From patchwork Mon May 27 21:00:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13675760 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2083.outbound.protection.outlook.com [40.107.223.83]) (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 1873417E907; Mon, 27 May 2024 21:01:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716843670; cv=fail; b=GDZ/pRWJEx/ZdemfhySuq+CYME/53OOScX7hmNnXhurOibmRxfI8A+pd/oLd+T3g3Uh7H8aldNCUuCRZFN6Hp2CFTvEFA0MwQY+/e4ekaCK6PoMYYxTTViTzu0YVRSVQMXetESIq1Sk2f19uF1lahkh+vdhHEfDp6yBqiA77biE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716843670; c=relaxed/simple; bh=2tpMA44GpZVD4BBg2uv/zijRwNQM8ebJXKRISAlvouw=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=WcvREy4LFMjcdLoHtZFHx34etyAqy0wElRGTA2JNmEnKHNZrAEaUbf/pf6JE9TOvEhQSfT5X6SvBglDyt6gRWg4MySi6y8Pv+YWIK90PGAWtaRJe3pHW+yViKiwdY3YUZqeICVgpamn8UWB/0m9B5A5Kfy6ayuVlgx71QVHaYIk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=BkXI0ZpZ; arc=fail smtp.client-ip=40.107.223.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="BkXI0ZpZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b8/HpZCabgzQZNfx8fGqcQvR2Pr392N7oLPXvOkVtjEEB/NQTb4HJca4uYJZ03AoPs394q7GWdXIs9WfO0U+PwSmvhlqkUpGpzhXo/h515NQUHkqOyzeUHWuHqovqD3P2lUe1jtv4MqydU0g/n5bN9QGzJqQQEVi5+gceM86/q+Nl+Gmg0zWt1DzGxcJ7k9PwZ+ktHqJ0NeDXWjXS4Wg3aRL9mYEYMkpNHNbkulEpuC2vuI6ZZUmISDcapjG9AonYnMB1mmCfM5Oh02M+GTyCO0ByWnSZ1ffeiqISqVFVugeObCWuzjOSl/xcmwI6RGDfZ8N5vS1w2+BJeyiuBe3VQ== 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=xXR33Wqh6ofv9ferASJQe4YXHj4eMz31yyl9MvtfjRs=; b=nD9axwcK41l9OsTh7ZgaR+MNvkRCWeW9V+59TKLbn2Zx2wghQaxvvvHIO4m7qT52o/wIWV/oYA7R8siAo5yx5PIeeMKn+XAEtxP916rYeK2/nWlcHtussURWP9Qn+A6oCRL6w65oSoixT/bD6bDKUB4ISYw3J5Wx6O7Vq9ijA7N9wSY95VPajSK4gxGrkEgy+rRAdVovadfQMx+35WPLbuled8/I+3yu7OnUczyQtz7E2WaBALZV8T6HQZ9SHash55qNsC1R5bBdZle63Nb8WZjcya8a/BeLuBeO1GaK4G/+O7UOXYnWgkWFwSSZ0hwHgwQHFuh9BX38ZsKQMrMt2Q== 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=xXR33Wqh6ofv9ferASJQe4YXHj4eMz31yyl9MvtfjRs=; b=BkXI0ZpZAdSbZizpuTurPCBIXossIKJ/OeGDDUa9KzLCR0LBE3y6ZNp025VaMYrL+QJtOSeTfYHAICAUgBWyBiyuFX/S6V8PdiiUNOMi9V26DetHjLr+kGsNItvCuJ+yCgvmQUL9j6nwklKHuPV/9G05gW5ygmGUVD7jvwgPiSswOZWSI6FjTO0/wL6FsDR01NVjQ546rrPb7Hxb5xsrbTD+vW7lQOQQCSQ+aPusd4v/iAQ09he3ljclk8PL8k/BzdYze1D9yvXxCIEmQgpXjkp7RcvHfeMNBp9p490c4fCqOk9wqi8YDTSPIoWLhi1Mb9bKv7YTXnaTaYimzMWlnw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by BL3PR12MB6620.namprd12.prod.outlook.com (2603:10b6:208:38f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.29; Mon, 27 May 2024 21:01:05 +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.7611.030; Mon, 27 May 2024 21:01:05 +0000 From: John Hubbard To: Shuah Khan Cc: angquan yu , "Kirill A . Shutemov" , Ingo Molnar , Binbin Wu , Alexey Dobriyan , Rick Edgecombe , Sohil Mehta , Yu-cheng Yu , Dave Hansen , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, x86@kernel.org, John Hubbard Subject: [PATCH v2 0/6] selftests/x86: fix build errors and warnings found via clang Date: Mon, 27 May 2024 14:00:36 -0700 Message-ID: <20240527210042.220315-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.1 X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR05CA0101.namprd05.prod.outlook.com (2603:10b6:a03:334::16) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|BL3PR12MB6620:EE_ X-MS-Office365-Filtering-Correlation-Id: 217482e9-cf57-4fba-e754-08dc7e901fc2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|366007|376005; X-Microsoft-Antispam-Message-Info: zlgFwkxFOmOoKmy9EamO4TBfIq+M5G4p7JYS7A+436Kjt2TzLxzKeLPH1TbldklV4O0CY13wvkZTnIMmmwJviA+L9ZKx23FeIESCx7GjCMXgGUwmsSy9hbZVrm0SJz0gH2IoyBRNyBMBnY64SKNLMN5j8vUd/ykv066V/Z6FAUHExt4HESTzkx4gg5VvQBwd/QK7aGQffCR0fAPOi4EfGulfZq1UmFSjh3lcaF7O8KfOpj1dW8o0AMwUr4etXGs/JzSog4UJq63CPFBiMC/c3yfe5mZHJbM4rHgSQkN5LvZsMhmXpUiCjFpnfcoDcTK7fw1bgghFgHoskA2QDOZthYc6aiUtW14hL55OupWnmHnTAdsvZetvdg9O+a1fY9b02npIVtdlkxGQcISg7Ovwcgjb+St1bxzmZxQ9BRZCuu2CV5zRmGuS5/7F0QNuAoM3NQgSG92oMllzy5mzSOfW8BnfdqyrhB+g8TZhGoP1rOozpbubWIHYfkahPZK7WzfeMCXWHcX9Hz1xef2fydSVZWF9WZw69gZsCg/sQslYWq9vO37ocKP11WMhlArue1QuUjjCZiEgLxl6Z9WeM3Dy/8mTSofkBW1thfCC9FmnKajVhfRhgyScK46HCH5aucTzJRSXoxaFjsyhPUJwR8Wo7iPal8tRr5q8sVdeqmS2Id4jHfYkNw5SSHjUvlEYiAbLHgDbP7PYlmGpV65nufhLdhe3Dkv/8LBDZHv12IkwrSQYyq+6sf0FClIZxvx4tIjwC6EoQiJRrI+Os5t6qlYbKJiuIdmNrHR2eKj7jwafm3BeWR9NJNL6U+jnpmXE/t4+Ec5cuMjaRb0Uigyrvo8UpvXPfjDZUOfPawnspvjyVuDG54g5WuWPxUZG65DZNYloFFKDXSujq62t082uCBsM9L9rllHRH+s1kDheeG3gUV1Xq0UUKka8B+UzFWLBYAdkXH8JoQ3D/5AJoq8/cWv5iuZU/bXtgEAiiUg9MLYNbdTYtXEeasjQQ8H4Aiv+uHRMfz6Gmpds7DK4kYUFmJW5yr0IhnwzfIvcqoCSjGMQ5yfnuNRZYyd/kaM1KqlFqHvO/L2wlImrbLSN2pLwNT7dG5TDjMxRuUc2zrbYmyoS0+SZZYxZq4INXkWV4pfBtN+Ax1sUmNYeIH6dZglwRVZLm1lFroCtUZIe+CIkJgfM2ULuFb0NVUgI9tbPDJDg6JSi7JRY1/TRbBniKmXFQ2MaMmSQEoCbKNEd1diBFcZNcxlSRrAQdVeVytWQ9L4QWz69lfSVN457vzabiTc6kH+Lzg== 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)(1800799015)(7416005)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-Ant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YbpnN02xUOUzq5udgQ6lhJQwTBSN1YRupuW82kQVKH4FyFbAubTQjk094AXjLe7GWWZWyLT150Gjh2tnj529DTzcZoEz/d7edFw+lRhbcBZWi0vjWpxEq/TtS3w5VP6+PVvNO7RGEEDJWi2l+1vg+EmkjI6wfoykHHG1sOdhL86McJmdoG37pnHSds88SrNhge20YNGVXQwEbzy86c2fmmaYlTw3mxQ9z6CtKoHXJ5skoKiRJbhHDbixJ2zc2tnvwCyh0x1rPbdiebYp3jd19eVh21iM9Zc2QgVG5+aWQN0pARr8a/soP+9SGRgRNlms0booi573khAiCV7hf7k5eiOD4H4mMC9IyUXveyGFPjXhKQnUMegkxKplBK/SN86MFnSC8Lvh++jxUJNLaa3rP1//cHT5CiZX4loh8GixfPPVjiC0G/Pw9rEguZ+Ymrk/fSxtJqDqhP/L9mydAgmuM+wW1tK6Gc4L3o2qywO9dWIZHj4F6YNctC3BA7W4InTQgQR6pNZ4AO+bJ9mCd0E2CQNEXISFlfq9qhaOw== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 217482e9-cf57-4fba-e754-08dc7e901fc2 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2024 21:01:05.3715 (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: F2r38Ef7WnZ0wWlDJBz1oYuc6h65ebUkyaWDdkTXjS7E9H3DnQxzZap6VKPUUHSj9XAQZVE6GxikJOqbWuLXMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6620 Hi, Just a bunch of build and warnings fixes that show up when building with clang. Some of these depend on each other, so I'm sending them as a series. Changes since the first version: 1) Rebased onto Linux 6.10-rc1 Enjoy! thanks, John Hubbard John Hubbard (6): selftests/x86: build test_FISTTP.c with clang selftests/x86: build fsgsbase_restore.c with clang selftests/x86: build sysret_rip.c with clang selftests/x86: avoid -no-pie warnings from clang during compilation selftests/x86: remove (or use) unused variables and functions selftests/x86: fix printk warnings reported by clang tools/testing/selftests/x86/Makefile | 10 +++++++ tools/testing/selftests/x86/amx.c | 16 ----------- .../testing/selftests/x86/clang_helpers_32.S | 11 ++++++++ .../testing/selftests/x86/clang_helpers_64.S | 28 +++++++++++++++++++ tools/testing/selftests/x86/fsgsbase.c | 6 ---- .../testing/selftests/x86/fsgsbase_restore.c | 11 ++++---- tools/testing/selftests/x86/sigreturn.c | 2 +- .../testing/selftests/x86/syscall_arg_fault.c | 1 - tools/testing/selftests/x86/sysret_rip.c | 20 ++++--------- tools/testing/selftests/x86/test_FISTTP.c | 8 +++--- tools/testing/selftests/x86/test_vsyscall.c | 15 ++++------ tools/testing/selftests/x86/vdso_restorer.c | 2 ++ 12 files changed, 72 insertions(+), 58 deletions(-) create mode 100644 tools/testing/selftests/x86/clang_helpers_32.S create mode 100644 tools/testing/selftests/x86/clang_helpers_64.S base-commit: 2bfcfd584ff5ccc8bb7acde19b42570414bf880b prerequisite-patch-id: 39d606b9b165077aa1a3a3b0a3b396dba0c20070