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 D4BF738B for ; Fri, 14 Jun 2024 04:55:00 +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=1718340900; cv=none; b=apPTEUIjweeBpa9hEumknpYQHiu9yfwN7WUqwxcQ0b6fLOtRSG4YTvN4MNOu4b/eQdRNS5bV14lAK91/bEOWw/lRFucbsEphVGixQJOqzM2BDXk/K2AQExXOnE0k62Iwb0Usx7ZIYNUMfyR0a/e3DxS6EJ603Q6diGzv/BswwBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718340900; c=relaxed/simple; bh=Slc1q7jDaIlVLTNB5dhAiJhaKhbbwf3gaW3VA7zWW4E=; h=Date:To:From:Subject:Message-Id; b=cl4IXa42rMjO4czEPDBJwxoJoUIngihb42maaIOCjFXzZNyA5BUJjExI75KpxwJDgyT9Mnr84Qi0P5b2QB28dfvBFEOopLUaLjFtJS6fRK1mkATp05lsrZHuC9Dt/LY4TlPoRQG9KkL5Y/Qn+ek0+EfF0ZKt0aBfUHhe2HlnvC4= 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=U++IRADP; 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="U++IRADP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5751C2BD10; Fri, 14 Jun 2024 04:55:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1718340900; bh=Slc1q7jDaIlVLTNB5dhAiJhaKhbbwf3gaW3VA7zWW4E=; h=Date:To:From:Subject:From; b=U++IRADPLADC+W6gvWZ/301xp7U4N2prAPMMkQB6Y0FCLX9L0x+yhUbfCbzncvEHc E7r/LivryozckUjoCtHht4QRf+NDtYKGETX9esMx8SbGw1zXUmqLyYgpA8StnjEYf2 x44v5iW0yVj62aQlkaM2KdEKl/b0ww1wIZixE6eA= Date: Thu, 13 Jun 2024 21:55:00 -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: <20240614045500.A5751C2BD10@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: Thu, 13 Jun 2024 19:30:07 -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/20240614023009.221547-5-jhubbard@nvidia.com Signed-off-by: John Hubbard Cc: 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<