Message ID | 20230920230401.1739139-1-indu.bhagat@oracle.com |
---|---|
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA4643860763 for <patchwork@sourceware.org>; Wed, 20 Sep 2023 23:05:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA4643860763 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695251104; bh=ZtJCbin2Ec/dAL41FMG7e+RToXGghD8xf6bSsdfKqjM=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=WqTudUelql8qXQRqSIHBokCMrZChUKiqZgMyh7H/tham32n7dNjLuUtre1gNqIBgB sFRH8Vmyx7etUqmvM2oAr76fTpyqMMs7btkk0fs+MP1AI8XopkObTRFCXGmUIr2RMs UFOcyKYrWua7fWdBY8wdeFceZH/zlwUhqO2JGVcI= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 9799D3858C54 for <binutils@sourceware.org>; Wed, 20 Sep 2023 23:04:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9799D3858C54 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38KKJ3ra004048 for <binutils@sourceware.org>; Wed, 20 Sep 2023 23:04:30 GMT Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t53530jy6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Wed, 20 Sep 2023 23:04:29 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38KM5ipv030244 for <binutils@sourceware.org>; Wed, 20 Sep 2023 23:04:29 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2045.outbound.protection.outlook.com [104.47.66.45]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3t52t7rd8s-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <binutils@sourceware.org>; Wed, 20 Sep 2023 23:04:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GAVKLggVdBjzinhuJRAJ1wy4hUBhjdey+H7MrjIWnn8lGh0DX49XUrrILoGNfTFzPy+aY09boHpjRzU4I+gqzUL6m/Hgnk9IV83rg03nDWK2JcnifeXVc7ir78zwW5Dm3mk6spSNLC0s4fHZoDJMoTtuTnPXmdef9T6hO13XImMAgbj8mBlM2Zi3KkyDXCe0Xw+AtHRZ03MdK4qZXM+rU5ZpbD4/KIjmjd7S9NdXwKtCVfe+I12dH3cYwx+G9Kynd+PQfSLuFC6LORrZzvBVOPiGH9DntQ18hwNuoI+L8TEcAIm2Cpr4GEcT8fKruuA1FM/DBDJG0bMlJtgltqmIQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZtJCbin2Ec/dAL41FMG7e+RToXGghD8xf6bSsdfKqjM=; b=frLTxw1FkAbMok3/45YeazI61rMVzj/YqLlTzzEEAIq2bPkB40QIEjQkmV9U3WUCWU9vLaf2sRGFORgNimntapssQgGimWPyt1FVHrh7Sla6DXThYJibtPhsOGTwyoUyQ/EsCdLBOsUtVgX8/GEwoOkAOE1c7WgTyhQsVZykPf9K4faKhdQKxMIqAeXnuSx/CR4Sg8Kj2Z3GZ/jpK0dZUu/8pMqVdY1OoTgvwBC8mzVwpFqrhHXqHLge/f4lJdyiETv96tZimyfnmhv57w2GlNC6LhRMQinXAexGZ+ar2+QcHefrE1XsLUyFTkk8xSra5DsldD2XTXBwDfYR2j3U7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by CO6PR10MB5553.namprd10.prod.outlook.com (2603:10b6:303:140::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.38; Wed, 20 Sep 2023 23:04:22 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::44f7:ba76:db28:606e]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::44f7:ba76:db28:606e%3]) with mapi id 15.20.6813.017; Wed, 20 Sep 2023 23:04:21 +0000 To: binutils@sourceware.org Cc: Indu Bhagat <indu.bhagat@oracle.com> Subject: [PATCH,RFC 0/9] SCFI implementation in GNU assembler Date: Wed, 20 Sep 2023 16:03:52 -0700 Message-ID: <20230920230401.1739139-1-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.41.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW2PR2101CA0004.namprd21.prod.outlook.com (2603:10b6:302:1::17) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|CO6PR10MB5553:EE_ X-MS-Office365-Filtering-Correlation-Id: 70b646e3-f9aa-4b96-60c9-08dbba2ded17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6Xdvq0lniYehreDCNEqeKPV/91fjI6i65AakHFqZPhdIzbBAVUhUoqhi23DbWNUmmWg/y8v5GMwQ8NdlDE5Xyysh30/2HX8y396HxSnTHtASrcbhQCYmadMZhCOyONdLrd6jFcxCZweYbDSvLoiNzcWpazSj0P5/UkT9gvAI9DUbMP+rgKJivDtiShSw/fT5xyYIBIdFZqNdtzF8tqefQZus3rrhTR0EJ1uGzsaQbmKi+K4RmdE8+X0iJJMJAwmk6lb2ckJMKxi/i6isfRHWYgGpMRnFo4h4kod0Y8UOzYGctY4x43TzBkxZMCJxjRmtirbwLdjIc7HzvU4WrGGsSdBynwynH2n84fBK74EFgiI8JxUuivHIS2zwNy2z0VoknK3CLM+U4OBrLH2pVkpI4kamqPagDKocSB4+ngYxlK68kdbtYVS9SuBWCxK2ghsvY99lxyvGS81h4KYz4I+gdOSqihnR5iI5rT+5efjS3YHbNwdpRYonOi3xmh3CSFA3tT0VtUQQVCXXSj97suqfauEPu4s4U2yaGCcp/GB2PwE= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1001MB2158.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(346002)(376002)(136003)(366004)(39860400002)(396003)(451199024)(186009)(1800799009)(6666004)(41300700001)(8936002)(5660300002)(8676002)(66946007)(2906002)(316002)(6916009)(38100700002)(66556008)(478600001)(66476007)(86362001)(4326008)(44832011)(1076003)(83380400001)(6506007)(2616005)(107886003)(6486002)(36756003)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-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1IlLQgrFqHZ2t0bRwb2NgvP8qBbPaEYS257/dEk9i6j/4J3dKdAeVQzHnhhPyz3g4KbZGSbCgFYj0/Pm11nQh0GjOO+97mFeBcPr3XGDIP8p/pXB0B6JZSVqOybKRedrDHNFjAzpdttiFpGM8+RffMXhKFkx8qFee1XpFLOI4n7SR3o87xazEjYNTw1nhvSDaaAX2XFMvy2cxdPqx2342T42x6mbgarU/qvu00524VJqfJCii7Nr7240F5wdrviDsN7WSNxHjSJRUrgc3OSjNIsAOXGliFoggD5aWp9c1nbTeExsm6gRwF+eo4vbg3SsYfQ+8LgVX8wf+em97Au3ciES5MiY4IJ1MpEnPOpW3TE/1EuzNPalLlUY0Ng== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70b646e3-f9aa-4b96-60c9-08dbba2ded17 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2023 23:04:21.8921 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 43Xy7F6FU2K827qs3pFkOa1zWSurccCv4F7wfF+kndo4kjWAysxn0zcHXTleX1vZiIpt2NQmuZiDqg7kF5/pjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR10MB5553 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-20_11,2023-09-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 malwarescore=0 suspectscore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309200193 X-Proofpoint-ORIG-GUID: gdq3KZKp6OxH7sJlkbSK3msG-d67qu60 X-Proofpoint-GUID: gdq3KZKp6OxH7sJlkbSK3msG-d67qu60 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPAM_BODY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> From: Indu Bhagat via Binutils <binutils@sourceware.org> Reply-To: Indu Bhagat <indu.bhagat@oracle.com> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org Sender: "Binutils" <binutils-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
SCFI implementation in GNU assembler
|
|
Message
Indu Bhagat
Sept. 20, 2023, 11:03 p.m. UTC
Hello, This is an RFC patch series for the implementation in GNU assembler to synthesize CFI, a.k.a. SCFI, for hand-written asm. The motivation for this work is to relieve the users from the need to manually add CFI annotations for most hand-written asm. Manually adding CFI annotations to assembly programs needs additional expertise; human-errors are possible and indeed occur more often than one may like. These errors, if present at the time of virtual stack unwind, lead to unfavorable outcomes: incorrect stacktraces, program state corruption etc. The implementation is in progress, but I think its a good point to get some feedback. We will also be talking about this at the GNU Tools Cauldron 2023, so one more reason to share the current state of the implemenation. For further details on the design and implementation, open issues, and next steps, please refer to the notes sent earlier in a separate document (https://sourceware.org/pipermail/binutils/2023-September/129558.html). The first two patches are orthogonal to SCFI implementation, but do provide some sanitization of interfaces so that the SCFI machinery can reuse the functionality in dw2gencfi: gas: dw2gencfi: minor rejig for cfi_sections_set and all_cfi_sections gas: dw2gencfi: use all_cfi_sections instead of cfi_sections The other seven patches pertain to SCFI implmentation. The SCFI implementation is enabled only for the x86 backend at this time. Thanks, Indu Bhagat (9): gas: dw2gencfi: minor rejig for cfi_sections_set and all_cfi_sections gas: dw2gencfi: use all_cfi_sections instead of cfi_sections gas: dw2gencfi: expose a new cfi_set_last_fde API gas: dw2gencfi: move some tc_* defines to the header file gas: add new command line option --scfi[=all,none] gas: dw2gencfi: ignore all .cfi_* directives with --scfi=all gas: scfidw2gen: new functionality to prepapre for SCFI gas: synthesize CFI for hand-written asm gas: testsuite: add a x86_64 testsuite for SCFI gas/Makefile.am | 6 + gas/Makefile.in | 18 +- gas/as.c | 20 +- gas/as.h | 8 + gas/config/obj-elf.c | 8 + gas/config/tc-i386.c | 646 +++++++++- gas/config/tc-i386.h | 21 + gas/doc/as.texi | 5 + gas/dw2gencfi.c | 114 +- gas/dw2gencfi.h | 14 + gas/ginsn.c | 985 +++++++++++++++ gas/ginsn.h | 347 ++++++ gas/scfi.c | 1090 +++++++++++++++++ gas/scfi.h | 31 + gas/scfidw2gen.c | 185 +++ gas/scfidw2gen.h | 35 + gas/subsegs.h | 2 + gas/symbols.c | 3 + gas/testsuite/gas/scfi/README | 11 + gas/testsuite/gas/scfi/x86_64/scfi-add-1.d | 25 + gas/testsuite/gas/scfi/x86_64/scfi-add-1.s | 13 + gas/testsuite/gas/scfi/x86_64/scfi-add-2.d | 36 + gas/testsuite/gas/scfi/x86_64/scfi-add-2.s | 43 + gas/testsuite/gas/scfi/x86_64/scfi-bp-sp-1.d | 31 + gas/testsuite/gas/scfi/x86_64/scfi-bp-sp-1.s | 22 + .../gas/scfi/x86_64/scfi-callee-saved-1.d | 40 + .../gas/scfi/x86_64/scfi-callee-saved-1.s | 26 + .../gas/scfi/x86_64/scfi-callee-saved-2.d | 41 + .../gas/scfi/x86_64/scfi-callee-saved-2.s | 42 + .../gas/scfi/x86_64/scfi-callee-saved-3.d | 42 + .../gas/scfi/x86_64/scfi-callee-saved-3.s | 40 + .../gas/scfi/x86_64/scfi-callee-saved-4.d | 40 + .../gas/scfi/x86_64/scfi-callee-saved-4.s | 55 + gas/testsuite/gas/scfi/x86_64/scfi-cfg-1.d | 36 + gas/testsuite/gas/scfi/x86_64/scfi-cfg-1.s | 47 + gas/testsuite/gas/scfi/x86_64/scfi-cfg-2.d | 28 + gas/testsuite/gas/scfi/x86_64/scfi-cfg-2.s | 21 + gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d | 5 + gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s | 20 + gas/testsuite/gas/scfi/x86_64/scfi-diag-1.l | 3 + gas/testsuite/gas/scfi/x86_64/scfi-diag-1.s | 23 + gas/testsuite/gas/scfi/x86_64/scfi-diag-2.l | 3 + gas/testsuite/gas/scfi/x86_64/scfi-diag-2.s | 28 + .../gas/scfi/x86_64/scfi-dyn-stack-1.d | 23 + .../gas/scfi/x86_64/scfi-dyn-stack-1.s | 50 + .../gas/scfi/x86_64/scfi-fp-diag-2.l | 2 + .../gas/scfi/x86_64/scfi-fp-diag-2.s | 55 + gas/testsuite/gas/scfi/x86_64/scfi-ignore-1.d | 26 + gas/testsuite/gas/scfi/x86_64/scfi-ignore-1.s | 13 + .../gas/scfi/x86_64/scfi-indirect-mov-1.d | 51 + .../gas/scfi/x86_64/scfi-indirect-mov-1.s | 48 + .../gas/scfi/x86_64/scfi-indirect-mov-2.d | 41 + .../gas/scfi/x86_64/scfi-indirect-mov-2.s | 38 + .../gas/scfi/x86_64/scfi-indirect-mov-3.d | 41 + .../gas/scfi/x86_64/scfi-indirect-mov-3.s | 38 + gas/testsuite/gas/scfi/x86_64/scfi-lea-1.d | 37 + gas/testsuite/gas/scfi/x86_64/scfi-lea-1.s | 40 + gas/testsuite/gas/scfi/x86_64/scfi-leave-1.d | 36 + gas/testsuite/gas/scfi/x86_64/scfi-leave-1.s | 26 + gas/testsuite/gas/scfi/x86_64/scfi-pushq-1.d | 35 + gas/testsuite/gas/scfi/x86_64/scfi-pushq-1.s | 24 + .../gas/scfi/x86_64/scfi-selfalign-func-1.d | 31 + .../gas/scfi/x86_64/scfi-selfalign-func-1.s | 36 + gas/testsuite/gas/scfi/x86_64/scfi-simple-1.d | 26 + gas/testsuite/gas/scfi/x86_64/scfi-simple-1.s | 9 + gas/testsuite/gas/scfi/x86_64/scfi-simple-2.d | 30 + gas/testsuite/gas/scfi/x86_64/scfi-simple-2.s | 16 + gas/testsuite/gas/scfi/x86_64/scfi-sub-1.d | 25 + gas/testsuite/gas/scfi/x86_64/scfi-sub-1.s | 12 + gas/testsuite/gas/scfi/x86_64/scfi-sub-2.d | 31 + gas/testsuite/gas/scfi/x86_64/scfi-sub-2.s | 23 + .../gas/scfi/x86_64/scfi-unsupported-1.l | 2 + .../gas/scfi/x86_64/scfi-unsupported-1.s | 10 + .../gas/scfi/x86_64/scfi-unsupported-2.l | 3 + .../gas/scfi/x86_64/scfi-unsupported-2.s | 14 + .../gas/scfi/x86_64/scfi-unsupported-cfg-1.l | 2 + .../gas/scfi/x86_64/scfi-unsupported-cfg-1.s | 53 + .../gas/scfi/x86_64/scfi-unsupported-drap-1.l | 3 + .../gas/scfi/x86_64/scfi-unsupported-drap-1.s | 75 ++ gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp | 59 + 80 files changed, 5311 insertions(+), 32 deletions(-) create mode 100644 gas/ginsn.c create mode 100644 gas/ginsn.h create mode 100644 gas/scfi.c create mode 100644 gas/scfi.h create mode 100644 gas/scfidw2gen.c create mode 100644 gas/scfidw2gen.h create mode 100644 gas/testsuite/gas/scfi/README create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-add-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-add-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-add-2.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-add-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-bp-sp-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-bp-sp-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-2.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-3.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-3.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-4.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-callee-saved-4.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-cfg-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-cfg-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-cfg-2.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-cfg-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-cofi-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-diag-1.l create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-diag-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-diag-2.l create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-diag-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-dyn-stack-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-dyn-stack-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-fp-diag-2.l create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-fp-diag-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-ignore-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-ignore-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-indirect-mov-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-indirect-mov-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-indirect-mov-2.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-indirect-mov-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-indirect-mov-3.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-indirect-mov-3.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-lea-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-lea-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-leave-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-leave-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-pushq-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-pushq-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-selfalign-func-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-selfalign-func-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-simple-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-simple-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-simple-2.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-simple-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-sub-1.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-sub-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-sub-2.d create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-sub-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-1.l create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-2.l create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-2.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.l create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-cfg-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-drap-1.l create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-unsupported-drap-1.s create mode 100644 gas/testsuite/gas/scfi/x86_64/scfi-x86-64.exp
Comments
Hi Indu,
> This is an RFC patch series for the implementation in GNU assembler to > synthesize CFI, a.k.a. SCFI, for hand-written asm.
Overall I would say that this patch series is excellent. I have posted
a few minor comments about specific items in the series, but as a whole
I would be happy to accept the patch series as-is.
I would recommend holding off on adding the support for inline assembler
for now. Get the basic framework into the source tree, wait for any fallout,
and then when everything is settled, start extending the code.
Cheers
Nick
On 9/28/23 08:01, Nick Clifton wrote: > Hi Indu, > >> This is an RFC patch series for the implementation in GNU assembler to >> > synthesize CFI, a.k.a. SCFI, for hand-written asm. > Overall I would say that this patch series is excellent. I have posted > a few minor comments about specific items in the series, but as a whole > I would be happy to accept the patch series as-is. > > I would recommend holding off on adding the support for inline assembler > for now. Get the basic framework into the source tree, wait for any > fallout, > and then when everything is settled, start extending the code. > Thanks a lot for reviewing. I will address the review comments and test out the implementation a bit more. I will send an updated version soon. Thanks Indu