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: 13690816 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 1D804C27C53 for ; Sat, 8 Jun 2024 02:10:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E8206B0088; Fri, 7 Jun 2024 22:10:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 297B96B0089; Fri, 7 Jun 2024 22:10:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0EA9A6B008C; Fri, 7 Jun 2024 22:10:33 -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 E53486B0088 for ; Fri, 7 Jun 2024 22:10:32 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 54F821C0F0C for ; Sat, 8 Jun 2024 02:10:32 +0000 (UTC) X-FDA: 82206092304.30.AA3DD41 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2073.outbound.protection.outlook.com [40.107.243.73]) by imf09.hostedemail.com (Postfix) with ESMTP id 7593214000B for ; Sat, 8 Jun 2024 02:10:29 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b="a8BsrJk/"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf09.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.73 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717812629; 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=GVDnhOwlI/39VMZ3bsvgpIHu8ZZKgMSA5+3+OPHxcoY=; b=FiHONxTLmmymfhg9tfLKVUlUrxWqK3IfdS5PdbTnY4dhixtfj6FAXi9RpdWapug7pGQEbW P/QMppjfJwxUNtflEys3lUPgwVgb2DDUZus14fyZekfc+EUn9fWmbS5mjTxLU/F+1ty9c1 joN027zIDpbVecnWNSA3DFLhxVlNP/s= ARC-Authentication-Results: i=2; imf09.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b="a8BsrJk/"; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf09.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.73 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1717812629; a=rsa-sha256; cv=pass; b=P5kG5KKOasYAfIMnOHGfd3GTvTtlQPEB7M8wj0EovZeLkJiUMVE7JD1AlxB80VKWXW+1uj Sfh/wbk0ZNX2Q7MmLofQJQsy/H0/bOMkrpzzFMQGSkLZFfLyD0Kyh6BZIsainnR/wY2Iq7 BAV2S18ZfBDNoRuHROTELB4GM4HDJpI= 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== 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) 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-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +H/d5y/KF60qGPWZNBlRSzUZSLnzh+AynK2jS1XCeB1cqrDyNBtLgI5xO4Xb+h5ZghzWE9HH+qpl084akGH6sQnfljm8OPvF2Iqh+yofRqJh9kp4RhzukLDffF04wbyafi7rGwEVE+6TyALOdcBsgzgOAk4XjGvmnwL1F/Dm0kGDNZc9xu19NcXunhoQMmFqC7cBJG8LSnYCy3/YxNYQ8Ej+TKPSM1f3nwIrrNluHki6oEaiG1TqoK2wNKx5ACXBFxMCapsVKkCyXuDE/F76B6kaHlXsXyuyPJzC524lJY8f+sptbXHRxY8LPBE3wp6yfCx4s09wGveVS/AcYMDB/EPoYhSGlXrFZWXTqJ5r5e8INo79b2+LAGvPqQ2CPxAv4jTl2I/bFEVxit7wZCaB04ITxwlfrB4LvwsFUCV8+PEpVBfK/MzGAnERZkhtry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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 X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 7593214000B X-Stat-Signature: 6jumziyo6bij5czeez7u78di8e6she59 X-HE-Tag: 1717812629-239276 X-HE-Meta: U2FsdGVkX1/8yRFFkKF6Q5VgI7Mo6TRwIgLlvpS7Qdv2x+k9ODr3bLc1926bovp8qq7b7EFn4Uu5jeOJr/YRY3es95ypYtKrGzJ/x4c5AC39JFsT5gxm9MHCrwJX6rPT1SMmrdJ9pCArtvWuV+I392jXse0mk/5fqup9J4FgvGCEDDMCqeCC+giKUhSiR9IZj39Zn431qb9HmGyK6mZsvY6I3/mpWDPHkAIv39tCbn4Cc9KoDpqXjjH2eqp2f0Myzbwq2BbiW7Lca+q2tDrldSetJqKWib3cKOqRqeNJnZby+jp3UaMiBIgUhuWadkUH3nEuT03LSgQIVBuvS74slhn7owxLSrmAC/2X8tZTsFFRWoy6A3UbY8DeeDd+2Pq9vl6vRPWSW0NRfkQj5mtVWTjv7XO5NT0Wz4ezWr0ud8tU8YhTAL+3PTF1asDiduH2KmiYei+B00FXIOB6ZIP2G5NYky4Oh2B7jvuJbPv8HRqQdZZLYfeJkUfNZtpUaxcj7If3u7rBcbjJ3dMgdILAK9ZZ3X6uR9oEv7lhEMeyxjHO9bj2hcgZxrId/ctg2Ndtf8jmQisVFfv3g3ntb5t99XssGvIb6fgWJO+utt01Ne8uEtCn2ho4AWFxI6cMD6gE3t+W0c6QeSiQWJcrsA6fE1cZVyLddBRNQCa7WMmDVfs1B1J4pxhUaCYjGFlCSgeWIPzQIZCq0FO/2OPtGzAz6fzpcmZF1RNjy38n28Z7EwFFtf6Yn8NaIcq8rZ8nzsFWzZaEzK3gtDNVCPzggFBtzkk/8evs/jo1ioabUIS0TbkY04UEso1qPISL+tsI6vHNviQB4WhKubIx8nm/Bn/ww5oKnDGwrOlcvOuC13kSjoVBFviKEbfd4Bsxbs76YGPjtze6GXleHOeeY8V8RWDXcesyjOaZ6N/7LDaVfnN9i+Leetcgg+LLErlzhySUx2S+vLe0qqyghtmn/d6RUum ZbcOhxbu S33837sd0OGR2Xa5VxiR7wDkCXM5JjDPXCISmzX3TZZ9c1yeQS6kD1+bdrAmAQiKZuDSf8+ZGOEN1DPIM9GsZgWjWomLt/lN8qD5f2PPCaTg2fXy027cShFCol6LI12C/IAmdrm2Kz+6v2VZ0zVsAMfP9QFtoKeRSXdX1Hs/TwGF/W8P9aZvbNsXUAMsGd2pCbsZmEz6w1J7UOd0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000941, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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