From patchwork Sat May 4 02:23:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13653772 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D924CC4345F for ; Sat, 4 May 2024 02:23:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3DC5A6B007B; Fri, 3 May 2024 22:23:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 365CB6B0082; Fri, 3 May 2024 22:23:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B9466B0085; Fri, 3 May 2024 22:23:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id EE1CB6B007B for ; Fri, 3 May 2024 22:23:10 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 3F6571C1977 for ; Sat, 4 May 2024 02:23:10 +0000 (UTC) X-FDA: 82079116140.07.26B7623 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2055.outbound.protection.outlook.com [40.107.236.55]) by imf16.hostedemail.com (Postfix) with ESMTP id 954B6180006 for ; Sat, 4 May 2024 02:23:07 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=ncvmKhCX; dmarc=pass (policy=reject) header.from=nvidia.com; spf=pass (imf16.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.236.55 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714789387; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=Y1ishcL6GenOO2CGGqEjzdJ/qOHZEfytWpY7wQb/Nqc=; b=m8HTbg4cjpWpF9DasNuCpgf7FecFoEpAHECT2b109ZWP/5mg66s5VDjYVnE91xfdclTC9+ 91tGK7ZfCy+oAPKqQUg98LrPrgeDQvEqaXPyqWpyTE/9JVOs4dzG1H4DLNZ5OxW91n10pQ Vth8uM7JfEcNIGTzk5kB8Pb+CWDbhaw= ARC-Authentication-Results: i=2; imf16.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=ncvmKhCX; dmarc=pass (policy=reject) header.from=nvidia.com; spf=pass (imf16.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.236.55 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1714789387; a=rsa-sha256; cv=pass; b=EMNQi4l2FVdFB5Z/Fc2lr78FrNHNtXB9CCxq1nf/mXBBQ0USSpDNnCNhRcTn8hR8ZB/tic +Q2Fq+kJbtrvBWppGK68erwX0oF8wLbRyb79M0P2RBHmZBfVfKNHJpYrEnGweQGRycr1Al RD08NOE2JZhg01RjhALn4c3QhMXg4lI= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+UU2Im8GwXMmRCu2sL2riOwrrw/oizxLDZLL2O6h67ZFbnCz8am+cFPsOUTE2PDUlP1BKDS+6gwB1inPjNd60qIgNDaK1fMm2aJndOhaqyISDUEGqJYnIut2y5l7zjdHPOE5fKqiv4q5g/GfIbX+TeZJ3yJjQ9JoeDcbMoViWIyX480BxRNflTKMZEfsTIGmIXEyjZiCNBs+EeeKm1bQWRPwoaG2m1N3cmvnir2eme1cfPHVLhPr650xdAaZm59V7Z+EPRfpu1z9DSwxyTBuPWg7MAR27agLWeDxw9oOWxjmi08aJO+BxbUs2ByJekfCCmWHB7tACRwRPwpCDs5Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y1ishcL6GenOO2CGGqEjzdJ/qOHZEfytWpY7wQb/Nqc=; b=CT5T020wJK2Z1bw/CMf9kuMTGdblJAlRtBZ1nNuaCpB2Y2LgmpfJdog1McxN6tGBh9Q8CLU0PlSkMwI/+rBLfu/tfWljLFudRKnsdEpiUqL5agOvMOvzqs/rOjQin/xhUCAMovmfOrbNDi1jK/tQJbsJvNsK0eMwPywwAwVfL5IZ8hqmkWl3/fFRk9TKXc/ZekfpcGZtekZuZftae+HncFdEGi5pmfC4KRKd1aeCyq5HhN1Y7jJ889WgykJcREgRodXFxKKh4COatPs/TjsiX4iAdS7B3778a4j+CUR7HDh8O/5rUWSyTQCTcbHOZpEebUOxxtPf0zfKJ0x53+8erw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y1ishcL6GenOO2CGGqEjzdJ/qOHZEfytWpY7wQb/Nqc=; b=ncvmKhCX4tTFUYAKooYEkqBbbGNouC9KyQmjeJp4x20NF3m+oskU0mjWXMpovdjd5uwEKasVVLGEtiJc1ekFOUYGIz28UoqfmB65n4/Rm3TeJshoPZeF/IJCM1u63d6tas6RBDsRRkp8EwBwANRjVFEKasQCw+ScMG6kWhLcwzwc5P7dTKZlRHIIsB8r3hWwASBAlAgQu59G+mdz35jGApLyaNV7J46mkAnsye7yqJt3zO7hEER5Po3rz74bn+lnOaSyF5msw1PrYJWHSY4HNb02Q+aFQhzqKWtOnSOlgTDNhO/k6lPvtwP2+Kqp2hUGJi1hDALeQ6oqVC6hQN/iaA== Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by CH3PR12MB9394.namprd12.prod.outlook.com (2603:10b6:610:1cf::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.38; Sat, 4 May 2024 02:23:04 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7544.029; Sat, 4 May 2024 02:23:04 +0000 From: John Hubbard To: Shuah Khan Cc: Eric Biederman , Kees Cook , Muhammad Usama Anjum , Mark Brown , linux-mm@kvack.org, Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH] selftests/exec: build with -fPIE instead of -pie, to make clang happy Date: Fri, 3 May 2024 19:23:01 -0700 Message-ID: <20240504022301.35250-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 X-NVConfidentiality: public X-ClientProxiedBy: BY5PR17CA0001.namprd17.prod.outlook.com (2603:10b6:a03:1b8::14) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|CH3PR12MB9394:EE_ X-MS-Office365-Filtering-Correlation-Id: 1aaaf012-af93-429b-11db-08dc6be1209c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-Anti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IrPKw8ujd1FQt+Sb3oGKdAXwnbFIHCVTxROtAbumxqamv/Eve3FCEE0f7eBp8fv+0F9J/hSeZeqEUNbQYS8HdTbU+2VZWKhayA3jCrV92b3umhj1FXNhvtgBZcUeIa7zB4Iral9T4AbkxcWhk7s4xVTt2be4jDE/fxDpQ/DCOihyUimBf1weU6gspbiRlxpIhxuF1h6o0rVNurCIFbtNSCt572S9NEnsCK/BuLJ8ShV2gvrJZX9Sv4713UBpRGmeqLsDvKGkh10p9LDi06S78jY3ktfJFqt6T6bUTepIZyFyL4A== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(7416005)(1800799015)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: t52vRHxscE+4WQVnDvACikPq7AEMp3oDAvLnTT4hgaJMr7GRLGSHFxKd3hx5YC/A5mZW+CEjljiMm3nM61x76LSVX3VVV9SznGs0J1Tle8HSo8SJSMoQmg469sRPuKr5mutvz2AoqJfbVEVhHrvWsMKGEZhyjiaLvKQif7jspGPrbOYLPI4WgupyBbA19K+ibpECS2xf2DugZjhXBZCI7tDayFaT7ivwERs+Ohn1jWb7z86YmR1br/Tb+NikMiLLvBmHbgOJFmiIlohKkttXl0qzJ8s+Yy18lgJNDsVeG0mjrS5PRBJE80HNxstdmcqwmNEc/fN833TFqnI36jypad3ra7lGSl9wej8XlyX07cqx5pyESLEkz3DYfBnHBEO9/iitPlbVzjG7RiAe1lmGMeifd+rChB5ajIKaso4b5JE8SREsg80cGxcCaCz9Kh8Qw0OaC22tybJqffrXWljLdeUHuEGiRxufsl7yCtHPvukxJBRGkuk+xBf4KoJA4tfaG9IbjIgqy5M4CYN52zm5ot37/FXSPIcMH5IWOW1lHDIv/+2iD9dP/YIlUJ2hAB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11db-08dc6be1209c X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2024 02:23:04.0061 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FfRnOZYuMavkwowwLcAa56ciMstkf4scAZ9FeEgdGVmHpRop3AYljvZaF+ya+S1mpxSJ3BjkMMm9mbJ5isXxVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9394 X-Stat-Signature: 69btdguypn1ydr4qfuhzkkagygxadu16 X-Rspamd-Queue-Id: 954B6180006 X-Rspam-User: X-Rspamd-Server: rspam12 X-HE-Tag: 1714789387-367748 X-HE-Meta: U2FsdGVkX18Be2148zkkAz7sO2JFXO+43PRqVWQTLnDsFnzMQ9Z+yonodWAwVsFCty3IOmxNbRmuFjywtp/j/uREZbaAQkUA2cdVRlKMfnJlP5iIofQ6eRGIzSWmboRE0Ggvwhr6aaVpS1QIedtW1CAb/Gu08jGtXGbLWhcwZuKsTh71DkpocNlq/H4RzfElIF0RcuL/au7th/iGXDinxDZPim5UIUn7Xr/fIR3Q3XkmiwZUYL8J9ssqRc01+YdpDtiBovRj3Veu73Wzy14kuB4GheUefSlkLtmc/8ZzXTDFrLumhH3OieFCjHcZ2WY6o2VEcMXtTWt9w9FOYMHqV24ZnOOq71FOPT7qtJy1v6eXy0XShBCS1iRe3iQHdRs6FiCY0NG5iWIx7XE7P3XEJCh9GuDt7JuvduzZg4yydtH1HGKoYFGrPWM6O58sEhWZaEG1ncQoq1OF+g/BFzWK3nfEEWy2fSQ8huqs9mTsxTo6GaZuf3trd66GRem+gk4vqNHx1LcH8bfDo42cAkKZb9ax8hSoVUyOUS8YbnR+buZg/NYfTNUQPBhWynqNbhLNY4Qk8KVLMcNoiUDeJOxkhWQIXelB4B69wPx9ZyQ9mjiGDuEixXrtmKl52QToaOLr9gpJsXK1qukztQLXcUVR1CenlRy5W38vnpbwbbsfT6zFvEuoK7IfNjtICCbTszRbNC5EkK7v2dTZrPDdMKeGfj5AB4D6/pe3MKmnZrBkQuHUVuRfDoyVP1tFOtZMPJGY8i09ibuXxj0OlveTTMaaq4IvFLQBUmf2p7fL/f1Mzpm+Hu1rZmaBeVO9gMMWb65nzBzf8STSxLyCRuso8hFsjBzdKr7aBMHc4Dg3MeIPmvqIUtdR2M5bOW8O42INxNm6MiAotmYP2i7xaaBM5cZ7ZCbmWCJC/abtFNHCmVnh7ZatBjmi7uFKG9s1PFNnaq+i1d8JzuGo3BCj+ASftUz hbOoAVEb GIv6IcODBsKhuhhRzcZkAHwEWvfc4L3g5wsenXRWOgSEwp41fRR5QmisjVL31fDdpgdKcH0afQociRsW1p32CNIsZtJNzpUGBwCRaTwZuVo2HjE9xgHo9S4jZ+AI+3RbQB+FSp0BDDZ8TbbOzHO8EVsLAM3ga/oSorXDwYl5C/owRMjN6zrm1G0GgaHV0IyRcdBO8ty33HASS0AhFi4WPLthSVmSwTw6Un8MrQgCVnFVMBCu6UZIH52lItVQCmCbg+YgPPXMvErEWZOLPpAi9zvXmQnRsA5fg4ApV X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: clang doesn't deal well with "-pie -static": it warns that -pie is an unused option here. Changing to "-fPIE -static" solves this problem for clang, while keeping the gcc results identical. The problem is visible when building via: make LLVM=1 -C tools/testing/selftests Again: gcc 13 produces identical binaries for all of these programs, both before and after this commit (using "-pie"), and after (using "-fPIE"). Also, the runtime results are the same for both clang and gcc builds. Signed-off-by: John Hubbard --- tools/testing/selftests/exec/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) base-commit: ddb4c3f25b7b95df3d6932db0b379d768a6ebdf7 prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27 diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile index fb4472ddffd8..b7b54d442378 100644 --- a/tools/testing/selftests/exec/Makefile +++ b/tools/testing/selftests/exec/Makefile @@ -29,8 +29,8 @@ $(OUTPUT)/execveat.denatured: $(OUTPUT)/execveat cp $< $@ chmod -x $@ $(OUTPUT)/load_address_4096: load_address.c - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000 -pie -static $< -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000 -fPIE -static $< -o $@ $(OUTPUT)/load_address_2097152: load_address.c - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x200000 -pie -static $< -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x200000 -fPIE -static $< -o $@ $(OUTPUT)/load_address_16777216: load_address.c - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000000 -pie -static $< -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,max-page-size=0x1000000 -fPIE -static $< -o $@