From patchwork Sat Jun 8 02:10:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13690817 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 7FF56C27C53 for ; Sat, 8 Jun 2024 02:10:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 077206B008C; Fri, 7 Jun 2024 22:10:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 027096B0092; Fri, 7 Jun 2024 22:10:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D94936B0093; Fri, 7 Jun 2024 22:10:37 -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 B928E6B008C for ; Fri, 7 Jun 2024 22:10:37 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 7F5951401BD for ; Sat, 8 Jun 2024 02:10:37 +0000 (UTC) X-FDA: 82206092514.29.92BF54B Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2079.outbound.protection.outlook.com [40.107.243.79]) by imf28.hostedemail.com (Postfix) with ESMTP id B61D4C0010 for ; Sat, 8 Jun 2024 02:10:34 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=cDBEEQxo; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.79 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=1717812634; 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:in-reply-to:references:references:dkim-signature; bh=ZXZfY0TcuwHIFCWojdHQyPgCzHtD2jyu75gGuiYghe8=; b=VTUYy4/LTsvWJkjLdiKpEep4wb4ssrRNSGEmW/AaYUFjUPshuqtNNefOSfOwrsw0GXKbYq t+craf42xCIp9wzdIO5frBykuGbyGZkYcu4/ix37vCXWVQvpDhSiFh5WU2H62+jRzOc92p oHicjSuqfphcOkI/XyUCdzOWdPCfA58= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=cDBEEQxo; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.243.79 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=1717812634; a=rsa-sha256; cv=pass; b=uZFUDMDJxgxFHdmeXqDtx38lseI6bEMQnbZuobIXeuCNQFd5/UBcABVhEZLCS/lS59DxmD W7PN6UV8z9Mug5O0dIUHRfW+rgm8ka16v2EreMo3qUQ31Y8rYHXTS8/Bo8FcCeMYVYzx4c G/+ST3x6otvESAHIn/99TX2h74U1GT0= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NrYZM7KYHtVcNtbQQdKshQeFGJE0HIGpKNaf2ksOiJoNQSlZ86z7Sh57IT+Q00icST7tFjK+fGam5cFMeQZ1AimayltTjPeTjottsgGYR0HkXwIr36jk5N67wVNaaTbuaZZLISTSDx2DtRrHzZfOTAGBfwUCtT2l5DZcX7kgZbbKY+CLzFc+fL5mL8iBL8NM06DIGsF0/CVtIOG7GBCgo0w6yqiOZHHsg+CQmmFJU/+AbP6dQ3sYZsnHYnin1fbNll0h6BagRdVdz8+WghcV7D2iIKGrujeEDIbE+10hyBe+vWqxVEe1A2Bb6Tb+ErvLHGxli9Fx1P7srJTPrRKGXg== 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=ZXZfY0TcuwHIFCWojdHQyPgCzHtD2jyu75gGuiYghe8=; b=BXCNmMoZvNcF7bPYHxMjTEYrpVH2bsHnAhxa4LoTA7oMx5lCdVJ0JoiLAuSZdg7tJ8dqH4mF7eoWK3mW+ED6VLwu2zJ0cRs4mtvyXv8CN4tJtDSe+dzKkoOLklLlZ1ke3hrBvJBewsPI1Jwmru67pNYYvSFweUvNm0otZiUEKvO5EHwHzEkSe3kgOsWAxfylFCbew9aoOHU3wH1P4QqyeFp6+OQLUZOhQg1r57KoREGTdEnpF+VtEZJ8C5bb17h3jvgXsmuljX2Dga6UoZTKr/BNQZvhUitb4ghpFaM7Efp01erg/4Z0Z8TQe2HLM45qgoJfFL0k2tykBfxyF1J0xw== 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=ZXZfY0TcuwHIFCWojdHQyPgCzHtD2jyu75gGuiYghe8=; b=cDBEEQxoqCMLJ/hHyOcwCI+VE/DD+/wG4jTGa5tw5jf/0OKBy37hVMe0Xq3TBdi5a+DTCdu0PdVZdaXnGa/geWdaEWxnViN9PVYpWPL2MuMDTN1UDKhea1x6lzzerDaWy2ksTwArMKaEH8yNO/dqARjStl16vBkXQ2VkJExk0HJJi3ReQLpPr3+KhWc7TeDDs0mdz229N75Jj+3ostUITi9wBsVtpZPrku8zgzZeNXUqS4ZOEewESWH00Gvqgd3l4p82sQIA01Y2t+WT1iJQ833uEAvVTKAAkNNKRGfTB9WXJQZC3W1lkA7bSoWnRNNh0AFRtF0pFS+/g3XfF95rdg== 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:26 +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:26 +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 1/5] selftests/mm: mseal, self_elf: fix missing __NR_mseal Date: Fri, 7 Jun 2024 19:10:19 -0700 Message-ID: <20240608021023.176027-2-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240608021023.176027-1-jhubbard@nvidia.com> References: <20240608021023.176027-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR13CA0123.namprd13.prod.outlook.com (2603:10b6:a03:2c6::8) 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: 86d6ebbf-5e89-41a3-922a-08dc8760295a 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: 22cqeRmmXd78Vy82N8Ruj8Gu3Vn0KZun/ZH2R/qTL+afJeulh5F2VybYVpc6Ku0J0ywyn9E3hIlQ2Qsm7NFsZ0aGqPM7YkhtOvSCgUJqa13Jf8X/Ph3tXMUAcadYegabpM3DVn8F14D5RhWDG357d8vPvWu0EOVR1sKgeLFxXd+LkNIO574RNPZSyu9f1t+XYVZ5e6PE1EtJZAFa8eXUFrdQzGX4cx2cwqNK71hQrG6kQgLDgur0+eH6zHuWXIKcI7rEFR8Ne+nTkyZ3V2Nw/DeJeTqaWfYysyY6ZtRwaFy7ScPwIY/hNstg4dsx4mDc4lLNvgsLQJEZ9A4QaLxurD/p9VZnzJZ/RFn39eYu7nbfuNBWyWDWm/S2uXxyTOTP59dNJ+7+S3Yz3S4afmVZNyCuT85A0Ceg9ID6al0RvPOUHv7D8CTnoLYc1JcBcHM8lY/mkf15fg73fgb5RwuPNMpjxvdYL5t1mKzc5OP30tR+Ky0g9Q97fch65oInNb/dqS4cZejTihPyxGJZL/4uJgFfeoBNqVlGA4PXVRv+ghd2T+NEG0mlqfHfbdDWze9UBIiaVQ2JhtHOJLwHZQ//6L3cNlIca3oMpKNaOyy4nG9+9sXlw0NlCudh02LK/BQONX1ASTbHLWTt8Lp+ndHzAVJEwf7COF+NtlfIReDrNsYNGWTNlqHkrbZOv3PPK1xx6f69+MRBBwrc9SzPMI79zTXG3vDXctSdTcSzrLet1kPo0cEF+VHF6VEY8owNXDE/fRpIgSERWQW07HVOBrrVJVBwsIYRGzBxjEnCpu7eGB/DvQc9LIXPeXAH5d7hAeXaSi3d4S+tWCNYsszaYr2MFb3ZN9+H2gaxdjMoz2j6PhpEuXnPadfVyOHS5zAoXDTsgbbtTKaDWmsrIn4xC24bzUIocGULYHulJGVAWS88PvpG8ccVJt6B9w0FH33NgHfXfR2tQDTQ1osC+387i22VTtjTOGx223HeIn0KSD7YqhFDlO5WrgiPYhh+GUKwTdH1aWOd1akC7ngKsauOz7cNTfqWHi/QbLsDsaHmCpj+qKKMI6QUm3hCr/71YdOiuB+t9PfGs+XxlstD3MZd1e9C5lwn4nF029S28mWpad9mmbxGTOFxRFAM4pG6S+V5DtdEgvLYu1QBVIJExcmWwlkssMVb9iwRrCuh83Jec1Sg2RYMeydcdXywN/i9cO5DeNXqvOr2Qag/t9SHG0rSxd5MqOoVMDfhsItFVgWb51/oklBJQTN6pJvy3L3bO471PyYPwdZrrhSI5lyL8ejZNSEy++R25QJWA9wZNv6Rg/DqQr+UQZJCk+OR5WnPptzL62+L 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: w8r5ksIOt68PyACMRIly7tQfNn4/x73dlkcGJXw0yoUiKB3r/nVLcRQlfzmRsIgzVhM6k2M/6mB7rXzJLqdw7QBmd3KCGFsOJpP0jbre6zbMvENwPJNEy0tmvi3IAAEV6Ak8nFtShPYDYFQfcrZ13yvG5wUEW+Gu6S2FT08evEz60lEHl87hqkgDB+cvLBryqxGFHq075rA/Jk8oU5CC+kZiSgxHS6mQMXT/J9zFXJNs6HQn7kekeHX7ylpGUDFMfbcqqfamsfg7e+Xz3Ba2Rpkbv/WpJ+kWf0n87jZMeAJU5eBe1/wSPzguzzQ696O8EMYNbckWUkD7NDoOX978MnINkSFhT3RUBLkpiL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EU0CQg5MaBnEF5abeagoFCTZnVWRDte/7LUOEKBKa5g5i6aZns0IDZz8JMeAiJWqhO5cQf5LiLxkX5p7C0rUEG6ErqCFicGO42DH++iRPZRqZxBXHkUKUyNlD/Xi5Jz5xxn3he3swuxMIaZ7WXz/ponKeRmHXk8PQKc2l3fL X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86d6ebbf-5e89-41a3-922a-08dc8760295a 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:26.1187 (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: xTGPuunX/zFm+DL46ptsb/QWBaIIUcu6VW7z2wqwyIUETkEy0DUD+lZ2BP8HmaGLvQvDQDfkCbMaRMYRDcwUAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4196 X-Stat-Signature: z6k474pge8gntsh8uz1ukc5acm5wckac X-Rspamd-Queue-Id: B61D4C0010 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1717812634-532842 X-HE-Meta: U2FsdGVkX19LDz8UEQJCu332F4dJ3Y47C/vbgE7MHc09vK68/p0BynYmuNNyBEACrjO4Xph6CJVIaIhCg60UVHy6DavBL+Ji7Ckl0v3oy47dyJzynqtHmAgeccxqcnHx9HhfaSqAT/80aYgpCheA4cEiD03qEeiEdkX1f0bhg5I04xzr4xZewPe6hH8jnlcze94CJ/Tn5tFoFgMNaspNXuFFRY22utdOvK9pSfgSAkejEfBqLHUlid/RzYW7YDXLaw1glQbvFo3EIQn8j7qpi8MLfseUTKK7hBUVdeenJJCWxmEQ13Np/iiLzrh/VyFATiz/++pJaaRwYeGdtS4L6CmhfGcAXjX6+KQptCH9I2lKn/lbzBli58toThSGn61DulxMYHJ1lY8Xokutki50H73x2KUtmbTPwA4844Br/m8Vc5pFc8tLjNpdOyTnf5j5rs5nfUv+y098YFBi75V7qUXghC/bs/GHG0/kxI97xWYkLPygxz8GN+xtYWx3+zaRJYFw0k8TCf0mZAe1LjwT39OV3oC1MdvPA2pbjF3/KHVaNfcTwbMl2gceO6GT7C3xb0gLCePwwpC0xMfVcSaBz/3W436VIVlNAJWXpX/DziEm14NRRLlABPC/QRHmUR2vMr62FKGUUugZl7bPKvwi90JK0kxrOJw1CbK7yuutT6qTL2n4YIZzRVfXAoM+sbvQnGrGxJOK+6XgAxzMjoOTi1PC26VbEt6Id+5I3NLg5KLJLnakRUQYwCXle1xQniWeQtZKBobi8Y24dgApnmXRftA8w/qiCdhTd/H0ocLduW9yHCRR32sS2D4RKGBcLdb1UmFCKe1cANEQmQZPtswPcLmSDR7X+6lSZYc2UZy385Okx3iP6QwXyk6VfSku1HDfQj/pYVNFO0SAmw161qaNiXPgtuFaHBd0JPVTYa/2Q5mp3cA6bA/bl6EhbAtX2ASofS+msbMgPGMRHZVu9Ko BwC7ArWA qoBLmqMymGgoR1gfr1cp4lHijJ3BsLhjzw21UStMS8xv86sHhxNiVP7Qjk5E5KV5S/L0Wj66IYxzfiVgDcX3rtVe64nU4/1Zq5DuiF2v0Srt6toPKl1Wn+TPacUYvHXwQm0gf4afFTO/Gh63pTaeaJeCCp7IUBGqqI35P/yTXZGGCal47gt/4HYrLj3wEX0U6ibkqT5kHuG7jQIxvSzeIzHBW+wh9+FjpttaqSp2pK1/JRxbMJSoBnbd/1w8Tu18Mkk+xSsjpeJGNSdlJ62uAEVGgkMebe7n92G5nQotKVV6uOpwHbXJ8LIvpMzYFWcIkIG5IS0UmvBYiizU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The selftests/mm build isn't exactly "broken", according to the current documentation, which still claims that one must run "make headers", before building the kselftests. However, according to the new plan to get rid of that requirement [1], they are future-broken: attempting to build selftests/mm *without* first running "make headers" will fail due to not finding __NR_mseal. Therefore, add __NR_mseal, to a new mseal_helpers.h file. That file is small right now, but subsequent patches will add a lot more content to it. [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Fixes: 4926c7a52de7 ("selftest mm/mseal memory sealing") Cc: Jeff Xu Signed-off-by: John Hubbard Reviewed-by: Jeff Xu Tested-by: Jeff Xu --- tools/testing/selftests/mm/mseal_helpers.h | 5 +++++ tools/testing/selftests/mm/mseal_test.c | 1 + tools/testing/selftests/mm/seal_elf.c | 1 + 3 files changed, 7 insertions(+) create mode 100644 tools/testing/selftests/mm/mseal_helpers.h diff --git a/tools/testing/selftests/mm/mseal_helpers.h b/tools/testing/selftests/mm/mseal_helpers.h new file mode 100644 index 000000000000..b922d453a014 --- /dev/null +++ b/tools/testing/selftests/mm/mseal_helpers.h @@ -0,0 +1,5 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __NR_mseal +#define __NR_mseal 462 +#endif diff --git a/tools/testing/selftests/mm/mseal_test.c b/tools/testing/selftests/mm/mseal_test.c index 41998cf1dcf5..20949617a036 100644 --- a/tools/testing/selftests/mm/mseal_test.c +++ b/tools/testing/selftests/mm/mseal_test.c @@ -17,6 +17,7 @@ #include #include #include +#include "mseal_helpers.h" /* * need those definition for manually build using gcc. diff --git a/tools/testing/selftests/mm/seal_elf.c b/tools/testing/selftests/mm/seal_elf.c index f2babec79bb6..4053951a535c 100644 --- a/tools/testing/selftests/mm/seal_elf.c +++ b/tools/testing/selftests/mm/seal_elf.c @@ -16,6 +16,7 @@ #include #include #include +#include "mseal_helpers.h" /* * need those definition for manually build using gcc.