The patch titled Subject: docs/procfs: call out ioctl()-based PROCMAP_QUERY command existence has been added to the -mm mm-unstable branch. Its filename is docs-procfs-call-out-ioctl-based-procmap_query-command-existence.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/docs-procfs-call-out-ioctl-based-procmap_query-command-existence.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: Andrii Nakryiko <andrii@xxxxxxxxxx> Subject: docs/procfs: call out ioctl()-based PROCMAP_QUERY command existence Date: Thu, 27 Jun 2024 10:08:56 -0700 Call out PROCMAP_QUERY ioctl() existence in the section describing /proc/PID/maps file in documentation. We refer user to UAPI header for low-level details of this programmatic interface. Link: https://lkml.kernel.org/r/20240627170900.1672542-5-andrii@xxxxxxxxxx Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Christian Brauner <brauner@xxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Cc: Mike Rapoport (IBM) <rppt@xxxxxxxxxx> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/filesystems/proc.rst | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/Documentation/filesystems/proc.rst~docs-procfs-call-out-ioctl-based-procmap_query-command-existence +++ a/Documentation/filesystems/proc.rst @@ -443,6 +443,15 @@ is not associated with a file: or if empty, the mapping is anonymous. +Starting with 6.11 kernel, /proc/PID/maps provides an alternative +ioctl()-based API that gives ability to flexibly and efficiently query and +filter individual VMAs. This interface is binary and is meant for more +efficient and easy programmatic use. `struct procmap_query`, defined in +linux/fs.h UAPI header, serves as an input/output argument to the +`PROCMAP_QUERY` ioctl() command. See comments in linus/fs.h UAPI header for +details on query semantics, supported flags, data returned, and general API +usage information. + The /proc/PID/smaps is an extension based on maps, showing the memory consumption for each of the process's mappings. For each mapping (aka Virtual Memory Area, or VMA) there is a series of lines such as the following:: _ Patches currently in -mm which might be from andrii@xxxxxxxxxx are fs-procfs-extract-logic-for-getting-vma-name-constituents.patch fs-procfs-implement-efficient-vma-querying-api-for-proc-pid-maps.patch fs-procfs-add-build-id-fetching-to-procmap_query-api.patch docs-procfs-call-out-ioctl-based-procmap_query-command-existence.patch tools-sync-uapi-linux-fsh-header-into-tools-subdir.patch selftests-proc-add-procmap_query-ioctl-tests.patch