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 From patchwork Mon Aug 19 15:11:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13768485 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 3A1871741C3 for ; Mon, 19 Aug 2024 15:11:52 +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=1724080314; cv=fail; b=fgxSWxPeAqVsZ9f6Ua4M95Y3AYbgHisZDv6q+RM1UDTfrbdynowId0JbbtPvKalNHbLd03TyINzWGv2DEBaRIX404g1qfW8/Vqj4/N/pXqPToYue6Y4G62IMFB2yr7GID5uF9tYz6oiGYluKITRAYMLGqqXxluPrWMy4JHXuI8E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724080314; c=relaxed/simple; bh=m4ukiOGIsibsa9KJM60XGEwJE/KeekEJsQYaff9RJug=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=q89HhMwfgkOBRkpIKvrRrxHBFzWEFuy4qdT2RnLwbjflKFtOzq+209e2/MtztnMk9KcKOQDs3sqoZI67uEH33O8Rob8AnBTQebuRZ+h0+t6zVOD5lCdb2aUzKj3+49sRAm9VKEtpM1lH2y/8iKM1wYxIMIWPX9glnLEUwwo9t+4= 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=C926Wo7z; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=psGb8Rsu; 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="C926Wo7z"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="psGb8Rsu" 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 47JD6sh7013190; Mon, 19 Aug 2024 15:11:47 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= C926Wo7zF7zrzbKEtmRv3KA1XrGtO+bcFno4ArUx7IKjoQrAVlCviWpVh+meV8gJ X++i3EmhkbYgAiVU1Pwcd9rwCA5AwvgL1moNtuwKh5IQZuVLq4j8CrFd+5CuFKPd dCqivx7iJwQ0gxpHBbeYYb0DnXp10sBKB7J47f/6NDNOsloGDf3vNJhYFmBjX6QH Kv0BnkVReUs/4JDmIm2ZhRstBq2ay3sjNqTp390IoEL23Bkuo1xfkKuiHzHja8Ic 4npDetaJJMAiwRNEA1H7tcbajfK51Xr4B05VDrAgE4Sh0ou39AF2BRE9a1A48Kcp snahovcEB8m7YBMu9qC1RQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412m67au2k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:11:47 +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 47JEbIrJ007873; Mon, 19 Aug 2024 15:11:46 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2168.outbound.protection.outlook.com [104.47.59.168]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 413h3p97d1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:11:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NPELYA6e+Yc+0UfOGx9P26iRUXOkepFQqDqUI6s8P1kXhr2n3cSf9c+OMlpRNLqvTm/IiobYyGfJzv5CkHxO8C3zoX/i+EkzH40wihyOkxiVcKtZNTnlYV1deblIVOzzd032OmTliTonMsnGoajjZYEeAjZwWhqmS9NQ+Gi8RBFfOaCQESwuUkXouOpVZ4vaei1dmb7Hl6kWN+gbeLbKqghVBYkTTgSlZGkQUPNKe1x2eZqzVB/H/qPzOSsMr2WLMXa3pvK9R0LEwYHAQjwKr+5UDxthEypF+cPDTVwU3D3cCFKBCuAnbhIIfRLiyG7g8Eo3saxX27uVyA+Qqwq4+Q== 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=ZSZgGcbCCKUnlWRMMuN9sln8pItXOtskpTdG7oXQUb0S1bGcOllGG/k13+M5f01XbIzB9ysz2atlHRUeyHV/PjV466mHYKn1QY4/z+eBLFQbUo+a6K1h3DFo8sMsX7AzUG53LcCdgaiUKG8I6TdyWFpMpjFMvg0zwCPaZBHE69Og4iJ3mDY4QwR+Ua87BQTbNkOdsF3pmQksVmY7uUrDAbPll0jwhSDgeV4sUJk4gZeQIM5suVywYxpzaEoiaT3yqkwwlkdWlLYRuQd+GdKS6n6N09c6I9FnRq1yGVN25QtNK3U331hi3WKI/v6oRYFrvG/qo3DlHzppjK0xETBfww== 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=psGb8RsuaxlgPoMUx0/pqmBMsHiOBZPyoQvYBLRKz7aoep5qByfKKckeIo9JmVqu9AHyKe0+G56lj5TvP06JghVRzc5eTpDzDF1zC8Xlo/LTwZTO6/oUp3x99FwL8yMUcD1ZwnKr2WuIFADT2bWEyinjnwHsRzkTHmFTW0HUr5k= 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:44 +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:44 +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 16:11:28 +0100 Message-Id: <20240819151129.1366484-3-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: LO4P302CA0034.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:317::17) 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: f045c6eb-c8b2-483c-328b-08dcc0613c87 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: GB2ChgsPCMame8a/ZlcBFG4h4urIQqQKYJN6eMG4oU73qpoZYgVtaOnNEy7+5rgggqo858Z9XMp7ZaTxgR623Q/oYlChPq6nG8RR3KdvIQN1/xMzf2yZ7vscsymacagbIuqvR8R7BLjfK7PQjEueQYPb8Un+luqcagzFCjBV1eB3M7Qb0rJ8+mlFo5KLmkykVd4gEy5+xeT05yQRKlZNtZB7VF0Wh+fZyFekjd9BhlTgE8qETuu3UMQ3EzIa6IhsVJpqqmRb31LvcAWtkNh16UqXLMNWyLNAwPiXbWmEZSGqCGyoh1zjTsbu8fUiiHTl0dAHMXrv/zNbsN+tHYMIsnHRFMxkpZpxzUz+/2l97bUKMzCh0U47Fdoi1/ewiccfT9Pi19EuAIfgA4sdQlAHHYtn1kKfhUspdN9yg2tE6COOopEI8y+lqrYhOWzAZ3pztVwn+SXXrHJSQ+FiXCegcKfD9cS8VloNkrRWl1E09m6LZveyc596y6OeBf2U2SAy/OAAl6eNTOah+eFVaSwVQEzsgYusdOJsI8PQwMZme1leQ7jkb4VvUj3Cwtgurb7q/GnlyZhaUAlgxyHy9siwu3CO9W0eZq5jFVxT+vIG7RG2g53sjH/kKJAxm4xdpvjtGrlZSOzWaG7/zeEgPdDlAEeMbo8twZ5nuZM7BsBiqbQzOPq7CFpIVBoJphHUCxt4fZzV2d8pFP97Y5dDZJ9neVkp9zcn54GhFBK+JIesBZaJPJozM9ahTClBXkSmjY0p/k7CmuSWJhnl+NE1nqo7QeI93ltUrTSS4CvQNaDiMNghpmzZbDsuAdL3HOqgHl/krob6kdnadmdyXJuYBzLqvimgGklkqOEclpHgYpNdBj+VK+0gVjPfgczW+TaFw8lrVk1jawFQgBJx3LqHQJlSjeBoaCHhDyl8ncohEgYzMoBaLdnGOfoP5HCyM+sx28WXsIV/lhAuW9+lSZh5ExDiPakaGjzJjfpdwaXaOUsfVLTHcULh0/WbS8XSrznBwfdVCOjAsbfkvcrR8eQOJ9QN0/1nYMVeDXecy1kCQ+N15OEvqGqHTnafN+iCXl+JyswaY/kXXrhV9la/FsP7lIZeUyugzUi10UhO3zRH8/Z5ugXIqPcZsY7qsF9MA5sokCzXx8YoFlb9/rHyAKjzjS5CEWa2jyYTMNP7g2uH2Br/cc0exTt9OymTEmTWhOJPv15YHR5pFgRA+1wWCv0LbxosBEfVjQwsCTcu9DDWzbfD6enOlxXx/7cjo4Qekpz0j3HHnkEum/jDgFOvWjg59RectW3JImVbemNuOPoZTKfr/qHfnAZrQFFu0psU6endlpXHNEhhGPrFwG0E/o9cF5s6aw== 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)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dpZgSRZda8MG0+SmDcSaQ/zsobqSjMt8bC+kbQUtoZt+RKIRIi1W/AXfXD+xJTH1p6RmnBhl2qpV/fBxa1g6SKYVaJlsx1ONEIHrTjzbYyzRdZmqBR5ydMNnzBtb5gacdJDn8xrlM9H7QJkWr9oGqMRiF/HSp7Tum3Cdx40jmGzK2P9qvIiXTi4/qxaFxpIIQY0L05LtW9Zp/aRltpLTwZ8H1tJ7MBreQc8DJ5O5BhVIG54ZdypUU69e3J+BiOscWX6XBGXlSV0MCKJlsYyim4vxm5rQxRXggAOqILOFGvSNmrlMmEYFNQg5l5JUHUEA/+oELac5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swiTXGn7MXGU5EeU7YEyXDKZUJyneCAHmXcXiRogF3zh6e6aQoGYnpobuU93R46m5E15Avu78v49I5QIL0rq5D2tEfzU7mPbY0oeOZS6GOUxzPNma9QuEx+Z5v36MzxP+PmrNYG+5xUGFHxkIAFEPa4mMenqrzyWsUc2vpGgIxCqGwjmm8jdeQm441GkQgQ3hMtKp0memT9WItBvM8HD5KoFOrKL6P7uiyczaH5TnsZ8mo= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: A3zd5IJLGVJWKOAEcxaRZJYzvCT6nOmTulghg9Mq/HnwDWwQvvP+I/gBpS6ghhcrTBPV5cuerhNPl/2rYRA65YbxB8zS2mDDgJ5+qpZImG0Sn2+W7k5HNrUOb3aUng3rbcQqA7/ZXqi5DfrfyTTHL9mtIxkiTRJHOBtu6IAWOW23R2a+YgIRiZiGYn8y6+yISvnLq0gBtXQ2J8heaXft0w56oQ1LffQZKLaFkqXCA6pDQ/RZzVzCPQs4ePhPfTio2Tsxd279BLCSTddqZkwQpX/cIpbQP/f9dM8nwHlYg/T7oWUyDXMvR0knva9MGSxswDOszZak4rBOQidlnNk+qpRWIl3XLwNdNEQi/xRAwhWOWjIEVF+WJwlH6oT96Sg2Z6moUlSFEPD0WeLmiqTiuPvBitEU4hyQrtAA8sCEUfkXhsDel5mWd7wWiA/Aas7AQbBHQJKmMxm1Va01OLXyH+0fUNZhQ+bnoDEgF/rE+ALbXLNyXDhvCnzMBjMhlWHzXPRbmT0jRJOT3EFJPLk7HVo0CsK3aMwwcAD5CBbiCykEe5P1AT6/mKPKe1oxUKJGX+LSRswXQPaBIssrZr5TjliUB4f6Fi+E3NwbZZd/G/Y= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f045c6eb-c8b2-483c-328b-08dcc0613c87 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:44.1498 (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: FfKEawGjxuaKs1+3YOarproUqkf0qHGFPHG8GF7+bActBkLfmZjR1QMLPwcy7HTsKA54grMR56v3NjTQ38/MmX3DCv3dHjAVmhkepFkjn8g= 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 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-2408190101 X-Proofpoint-ORIG-GUID: DhpHrzMBuHijU0YpV2j79QmtGi1BTVQP X-Proofpoint-GUID: DhpHrzMBuHijU0YpV2j79QmtGi1BTVQP 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 15:11:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cupertino Miranda X-Patchwork-Id: 13768486 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 4983716C68F for ; Mon, 19 Aug 2024 15:11:56 +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=1724080318; cv=fail; b=fL8Q/KaMKt3PC2GR4Vlr8Hc9pXtdMKLPh5ICmTzMuoceXt2RJTT9vicmpGzsMSKVrJr6wkvtXpCJZufT4i3b/ps6Imp+58guM4siOs7orhVquEmMRyKCsqSh67di0t4Z7D+J7hH/ohLBuunGeluJMZZ6VIep8Cu9SGcvjOcrV9w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724080318; c=relaxed/simple; bh=M6viDdIvbBCln5EPHXmnhiqm24jMM23I+0M9uLRZLHE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=mm9VBdz3DnRFIi+X5Br+/fycZSKU1pPagWyHskUj9urQml8/3yZdPOFbEDdTWH/gUWLwfT4yAcOL3sbr0X8hJqZuh2vZRUs2gVyeLuR9gkylSqy2q17WIUGnD0QkJ9eQUM1mXif045GyXTRpmRuFkF4fFoxXTJGkKobcNuPISAI= 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=VeyGS7AY; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=NWEMf0Nh; 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="VeyGS7AY"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="NWEMf0Nh" Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47JD6s34016701; Mon, 19 Aug 2024 15:11:52 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= VeyGS7AY308XaHeDaHvfOC2ZKSPkHoCYR1tMay627lIK7t0UYzzJfGeefCCsZ2K3 6KEp8g53JGBRAzxzy1akZr8tFgnOymLWiULePdD/6+4DAzWxWcBGDI5PGsbq/yME J+dF8KKi2xagSMWFRe2wlaWt4k/qizqit2Tvm1jcbnXOIdsytZ3TG6AHcklisMKV JVASfMTjvuooiRTUK9wKgMlmmfCUkdKi1ZoFbQpJDpn6+pClq+cKzEhh/qmMbcD3 O4AAtkyCaumniE6JyKR0Z5dpBnufN6S8oslOqC3yAweyuMZRea+dEC3U2McJkKJM 8XGmDYQq25rUt5+4N2XU5g== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 412mdstudu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:11:51 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47JEbHWu030779; Mon, 19 Aug 2024 15:11:50 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 413h9bffxn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2024 15:11:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nD0028eA6VtA67le6zuLMfb3wec/htQ5nVKqbfZtnkytBGRe4OgbdCAPH7sqZbaCYprfzhvGXdi+GUDs4ymI8y4WbjTpWzHIzgwIDWM5lm3YporzNBLD7QQJH04VP92xbv0f5RWaBD1tsnUJGXje4/xJKhmbnWMLDa9trWcGUK5VB8TlJd9IohyeMtvcncDeCfPSBMexGYkLH/R1pgE1c0LAAp/+4pU9DwRn8pseeoD9as8qD0ZQRw+qx/9xc5wfOHctu6YeG9nkyXpY7vDaQAT/I+5n8xS88Dsxti3/9+ifsAQ+ooa3oEQs2/4z28C0oNDXHKFb/t3s0+jflk+Qlw== 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=gJkffKCReQQ2RXHMqYK4Xf95xKUPtdZvfGTy1ZapuQLlojuVWmYRQhFxx+hqCsvgorV2zyuH6BGNrjcwDdHQ9HjF9lbWOTLLrVmPOfAmXkwzrWbovzMWv3iLAyzIqmsSMzHM91CFnXJSDLNJxQEpl5HBx5sEMOcds30woz2PGGWKlgufVNESmvHuIl3ho8ICN0hGTZfn3LSwkrnZaVQ+0ITrnVuP1qjHKeNemcAJxAg++YlfqyCLT59NgwNtpGMHAfrNMCkkbaj4AUDaLQOzobGuVKJ76Y90W32D/0nX5hNxlrR6NDWt8w1X65RGFhw0MjdjFtyoUcm5zYad6knmMw== 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=NWEMf0NhSvVkBMDvnCPsgil9OF0G6eZCwf23h+57TVsfqkN62n6dv4hOapX0QRqVVehfXr37oDHKM6GgIoahLU71g9GarGNSajm49uFLr0Nbqgk3AVXNkZwsKSFBuD0FeVhmD5Q3SfdWw8TgO0bdZBpVEcVK0U3tGAffr2SKxiE= 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:48 +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:48 +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 16:11:29 +0100 Message-Id: <20240819151129.1366484-4-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: LO4P302CA0041.GBRP302.PROD.OUTLOOK.COM (2603:10a6:600:317::19) 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: c7e9e702-3237-42ee-dab1-08dcc0613ee1 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: SZIdQbFnqIA5Csaj87We6l6jlgTbK3aHL7dU/XBXjM4e0E/kkaI8l0aU8Mpk6kD8sUKc3BrkKAT6v0OSjUK9TW9nz/3wzQpNtnXRK9bDbfoSMwPE28PhC6jHjIAuvBFArWrJP7jUu9Ki3K48cQI9XKMAqmzX5lx4YpqAy5w51J6OaWDwv6XWrKlhsR4haPfQgmuq+IkcUBtDvVuinZfAXHi1eV92ZswJ0dlTD8Qzzu9SoJ/+5zMwzq/lhXvl0fx20F+AmUPfnjC+TvtMob0xuXLrFeGJr6jCuUZJJuYBP3+MdmsoRrUO6gblSPHUV01dFtQ67umcreuVBF/4qN7GTjC84QRZ8/DlI/hubwAlQMLVr5CYhw9OgpXZBWU4TBjzQapWu23D20REI8UZZo1WNX5PvI0nKDtIYXqqEkxmp3uAe0nzZt6GamRNAF4vUXTUxjpMpNOlnsSLx5MBIEFjyCs864qJJodLDXvymxvRm3++gf1PsQ0MDvi6YPh08aGSwafYlkAlR41NNVl0btPp6DBjd0tmbb98iQI3SERMvCpeVkWULdRlCEMAnZOCxWaNpRii/4DxwKhBrBSeEtm1QHSxK96DQ5hN9eI6ipCwrtz/mFQQb6uM8ucP22uU9DS8NRXXeEY43M9hDVtuSv1GL8IjvVcvyfZTeX+FA/V44OAJ4ihc6crDoG66Tgv7/r06NpK2ip7d1DR1xBPaawfbxr1PJqm3N0XRJrZkyVbHQNgQymEHiIDN3k4mvtqm1BxurFDwE70hzQeixTLAW8IewUR+CrfCLl1eFOprI2yxW2KbqQd51APU8VWzadwZSUJ6HSYK+cIOoq6ObZsUdLFD8z6pwa8yBA3+z2CD/l2KaMA+sW3LVKuDZ0ScVvyde/0HQvF2kR8g+OdfLPsalwAm5W3MKMXRhTRUkyKlpfX2laZMvWJipIX82sbQ53hmlljAzIbTdlQRBBhaz+5BMcbkAvHj0kpGL8YOMxNngbb5EZMRpcsePoWVoVNdly6YY9R5nV4iKwjGLwHQTPW6K2t/9ZAg0g2GFSWlO4MXqbQ2T1qgMoY54aXf1gIc2V7d831pu80wFegpByVndfE713D/hTgayvBiezs11gl7iPzIFYYa3i0TQZeu4Oqm76mQK11bjRKTaDF9ePMgDnOA50tyPqtLlJ3sEeKofQxdlqeByPm2s9AvZcDrnirBjm6r8f8TVOUNae+PrHNgk7Ccys0Bx11RQaom6HNZusxN1eWYYXX5/zcE3NfiHKab6A5oNZVS7h5sDVespWZR1NYH1Wat+44fZ06neBNzeQeibcEbjBCljTCVpUq7yvVfE1VR1U6lf2xK54gKpnMFPpAkHY2U+g== 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)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yHPkjXrswwsM/0Vd8qxpF1oFwOABdev6YjXZzqVUZkaMtBwr/fC86v/WNyudVSSOORhrDrONmq30qD2NbVgfsos6/TC++WAAMpaUtPf1ZHRyKYyPUsUZ4VMZwaEskXBKeAR1DLIUa/NWieAvEBuR7DQL9nKMkDfKd2wsRExnDBKBD+88nrmkSSyVDIRLoW7nrNIa4F9Pb/tc+UnJGg5jP/HfEynlbUAHCPzbUKCeG3M5Nuz2gWnnx5BupEBsO0UoBSiE0WW2iK99TfxxFI9eipn0NWADx5KA0xiQWpqCTuMDWcpwLAmKjQ5/fcdBEUDDiIcRFBHElaL61CCxwmODrXeFTrhMqIoWP8uZkWQnrgbjdSaXBg1Y1hkICAXSfWgUPpsHBd0yUK3OiMSwLlTDkFVgFpxHIG3QjEkPksFvt/DUozWHR6v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Zfj1wrVxedTlEJ/lW5EUiGOKwXK1V7uiVWfMf69udylLXluAVV6WwgX0+lLppJOPqsVjyuj4byJA7oIqDqcid0TWjka1jsy3E7+REdVssW9HTadMdnMLF/4QmmGWukEI= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 6WC7sI/1cdYx3S8uKcL14OG5HrQcCaIFY8xRzQvW++kmPCB3TXI9xy5GdTSm0j2BU8xGXu2rMx+x3S/KJb+NPTtz2kp6oTbWC6U9MXWf2sZgWQamaLDUrYyVzlEqR/nK/kFoMVknlo2sNSnErZ6AZeEWde51VG/U49zlE84h+zvQuFckgJStNJuDbpfjdkRxE04660IvI/qHkLsg3GNoB1Lbg18ahe47MZrHKDz2Qgz8K1WU0lW7Rp1OFVcOl2NQyvKp97O+wkBNPrOyoCoBg5pz43unbipRWIM9ImJjqdkRjkU1Gy6wVAwclYKMWUZEzYxl1THPHXvMpv0UtTtUttx2bGU1ZekQw5MN5rnPzndLZhYNYOfHzQRIN5TU+Gk/FTiR3A1IUuk7knUoK6geATeNSLtxFohtPqcxgyJKIm+7Shc+3YEfTl/uDUOfyofWnXoyGUTmOVapSX0tblLwNcF2U9L58xbpg4XFHNx0AcPAn03O+1O5Xxk6+P99BAuFhNWoss1zi86GAaTBCbx9X/5wyY77JCAMh86L4LySoDI8GGc5LNgdtP5fz/I6A5Uv909GYNu19kNc2aMi3y7eJOR8bDxpmz9S30wWYAWEpak= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7e9e702-3237-42ee-dab1-08dcc0613ee1 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:48.1167 (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: /9es4Lz6+2BnNjV2CbI/XsyADeeJYlLIel7eE/3UfKRs+c/NngBAiZIHW03vZk9yJ3y9ZnO76ffyBLl/zGN465tZS/cUcZIpEPssDoBqhHM= 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 spamscore=0 suspectscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408190101 X-Proofpoint-ORIG-GUID: vHJvVDT7ne5_Sd6HYMLJNOQT9SsKdyu- X-Proofpoint-GUID: vHJvVDT7ne5_Sd6HYMLJNOQT9SsKdyu- 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; }