From patchwork Mon Aug 19 14:53:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13768475 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC044170A20 for ; Mon, 19 Aug 2024 14:53:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079218; cv=fail; b=mkkl0w3B+35Aa+bdj7wJYGpv0GCD1mOYGBTWtr7C4Q2oHklSsQGy62sjcoKGQc7seeSdPzRvcE4gmqfeU6gOJQHU7LUZJ923hISD0EpwoLKKH36p+HMfMVTti+n/zgeLgiVOzm01hqOareqaTjkD2ha528EDJwMJTfkNmkeRYcM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079218; c=relaxed/simple; bh=GTWa1hKf7k5UJLxW58olFcXgwQNBigF2HvpWl9ZD2tI=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=FB5PzUt6aQUuuDE5DuGM+aVgWQIG2ludkWfpqEOP0FRbvIy4TJzJQ01P0QES3ke9zFsyQvDCPSRZ8+WXa8jLbVA1YuFPJq0YIxh8MX+PY0wq7tdtWoSuPt/VPsOrXjGxHS6JpN3jLdpRihkhSoLC2nzgb1BKQV1HgqtgR2ICSRw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=AtS/erPo; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=dKx3QCyO; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="AtS/erPo"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="dKx3QCyO" Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47JD6xLs019063; Mon, 19 Aug 2024 14:53:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:content-transfer-encoding :content-type:mime-version; s=corp-2023-11-20; bh=dAr6G6+qH7OZf6 yq00niXLOhaRSRaiMX8QLUJxbWuKg=; b=AtS/erPo9UQupEYy9WX3AhpBLTSDW4 LjIEMQOmERMDm4vIWlO4gFQlwpmpoNuDQKGuMwJ55oBTMKPvnFnvscGor9Wt56xI dovXGZv4wKtILoQM2llrKoMLvt0zDFQ0enesp4+f19jlad1DbOtLWSQakhcHngrR KdeUjikADgGdUqMU3AlFvIG89bm1bW6BAVR3zE2rcEB5y1HQr8Jy7m8UP7uSzRM7 d9Cddb4hnGcvo5UkXa0IoyGKQY88sv8IelWNeIanxKOkDutW8MQGAcy/mffrz/OF FC7CG5b1skHwyldiP4OPVQMgvZhSeHr+dGOBb3m0vmZA3mHqoEV/EbXA== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m3hjsb4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:17 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47JEbIaK037794; Mon, 19 Aug 2024 14:53:17 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2171.outbound.protection.outlook.com [104.47.57.171]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 413h5s6shs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wWUmm05rsAQ8+gbWQ+Y4b7tO+j4i9x3QmrGvblb8cpYQ5XbwUTeRBcMYOAwQjQCwEFCNRHgA6oT3J6xdGnLeBSVI4ITJr9cvqdAeULazm+/P9yVzWPskvbGloa3XG9LlUHUc9xSqAkY8HGPf1ASyjDOXFPM2uVt39IdgWmLoajKdn71Fgnkd0TG8vQOuQjVi1fJVUKEGDAo26urMYeuNrAxjYXRE78PnpTYjvJQJrREaTooxXNimkR+6O4jNKYF2oNBnWAR88bqq+jnALrjA+CWX4zI2EAPdEeJcw1RRVAyXJVDt7p7yWFoDJhN+8CWFt/9BqfVZnwbRHbn5enpEaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=dAr6G6+qH7OZf6yq00niXLOhaRSRaiMX8QLUJxbWuKg=; b=SRo54dJuQchOk28U4ddleZiu3gSc/ApZM+pOApBn5+coeEPKuvXj32oPXvsvRKbwZ3ukE4WN5yqRKiL1U+Bk1+kil9ajY9cjBrUQUUJslhYfJirpD9EuknVi+PdUb/h2WiDd448EPlrZp6+K7UdQhjn+0YJtNczneboODw46Vng8S6ehN6wMqfhbxbtEQyxgsxD2wGzLPDNwnIZznPU+UCMH5yxVaYe200eVYWOLbkIwIhPTUVNZ3MlWpnsDCkzdNQv36zatKvZ6Ene5WMsjCMC90aOA5BIGKqYzcNq5EXjakv3yao0yJR0KhHe0/ZhviCNUw/LkzYMGgVTLCEzEMg== 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=dAr6G6+qH7OZf6yq00niXLOhaRSRaiMX8QLUJxbWuKg=; b=dKx3QCyOh7i11X2cunXgNMg2LCKNTZ7Qsiv4ZD2tKN++Ahzk/gNkrD9QZfdK4DgsbOzFj8LpGPC5vsNO4IzYZ5LiajCwxIDAxBvgIFGkwQAmbqExjE3UOTye8Bd/OOOyg8irfHnPuARvAiRA0TcKZQl5oXURUdB7U8kgRxU+nZ8= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by SJ0PR10MB5630.namprd10.prod.outlook.com (2603:10b6:a03:3d2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13; Mon, 19 Aug 2024 14:53:14 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb%2]) with mapi id 15.20.7875.016; Mon, 19 Aug 2024 14:53:13 +0000 From: Cupertino Miranda To: bpf@vger.kernel.org Cc: Cupertino Miranda , Eduard Zingerman , Andrii Nakryiko , Yonghong Song , Alexei Starovoitov , Jose Marchesi , David Faust Subject: [PATCH 1/3] selftests/bpf: Disable strict aliasing for verifier_nocsr.c Date: Mon, 19 Aug 2024 15:53:05 +0100 Message-Id: <20240819145307.1366227-1-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: AM0PR10CA0025.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17c::35) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|SJ0PR10MB5630:EE_ X-MS-Office365-Filtering-Correlation-Id: 29132785-fb76-423f-468b-08dcc05ea664 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: U2C91QLGT4Tq2aqAGFpY+oG3n0GMNFdsyVThD6wvQAPf90PUcjKUHahofT1ZInJG4zpHxcjvxmBjThe/8YNzwZpymmZnvtbSUQE3CKLM3AYBR6JYKPwXJu9iUMDzGBLmxGjRZBQYYz6IPDI4WuPF0j84blMVwzFfAKTFpj2KE53iV6CTT7iabgX3j9edW2GeLoGtiEMUXICkdrUmz8FjN3Vlaa+mkEVFvs28qJybt5MLA67AsY6pxWebAQUuO7vTrF6gTRYJfNoJRN8HdTReBKzp3J61zdWwep6TDff+5nwFlZeFzSQu8V8ZfEpLZ10hqnd9MDQsP3U2YanXBH5LdA+DvredvULG9f7uPpEQW4SmlwqFjeTgjO5LsEjQ6/V9asdokJbzTLN4CXEcGovCyOhz7enM9gRbfKRDtqCAkk1z2pWFM3LIidaY4ssNS6NjewiRLZ0JQ/ONOXvOr8IFdw09W5nvQy4RlrNFp91uTJk7AJ3xEVReyJk76nEAXENdCxMs1LWm2S9BZMcbDWa3faTJ4uz6nrtTP42lIZ0FmZH48i3DyOIF80j4ELQAS2mLkp40PaX5cChShWJddVE8HpBgspmPxHB0SUKHGwsxixeDmj29cYjH+v6mVrkqOog7Lqecm5ggYUJOSi+m2MuiCwRYzgq5ZnEd2rmxJ0X+2hv1AapMWGxZfmZ6aGe4uq8yayNmU4azpwe6e1uEFK4q92b58fkcQ07HvErqR3BsBHH6Z4Va3Gd4jxrmN0LapmumoiSs579YZv3Ybls2ZI7Z50F558Um1/hlYNQSq2Fhjm4It86lbtGf3Mav6Win48Pen2YUSS0Oue2UL/kU8p24xNckkITfSvp1yfsxuLQvT+liCdsjinkD5SreJ4uAH2AwoAOezh7EAkrR8rm0ffLNvL+AZaEs5HUFOrpYu6X2malgOW4OXaQIqE/gH5+p9j1dIYRDxDTFfORDqx0hARVjxuGM9Jz7dYCSeF2m91pNCt6PY/mLBuyiDw7fT2P688kuCnXo6hJmnvbEaPI/VBSV+aluKXwbinVlVw83eF84/n0vqn5ZHUhqmwFbHzZKXbBYT/9o0E7PwHgQzYzUQvCf2A1IgJHZqsB3FgotcSK+do6lF1hUvUI9BvOqvd0qJNFII/d6bFMwSRKRaCdgjiab99t2vCWYnJRRnWLcuUtp2GnlCv98WQChh23Xpqh+fvfOf0Onqso/SrfpvxwJIi1hgw52CSqcjoxcFQOD4aB4Kn60wmnB0e7cXmg5L1zWb9vqd/sog3o+/20oiFw3d/kCqASkLkFSZLcXhR+DFNMTT7tO9Do/UpKLxHpo7u6rhA5B2pE6Fgu/93SJJVui3sXnww== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR10MB4382.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-Mess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TlCEM2JEyEBlY21Ks+Fw2oU9YzClJLUzy7hsrw+8NYTYyg+k5jAiBbZG6Oub/ng/bXYWY0JA92T5fv1OyjP7xqFSG/S0udgc+lJdyeaSZnYJ1/8F0+1RWtCzMZb3kDeonRDtGG8n1zGZPBOjSK4E5khQi1W5QdyWJkzZhVuixO8ms= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 29132785-fb76-423f-468b-08dcc05ea664 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 14:53:13.3742 (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: sx/69v7vEtjSin/HD9tsxulgoOdizM75aczO+kYzkUJ06BiKv3owFhmSSlt4e5ZYMmQYMJlm8KdZiRWR2+SKT+mWIT3bBBt06T0xiztrW7c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5630 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-19_13,2024-08-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 mlxscore=0 spamscore=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408190099 X-Proofpoint-ORIG-GUID: 2fGs-nnZo-kuaplVBokJBFUEL3VFHYMu X-Proofpoint-GUID: 2fGs-nnZo-kuaplVBokJBFUEL3VFHYMu X-Patchwork-Delegate: bpf@iogearbox.net verfifier_nocsr.c fails to compile in GCC. The reason behind it was initially explained in commit 27a90b14b93d3b2e1efd10764e456af7e2a42991. "A few BPF selftests perform type punning and they may break strict aliasing rules, which are exploited by both GCC and clang by default while optimizing. This can lead to broken compiled programs." Signed-off-by: Cupertino Miranda Cc: Eduard Zingerman Cc: Andrii Nakryiko Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Jose Marchesi Cc: David Faust --- tools/testing/selftests/bpf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 00bde031a469..ded6e22b3076 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -58,6 +58,7 @@ progs/test_pkt_md_access.c-CFLAGS := -fno-strict-aliasing progs/test_sk_lookup.c-CFLAGS := -fno-strict-aliasing progs/timer_crash.c-CFLAGS := -fno-strict-aliasing progs/test_global_func9.c-CFLAGS := -fno-strict-aliasing +progs/verifier_nocsr.c-CFLAGS := -fno-strict-aliasing ifneq ($(LLVM),) # Silence some warnings when compiled with clang From patchwork Mon Aug 19 14:53:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13768474 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6C4416C6A0 for ; Mon, 19 Aug 2024 14:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079209; cv=fail; b=EoyhJopwHC4HF5slllMooz8LA+8HA5q+P4lnMo6yrHSgnHoy0CP34cE78PGe1n8FNo7b/LPv5yGYQ1yvDOTvr/p1Mq6UWMpwsowapQHuDiipptnfXhbQIs/h+N8Z8YORU8tvIpcc6y8cBIsy8PnWzIYTbMx2yXwQjugONHnboBI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079209; c=relaxed/simple; bh=m4ukiOGIsibsa9KJM60XGEwJE/KeekEJsQYaff9RJug=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=TiuqozAr3kMtxjUiAB14SLOpi0PdpKKLCL/wTFH7BC00l9NJPFDY/MjeaFARbi4HLWoteaQgP6s1p80IDFp3ppSp7fl04zW/EjeLlcnSDu89Li96DFFe3Jhq7B/vIGjDlKBUfCC22mk6gnzkfLKhJl6wCPPbbmO8zuo2SRpB1BI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Lb1LCVjE; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=OdJLqTmL; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Lb1LCVjE"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="OdJLqTmL" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47JD6ujP003650; Mon, 19 Aug 2024 14:53:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=Z35dEbfkB2VTX7MJTmShyELW5+GJMSHjFCMRfNFiARE=; b= Lb1LCVjENCR3pDlyMX8iaylIdB42brXtQ+NmLSvtAL5zALyZ83IfkIspW9f4TxW/ JW6nYGW7uqRob8nBl4hWJUrtDnUdtiUlSDdJV6zr2DSVg8ZidOV691AhsLHLcw+V R4Z0XtXh8x1BUlXNKoV3AFwmwYMr+Aw97s1u1WHa7H2aWpXr9UGvxzEeG1iihAKD 13aLqYYO6GObXIaOqSZ09dNrq24WnFPGVwd89d3MUQpQzmlIdvi1mJjOLbsnneyY 6Y8Zz9JaLnh8QZSvyBmgsNHP3SxtsgvkzTLcckepSVubvtumTjo95OGGMGch33Vo ncbFxZcrrt4zi/NRuZLGVg== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m4utt8a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:21 +0000 (GMT) Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47JEbHb3018978; Mon, 19 Aug 2024 14:53:20 GMT Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02lp2043.outbound.protection.outlook.com [104.47.51.43]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 413h4266bx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QlL6vDvtez4TXqBBrF15yPXArU3LQp3RA4lJrvjJyT+F0qSsfV3vR6Rb7EcDPYTKUqKSy+q+eJbljvk16ZByxw6EXgTH9e1LJyHX2PMWP0DdWWHLuAoTVZ4BK3EOEL/ovweIwWbCMGsP0j73+xDvmNPjUshk9Xq9yTwuYLJ4frWq5HVE/0uTCXUgpG8HIMXscMRMvu10983LmWYTy1vE3eLFzuHb19keREdNM2wDt89xArn+JedOwZEDoPafK6UCdZxwokuzMC3T+0UkJWaafsYxfRkahaxq7PW0BE4EaIDEVHkJMJUgy30MMUKX+1hN7pqx8MJCsW48O19qKrDNng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Z35dEbfkB2VTX7MJTmShyELW5+GJMSHjFCMRfNFiARE=; b=NMvzwhs4gKDC2llerBPTBIH9F6NUulzirXBqHtIUwW5GJPG9z5P3nZCOatAY5yiE7PVvC8F2yG++61OaPZblrxazQs4UQw/iydmfp3MkcGDDXZHj94dFDZ7hiru6aEW+i5488pFXSy31yfeZX9GMJlUPpyKzmfaVkJRTKNSO+yMXzLxul/KVKQNh1mfD+HO4dQmxNGJw/EsQRenb1xE42vYRa7rCdXLmPU3zZJko7KXpg/vZ4pS6h+3e9PjcaktB+lP7cxl+Ccwnt2xcGSG7okKE59RVUyZPfc+3uc2hObgGFdj0MKOWLzZ9xZYVavvS0a99lBfKGbyF/YuGcRlhwA== 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=Z35dEbfkB2VTX7MJTmShyELW5+GJMSHjFCMRfNFiARE=; b=OdJLqTmLajo42f4tgypGnAriIXdxo0d/2sXmjgbsLqg92sP6al8zeuPOOFQLfsSoHP4AtWSmluVKPv1QuSsFhtwHmtq2EMGMxiL35byvDgmGKOPvWRUV1/8zfsue5jyv4u1ybXKL2xcRl67tCRbvVhB7RdxoOXvPXntImfuXFpQ= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by SJ0PR10MB5630.namprd10.prod.outlook.com (2603:10b6:a03:3d2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13; Mon, 19 Aug 2024 14:53:17 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb%2]) with mapi id 15.20.7875.016; Mon, 19 Aug 2024 14:53:17 +0000 From: Cupertino Miranda To: bpf@vger.kernel.org Cc: Cupertino Miranda , Andrii Nakryiko , Eduard Zingerman , Yonghong Song , Alexei Starovoitov , Jose Marchesi , David Faust Subject: [PATCH 2/3] selftest/bpf: _GNU_SOURCE redefined in g++ Date: Mon, 19 Aug 2024 15:53:06 +0100 Message-Id: <20240819145307.1366227-2-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240819145307.1366227-1-cupertino.miranda@oracle.com> References: <20240819145307.1366227-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: AM0PR07CA0022.eurprd07.prod.outlook.com (2603:10a6:208:ac::35) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|SJ0PR10MB5630:EE_ X-MS-Office365-Filtering-Correlation-Id: 99a33d83-9593-4a9d-c7d9-08dcc05ea8e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: pU80UHipWhTuilLxztYSraYmn7iwnmqXaaNxPrkaW4V3XQHUPYaabSU3rOZoYupzByAFgCXVgXpjjrzFQbLeBrA0Evv2bm2WI+pr+CeVttQa0EoyUHKzzq2ZkIMhpg9Pnq4oxeyTAZPwcl+HLS+yzdZIxKEDiX+d4upqv7rpms/Xq9QuSuNdKi8oMQcR01ktfZFHN+XGeNOOLR3BXWUqikeybzVOiYeGsawter6crnnlzh+O7ZZ1LyPrzrt3cOZvzEwzXnD5h/dyDAyXexQRhiQymYjv16JyqBWTmdJ9AdS+4Ipt4mGE1C8vq0hfIVP57Wi7CAMyApWcCxTkMZirmKSbFZ3yKBg9EeYmelRx6UUa59cJoN7mIbjfALgxbuNy354ls7mOGs7tcdg9zTwtSM/ft9NY0q2aeU1l837fKos/giN8h3xlcGdV0+l7MjLxo1ZWIEOLlF1b9cvQ12rNXVuXoOqACn+HoSJ9gMrJ/63ONfd1e+sHKE8hmxb5SZExL2OKOOFpMz3FTq1M68Lnv8zeNObuoMMC1iV4UyKZYayHDo77FFnx6urOBDjSL86e/0NeBIgNDafbAUWyku6Cg4fDQ0YX/mZuuw7SfIxySbJsW2lfX7OPWX9CfpFeHIu54heIFOm4jvOBSFwQxJ8xYAPMAXpHTWegRpQ3jsDmO+76rMrBk4Xtmwu1zC8id8Yg6g8xpt3oxMPlBvCaVW7gXdRF0UsNxzMmJtBul4HmAg4eEp8RiHQWmKDg5Icj2qbh0tWc1mKeb9YejTnLQbZo7zszrh7B1bWwrxSu91P61TQexrtxzoOlCc1j8npDYlmu1Sev4vi4jq1Ce/JSgovS13Er8YdggSx1mudA4rwggYZc0Pz0SD7IcRgZCYXRKQsTmp08VArRm7ElST6A9KsmKO8PrbzbF1aFhJzJ2LXag4oWnFFmTf160ssoJIKQdMVM/03Kv2Uuy5mlmktpsIWgBn4sSbiksVqTNWDbyvC+6gLPvXTzwfeF8M6vAc2mX3ZoTbHlgxSWHyDWnYXVUdj+07Vbgu2HhmXExtKk2Q7a7p6Gz8D3l6OPnteu5+PJl7CIdppifiNBxK471JogosIxTPVVPDmsXvKQEUU8UGYECzY6O6a4pSK5EFBCOoJIrH/NbcFbtI9KuHiNnUsqrmwK2yz+4Y9Ksi6bMEHWhg1j+8aCT/a2gOlUkx/laCPHNS8wfrwqkszj8wzU7HCNraIRrNSD6KUUwESFA+9QzX04SvmeJZ9aHOgkACa38UAg+0Lqsk1LQm8F3AI6XOU0MOFEgq0EGrU+Z2D6Z+FdIgzqE+MnY5hsL2EhatAuPskYFAwlXtA0YK00EOdnrbVEzRpAjQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR10MB4382.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rmA3M8KnDLoXT6WbovtpboH0yW8t0Rm7r30lmg5v8aKq5zmSU7XUb/6QYQZoyl4B1+INqIEKz9yxw1/60d5CI+QgiK1WmP0Hv5NpIIvFzPYTMOh+ZnqD2EYI3MUAYaA2AAyfF2g8FmTlqz+q5Ic5kzeqWp9S4o842jo5nrIb71iSKMUTPrbIVzqDE2h2f+xF5nxtxwwt9Q+Vk0DHhMf0TNL3agH0hq/lFGn9/6/bUscKSJBeMFkGGfrU4tSy4Cp+40rEoy/X5BXjL/2kiqkVXKFHj6PmRhjC8+gcKVJHe+Fl+L6mqHTzRsa8xzgcwR0Bq+m/E88tRSYyLp6baiQHtO/+VhmqHIOkCig9eIemk4ndOU4wsZaYfavE9/rdMcmiUX6UWRFL7DxaC0n5+cZCb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0GqXAOnBkXItbS4AgxEYcLbvocY5s1fF/KZO5l7LPN+myxDyeXSe4KKS2RjqC+0RUG1CpH7rnKiFBA4LRmQSrwoMtYAHX4wPlMd7pwKZfC06rXwzNwYq3CtWY3pCjItcCL+Zv5Jwv2CUsk3Ci/nFCKbZ2iY= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: HYwREVajWrTQPI0tEznKBQlzd21DlXgPC2tTOBEuSUDcofPl7/y90YjDl9Ky0FEluKiCF3h6Om1xSUhgc1nIuwFHgYtMYjIYbmSjAbPymCJ57Og9oWGnOg2cywnaqaMr/3rWZRdhjXP9SGDiZNKZnpjN/VPothAMVog7GoSyxOyIgXBGyXTcfYlYF6SfbFPPNZe4huOD8pwKPjImqfu1kcY33iBb1i8ukfIUgz5SFCLoPswYVhbrEkf0jzolgfUGQTvBoNuLdIJMbumVTshmJqOzEuWC+uCYs4I+nLeSr6NPjwBgOhMGpjz3FN6uOvVdr9v1YfYhUZ58UmIzkru1VpjZ9xRTVDHC7uXyH3vdx6yJCyyT89O2TtZ5TsVi7UwGZDs8H0/Dtcg8Y7+OiTr9o1pM+K1yvoOzV7Zz7pEGDrEx9wqFO2YzigfRW4GGdbcCmZvtUrrV/eN5Uf+Bzj/ecqQrQl2K4k0u1RFHONrh70bZ7Y2ayE9r6AUln6wwwET9CT/7XeSsNK4AdSpeg3dDQc8Isu8/PxtI2pTDDcP5lEwtcPeZOZNodONEGhECT8MixAS1SZSmZbk72OB1iqy2eMkpHbsbUOSqoVTVnftgaFk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99a33d83-9593-4a9d-c7d9-08dcc05ea8e9 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 14:53:17.5707 (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: MTG5X9H/gVe6kgUgIju2bLN6/cDy+gztqHqO04vhKyHEWnokSsMwl4C7PbSnLO7Nj9Cv1jIn5Ga0VzgALqfivbL0bdAyXZpyV5kOMJJ7Xtk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5630 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-19_13,2024-08-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 phishscore=0 mlxscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408190099 X-Proofpoint-ORIG-GUID: miIlkAOL5CsMzjHUSqpnq346VAinco56 X-Proofpoint-GUID: miIlkAOL5CsMzjHUSqpnq346VAinco56 X-Patchwork-Delegate: bpf@iogearbox.net The following commit: commit cc937dad85aea4ab9e4f9827d7ea55932c86906b Author: Edward Liaw Date: Tue Jun 25 22:34:45 2024 +0000 selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk introduces "-D_GNU_SOURCE=" to generic CFLAGS used within bpf selfttests makefiles which include lib.mk. g++ by default sets the _GNU_SOURCE flag internally which reports the following warning and subsequent error: : error: "_GNU_SOURCE" redefined [-Werror] : note: this is the location of the previous definition This patch removes that _GNU_SOURCE definition from CFLAGS when compiling CPP files. Signed-off-by: Cupertino Miranda Cc: Andrii Nakryiko Cc: Eduard Zingerman Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Jose Marchesi Cc: David Faust --- tools/testing/selftests/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index ded6e22b3076..f06c51bfd522 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -741,7 +741,7 @@ $(OUTPUT)/xdp_features: xdp_features.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xdp # Make sure we are able to include and link libbpf against c++. $(OUTPUT)/test_cpp: test_cpp.cpp $(OUTPUT)/test_core_extern.skel.h $(BPFOBJ) $(call msg,CXX,,$@) - $(Q)$(CXX) $(CFLAGS) $(filter %.a %.o %.cpp,$^) $(LDLIBS) -o $@ + $(Q)$(CXX) $(subst -D_GNU_SOURCE=,,$(CFLAGS)) $(filter %.a %.o %.cpp,$^) $(LDLIBS) -o $@ # Benchmark runner $(OUTPUT)/bench_%.o: benchs/bench_%.c bench.h $(BPFOBJ) From patchwork Mon Aug 19 14:53:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13768476 X-Patchwork-Delegate: bpf@iogearbox.net Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1CFD16C6A0 for ; Mon, 19 Aug 2024 14:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079219; cv=fail; b=TeD5p/neEYq2gQSZALZk3JcpxB7SMlbvE+WSn8yhrNTfWl9KycYUObag0hUBchCjpaUd+QNUs8XQRqDIdJ2/MEQhqRgZv68y5aIKhG4x0nhYavvRcpU0/aLMf0kgMWGb3xU4TJ0jj0Zruv5Dgs44VeQ00WUGMvefApvOS47hmNQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724079219; c=relaxed/simple; bh=M6viDdIvbBCln5EPHXmnhiqm24jMM23I+0M9uLRZLHE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=ZAguyBkea8XdIx1Ml+szg7fLV0Z3vJU/hurOG/LfnxIx4QasucAEkDhNIPCSyWrPmutHvBdl69phKcoKtvCco2YzOpU7nley8aa/2b6gLQoE1/0bPU/hY9JYl6ZCx14fwtr+ciirdqnshRfBfUgw4Uz0twvQ72F796gKeOhWpEE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=NvLAw2E5; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=yvl2ayti; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="NvLAw2E5"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="yvl2ayti" Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47JD6xLv019063; Mon, 19 Aug 2024 14:53:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=2xqX1CIYywwAFjtNMGRk1mKfTi+Zu4jjMh8QXXiS9Dk=; b= NvLAw2E5QsIwm8+dnVRUYB5Usm/FV3H4uBh42AjZPeSnCt7Q1KpjJKRXrxm30vND cUQ/bkxA4GEKksJ/LblGflYWR+fS91QosV6btp2Apw1RHctAEw8yyZLj6wgba1UE cppxU1ZGABE+iBdLexxZfHoFGbeltGWEP9Ckg5l+qbDfNPjZxNK8R6tBvGmXPHCm pIutRtfj/8txvCLpfGGtiyIfE9p1LE5zIKMHY34oIIH2AjDGJ+6nIUysYC3YzzPi ZPobgbTYP5b/nDeOC84EO6rd+U29kppxsoQNsEU0CL6Jaan/Vfn6SQjDW0J7UFi3 dESVkXQkcUhGRdBAj7+l4A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m3hjsby-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:28 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47JEbIgA007873; Mon, 19 Aug 2024 14:53:27 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 413h3p8dyw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 14:53:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pr8bByAt9RENrZedM7sEmQz98t25QI6DLIWDeqKMN3b+Nol2Dk5JqDqkwSMqbyQ43vn1v2HKFghHQ+RTJuCB6BdznspuUvs2v4BoXvsd+W3zhOyTHulpoabKxskZBv8bX4TuTkw/kL39XurYwYwngyntw4zrtQk5b7i3jDaEC+mrnR2mTSJe5ETgIsD75V5bwcdrSEBkY4aiFMesRMJ4XX6OVCd81UrYReYUhgRPHI9WrGQ1739U4lOgtOBCMpePht9/2+QHuLD8uBVs0DCRjoLdMyY/bUchviO2lss8BIS3FjRtQh82KxEJ/JXkYngX03EC7bldhGBWgcpjjKmfxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2xqX1CIYywwAFjtNMGRk1mKfTi+Zu4jjMh8QXXiS9Dk=; b=IPZBJlD9JUQi8oLFwnLi7Z/bZecvmGq719+7EzfBObQyT3vOofGL/nYALwmcoOSRl3LqlWEoT1wPqO0aEwr8T7mYDMSCO99Jq8tsmv/UT4akNTGnHSbXX+lBRalNfclVwbhHFiLF91AfrfvQmhWAcyHjPvm2HNuS3GyHmw9GV51s8QW0QIJRruqsZvwgdkJwBdwrLCYNG94CNNADp6xJUg8hxBEJcqMPwZTOTsZwFXgVzIoXR3sl67f+2DrUVCA1y7/9sal7YL0PTNnMR+nNmB6RfKHbXYc7R9Zg9e7d2pbYb+JOcKtzzTpzBuBAdv0m70j28dpL/TzvkYovfTmtbA== 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=2xqX1CIYywwAFjtNMGRk1mKfTi+Zu4jjMh8QXXiS9Dk=; b=yvl2aytiO9/KVa2vvCG75oy2BPgLb39wLHQTuSkwzasVn41DaAMC8qBTmf0FrUIx+BivbX/DYcCtn1YepLorSxNL+DUUR6s0zwxrPQFhRcIuUdGDecDePPCLUdoMtgI/0KJTe/gibZYU7Hf0/9MhdRpWVSu5UZsIUhVxF1+cy00= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by CH2PR10MB4152.namprd10.prod.outlook.com (2603:10b6:610:79::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.13; Mon, 19 Aug 2024 14:53:22 +0000 Received: from MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb]) by MN2PR10MB4382.namprd10.prod.outlook.com ([fe80::5033:84a3:f348:fefb%2]) with mapi id 15.20.7875.016; Mon, 19 Aug 2024 14:53:22 +0000 From: Cupertino Miranda To: bpf@vger.kernel.org Cc: Cupertino Miranda , Leon Hwang , Eduard Zingerman , Andrii Nakryiko , Yonghong Song , Alexei Starovoitov , Jose Marchesi , David Faust Subject: [PATCH 3/3] selftest/bpf: Adapt inline asm operand constraint for GCC support Date: Mon, 19 Aug 2024 15:53:07 +0100 Message-Id: <20240819145307.1366227-3-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240819145307.1366227-1-cupertino.miranda@oracle.com> References: <20240819145307.1366227-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: AS4P192CA0024.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:5e1::16) To MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR10MB4382:EE_|CH2PR10MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 52406f70-500b-44c7-8c4f-08dcc05eab9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange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0sOsLBGUVQoba2E1pPus85KmlU1gS/TWDSlYGcL735xcipmDcMq+q8EWXFHiqWahLh3hHRyOSU7l576vlhQeYtaEGcxr7yX3T8xcFIKS6MH9ziX/C+C5Ncy2Ck2qtzEax2JeZeF2WNoeKj1x3v5jL+cu2zotasefz5gEp/6JTsFAWq+T5h4Nn7qmVS2jqysKEG7pgnjIomy0cEcdSnXT3MOs6lOWkxdR3d6Lp2qy0lKieOHZKFe3UBwOnYDGEBPqF53DeY0l8SnywLfz0ArTeDNJ4Mzh6ar4mOaUgCNyGTBSz1Wn/V6tTNmrDpIiWOxXn1fIY5gr84Y5qmpgJtHKJ7iWji8idT19+90PDHQw5w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR10MB4382.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: gYToLfOGzkqhcw1+9dwoeWdfv3rbATdQYNx0BpgdwY48I756wqJAGAFDYM2xWBKPZgZL2G2ZQac0Mg/dFg1ewdBps+TnYy131EU0yFjVkjMc7DswK/Gi8BK5tbzyuLPYj6WTd/d1Xp8BaWEjpnC2n2SV91dAK0JV50Jj4x7uDdYGhKurezDv0bsxMzM54Ds2T8ewigrV0Xpn71YQHO5CqjkeHbZiEgQnUXBZ/g5rkF4RBVJ34+60z5+TJJD08XdKeUlJanVkxqLxvY68gtZpTPtJW0bgc7rtjGzsX0SegFTOdNqj9RXemvfcPXwVU5P2+8KVseAsXcHS8uyZi2OYQsTM0r6DIRx2kT5/mwg/+FzXKmoqF7KhTgbuocMEhTMgAsapOhVnU/dYyeFqV6RmVa8ohV8gtDB3fCoHIdLymvLa196koOpjkawdpA40FD6JHB16M8oL9mHIySpT9UwBhFLILjlyhSX7CDuXqczUcNO5ejiXssn8euItt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Fpfg0qU4f3KGT/HxV5r9zCPSwYW0NwqE0n1p5MJ+VPCQJPU7sgyoLw1HE= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: HuHERymCC4gJn1xxz363eL8Micvpjy6YW+/hKC77Stop9og5odg/FHh63ixRJN2f2z+iUIesp+WEB/JmV864RzVnYoovPSCaWR9kYapjZkGPyYWifYKCNKsHutkrDATAAWM5RKiYMdo4wCKCWWjsFugVtlX2HMIWoR6ctqOYjfiybiUTJ2YHRdnCsQC25Nar7wptTw1VqeyoC1DEfB636qbOoa82ni6rEsgNlLB1YF4791M9vbrHuWOUU2xFNJzxyOHBWBy4+zJQxrqhP5hTMHGkQXYWSzjW4TW+ptbXmc2fKeA9QItZgqU+mWq5yI+4XTp8X3wGwNSX1t8yigMqU6/JdKguv1F04Lp99HzgvfGirXp8HROoozsga6uq85+1L3ixLU6hdofaoW+Q3caz2voI9bsLbqE/xJPhdTf/L4ES9HSaHFYsAgD4cek4OmhEhGKJZhLkKXd2DISCRYb3vDZIzwIljzQYyHyLYXeVo6+a1i896EccKSr5Vfh3tqOY4AlCJGkIwrf7CnmaTruSYyg0f+jm1tW1eED1UvFnzDjjhrGK5ItHRBfwvGC3ukyKSPeTwRdCiejIHVWNcr+Q7Yx8ioGkQkmtGEBmo52en4M= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52406f70-500b-44c7-8c4f-08dcc05eab9e X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 14:53:22.1192 (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: BKerNgwzvjNhE4yaHbU76M5rnYU5MfMYKkIXlOJMtrOAOKaDV2bDnbnV2u7yJm6/H8BfJ5ysSu85Z2f2eVju8nFXVltPSKnPbV9lS3q6sbk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4152 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-19_13,2024-08-19_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408190099 X-Proofpoint-ORIG-GUID: TasyezQ-iw48R67d9U1B95SgTqBZhqAV X-Proofpoint-GUID: TasyezQ-iw48R67d9U1B95SgTqBZhqAV X-Patchwork-Delegate: bpf@iogearbox.net GCC errors when compiling tailcall_bpf2bpf_hierarchy2.c and tailcall_bpf2bpf_hierarchy3.c with the following error: progs/tailcall_bpf2bpf_hierarchy2.c: In function 'tailcall_bpf2bpf_hierarchy_2': progs/tailcall_bpf2bpf_hierarchy2.c:66:9: error: input operand constraint contains '+' 66 | asm volatile (""::"r+"(ret)); | ^~~ Changed implementation to make use of __sink macro that abstracts the desired behaviour. The proposed change seems valid for both GCC and CLANG. Signed-off-by: Cupertino Miranda Cc: Leon Hwang Cc: Eduard Zingerman Cc: Andrii Nakryiko Cc: Yonghong Song Cc: Alexei Starovoitov Cc: Jose Marchesi Cc: David Faust --- .../testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c | 4 ++-- .../testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c index 37604b0b97af..72fd0d577506 100644 --- a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c +++ b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy2.c @@ -58,12 +58,12 @@ __retval(33) SEC("tc") int tailcall_bpf2bpf_hierarchy_2(struct __sk_buff *skb) { - volatile int ret = 0; + int ret = 0; subprog_tail0(skb); subprog_tail1(skb); - asm volatile (""::"r+"(ret)); + __sink(ret); return (count1 << 16) | count0; } diff --git a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c index 0cdbb781fcbc..a7fb91cb05b7 100644 --- a/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c +++ b/tools/testing/selftests/bpf/progs/tailcall_bpf2bpf_hierarchy3.c @@ -51,11 +51,11 @@ __retval(33) SEC("tc") int tailcall_bpf2bpf_hierarchy_3(struct __sk_buff *skb) { - volatile int ret = 0; + int ret = 0; bpf_tail_call_static(skb, &jmp_table0, 0); - asm volatile (""::"r+"(ret)); + __sink(ret); return ret; }