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