Linux Manual Pages development
 help / color / mirror / Atom feed
* [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5)
@ 2026-09-12 11:32 Max Chernoff
  2026-09-12 11:32 ` [PATCH 2/3] man/man5/proc_pid_{smaps,smaps_rollup,maps}.5, man/man7/capabilities.7: CAP_PERFMON allows reading /proc/pid/{smaps,smaps_rollup,maps} Max Chernoff
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Max Chernoff @ 2026-09-12 11:32 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Max Chernoff, linux-man

Document /proc/pid/smaps_rollup, which is similar to /proc/pid/smaps,
except it merges all mappings are merged into a single synthetic
entry [1].

Also, add a better description to the NAME, following the discussion
in [2].

Link [1]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=493b0e9d945fa9dfe96be93ae41b4ca4b6fdb317>
Link [2]: <https://lore.kernel.org/lkml/3f250c7105010613115554b9d9@mail.gmail.com>
Signed-off-by: Max Chernoff <git@maxchernoff.ca>
---
 man/man5/proc_pid_smaps.5        | 7 ++++++-
 man/man5/proc_pid_smaps_rollup.5 | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 man/man5/proc_pid_smaps_rollup.5

diff --git a/man/man5/proc_pid_smaps.5 b/man/man5/proc_pid_smaps.5
index 9c433dbc1e60..51440cc13bf6 100644
--- a/man/man5/proc_pid_smaps.5
+++ b/man/man5/proc_pid_smaps.5
@@ -7,7 +7,7 @@
 .\"
 .TH proc_pid_smaps 5 (date) "Linux man-pages (unreleased)"
 .SH NAME
-/proc/pid/smaps \- XXX: What does 's' in "smaps" stand for?
+/proc/pid/smaps, /proc/pid/smaps_rollup \- size of mapped memory regions
 .SH DESCRIPTION
 .TP
 .IR /proc/ pid /smaps " (since Linux 2.6.14)"
@@ -125,5 +125,10 @@
 file is present only if the
 .B CONFIG_PROC_PAGE_MONITOR
 kernel configuration option is enabled.
+.TP
+.IR /proc/ pid /smaps_rollup " (since Linux 4.14)"
+This file is similar to
+.IR /proc/ pid /smaps ,
+except all mappings are merged into a single synthetic entry.
 .SH SEE ALSO
 .BR proc (5)
diff --git a/man/man5/proc_pid_smaps_rollup.5 b/man/man5/proc_pid_smaps_rollup.5
new file mode 100644
index 000000000000..4b5f9eba0484
--- /dev/null
+++ b/man/man5/proc_pid_smaps_rollup.5
@@ -0,0 +1 @@
+.so man5/proc_pid_smaps.5

base-commit: 59ba1c34fb6538206e96597739f053183d1e6428
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] man/man5/proc_pid_{smaps,smaps_rollup,maps}.5, man/man7/capabilities.7: CAP_PERFMON allows reading /proc/pid/{smaps,smaps_rollup,maps}
  2026-09-12 11:32 [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5) Max Chernoff
@ 2026-09-12 11:32 ` Max Chernoff
  2026-09-12 13:39   ` Alejandro Colomar
  2026-09-12 11:32 ` [PATCH 3/3] man/man7/capabilities.7: CAP_MAC_ADMIN allows setting undefined SELinux contexts Max Chernoff
  2026-09-12 13:35 ` [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5) Alejandro Colomar
  2 siblings, 1 reply; 6+ messages in thread
From: Max Chernoff @ 2026-09-12 11:32 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Max Chernoff, linux-man

Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c555a3c1bc9114ad91422b941dcd29e02490687>
Signed-off-by: Max Chernoff <git@maxchernoff.ca>
---
 man/man5/proc_pid_maps.5  |  5 ++++-
 man/man5/proc_pid_smaps.5 | 10 ++++++++++
 man/man7/capabilities.7   |  9 ++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/man/man5/proc_pid_maps.5 b/man/man5/proc_pid_maps.5
index 8783dbb3a89d..dcd455ea840c 100644
--- a/man/man5/proc_pid_maps.5
+++ b/man/man5/proc_pid_maps.5
@@ -16,7 +16,10 @@
 .BR mmap (2)
 for some further information about memory mappings.
 .IP
-Permission to access this file is governed by a ptrace access mode
+Permission to access this file is governed by
+.B CAP_PERFMON
+(since Linux 6.15)
+or a ptrace access mode
 .B PTRACE_MODE_READ_FSCREDS
 check;
 see
diff --git a/man/man5/proc_pid_smaps.5 b/man/man5/proc_pid_smaps.5
index 51440cc13bf6..d83521409375 100644
--- a/man/man5/proc_pid_smaps.5
+++ b/man/man5/proc_pid_smaps.5
@@ -16,6 +16,16 @@
 .BR pmap (1)
 command displays similar information,
 in a form that may be easier for parsing.)
+.IP
+Permission to access this file is governed by
+.B CAP_PERFMON
+(since Linux 6.15)
+or a ptrace access mode
+.B PTRACE_MODE_READ_FSCREDS
+check;
+see
+.BR ptrace (2).
+.IP
 For each mapping there is a series of lines such as the following:
 .IP
 .in +4n
diff --git a/man/man7/capabilities.7 b/man/man7/capabilities.7
index eef074979f1b..bb8f6d9db433 100644
--- a/man/man7/capabilities.7
+++ b/man/man7/capabilities.7
@@ -283,7 +283,14 @@
 call
 .BR perf_event_open (2);
 .IP \[bu]
-employ various BPF operations that have performance implications.
+employ various BPF operations that have performance implications;
+.IP \[bu]
+read the contents of
+.IR /proc/ pid /maps,
+.IR /proc/ pid /smaps,
+and
+.IR /proc/ pid /smaps_rollup
+for all processes.
 .RE
 .PD
 .IP
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] man/man7/capabilities.7: CAP_MAC_ADMIN allows setting undefined SELinux contexts
  2026-09-12 11:32 [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5) Max Chernoff
  2026-09-12 11:32 ` [PATCH 2/3] man/man5/proc_pid_{smaps,smaps_rollup,maps}.5, man/man7/capabilities.7: CAP_PERFMON allows reading /proc/pid/{smaps,smaps_rollup,maps} Max Chernoff
@ 2026-09-12 11:32 ` Max Chernoff
  2026-09-12 13:41   ` Alejandro Colomar
  2026-09-12 13:35 ` [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5) Alejandro Colomar
  2 siblings, 1 reply; 6+ messages in thread
From: Max Chernoff @ 2026-09-12 11:32 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: Max Chernoff, linux-man

Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=12b29f34558b9b45a2c6eabd4f3c6be939a3980f>
Signed-off-by: Max Chernoff <git@maxchernoff.ca>
---
 man/man7/capabilities.7 | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/man/man7/capabilities.7 b/man/man7/capabilities.7
index bb8f6d9db433..8813ff81f0ea 100644
--- a/man/man7/capabilities.7
+++ b/man/man7/capabilities.7
@@ -210,8 +210,16 @@
 .BR FS_IOC_SETFLAGS (2const)).
 .TP
 .BR CAP_MAC_ADMIN " (since Linux 2.6.25)"
-Allow MAC configuration or state changes.
-Implemented for the Smack Linux Security Module (LSM).
+.RS
+.IP \[bu] 3
+.PD 0
+For the Smack Linux Security Module (LSM),
+allow MAC configuration or state changes;
+.IP \[bu]
+For the SELinux LSM,
+allow setting undefined security contexts on inodes (since Linux 2.6.27).
+.RE
+.PD
 .TP
 .BR CAP_MAC_OVERRIDE " (since Linux 2.6.25)"
 Override Mandatory Access Control (MAC).
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5)
  2026-09-12 11:32 [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5) Max Chernoff
  2026-09-12 11:32 ` [PATCH 2/3] man/man5/proc_pid_{smaps,smaps_rollup,maps}.5, man/man7/capabilities.7: CAP_PERFMON allows reading /proc/pid/{smaps,smaps_rollup,maps} Max Chernoff
  2026-09-12 11:32 ` [PATCH 3/3] man/man7/capabilities.7: CAP_MAC_ADMIN allows setting undefined SELinux contexts Max Chernoff
@ 2026-09-12 13:35 ` Alejandro Colomar
  2 siblings, 0 replies; 6+ messages in thread
From: Alejandro Colomar @ 2026-09-12 13:35 UTC (permalink / raw)
  To: Max Chernoff; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 2274 bytes --]

Hi Max,

> Date: 2026-09-12 05:32:11-0600
> From: Max Chernoff <git@maxchernoff.ca>
>
> Document /proc/pid/smaps_rollup, which is similar to /proc/pid/smaps,
> except it merges all mappings are merged into a single synthetic
> entry [1].
> 
> Also, add a better description to the NAME, following the discussion
> in [2].

Thanks!  Although I'd prefer the renaming to happen in a separate
commit, please.

> Link [1]: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=493b0e9d945fa9dfe96be93ae41b4ca4b6fdb317>
> Link [2]: <https://lore.kernel.org/lkml/3f250c7105010613115554b9d9@mail.gmail.com>

Would you mind quoting the most relevant lines of it?  It seems a long
discussion.

> Signed-off-by: Max Chernoff <git@maxchernoff.ca>
> ---
>  man/man5/proc_pid_smaps.5        | 7 ++++++-
>  man/man5/proc_pid_smaps_rollup.5 | 1 +
>  2 files changed, 7 insertions(+), 1 deletion(-)
>  create mode 100644 man/man5/proc_pid_smaps_rollup.5
> 
> diff --git a/man/man5/proc_pid_smaps.5 b/man/man5/proc_pid_smaps.5
> index 9c433dbc1e60..51440cc13bf6 100644
> --- a/man/man5/proc_pid_smaps.5
> +++ b/man/man5/proc_pid_smaps.5
> @@ -7,7 +7,7 @@
>  .\"
>  .TH proc_pid_smaps 5 (date) "Linux man-pages (unreleased)"
>  .SH NAME
> -/proc/pid/smaps \- XXX: What does 's' in "smaps" stand for?
> +/proc/pid/smaps, /proc/pid/smaps_rollup \- size of mapped memory regions
>  .SH DESCRIPTION
>  .TP
>  .IR /proc/ pid /smaps " (since Linux 2.6.14)"
> @@ -125,5 +125,10 @@
>  file is present only if the
>  .B CONFIG_PROC_PAGE_MONITOR
>  kernel configuration option is enabled.
> +.TP
> +.IR /proc/ pid /smaps_rollup " (since Linux 4.14)"
> +This file is similar to
> +.IR /proc/ pid /smaps ,
> +except all mappings are merged into a single synthetic entry.

LGTM.  Thanks!


Have a lovely day!
Alex

>  .SH SEE ALSO
>  .BR proc (5)
> diff --git a/man/man5/proc_pid_smaps_rollup.5 b/man/man5/proc_pid_smaps_rollup.5
> new file mode 100644
> index 000000000000..4b5f9eba0484
> --- /dev/null
> +++ b/man/man5/proc_pid_smaps_rollup.5
> @@ -0,0 +1 @@
> +.so man5/proc_pid_smaps.5
> 
> base-commit: 59ba1c34fb6538206e96597739f053183d1e6428
> -- 
> 2.55.0
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] man/man5/proc_pid_{smaps,smaps_rollup,maps}.5, man/man7/capabilities.7: CAP_PERFMON allows reading /proc/pid/{smaps,smaps_rollup,maps}
  2026-09-12 11:32 ` [PATCH 2/3] man/man5/proc_pid_{smaps,smaps_rollup,maps}.5, man/man7/capabilities.7: CAP_PERFMON allows reading /proc/pid/{smaps,smaps_rollup,maps} Max Chernoff
@ 2026-09-12 13:39   ` Alejandro Colomar
  0 siblings, 0 replies; 6+ messages in thread
From: Alejandro Colomar @ 2026-09-12 13:39 UTC (permalink / raw)
  To: Max Chernoff; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 2299 bytes --]

> Date: 2026-09-12 05:32:12-0600
> From: Max Chernoff <git@maxchernoff.ca>
>
> Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0c555a3c1bc9114ad91422b941dcd29e02490687>
> Signed-off-by: Max Chernoff <git@maxchernoff.ca>

Reviewed-by: Alejandro Colomar <alx@kernel.org>


Cheers,
Alex

> ---
>  man/man5/proc_pid_maps.5  |  5 ++++-
>  man/man5/proc_pid_smaps.5 | 10 ++++++++++
>  man/man7/capabilities.7   |  9 ++++++++-
>  3 files changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/man/man5/proc_pid_maps.5 b/man/man5/proc_pid_maps.5
> index 8783dbb3a89d..dcd455ea840c 100644
> --- a/man/man5/proc_pid_maps.5
> +++ b/man/man5/proc_pid_maps.5
> @@ -16,7 +16,10 @@
>  .BR mmap (2)
>  for some further information about memory mappings.
>  .IP
> -Permission to access this file is governed by a ptrace access mode
> +Permission to access this file is governed by
> +.B CAP_PERFMON
> +(since Linux 6.15)
> +or a ptrace access mode
>  .B PTRACE_MODE_READ_FSCREDS
>  check;
>  see
> diff --git a/man/man5/proc_pid_smaps.5 b/man/man5/proc_pid_smaps.5
> index 51440cc13bf6..d83521409375 100644
> --- a/man/man5/proc_pid_smaps.5
> +++ b/man/man5/proc_pid_smaps.5
> @@ -16,6 +16,16 @@
>  .BR pmap (1)
>  command displays similar information,
>  in a form that may be easier for parsing.)
> +.IP
> +Permission to access this file is governed by
> +.B CAP_PERFMON
> +(since Linux 6.15)
> +or a ptrace access mode
> +.B PTRACE_MODE_READ_FSCREDS
> +check;
> +see
> +.BR ptrace (2).
> +.IP
>  For each mapping there is a series of lines such as the following:
>  .IP
>  .in +4n
> diff --git a/man/man7/capabilities.7 b/man/man7/capabilities.7
> index eef074979f1b..bb8f6d9db433 100644
> --- a/man/man7/capabilities.7
> +++ b/man/man7/capabilities.7
> @@ -283,7 +283,14 @@
>  call
>  .BR perf_event_open (2);
>  .IP \[bu]
> -employ various BPF operations that have performance implications.
> +employ various BPF operations that have performance implications;
> +.IP \[bu]
> +read the contents of
> +.IR /proc/ pid /maps,
> +.IR /proc/ pid /smaps,
> +and
> +.IR /proc/ pid /smaps_rollup
> +for all processes.
>  .RE
>  .PD
>  .IP
> -- 
> 2.55.0
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] man/man7/capabilities.7: CAP_MAC_ADMIN allows setting undefined SELinux contexts
  2026-09-12 11:32 ` [PATCH 3/3] man/man7/capabilities.7: CAP_MAC_ADMIN allows setting undefined SELinux contexts Max Chernoff
@ 2026-09-12 13:41   ` Alejandro Colomar
  0 siblings, 0 replies; 6+ messages in thread
From: Alejandro Colomar @ 2026-09-12 13:41 UTC (permalink / raw)
  To: Max Chernoff; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

> Date: 2026-09-12 05:32:13-0600
> From: Max Chernoff <git@maxchernoff.ca>
>
> Link: <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=12b29f34558b9b45a2c6eabd4f3c6be939a3980f>
> Signed-off-by: Max Chernoff <git@maxchernoff.ca>
> ---

Reviewed-by: Alejandro Colomar <alx@kernel.org>


Cheers,
Alex

>  man/man7/capabilities.7 | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/man/man7/capabilities.7 b/man/man7/capabilities.7
> index bb8f6d9db433..8813ff81f0ea 100644
> --- a/man/man7/capabilities.7
> +++ b/man/man7/capabilities.7
> @@ -210,8 +210,16 @@
>  .BR FS_IOC_SETFLAGS (2const)).
>  .TP
>  .BR CAP_MAC_ADMIN " (since Linux 2.6.25)"
> -Allow MAC configuration or state changes.
> -Implemented for the Smack Linux Security Module (LSM).
> +.RS
> +.IP \[bu] 3
> +.PD 0
> +For the Smack Linux Security Module (LSM),
> +allow MAC configuration or state changes;
> +.IP \[bu]
> +For the SELinux LSM,
> +allow setting undefined security contexts on inodes (since Linux 2.6.27).
> +.RE
> +.PD
>  .TP
>  .BR CAP_MAC_OVERRIDE " (since Linux 2.6.25)"
>  Override Mandatory Access Control (MAC).
> -- 
> 2.55.0
> 

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-12 13:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-12 11:32 [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5) Max Chernoff
2026-09-12 11:32 ` [PATCH 2/3] man/man5/proc_pid_{smaps,smaps_rollup,maps}.5, man/man7/capabilities.7: CAP_PERFMON allows reading /proc/pid/{smaps,smaps_rollup,maps} Max Chernoff
2026-09-12 13:39   ` Alejandro Colomar
2026-09-12 11:32 ` [PATCH 3/3] man/man7/capabilities.7: CAP_MAC_ADMIN allows setting undefined SELinux contexts Max Chernoff
2026-09-12 13:41   ` Alejandro Colomar
2026-09-12 13:35 ` [PATCH 1/3] man/man5/proc_pid_smaps{,_rollup}.5: Add proc_pid_smaps_rollup(5) Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox