From patchwork Sat Jun 8 02:10: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: 13690811 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 C98A28480; Sat, 8 Jun 2024 02:10:31 +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=1717812634; cv=fail; b=H5SLi1KxEgx/wWcf6rCZ/UGObJEVAV5facyuuI/NdlhiSLRtYgjUzXgFdGLvL6EyQtI3za5UOV9iI3fPTuO9JVRfn4QsoqQRv4CVhIcdKdPQEIQu8wb1p+ojXe+7zrXRc+wng7pkla9zrCAZsUTWfsr93y8DkUBr8WHAJP4cA4E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717812634; c=relaxed/simple; bh=vY5WexvCZtLCeaxL7IOSc4+Jwriyrc2c27Ql9tQ0qKM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Uo4kLw/XEuB/zp6pVieKwqie9/QHgu/2b8Z3ctJ2mSk0qF/xnnkVB+PbcmSuMadrCBe9vHZlhd8UeeR0ww1lYOpY+oI/wJ90srHBeuGbKni6fLuYVLz2sDa6Qwg+KIhIJTQD71L7vqxhRaUn66eakKBERbQ0gAin7l60DLZXGkc= 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=eKwGslnf; 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="eKwGslnf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eJhIuFNHbGCOqPudKgGrCkwBrMZeeKd+GtCzBF95ssHy3VRGQqgvKd8qig2UBCqtoIRhemgY633j5GTs7jkrn315bqm4x9jez6RSAiUcN8D5sD8bN5MMjv2dsjS/3IfUQbv+O9aQX10s6BstF28fyyui+ooR6WCERjHJI2yZMU4lx8GJI8oaoQ7+VdxnTvZnfH+EMeKdkDhNYURjXtuZDmOPXvG0EDqyM5wofA9qLSgL0XpZoss5XsWUs4DgJMfX0KjNbg0Jj0xbHngQqv6cPjPz6mlTQPWYP/iDAe/1hKihSs4Vq4rTYngupEzZ1eEvG+3LLDmHaE1+ErQi4/cxiA== 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=O+/RmZSS/R2hOjv+bgtoV6Q8VTZwTejdmpBy5zRCcQc=; b=Eap0OewWm+Am4w/hEDjwUPQoskuzAtLdJIJ4GckAKL3gOSnnyCo5VARCPCc6uZ0S9jYMDN3p2efDd541XXbUzdBqsLar0vgG2MElnNZbG3px9wx9Hf5/Q8YUNLbB28VJDDZUNGbLXwED++snBYplDaGkeEMEG7zfSeWOg9dPSARPwAThs/+cauj3JbpVlWuWnAbRooqzmO+01hK22nE2XtK5YhOJSLS275dRiiLcVPMnkxUvdL3YFdLHyYciL404+r4QwLa6egY4j7O1vP5bRlT7D/A3HtpDth0+OTDiT0wxgRMOZmnJ11EBiS/5Bx5EcJHGMbyqx5W+B6qgsoj43A== 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=O+/RmZSS/R2hOjv+bgtoV6Q8VTZwTejdmpBy5zRCcQc=; b=eKwGslnfuv4KjT2ptRzqaKo30eWLRUhpaSJxYaZJZqF1fbd7qR0ZUmOvLyOC2IGiU+3DvQkD6+QKp0TRcLmS3WviCk5sxg9n5EgoPSm0I+Y8ibxxj53QXVazC0gUvmfXDA/5AF+lHE/4okB8Hax/dI3yxODaebxK3AIRCVRG7QGh8SzjpvxUd8zM+TQXxplUCpcZx/+ETvgu+U66LQ41zHhArbKD0m1jifyuN6V8MxTZF8vJggT6t+1M3C4EJ4J9tR2osctQTPdAgQvsaWphqBSDrvNOwRe5uagaUYS6Z+O7aj0AViuKAwTn0yh96B2xl5AVY9Fgg6J84mCLveq+NA== 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: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 2/5] selftests/mm: fix vm_util.c build failures: add snapshot of fs.h Date: Fri, 7 Jun 2024 19:10:20 -0700 Message-ID: <20240608021023.176027-3-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: SJ0PR05CA0003.namprd05.prod.outlook.com (2603:10b6:a03:33b::8) 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: 73311ef6-9ef7-4c6b-2b0c-08dc876029a0 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: Y/aBuxXRv6UFhbsmkbeWlgqktY4+2wV21DcILzuKu4u3t7UoNrGMjYLfxQTVtSwNYVzTw5ECHUyyDGAQyUKePiPwDlQFLtvDWFJ1c/eYPQekmWPhz9cgEjJgUaOKfg3B+HgRH7Sy6r1DxR7EeTJfUF2Uf9cZ1Xqd1qGkd+W4ZFSAtJD8W8ZwyhDdh02cefUwiscm4YPd4lVU2GuVjF7xP1xI5G9G7Nc5lgx+w05CBb+6Yq641dmUWySqU1Ksmac+0cQydCwHEdtv9Tqcoxm1k4wvwTtVElE4Ep7dDE5j5enzzm3tfGTD3fFc7PGePKdnFPXtBUjxr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Y5PR12MB4130.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: XH5m2F4v59fh0mTpYd0zBGL9l27uf8WMuK8LnswfIvRbhM2ITBobpwMsKHUjRixgShJpwAApNkcCysgLayvZs9nzSSgjoHLJWwALalKf8sEbnmzQ6cCAJdHJ4FAYny2RbqsKO9nKSFxr2/SR7ZDrzQw+mbUhxAZmKR+10nlSTrbUAdmDmR2C7XOg7hJJzYz/aN7YRMxq21/AbOYrIklXSjGM6mhh6yb0p5+6Tf2J/mmETxPA3M/B8gz5nH2eWIRcH+PGYOHKkrfwNJU5L6gvPkVNYSrrrEgXCsrH4hW/AtngDKLgaUFYt37obpn1EL4tfKagieMsT7adfk/PPAj7TObWTZUoKa514it55AdhhIpfk4+bonEu5VwLngyq0vHuc1Lv2EUft9kwIOkKUzXDZqN7gPDNmXRdRj5S1qqLdXHeWfapfr6K+pg4mhBeqXW8xAI1ubCoC3RNeNYia5ANk4lUxzQNj5QUHwgZOq9bjXtRVOmpmi+ioPt8X2c76/ieNGeQycX3XgF7WbPHPFckUNZhZIyCLEMjolWzplREQOPTl86sxzPH1mvfjI8yj5VEOBbmehm5e0grZ+a0hem6sKSMrJENWLgMCS8Y5oNHWYDVqHl+S9iAOCdpKSGoRWAq1u7IMLxIfmGQrCB5qNA1xjZ+zcYJUojNiPQsyWwc32DQZXdBMyrkVkBz8Unkz0RMUU/kgP2YMFHkT2Z16XgpZR08/3eNbxgbyXbbEIZNFagyQVVqKbYsxQWmei9KRA1Gcluhg/42nuiQWqDcAq4lF/AcXv9MorzE//DHFwk5WzDz04WJscd+77vPZhZz/guvEyhwP0qZMGhf06WX7KWRjIvi6h07gakX5bgI93c7N9DysdTB6puRYjZBlaP/xl4vJGiW+6kkxjDVzVuzoYgJJrNazLvlU4KWEwrLmUvso+JVF2irK0RVv0H9jasG+97wRJI79cL0zqWAjKjcoOn1MIxXP1j4WJCIkFzTFaRmHhS1wdqB25tLGJwjZl2Yitdr2cjz/W7PjujS2Bn7ghYveiod6GNgI/wrHo0cccazM22V6v/bJUzJk5FrkMBXXQEf81TXIkZ3bMsYUtKhGglIEa78gbQNOlkv9RX6HeULK+zmEJ1aij1JKINPXctK/DxeO+B1dPG9PmBKznNqNmOAR7zCmYP4GT7GRT70oyM+KEbL0/fH4+zD9UxXRwES5BvRCxufALXB7ci2FhUzZEiBFa67h/7Id+Gw9XpcDuNgq5Gu4/DW/owOrT/vyubxicX5hSrs3iVPN/TtbZz2lZH4AHtCEPsdaQwp+vro1Ar/MJOYSFhrvznQLsV7znD1uYXowv3oNh2j9dy7IvOtvi79FO+KRPnLYILPTc4HWeTuvNI6SQLb4uK+l3LJXJvYQfxSJry1wVkYoh9/nc8g8QxErvCBMEFlHfqz8LT7NtmQorT+0b5EhTTTY9WweqlIjJqnogHa487V7dIx+M7RDu9dfG7RBP3S5oOwITf7kDMhgxURy/NOhR8BItmepXM7oHUup/FvKNWJ+FehrX1gg54JkdwCPxdnbpC0W1R6h79sqUahmkX2ADvei5UFQDXtGWZW X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73311ef6-9ef7-4c6b-2b0c-08dc876029a0 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.5487 (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: sRF33lmBp2uWrvxaOXOHTIX02O1BsVinw84o2knOfWYwmmxVp5c/xwcOIe6ilErkQD/0yslST9l9FBlwL6IoeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4196 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") 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<