Message ID | 20240129175251.10323-1-jose.marchesi@oracle.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp732035dyb; Mon, 29 Jan 2024 09:54:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmi7O02NpH6TmGR37kaci9bCtTm2sedSSzWQS1TJXkFXHsSAj6RH7CTkWRw5qcHdkEeidp X-Received: by 2002:a25:9383:0:b0:dc2:343f:cafc with SMTP id a3-20020a259383000000b00dc2343fcafcmr3073724ybm.128.1706550850262; Mon, 29 Jan 2024 09:54:10 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1706550850; cv=pass; d=google.com; s=arc-20160816; b=v275QJKaONsexNg426w875mKFooe4zOfUZR2h29mYTFigUEV4DKORZlBxrYLieXOKH 1gors35yU1T04/RhKrJJ9pCW93thWTzHsCYE2LlHervZTBZPC/DtgamBTrUGCDGQB9jk Uf34Y7lIzx/ItjvU8zFXygzjRsDbAmnlJK/sagfzVegtzIvrOQc+CoDI6zoXgSKkLB30 jQ1ZRIdbyDAb8fU46eC/ATOgCU4tKyCNfBtBJ+BYqFqpp6y22wjVUV6YkI7ppUYGYPyz X/qRXYCR5gx669F+G7UYS1OSIG2YGhmdrhRpn6VBJBu9ypaKFHrN4B7zuZI73Zfr5pCD EzZg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:message-id:date:subject:to:from :dkim-signature:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=ca9kIk47mUvEz/caaBijyv82BQ469KWIQ4hntYcrjGQ=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=m4izxtRNOYjLZVnxfiFpcTiM0Q2+yfoicekqJDl3EcLzSa/ipmMcRkcklZydt95Mlj +B120YuXikFZJqai4bEhd0FVBff9FVkuJ0OKjdSnFi6zKfZHhOOQcvfpfgP4pzh/Jtq9 4rbsUY1PLNQOZnpJGcdbnd6I14sCZUKI3geq3HGonOkEKQ9kQ4UJ9BID2sxKsrWwNXDW BmSwawCv9vOro3gbJWTdneqlzq/TvpDmfpsqR8M6AHljDCGgsq/QRROvPBIObuDB9Wz7 E9g2FLwaNhA29TyXlSWtLLKP4cjMFKu37XB3IxZZe5VLUGA753uZzkPoWTmcKzZd/5N9 3sSg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=EQGVDomM; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lBRwMw+M; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id o13-20020a05620a228d00b00783f1ea0652si4603404qkh.407.2024.01.29.09.54.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 09:54:10 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=EQGVDomM; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=lBRwMw+M; arc=pass (i=2); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9CE1385842F for <ouuuleilei@gmail.com>; Mon, 29 Jan 2024 17:54:09 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id A28313858D32 for <gcc-patches@gcc.gnu.org>; Mon, 29 Jan 2024 17:53:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A28313858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A28313858D32 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706550790; cv=pass; b=MLWU8rWpg2KLptG6dcrEXaXwFQzIuO4PUZB1KSX3dwJ6r5MBtr09yo2WnLsRXHKKw6d2osd9Mxjlp24PjLBhaRmbt23dE2ba/xDUmhmBxebp5PKbtNF30I0OWHoI6GXBO3dichmUVMSA9s0ZA+TGH1Edx++G+7zab8Pu/orv00I= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1706550790; c=relaxed/simple; bh=7N2opKDH3+i7DjWbXyuCbX03ugV3KzPtbZzMhN/fgGo=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id: MIME-Version; b=h7DbiTLEpdFDzhL6N4VBwrn3hTVLMDSB2S3BN5cqWxIYvQNu3ufElInt8V4pS12WH+VxVYbgp6N/ZEapy8cOcyOGC4W/+BvFO2TGsfcsmDaY/aEiEnDFj/WZy5LF3+5pdw5NtpBX87+dL/zRnrupPT90ekGwQsnPTA8TL7Mwjrc= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 40TGmsEC028164 for <gcc-patches@gcc.gnu.org>; Mon, 29 Jan 2024 17:53:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=ca9kIk47mUvEz/caaBijyv82BQ469KWIQ4hntYcrjGQ=; b=EQGVDomMNJycJQDKhwPmm/AnygsynWye1wzl/VXwwCZefEXFQkh2rAGWxW4j4Cb1OM/d vJ3naqfbVse8JsJly/ATjLiEWl+2Kk3BVqKl7RkdxgzrH+XS329in7PyYQTraIg5AULX CTOw3Vkx9p98JKOyplYfJz8owCY9EUHrD2Ri/ZFPVYviWHAmb1tWRh9VZNZfsNwWq9a9 am+QoM/o+TkrjHsyM3LBUv3XjEBvstSwP8PoJopZ7jgMRBCvlAO4AvMYx2+AA/KH3DJt g33uSukrHLBARlfeKoHocyYHVTiN+xp7+uyMLDq0OVfX6H7mfnTllcw8Dybsp70ib8O5 BQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vvr8echrt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Mon, 29 Jan 2024 17:53:08 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 40THegDC035372 for <gcc-patches@gcc.gnu.org>; Mon, 29 Jan 2024 17:53:07 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3vvr9c06jb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Mon, 29 Jan 2024 17:53:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hYRbJ/iG12Vl6wDiwkDl+Dgi4QPzD3V4SKDqbJ5zkFz6dYSMaLJVpmFqAGni4RkHmtZukhUMK/qTaLqzjv/Aej4AjiWdzb9WyX5RGXmemdYymgynhZeGeMsZkmD7ymLsPs+XThyw1bvdeVC/Vm0qxxpDDvqFX4f4Qi5dQa6Ym9znLP406ctjbikINHBfIO5bktfNy8PinMb7jw1LM+XfabyvGFyfD31+5pwXUtZeSLmUgFMbr8FJE3VE4Iqvqv1KYx1GUQ6OEkXHhsTsV2iCv1HpN1rs2y1PVAYQyJNfFiulryuik1mUuwqax6Uzb/27suupyFumcNvDfmaiIR5w/Q== 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=ca9kIk47mUvEz/caaBijyv82BQ469KWIQ4hntYcrjGQ=; b=KfJk49AQr3Z142/BMKgUG9LQThnBPKAXKwpP40SdSA/7cSgvsS1mVZTsK3ixoRb4Wm+DPfa2qTJ0kofNJ0J1x/KrfyQFijedt0AITHtNnnahb+t+eMtew70j8J6DUjbG2XpIg0mkUXshb9vlpdmSQujb6VhSo8ZhySAAyaET4R1omRgX0IwU0cwKny2iXlDgrV4M7skMdYYx5/3HpQJeUm4bU4VGOGzFu8z/wa8+OnMswvQEGQyMsTp/WWKaTSgf6LgyLvY82oyMaK9IDbQ7BbTEUdoj4icfH5XdrRC4TdTIcW+mVhbUp/R6a6DaB04rhrW+7WWP13sbAvRZhXCxkg== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ca9kIk47mUvEz/caaBijyv82BQ469KWIQ4hntYcrjGQ=; b=lBRwMw+MNh1WdQWYKlNuGEonSyB/I/dgmtlc6dhyQRWPCaA+sHNLsTClsZ2ogWLFr/JvzRYDoWTL1liOELqfGlE2M4Yfj0P/6SkQxIUYfTgQiA3Ua/VCPsLnKMot7pk9n5UwrYlqgDDVLst4Yy+0rymokz6lka+QdDrMzuvM3eE= Received: from DM6PR10MB3113.namprd10.prod.outlook.com (2603:10b6:5:1a7::12) by IA0PR10MB6700.namprd10.prod.outlook.com (2603:10b6:208:440::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.32; Mon, 29 Jan 2024 17:52:55 +0000 Received: from DM6PR10MB3113.namprd10.prod.outlook.com ([fe80::cafd:c8d6:e2c3:3a1]) by DM6PR10MB3113.namprd10.prod.outlook.com ([fe80::cafd:c8d6:e2c3:3a1%4]) with mapi id 15.20.7228.029; Mon, 29 Jan 2024 17:52:55 +0000 From: "Jose E. Marchesi" <jose.marchesi@oracle.com> To: gcc-patches@gcc.gnu.org Subject: [COMMITTED] bpf: emit empty epilogues in naked functions Date: Mon, 29 Jan 2024 18:52:51 +0100 Message-Id: <20240129175251.10323-1-jose.marchesi@oracle.com> X-Mailer: git-send-email 2.30.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO4P123CA0342.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::23) To DM6PR10MB3113.namprd10.prod.outlook.com (2603:10b6:5:1a7::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB3113:EE_|IA0PR10MB6700:EE_ X-MS-Office365-Filtering-Correlation-Id: 99c0f116-5a7f-4d4b-d4d9-08dc20f31f4f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uxdZfldGz3nauMH4eBPpM1DmsSEVLPL1/m3jBGB7o+w3FT6AY9Z0QhSjaB6B+PKH9caCcV08iM6sKKkEEzNGb4KOcJrsdhF4roRuQLkdEa6dtRTazee0agKRyQqCltcWyPtIr92j2h8lavb6VbY8MucYQXySML/CZqBxN53Y/qOU9GMIYqpqqTuiqxA/mULMvPJ5iN8UGkUW5UoChw15DRp1yminEtlrysrlGxbMJpneHb7B3FBVBZ1aeOxSdk+/uTFcvsYid3XdhMnfwzY5wJ1Px2dkRrkVwGKXbJicH6BW0QDC/XtXYqPRAhZR2ecadCRHTjcQGm6OytVjLfPFZNb4IlVvMcaKnZ29dog5zfKST+dYaRLe2VIKXx7PncHT+pH2Bt1kXxgBdIxzUROQRysyiwdpmuSTqSiR+CxwOcmNIhU/nc5PtJvKL2zyV8xYpdLZakFxh6VodJ7gL+UqUsyJQhKoHvh7mhcF4vpZxtvEsrwMcaZJQ+sap3KSJXwS/0fGgPXKQFM+EPZrJ7dKXeBQk0a6ONnibCfVkiUJgbWCnh3uEYdbAws6wQhB8Jp5pJZQcIjgY/qaOU/IsLlOsT+4ovuJZLfVxEVqre5R/3s= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR10MB3113.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(346002)(376002)(136003)(366004)(39860400002)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(41300700001)(1076003)(2616005)(6666004)(6506007)(6512007)(83380400001)(5660300002)(8936002)(8676002)(26005)(478600001)(6486002)(316002)(6916009)(66946007)(66556008)(66476007)(86362001)(38100700002)(36756003)(2906002)(84970400001)(41403002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qtl3gpJwIXAGY8FSZ44erNzqY2TiahrG0Sw1AMdD5PurLtk79sJgBJBjswFe945G+Wr6jy1W6cZsB1mmdBciq/eWzdrAyEIiDCwHgop0wvuPfFvBaOZt0Lr+oBHd92qOIrFhG87NW25NqzXguQui/Bman4thpZv0B6YqgreS7DFtNNhBL7ciG+RENKEDav+9MRG6zXiuGvQNJHX/31wyoQlXwFA8O7OwvZQRFFGjA0XHFaTanXCum7v55q6iYpQFoqZqh/HYnhjkqY8n6IjLS+apY2+T6+cSzQmknidpn02MgTgxQpyGCQrv4sULB38wpUkwkURSxuXMFBeC1+yhjoN+QXUhXUWF0Q/kOwznQuh0ujMIXhBiVu1RCTw5RLEsQkAeNDJBO7WqxG02oIloNgnyHCcK9kNS2/UJrUW8n06dptsEmxR2fEbh80fEyCBilDBxtA5gUDYiSTyB08yXF/ZS3tOsBB9LT31WgzPieuY1yR5AwlEjiuG0a/eBzPHEbzzIYmw04DMKyldexPyjFdONu9Ake6ETIt0IuDV+kV4jc+AWZ8F99pHupFgwGqAd6UPICZkzQnD7T6CtLSVy4PRO6po3uq1G4icWoU+FMRfRzIQcWw/YZ7AmK1PdCqjNP/eNv/8bsFU/J6NZ6nTbFU0nTY1hMHXfGyuzvn7pddVo5/UePh+uiktG9dRalvxohHuy0Qf1/Oi32LOYzH3xdenS6O3/jWZXAN+aauWcqBdJ0Ans+ystQ02JsMku3szUDqi4ll9UmaG2ZLmY/RxPpQrUyuXqa/+qsL18vvSkheZGVpQr26CIBpg/4Lz+qxbC1ZqToucgblcRBIa55NmW8c30RThEJ/GdHIb6Wh8X9pXmrq9dH8YZScVl6+nMZBhK0mRvWXB5rfIHFGELoASNkE4rbT5ZrIHPufVosy3dTAnRJ9fuL2hoX2o4aTXWnVM/xXXQcS9haA0eYLaDQ4vWXx0qex6beBwmb1q3wV0KBmwDVjGsYzrrSXl/gV4rM7JGCYMKSeVNZFWfbdW9xUwqaKw5bbYSc02pVij1Zf5JCDIu3i5n0B9sBrxxsuf9e/rP6CUG3dfRetZPfsuLusfUtHHG3gAL+WtvzoTLisMiKh2JquErohNT/uQFj1ah8RA5lNf9qJZTa7+2hF4tuvplQ6qNOPWef6mS7tCNxzd9Yp+EzFx5G/2CeLlA2XLYWAIdPumS2UJ6U8a9OjDClNi77PSBOGOgGqzaIdgzgQUqZNxfLRG2Niz2XQ33eXkvKKE8Ack1jm0LK42+Z7ykzRJq7Zt0A0btdfSsY/U+jpkms94oVptb9gcEmtX5W23o/WLnu5GSk9dgP/HJ4ibVoEHNeGobavFV/+JXUNzpM0DIPmJ26fImuSKSfunRoZ+TieP8NlaX0HcMRRTvZ4bt7APeFMFF3A5MVMz6P0YN6z2XQmBYzCGD3YHsLn9yV/jAgcSd8t28IhfCdEQJCJ9kqdtxzZISmnyzqZb+JeRfAasCnoJhYXn9hLusFCZYilQD6UWNBHTZemNyuITDIb37TjDdp4gG6j4V1+3Nk/UZRhZ/kB4MmNGltB4FXJloWzaipPID0E9Pzl2+fb+wM0fImm8VAA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Uea8qdJSHJJdxQm+NKsiGnCbyle+eKtLXiCJbJ2isVA/L96t4Gx3xzVjJjlnXQEm280RZYjZIEiOoBZzOh4qAGQCJaawFpP4sMYchHQyGHrHwVhbIDjCZQmSWwTHPCR93lXyjVM45nhQ14VrdI3ge2dBVXLK+z30ifmNXOLDy8RdHw+SG1nik2rSxc9ZbySEgIRuw/RUIlEk3bWGjB+FOAUNZYhbB6BLOFRIxUrWdQ0etScVGOkeofveA0t0m4KDozSQZqdCf31n/PEhdHU4BEK3wLagc3R/LuHTvoNRlEunbs1B1kWp+vOCBhe87nHhHSjlb/Zg4x9nNtb7Z9Yop0KfQOhs2AcmdWWnJl3aIBdKLspT7iSLaiIWCYAF7l25BhGqFqmnzFj/zHgANS6cBB/hhAmEkMTx+pKtR0RBqyQhOkxvuW0dWrKZ9ZLjCK1uw5tM1Rf0n+eC5n1cYIyjxodG9gCC+CIOdd9pMWr4aKY+wdXJpvT7FiXhc22noMB0AKk/NDH10WIbetvLXCNpWl5uIEPrID8dwcLnsNnzJ1Y5kIN5qyt5sCo/n/UNCtjVFd4dUwBQCYeQY0ciodqx+CpPQRH1igHpQLfPopylcRs= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99c0f116-5a7f-4d4b-d4d9-08dc20f31f4f X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB3113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 17:52:55.5902 (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: VfXukdC+zk8vxtAvdfBihCBIknlzys7q4hsrOB79fuF5tEXaBhdprK9HfUzgZ/uKO4QXkE7GgE7DWqSFmn1ZE9Dxv+WIbL9ZaGz+so8W9R4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB6700 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-29_11,2024-01-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 spamscore=0 phishscore=0 adultscore=0 mlxlogscore=672 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401290132 X-Proofpoint-ORIG-GUID: Ztwm0yzi2j_bzLMcx-AUJyo7aDfIxI8t X-Proofpoint-GUID: Ztwm0yzi2j_bzLMcx-AUJyo7aDfIxI8t X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789448264379442548 X-GMAIL-MSGID: 1789448264379442548 |
Series |
[COMMITTED] bpf: emit empty epilogues in naked functions
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Jose E. Marchesi
Jan. 29, 2024, 5:52 p.m. UTC
This patch fixes the BPF backend to not generate `exit' (return) instructions in epilogues of functions that are declared as naked via the corresponding compiler attribute. Having extra exit instructions upsets the kernel BPF verifier. Tested in bpf-unknown-none target in x86_64-linux-gnu host. gcc/ChangeLog * config/bpf/bpf.cc (bpf_expand_epilogue): Do not emit a return instruction in naked function epilogues. gcc/testsuite/ChangeLog * gcc.target/bpf/naked-1.c: Update test to not expect an exit instruction in naked function. * gcc.target/bpf/naked-2.c: New test. --- gcc/config/bpf/bpf.cc | 5 ++--- gcc/testsuite/gcc.target/bpf/naked-1.c | 1 - gcc/testsuite/gcc.target/bpf/naked-2.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.target/bpf/naked-2.c
diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc index 9af1728d852..d6ca47eeecb 100644 --- a/gcc/config/bpf/bpf.cc +++ b/gcc/config/bpf/bpf.cc @@ -420,9 +420,8 @@ bpf_expand_epilogue (void) /* See note in bpf_expand_prologue for an explanation on why we are not restoring callee-saved registers in BPF. */ - /* If we ever need to do anything else than just generating a return - instruction here, please mind the `naked' function attribute. */ - + if (lookup_attribute ("naked", DECL_ATTRIBUTES (cfun->decl)) != NULL_TREE) + return; emit_jump_insn (gen_exit ()); } diff --git a/gcc/testsuite/gcc.target/bpf/naked-1.c b/gcc/testsuite/gcc.target/bpf/naked-1.c index cbbc4c51697..dc8ac2619cc 100644 --- a/gcc/testsuite/gcc.target/bpf/naked-1.c +++ b/gcc/testsuite/gcc.target/bpf/naked-1.c @@ -9,4 +9,3 @@ int __attribute__((naked)) foo() __asm__ volatile ("@ naked"); } /* { dg-final { scan-assembler "\t@ naked" } } */ -/* { dg-final { scan-assembler "\texit\n" } } */ diff --git a/gcc/testsuite/gcc.target/bpf/naked-2.c b/gcc/testsuite/gcc.target/bpf/naked-2.c new file mode 100644 index 00000000000..25aebf84755 --- /dev/null +++ b/gcc/testsuite/gcc.target/bpf/naked-2.c @@ -0,0 +1,10 @@ +/* Verify that __attribute__((naked)) produces functions without implicit + `exit' instructions in the epilogue. */ +/* { dg-do compile } */ +/* { dg-options "-O0" } */ + +int __attribute__((naked)) foo() +{ + __asm__ volatile ("exit"); +} +/* { dg-final { scan-assembler-times "\texit" 1 } } */