From patchwork Sat Jun 8 02:10:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13690810 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2042.outbound.protection.outlook.com [40.107.243.42]) (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 4D77A6AB8; Sat, 8 Jun 2024 02:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.42 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717812631; cv=fail; b=Erb/FjoNh5QHde0PexVtpDW5qKfzWOoWvMUZiKQc/i5+asqrUOqZdVm3N1eC2agR0uTTx9reL7mMr9oN03Vt3/FJM5AMB2t6zyaUmMO+W83rlkcHkSkLMJSVfJwTgLPd9B98bS5qCotqUJmOR4MWRt09bBzYYLo9KYqmeB14Gpo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717812631; c=relaxed/simple; bh=0VxzAmdBTUInOc0Sc2cQqEnlt7MOQJK8+EPrCzg95dU=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=GB7iU4slggRemY/GXGp0WiA5Tssi4TZqK0ridAV9stUp0bjMv1trctwiKq8/zX+ILlQ1lzDwgIyfm28LlRBVGUa9qoYHw2AM1zvgtHsS2D/Hx1Y83sWDmC8kA0w78ihnSSAxaLESM4mFhXIQGOLcI5aRIi4djbhsU63DctjYFn4= 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=a8BsrJk/; arc=fail smtp.client-ip=40.107.243.42 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="a8BsrJk/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q3oysspJxGmHYs9amR25tXah3Xlxo2x+IM6/mopNzp7dg7su6b5yWZDL7URJ5FdZ/OcVBO75L+Do3nGbgWgVMyueYhYsig6x0l8q6jUFewlrzkEQVGqsRZL8pnTUTG7mQsYE/C+4A9sKC7k2ugtmfVx2mnjI6iNXgYgOHlsdvnzDjdHVHY9SunjR+bzzoq6SCnLhmzsppxarQiUbLCtrDNKGtSizJtKcsPwKX9Lqkom3fd0TV5YSoMqi6+A0bdl2k3QyYdjJSuPhEz1Kf/lU1DlZmMWAOZR0anRcdJlMRUpLmSbAFDEu4imwvjANQ+rHYt5VUg7/ASV6mQv0aBF2gg== 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=GVDnhOwlI/39VMZ3bsvgpIHu8ZZKgMSA5+3+OPHxcoY=; b=XfpuqRkaed8UzTNaSi5Rx3S7m+NqJ9A/EOW24ys/uit4jYi5644zeBa2BrhF0mCsLKU/+5foh7juvez5FTfqwzet7MhYJC5Xm5n0lfFTaQt1ooMRqm+COqF/EbOGblK6zSaYUc5092JUIhvPvpge9DT1Hxce+pkQtODfYSBoBxpjJFXYXVH7l00dPI6ydmwHRwaXMzxnV9D0KOAv+VeWWvWWuVXogfnGNyCW/2bjuIxI3jUjBqwgh9OTkxsjqSXi8s4XSxKr0a4iGn4SP9rGZUxecKOHh2a6p0d2SxBD4xmKp3UPuOPVSdv14eDjOQ11favaoNp1BDk+tWzDQIf92Q== 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=GVDnhOwlI/39VMZ3bsvgpIHu8ZZKgMSA5+3+OPHxcoY=; b=a8BsrJk/M5FcQ+e9+lPZgMT9pUjjgMs71l/j68IOrmKcT/PW2Tmegn87OGDEOS//0oAeWA8xX8LNyunKiuOQu6zwecA+B0r7+TPkhF/EGqhpGTSZO236BCazlt9D6ka2vB/Zl2ByIxk5z+ZO92u6cb86cPrGCdjUl/QAz9GZMwOWkINEyIutHcXBw+5BbGGHOEUeGpKuS/F8mKavOmvr6ylTzg84rYTmwqNZ9T1J891f5q0D/OWxrsYcsDn7sH3OtSfsENY9yP8VJoHa5Xx1a+k30wHW2oRsjfBFad7g5xklZlBbudfTC1TgMDoVD0aoU8jSGGbcfWLqD9lTBMHw2Q== 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 BY5PR12MB4196.namprd12.prod.outlook.com (2603:10b6:a03:205::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Sat, 8 Jun 2024 02:10:25 +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.7633.036; Sat, 8 Jun 2024 02:10:25 +0000 From: John Hubbard To: Andrew Morton , Jeff Xu , Shuah Khan Cc: Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML , John Hubbard Subject: [PATCH 0/5] cleanups, fixes, and progress towards avoiding "make headers" Date: Fri, 7 Jun 2024 19:10:18 -0700 Message-ID: <20240608021023.176027-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR03CA0001.namprd03.prod.outlook.com (2603:10b6:a03:33a::6) 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_|BY5PR12MB4196:EE_ X-MS-Office365-Filtering-Correlation-Id: ede95936-ae5b-4b19-71ec-08dc876028e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|376005|366007; X-Microsoft-Antispam-Message-Info: MvwTEObELXB2IkuN6c6GZpRTAuaM9ewNx5HdKYlx395+JDPnsy9iPuY4F2hFpmf6CE1d0xH3tHiBk0Kn/m2XuRIIieGGXERCCfhUFuG9uGoUpsu2iR9m5EIquCAfugDRKcO6GrN355/LLDPkNt/KnjouGY2wx0jMqurq6XIY0cQ/00UBP4Fg/21bso4C5PbNmpzuNsOSNaX6X7OsejhZe/jMLXY0D+9lquZcJEXiHmFvLN8ehcsa5HF9GnkbAxn0bq046kQGeCfKIJT6cAxwgySirYZYYqzFpUy2DkQJZ2wS0on/UkW74DejWGBaOvN81N60MxOWlpON4jmBAYXt2NfNsz1ChqEVH+lp0kapZwNvZV0o3uwqZULjudORautxnqjSkQvYcK36pFhUAf/spGy58SXCvsZzDwUkVNOuVorCpq/Di1iqB3FzvmaD/rM1wq9jk45jwLptFtaUfdVYJDkoTzh5jBG66XRz2laldHsS/ZmNFUS67osQJMBujV/wj04nicJziDQgf6S1CDrTEfxJ4cquG8j30KZBDzVPjEFjZWegco95eT0q0yW/u60/sA4RF1YIxlSNkWJprlZex9jLP7E+s+/8mqbzRy1PGSAmLc9CqXl3DSebr4Gxr/nh7uFJbapmH4/q4xcsw8owCnzV3riNV0SiOy+PsZAkU/GsLhBU4KEf6TtsJpu4PeKiAw5jvsIN3gIIrnMwHvxN7rKmnEwFb3kxCy/o/AgKEXsO0ibplA6JqHIVrO/lwzuzuARkYEm+0YT7d0BbTtSTiy29B2kjTcf50jh6IOuz6SfqYwlvg4i8fuOVzodbBtreHpPBubxzgclPix4yPiOnu0VxptuZqKoSbhmu6evuXkmA6QCuGDvgZd4sFDP+cZ9pYh/0QqJOxm1yIhHrMLHWuSaABmFjFsiXo+tns1Viy6rA/ag/1rcLw00DK9+KnuxxPgNkiZnfAtcIjCyqwJTjgGqaTI2Gh+Vht6aOC/WAahVLw8txxIxgrsyDZ6CMevFxOaQTObtp0FaD6YOkRlzAliK7609efDP8a3aaab6P8JGQltOKiPdSfg4oeeE7dw7sUCrspplrYsi2u6+ECaiKYlTy5XIiSZVEqGGjpaRERHwDHkTCh383uvoA5pywlQpk4lCu2dyBVt4DwdyY24ZRAEsbw44Y+ZKIE5KrecpqDEuU+VHHqnbyrLeaXEn6OLOMVE2X8mP1cqGt9at2fYIazIfdyrNY/0b8K1KRrbGCVUbU7bLDLPMJVAcu6N0FpjEqpQcIDgJ7UK8XpnMQcUsEhndwCHCR7GsJ4AwnjNGjyuydcFAlTu5CBYQhCcVDbkgQ 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)(376005)(366007);DIR:OUT;SFP:1101; X-MS-Ex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fed4rJnm11pCQiCzxmHt8svKb1FtJfGimhbx91OoQw1CPQwxJkOt2fLd0HHPgztIdLP5r2eG9deXS9BAPAAWRIEOZZAxonC0nexCNTMUHzMy2leXz54HgIWrufG5MyIdAhqDoYj9Ri02EXYIxgx0v2BrMRyc6pJ8CtsSlK/th0JmXlef0XJyBOWqdZmR6OYxNPvIPjYYK0I72SrlCQzHMZsx9L6rSswAlV6XrpuIBhAizd+ttnTv+eKB6J0vLggaZPXmw08y1OJJ4XVJyM+Gj7QxaUQWI/UHFbkTaY4jbsG9wf+bNqIPY1jsdWC36ML2BWmprYTjEN/SetrbY9x+y+f2Xz5IvXmHiGz9memuGHUxmGcFxVZxMu3f0SXB7/2snGTraMICT1q/EHYSg8xevfSE56Sr13mplEgv+WkyHfGpViDmRk3xo0SSvHIQKcdudV/jaGw4KeS/lBBT9ojvyA0cXHMozjesSi7kJspyLMmcow0rnX1bMvq7/lU/dsmyErKEAzNJrbkzImA/ywaOfEF1f/7Grjacu86okfURuIewvRXKwO9RZHAsPrupRjgnQ X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: ede95936-ae5b-4b19-71ec-08dc876028e2 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2024 02:10:25.3287 (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: ZwxFW/WDfMtc6EXPlaV2sPRJRwxBXyQ3ILci3jpSSvV/v9WwLSerV1tmFuwEfFQrarrbBxjxUtDjo7yjsL5xVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4196 Eventually, once the build succeeds on a sufficiently old distro, the idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and then after that, from selftests/lib.mk and all of the other selftest builds. For now, this series merely achieves a clean build of selftests/mm on a not-so-old distro: Ubuntu 23.04: 1. Add __NR_mseal. 2. Add fs.h, taken as usual from a snapshot of ./usr/include/linux/fs.h after running "make headers". This is how we have agreed to do this sort of thing, see [1]. 3. Add a few selected prctl.h values that the ksm and mdwe tests require. [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") John Hubbard (5): selftests/mm: mseal, self_elf: fix missing __NR_mseal selftests/mm: fix vm_util.c build failures: add snapshot of fs.h mm/selftests: kvm, mdwe fixes to avoid requiring "make headers" selftests/mm: mseal, self_elf: factor out test macros and other duplicated items selftests/mm: mseal, self_elf: rename TEST_END_CHECK to REPORT_TEST_PASS tools/include/uapi/linux/fs.h | 392 +++++++++++++++++++++ tools/testing/selftests/mm/mdwe_test.c | 1 + tools/testing/selftests/mm/mseal_helpers.h | 45 +++ tools/testing/selftests/mm/mseal_test.c | 141 +++----- tools/testing/selftests/mm/seal_elf.c | 35 +- tools/testing/selftests/mm/vm_util.h | 15 + 6 files changed, 502 insertions(+), 127 deletions(-) create mode 100644 tools/include/uapi/linux/fs.h create mode 100644 tools/testing/selftests/mm/mseal_helpers.h base-commit: 8a92980606e3585d72d510a03b59906e96755b8a