Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1411648lqt; Fri, 7 Jun 2024 19:11:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtWIJNZUzWS5y38AXeeA2knPZ2jDa7mJ86rvth+CrU9jZ9k5zp2QefEg5xo6Q5tuy1W1gcMRCX/r3Zcp9XC/+/MP0zYwqaSs8IDMFn0Q== X-Google-Smtp-Source: AGHT+IEOhJ0tuO0BVOh8NsuKU7BxHK0+cjIW9d2J7C4NcZXNzXBzSh8tznnWo2akGud8pGJzY+AP X-Received: by 2002:a50:ba82:0:b0:578:e202:137 with SMTP id 4fb4d7f45d1cf-57c508fa187mr3315866a12.20.1717812664865; Fri, 07 Jun 2024 19:11:04 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae22863esi2312320a12.367.2024.06.07.19.11.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 19:11:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=eKwGslnf; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-206876-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 63CED1F220F0 for ; Sat, 8 Jun 2024 02:11:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5734312B95; Sat, 8 Jun 2024 02:10:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="eKwGslnf" 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 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-kernel@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: =?us-ascii?Q?Y/aBuxXRv6UFhbsmkbeWlgqktY4+2wV21DcILzuKu4u3t7UoNrGMjYLfxQTV?= =?us-ascii?Q?tSwNYVzTw5ECHUyyDGAQyUKePiPwDlQFLtvDWFJ1c/eYPQekmWPhz9cgEjJg?= =?us-ascii?Q?UaOKfg3B+HgRH7Sy6r1DxR7EeTJfUF2Uf9cZ1Xqd1qGkd+W4ZFSAtJD8W8Zw?= =?us-ascii?Q?yhDdh02cefUwiscm4YPd4lVU2GuVjF7xP1xI5G9G7Nc5lgx+w05CBb+6Yq64?= =?us-ascii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bzrjNfuJ?= =?us-ascii?Q?0zLGoYECjWzR1psutc/gK0fN5SUMnTy7NaFd9cTokOW3RhSrDK3QEwrClect?= =?us-ascii?Q?DOsT6ABqhLleBp7mwNtg5HEcO9JLvxqRlUEfUgN5xN1THmZ8bfGCiy7JRV3A?= =?us-ascii?Q?fFcK5P/iXgWIYjMvB2sSp9+BEyn+2HQBfY6lhXmhjLvDyfHsL+s+9ZitwtVk?= =?us-ascii?Q?mS+wKWgd2aZ/YlPLppSpbulx?= 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: =?us-ascii?Q?XH5m2F4v59fh0mTpYd0zBGL9l27uf8WMuK8LnswfIvRbhM2ITBobpwMsKHUj?= =?us-ascii?Q?RixgShJpwAApNkcCysgLayvZs9nzSSgjoHLJWwALalKf8sEbnmzQ6cCAJdHJ?= =?us-ascii?Q?4FAYny2RbqsKO9nKSFxr2/SR7ZDrzQw+mbUhxAZmKR+10nlSTrbUAdmDmR2C?= =?us-ascii?Q?7XOg7hJJzYz/aN7YRMxq21/AbOYrIklXSjGM6mhh6yb0p5+6Tf2J/mmETxPA?= =?us-ascii?Q?3M/B8gz5nH2eWIRcH+PGYOHKkrfwNJU5L6gvPkVNYSrrrEgXCsrH4hW/Atng?= =?us-ascii?Q?DKLgaUFYt37obpn1EL4tfKagieMsT7adfk/PPAj7TObWTZUoKa514it55Adh?= =?us-ascii?Q?hIpfk4+bonEu5VwLngyq0vHuc1Lv2EUft9kwIOkKUzXDZqN7gPDNmXRdRj5S?= =?us-ascii?Q?1qqLdXHeWfapfr6K+pg4mhBeqXW8xAI1ubCoC3RNeNYia5ANk4lUxzQNj5QU?= =?us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FO+KRPnLYILPTc4H?= =?us-ascii?Q?WeTuvNI6SQLb4uK+l3LJXJvYQfxSJry1wVkYoh9/nc8g8QxErvCBMEFlHfqz?= =?us-ascii?Q?8LT7NtmQorT+0b5EhTTTY9WweqlIjJqnogHa487V7dIx+M7RDu9dfG7RBP3S?= =?us-ascii?Q?5oOwITf7kDMhgxURy/NOhR8BItmepXM7oHUup/FvKNWJ+FehrX1gg54JkdwC?= =?us-ascii?Q?PxdnbpC0W1R6h79sqUahmkX2ADvei5UFQDXtGWZW?= 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<