From patchwork Tue Jun 18 02:24:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13701692 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2077.outbound.protection.outlook.com [40.107.243.77]) (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 AE1B51CD2D; Tue, 18 Jun 2024 02:24:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718677477; cv=fail; b=oSnKOZDzpTOyPTW/znLdc9sZFFvW/0pTFDUe7bU3FGqAriKfmBIdPUuqpcCrrjmp1tsd5W9kNQC88N1j78lIDZ1psRUuNeOk0WreP4BYU6IVuUX41YsYCzdIGltOOpjCRnwAiH/3vnOgKd0Q2K6kue/3n5o/R6693FFcuN74mPw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718677477; c=relaxed/simple; bh=yoWAqqL3HUASUs927z0sLL7goDrs5qAjE2F5KFLgcLc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=WO34fDmDiR34A4407ZNVsXrxPQluJNQ16AlhnPg86iGZYQ+RxApOjurQ1d0T1nFbc/lTZVNSRK0mP+WTH9tEn4n8eMZ/thpeqKrFxQE0KMMGLhCv0wNrL2RK0hRkL/nHXLl1XK4ARMnMEwuns+ZJm0PVrSkqrkmjm452ISAE4lg= 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=sBPxiyfS; arc=fail smtp.client-ip=40.107.243.77 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="sBPxiyfS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bo5Q1aGjvsVVc6NUf75oZmYIHuOxw45ml384XOkzeK6lWA6uORr2ggnGLU3W6JJdHD88Da+qnRfe315BWgTjoUWJS6+Ur2X0afa3XbBTdBivrcxKKB8YfvUnpcHjLmvhVHgkH1yeUh/nTfsCbXLR/tkmfIVCVrpVXvE6X/espE4IBVw2VPz4OBRtyQgWsdLg7sU3ADD5v/T5ClfjnoG1iyYis5pj5VWFulqy5eGm9fGuBWRp7GQvOZ7R3OcYYQ6wOWI0OFg2hCKtQT7joeHXUUCPzwtd4w5hdm7FS13QpEOpak0C3nI+Y5Q/8iVAHAzjn8aH05O6ckRXsI/vFggQIg== 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=T+DMGwe7FqnmQLeYIMLXk1zg5zgGZ88xewuLNyoQlPg=; b=KXMQcoBqZYiaLaiaxzvYWoc1PSy20ezsvnaWdP4tYJCForibbgJ2Sot5dCwUZ5PKh+ZKKUCYwQrWvSpTwFAvjAahAPFSZ1gylz4MVmfDXPbhjexUjk9xyuLHoPB13yfmbpJmgRjn3kUFpa9z/C+ji51eBmZdJ1Ut1+Km3U7BigqU7HLSG657QNL5SlYddF6nHxHKvspodfNWU9pcYiVrqqQYRsz0NTNog3OidKgcz+kO5dHtOkbEbi276nBupaEwS8bIPQbaU5DS5lW3Y5Dtt64Sk8WdfZJ4Hh9MbTAUsv1oRmkTd1Z1E3OIhQ5lKzA2KQ/V4yZ06gAk19CKChrTxA== 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=T+DMGwe7FqnmQLeYIMLXk1zg5zgGZ88xewuLNyoQlPg=; b=sBPxiyfS4+YLllcltooLStjBbsOIivPwul4gA05FieE91itkUXGZwH/Lpww1TzM15X8WKdjAypjHmr/60pP5MWcK3kbrAP5JuSDqQdpiY1qL3tLUyteo8lbn+WqnLfrxa6bcQ49wphG2LnYZgvr25KNqgVJlFhFVUxn7kFq/wLyWaT6x3XyckpnmnWUiy1aJieqOUNsqkHelv1SFJifhwKCfZd5S3IdktVKufuF0Pj5uEsdQSBE+hvtrd30eZL8+4har/SBtnXzg1Xuq+4y0BCcXi2/pJ9rkiVKbvIq7cSG8Zna/RhF/yfpFCoJdG9Q+P7jte0h0FTVdsTZZ+LQ/VQ== 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 SA3PR12MB8047.namprd12.prod.outlook.com (2603:10b6:806:31b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Tue, 18 Jun 2024 02:24:27 +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.7677.030; Tue, 18 Jun 2024 02:24:27 +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 v3 4/6] selftests/mm: fix vm_util.c build failures: add snapshot of fs.h Date: Mon, 17 Jun 2024 19:24:20 -0700 Message-ID: <20240618022422.804305-5-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240618022422.804305-1-jhubbard@nvidia.com> References: <20240618022422.804305-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR08CA0011.namprd08.prod.outlook.com (2603:10b6:a03:100::24) 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_|SA3PR12MB8047:EE_ X-MS-Office365-Filtering-Correlation-Id: 69c13d91-e30a-4126-b616-08dc8f3dc6d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|7416011|376011|366013|1800799021; X-Microsoft-Antispam-Message-Info: TIsYiZWkbba8o4fd19caLSSp3CUd+vNXYeviMrQo7zWspVSfiTc7FPkqQUONFLK0DrPSLJPQcPbr37nmmXoDcPOoKPMJlX6LqzOvXHk6OYvNil4Kbhk/IMvNXJ29Gd0cVJKn8smcdpBMDPK8vyyvyqoRNyZipL9JKI6SPoFfr9hQ53p3hUR7bisz4/Cl/GszX0yno2quTsB9xc1KB9mATFUA/dYe/GKVladDqCYpCAKnte8wVvviJ7ELtiZyn/lbsE72NH/iquNKBSHsx0sW4JaSYzcxvkWCygTqdmCRLRHHB1yoH7RVMsfaGISAj752AZLzV/4Zdh41FBf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PR12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(7416011)(376011)(366013)(1800799021);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rho6j8UWGU4QiVcRk7qoWLAIDkYKfYQbU9kRblD7J0W8xeVkkaFXvdAps7pTFYcSrDLZYRNkAin34AyFolBrzOpLvKmVqijI8L46TyXqwMLySz3AUwey9vVWlfKMS0sBeshjwMNfKXBMFmAGF2faxjpCfafszppYEEKM9/W17PFBFed2qU4DHVUaGJyRQZjjmx7GxOek/kl/DpmZKZDx6+lZuF7crzs8t6yIp6qJd0ODG8evKJC1N/Uk9YWXX64HQskIbNGiAcn2RimXOLWbnl6M35GyrF+UmYzOSV9qke/cEj527YhUB7b1HWFYQS64QfEHHh1Xwj8nVjyDux+r7LDQJ10RiCJkGZ5OgpmVn/TJksYetq8XdQxPcW+Z7FoSQ7YmP28nKOr/77MFeGg01wlq1otQrfNECgkonjfJ5U95AswqAtvH2Fhh2+T2U4ugVwABm4eyC3UffFbPBqwEqzxsAhs4v2QEnBlXZU4iAXxUpuuSJgVfmIuxerEXvwsDlnSg013q5j5hTfEvcqOqXmEta9oGVHkY8DILEhal8O3O/lPIUcKPG5loQMxCq7BUjjySPVF3cBVHitYe5gRbSmsgbgmh2l0LbKUKPy8KKbd6/TkD4DbszcLhHyBMRxQrDR8pfC4sjKzA/BhdqpkprFF6Z6e2Luqr01bcxBNGN2f8QqDSCd8O/mSAw7N1mPdVDvVIRvWaQ6ZWVdVW8pSsC2k7eP1B73LhVZ+4Dav6Kr/hdrzQe5EfVjEewpsBQma9DJVCtcTYtEqtGS1mIJnU+JF64Ofe3H/MamURF4VGogEDvgfy3mwYmzx7HDXCfJ/d7btfiGMhXQ36+TlZKvhNbW3AXasy2G224NoyBM540KKQdxC1CsZCcVppNL9RWI6AD+SNDo9bKUqiKu3N1hTNKJOtMvhsQrvggCIQUX+nUbmE0ubiJGw8lq1IZt6GolDV5eUei5R2oEuNChOpoi1VeLPB4isUwEqmcgToD/4kQQyik45fVyVpgmcG8Q0t2yduh3jOsMjV9vni+dyTHu0HR2O4znS0qGa5ozJStnY0TfN9qrAwflplln7/bApRg8Q6cui+tMzFCaltiz87QpSUozZ3xZkGpFpMXhKBCrTI+2uMcLt4V2Gu74CoLV3KNAytnWME/yv8JUJ8c+BhFdHsjrWrguIY1bSMrvpBmkOp73jPDu3wscnn1v/NcokULCzVlNlECdfTKhMwXw/9VNu4rIvLzs3tN8maiSqhNoalJuuK2DGa/Tmp52A/qEmXclWWPNmnhgVj2qvi74jCG7lwQyg+58NX5k9yKHoigFVKIYtK16YHIuOFkQdTX0h/wJ5muvanvY2Kc3y5uXYnWcAfRJuhEEbqgn9Pp0P856Hg1hF9IpbKHQ1S5XuOA2u49cOvkBGHgpoISRbbCi5Mc6I2PMGWgh5g99FZFqzBh57biKeDaz7+h9uS8OZdru18yi643k+UXOOYNbh7PjYhQUTyutNLUsf/f7YDznhsKfzoKqgyGrUKNs6YrkktC3bnZCA0AY61HyC5FauAGokKmOMgA86SZpFqoZ/gM0QgvNfPPwOeSdEcQtgcvx8mP5/FsdQ+ X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69c13d91-e30a-4126-b616-08dc8f3dc6d0 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 02:24:27.2789 (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: iKHQsZD44KAe5NvsxSiaffJ02M8XEPXl9IheGRmN6WbOwMZsJTMBWMWGT9GL6lgDLzUwwXKw7mY1yEo+cAok+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8047 On Ubuntu 23.04, on a clean git tree, the selftests/mm build fails due 10 or 20 missing items, all of which are found in fs.h, which is created via "make headers". However, as per [1], the idea is to stop requiring "make headers", and instead, take a snapshot of the files and check them in. Here are a few of the build errors: vm_util.c:34:21: error: variable has incomplete type 'struct pm_scan_arg' struct pm_scan_arg arg; ... vm_util.c:45:28: error: use of undeclared identifier 'PAGE_IS_WPALLOWED' ... vm_util.c:55:21: error: variable has incomplete type 'struct page_region' ... vm_util.c:105:20: error: use of undeclared identifier 'PAGE_IS_SOFT_DIRTY' To fix this, add fs.h, taken from a snapshot of ./usr/include/linux/fs.h after running "make headers". [1] commit e076eaca5906 ("selftests: break the dependency upon local header files") Acked-by: David Hildenbrand Signed-off-by: John Hubbard --- tools/include/uapi/linux/fs.h | 392 ++++++++++++++++++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 tools/include/uapi/linux/fs.h diff --git a/tools/include/uapi/linux/fs.h b/tools/include/uapi/linux/fs.h new file mode 100644 index 000000000000..ca9d754bae04 --- /dev/null +++ b/tools/include/uapi/linux/fs.h @@ -0,0 +1,392 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _LINUX_FS_H +#define _LINUX_FS_H + +/* + * This file has definitions for some important file table structures + * and constants and structures used by various generic file system + * ioctl's. Please do not make any changes in this file before + * sending patches for review to linux-fsdevel@vger.kernel.org and + * linux-api@vger.kernel.org. + */ + +#include +#include +#include +#include + +/* Use of MS_* flags within the kernel is restricted to core mount(2) code. */ +#include + +/* + * It's silly to have NR_OPEN bigger than NR_FILE, but you can change + * the file limit at runtime and only root can increase the per-process + * nr_file rlimit, so it's safe to set up a ridiculously high absolute + * upper limit on files-per-process. + * + * Some programs (notably those using select()) may have to be + * recompiled to take full advantage of the new limits.. + */ + +/* Fixed constants first: */ +#undef NR_OPEN +#define INR_OPEN_CUR 1024 /* Initial setting for nfile rlimits */ +#define INR_OPEN_MAX 4096 /* Hard limit for nfile rlimits */ + +#define BLOCK_SIZE_BITS 10 +#define BLOCK_SIZE (1<