From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4826C1741F1 for ; Tue, 18 Jun 2024 20:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718743502; cv=none; b=NyW3z4k5L5vYqlHEg6fnREChP4yQ7i7EaQXZq/BXztFADr8d0IugURoZGnVYnL5s9JiCi19xen3ItqkplVg9EewOTrBdlR5btkcG7pzIsn76mJFcX98bnpBXACzMYRoObztOXKZLDZOSZKLvOVJ0NqeeyeK907FVPopjcYmYdbY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718743502; c=relaxed/simple; bh=iAAqpeKg+DovvcO3M1qr6a25eBJlTValGbTS+BiYQgg=; h=Date:To:From:Subject:Message-Id; b=Xka026CKDi9LDd+FFc/9R81GLltlORzhpypftKlPmd7QaXGE8qnozY5QSBYTef2y9QrJeZye5jYhG9wEYQcDIyNxHoOYWcPpWyqwEOHsUgGNzx6/9aoBbg6le9WNJqYnTyGfwafdoerYaTP3VDGDhmxqNF2O+oTo4tIN2+NLIhA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=Q/xcOA9t; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Q/xcOA9t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15467C3277B; Tue, 18 Jun 2024 20:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1718743502; bh=iAAqpeKg+DovvcO3M1qr6a25eBJlTValGbTS+BiYQgg=; h=Date:To:From:Subject:From; b=Q/xcOA9tKKMNx4JcUVEH5Ouh8wHKiYPMnUs17bHB9RpvKiuHPGtl1eTXNAl/UJuz1 ojEj/USWsGGvZEFB4RSjehwDlQTtEHoPfeVu/f461NbHXKsgaYklT2mDDwZnFNFiMM ORxe1OHCNGnj5yNsualBMBxLSrRhFsEd2REB8pAo= Date: Tue, 18 Jun 2024 13:45:01 -0700 To: mm-commits@vger.kernel.org,usama.anjum@collabora.com,shuah@kernel.org,peterx@redhat.com,Liam.Howlett@oracle.com,kent.overstreet@linux.dev,kees@kernel.org,jeffxu@chromium.org,david@redhat.com,dalias@libc.org,brauner@kernel.org,axelrasmussen@google.com,avagin@google.com,jhubbard@nvidia.com,akpm@linux-foundation.org From: Andrew Morton Subject: + selftests-mm-fix-vm_utilc-build-failures-add-snapshot-of-fsh.patch added to mm-unstable branch Message-Id: <20240618204502.15467C3277B@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: selftests/mm: fix vm_util.c build failures: add snapshot of fs.h has been added to the -mm mm-unstable branch. Its filename is selftests-mm-fix-vm_utilc-build-failures-add-snapshot-of-fsh.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/selftests-mm-fix-vm_utilc-build-failures-add-snapshot-of-fsh.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: John Hubbard Subject: selftests/mm: fix vm_util.c build failures: add snapshot of fs.h Date: Mon, 17 Jun 2024 19:24:20 -0700 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") Link: https://lkml.kernel.org/r/20240618022422.804305-5-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: David Hildenbrand Cc: Andrei Vagin Cc: Axel Rasmussen Cc: Christian Brauner Cc: Jeff Xu Cc: Kees Cook Cc: Kent Overstreet Cc: Liam R. Howlett Cc: Muhammad Usama Anjum Cc: Peter Xu Cc: Rich Felker Cc: Shuah Khan Signed-off-by: Andrew Morton --- tools/include/uapi/linux/fs.h | 392 ++++++++++++++++++++++++++++++++ 1 file changed, 392 insertions(+) --- /dev/null +++ a/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<