From patchwork Mon Aug 19 15:11:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13768484 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 889A41EB3D for ; Mon, 19 Aug 2024 15:11:51 +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=1724080313; cv=fail; b=LCebUdBBKNcuqEMN25H+hOyEoh8i8VwijN3N5Q6bM3KZRlS5eBrnwNKgg7Pf/YTt7mGsdbnFx/y3dX7Mxx3ALhFmobErKkFfdnuVpSuaDuIdR2vGfYIC0qm6vSDDSiCb28rXTHDAFsi+M8ceBuZkV6OW8GnngpgUupqb58lLh4E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724080313; c=relaxed/simple; bh=GTWa1hKf7k5UJLxW58olFcXgwQNBigF2HvpWl9ZD2tI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=Bctsuiq7roFcB1+aCfc0gQKqZ7/SrqmM+TvyUhHTgzuVx5vlWXmeiVSoge/0xmrnuvJGOX6O1Qm+vbLnP6/QPWGEyneT8YQDurMI7rwiY8mF6Xrnpg2Vr0mIAJWeeXVky1riYQzvkg2va8A97Ck2GcpK0+J2pyv4nDjtwbw6FEU= 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=R3fHPP/f; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=c/4s09fq; 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="R3fHPP/f"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="c/4s09fq" Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47JD6rhm013177; Mon, 19 Aug 2024 15:11:45 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=dAr6G6+qH7OZf6yq00niXLOhaRSRaiMX8QLUJxbWuKg=; b= R3fHPP/f8vOrWoz0zGZnNxM6/yMz2xWHUhvPvUGnKdGO8WtZUrql/8YjJdfDgFuj 9xJ5EehE8H1uOEmq++KbAyXbftOWbfwaVHADpzleDNalf7cP4rbcuQb5/NgEseO9 T+f0tFDZcYWLV9LbuP7wmv5yfzNhFWtJhSdE5dmDJ6P8IE2t1Lqdf90l3l0e9OXk IxBaYZWcgHZA8KURPm4oi4odx7B95BRqGZ/DckEG+GZThvXJ9LBEoavCHJylRDN+ ufH/PpVi/aVKEoa44rWQz1N5uBSzoMgb5gKb0od4gWpl0XfGK6VGDar//Vjkn5Hy 5n3RAgJGB0pxivkwm/hJbA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m67au2f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:11:44 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47JEbHd8003087; Mon, 19 Aug 2024 15:11:43 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 413h8qq684-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:11:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BOWdIgHPtN4ZOdCTCdYVLOyUBMA11Y1/2CWus4HlZKg8sh7rHCwK5doCAQ66imsvILEHUveT4mNVyukyXDv3MX5gKcOrUzigtqYzlTb62EstNkaJyrcUT61HOFyNNeulUTkvwOyG2XqoDRp39N5QBpk5h5mvHBlmN1w3SQJubQowMS9McW+NmVrIfBtPuzWdhGL74EkyLa0XJ45D/tEfZvUrHmWUdCoR8xNIH32mHrYIDvDTEJRRtmYQSqsWYftsUADAc4VC+P7YsbnlsWGhxgH/vWq0tBFD9D4gSvzm/IRiw3W319hf4430TKd9J90VKYtgOLzNPvAFE/cUzCUIpg== 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=obpnc4+dYu7qzKO7svxoQI+cmotwcew1D6b/aAanMEYELp0gKx/X8dBj8bv0fT9NhJVVeL/jPS9mzj3XmBNLZ8At3l2j4GacllHUMMdU+r3NnGdu4mWUC3T/B51rtiX1pU9tMVhqzB1RGEE9gqFM4zxobpLHuWGRfy4iDxAcSGVHXZ/ea7fGixs2/TD//Y4BLSICA8TrDYHQH3AXgbE60VePf0xal2d5PYPmtr5o/O8/8n256D4Ma9Z2xR85qfKaq8cq+bzpicTYGBE6mPvQigY+Kvx9GsKLvQ5imOLkPc5KdAHUntK0a+nXE2nA0RuVcYHQxsFJ3YqDeOAN8uIaCQ== 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=c/4s09fqwauSkCWUXi6+GZ6tQEPuj0D021ojspERc4C/MjvYdSOu8ubuGSQU/Iyhi2SG7zlujfiGkUgq3rISEXixgZ2o8Q6nMwgyuvtVae5Wn0aesD2LwO62OFoEgV35ywy8BLeOBT4uhqdffk/zY1kc0loppBwoAUBWtlejdqw= Received: from MN2PR10MB4382.namprd10.prod.outlook.com (2603:10b6:208:1d7::13) by DM4PR10MB6230.namprd10.prod.outlook.com (2603:10b6:8:8d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.11; Mon, 19 Aug 2024 15:11:40 +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 15:11:40 +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 16:11:27 +0100 Message-Id: <20240819151129.1366484-2-cupertino.miranda@oracle.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240819151129.1366484-1-cupertino.miranda@oracle.com> References: <20240819151129.1366484-1-cupertino.miranda@oracle.com> X-ClientProxiedBy: LO4P123CA0096.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::11) 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_|DM4PR10MB6230:EE_ X-MS-Office365-Filtering-Correlation-Id: 0997b389-913f-449f-8c44-08dcc0613a50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: 6N1kVSmrfBB443MdtKHVS0rE3tj10jRlNoxuRKM7s6+9yYjs0lhnZKiy7fI1InsDNyoYV1QQiMp+VP9zcMwxQRxkpAFbK1UdrtyW1L5v8tU423CNNo7LzpFsJZ+eXuxBTW6HE9lGGXTiLm9uftm2oUKim/uq7SA7hs8rypW95O8kB/MKsak2KyeldoPDXSvyQ9W0nA8zeEEnacpqr2axQqphyBmMPCtb2bZjVIbsAsfRuWgXwOdjYh0pNrEU5jRdAJcgIxbK8AHVbrchS6VxnttoXEiYg5TrH+dcTPzzAs/Pnxbb2f3rNFyTmnP8VFYAuAZxGg5SbsKY2dLYss/PoacF47lRv/Qw1ujTt5ZqgrMeFMdE1DCyI1KWQss2+m7q+2PA9yv+Auy15PuNZ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F3w/FNNikeaijVVr0rOLSekX/MPh5ewE3vVwEtvLYcrAXyGSEZN86HCK3XeAeb6zgvJZLp1s5xjPCO1h/KvBHxeD9skkOpZcPS22TMaQPdvOJLvUU8TpKf5r9Mt7Y0iISQgfzANgRZAq2khF0e5kRTa/YpQIRNxgn12WYbzL7aCzSBO9sVCBB5fu21o7VP4f944meyVSRrt7nu3d76lqIhOULJS94ZiVI/J3hrJ+3XmXY7cjDmD1GSq46crxHYHR2NpmTJa6w/sezI0vQKkbbSRfrW0JsJnT8BSN8AhL+Vho3BM0trU23MSratKQwrZmACNRYVwBUV83TyI2xnur3abQYbbqiUKTJgEAiRLnE6MKtFk+J721p9rbi74e0xmkXtfii6GDPVSXVEbJXs+LrBQjPAr7t27z3z33UE5Xtclb6ILz0UohkwtQTOM93832tt1OrfajbGx4bDDVuwRrZBWbBeqRFjII7kLbIZvF6bb+1Kv35LP+LYtfwastuiO6K7FSt3WwzKqk8AFes03qEkvPtbYH7XmtlEHoUNK/EDbxt3HhPSUq9SRGza/D18hrbTw/2nJaaxSW0boReN2i7hd/16yTYlxvOvwwFcdCJJGLgt3n8eK25cYNZZBsNya/WrUnEGGp1oznOfybly2GR+aAL6FRaLo= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: QkEVSjdUJADYpDwxBkb7wTnVcjMYfEOFJGAABAfNcZW+aGJ+QcYnx5r4k9gdLFUm4NLjc6BLHcaNRFN1BIuAknoDJLykm0eIngF7zE2OryKCwUhSmzypnjwaGEHYVo4P9xss30QNDas0j3lUZrS5+pqfmZOzpuKFtpIrNeHFx8cLTYMH5oITFD7yGS2HLbZfV/zZ/Q5MgiDDfRSwSPpw/Q+9o19Fue/HWDhsT/EiRmBoadOsGbnHQQN99coPBOYyjMfjszaSp4YyECzqs5Xfnvovwk7bxzGz7aH9JHG+5Sn22tEv/w+8ceFU6LUM3AiL4XVlMljd+rjOR/oj7YC7NkesaNeHOQIb2B5I5jvsF2K/kvXWwhmN1JcupPRq+fKkIQ2pfRc+jimr6+65Pd6AKYFxHxqGlRirX1urag2CMNF1SkumGV10k0BQfa5mmPFkeMVu/l90H0e7tOwv2xyOTRDVaLr2NG1UzGyzXC0+88iOM9Pyn9daje5VAJb03UCMgf0DSDvqvl10C5POkCSzEQ/dsYtZVm/lKqWd8w1n6Sovhj9wF1YE1DqAX3sjix2sun/OrWXsARxunRoRFY4HGr3LmM5Ydd/Lz8NevqaTG4k= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0997b389-913f-449f-8c44-08dcc0613a50 X-MS-Exchange-CrossTenant-AuthSource: MN2PR10MB4382.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 15:11:40.3910 (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: bGT1AGhCK4AID71DoEaOYd38Er0Ft0sUFWDbk1F/v1h+lptp680FHZpQqLpOyKawywfNVNeCt4FzGLSuf9/1AnLT/EG2sMmzvDGYyHGj788= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6230 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 malwarescore=0 bulkscore=0 mlxscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408190101 X-Proofpoint-ORIG-GUID: hKfkBf1T5icImY2odoJYbA1Nd8iF9yeU X-Proofpoint-GUID: hKfkBf1T5icImY2odoJYbA1Nd8iF9yeU 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