All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] prctl.2, proc.5: Document VMA naming
@ 2023-01-07 22:19 Nick Gregory
  2023-01-10 21:02 ` Suren Baghdasaryan
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Gregory @ 2023-01-07 22:19 UTC (permalink / raw)
  To: linux-man, alx.manpages; +Cc: ccross, surenb, keescook

Bring in man page changes from the patch set by Colin Cross
<ccross@google.com> [0], and document the corresponding virtual names in
procfs.

Signed-off-by: Nick Gregory <nick@nickgregory.me>
Cc: Colin Cross <ccross@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Kees Cook <keescook@chromium.org>

[0] https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/
---
 man2/prctl.2 | 34 ++++++++++++++++++++++++++++++++++
 man5/proc.5  | 14 ++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/man2/prctl.2 b/man2/prctl.2
index 74f86ff49..2c8d52ade 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the
 .B CONFIG_CHECKPOINT_RESTORE
 option enabled.
 .RE
+.\" prctl PR_SET_VMA
+.TP
+.BR PR_SET_VMA " (since Linux 5.17)"
+.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
+Sets an attribute specified in
+.I arg2
+for virtual memory areas starting from the address specified in
+.I arg3
+and spanning the size specified in
+.IR arg4 .
+.I arg5
+specifies the value of the attribute to be set.
+.IP
+Note that assigning an attribute to a virtual memory area
+might prevent it from being merged with adjacent virtual memory areas
+due to the difference in that attribute's value.
+.IP
+Currently,
+.I arg2
+must be one of:
+.RS
+.TP
+.B PR_SET_VMA_ANON_NAME
+Set a name for anonymous virtual memory areas.
+.I arg5
+should be a pointer to a null-terminated string containing the name.
+The name length including null byte cannot exceed 80 bytes.
+If
+.I arg5
+is NULL, the name of the appropriate anonymous virtual memory areas
+will be reset.
+The name can contain only printable ascii characters (including space),
+except \(aq[\(aq, \(aq]\(aq, \(aq\e\(aq, \(aq$\(aq, and \(aq\(ga\(aq.
+.RE
 .\" prctl PR_MPX_ENABLE_MANAGEMENT
 .TP
 .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
diff --git a/man5/proc.5 b/man5/proc.5
index 65a4c38e3..e0a64d486 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -1372,6 +1372,20 @@ See
 .TP
 .I [heap]
 The process's heap.
+.TP
+.IR [anon: name ] " (since Linux 5.17)"
+.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
+A named private anonymous mapping.
+Set with
+.BR prctl (2)
+.BR PR_SET_VMA_ANON_NAME .
+.TP
+.IR [anon_shmem: name ] " (since Linux 6.2)"
+.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
+A named shared anonymous mapping.
+Set with
+.BR prctl (2)
+.BR PR_SET_VMA_ANON_NAME .
 .in
 .RE
 .IP
-- 
2.39.0


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

* Re: [PATCH v2] prctl.2, proc.5: Document VMA naming
  2023-01-07 22:19 [PATCH v2] prctl.2, proc.5: Document VMA naming Nick Gregory
@ 2023-01-10 21:02 ` Suren Baghdasaryan
  2023-01-10 21:12   ` Alejandro Colomar
  0 siblings, 1 reply; 7+ messages in thread
From: Suren Baghdasaryan @ 2023-01-10 21:02 UTC (permalink / raw)
  To: Nick Gregory; +Cc: linux-man, alx.manpages, ccross, keescook, Pasha Tatashin

On Sat, Jan 7, 2023 at 2:19 PM Nick Gregory <nick@nickgregory.me> wrote:
>
> Bring in man page changes from the patch set by Colin Cross
> <ccross@google.com> [0], and document the corresponding virtual names in
> procfs.

Hi Nick,
The content LGTM (not an expert in formatting). You even captured the
recent addition of named shared anonymous mapping support (CC'ing
Pasha)! Thanks for doing this!

>
> Signed-off-by: Nick Gregory <nick@nickgregory.me>
> Cc: Colin Cross <ccross@google.com>
> Cc: Suren Baghdasaryan <surenb@google.com>
> Cc: Kees Cook <keescook@chromium.org>

Reviewed-by: Suren Baghdasaryan <surenb@google.com>

>
> [0] https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/
> ---
>  man2/prctl.2 | 34 ++++++++++++++++++++++++++++++++++
>  man5/proc.5  | 14 ++++++++++++++
>  2 files changed, 48 insertions(+)
>
> diff --git a/man2/prctl.2 b/man2/prctl.2
> index 74f86ff49..2c8d52ade 100644
> --- a/man2/prctl.2
> +++ b/man2/prctl.2
> @@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the
>  .B CONFIG_CHECKPOINT_RESTORE
>  option enabled.
>  .RE
> +.\" prctl PR_SET_VMA
> +.TP
> +.BR PR_SET_VMA " (since Linux 5.17)"
> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
> +Sets an attribute specified in
> +.I arg2
> +for virtual memory areas starting from the address specified in
> +.I arg3
> +and spanning the size specified in
> +.IR arg4 .
> +.I arg5
> +specifies the value of the attribute to be set.
> +.IP
> +Note that assigning an attribute to a virtual memory area
> +might prevent it from being merged with adjacent virtual memory areas
> +due to the difference in that attribute's value.
> +.IP
> +Currently,
> +.I arg2
> +must be one of:
> +.RS
> +.TP
> +.B PR_SET_VMA_ANON_NAME
> +Set a name for anonymous virtual memory areas.
> +.I arg5
> +should be a pointer to a null-terminated string containing the name.
> +The name length including null byte cannot exceed 80 bytes.
> +If
> +.I arg5
> +is NULL, the name of the appropriate anonymous virtual memory areas
> +will be reset.
> +The name can contain only printable ascii characters (including space),
> +except \(aq[\(aq, \(aq]\(aq, \(aq\e\(aq, \(aq$\(aq, and \(aq\(ga\(aq.
> +.RE
>  .\" prctl PR_MPX_ENABLE_MANAGEMENT
>  .TP
>  .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
> diff --git a/man5/proc.5 b/man5/proc.5
> index 65a4c38e3..e0a64d486 100644
> --- a/man5/proc.5
> +++ b/man5/proc.5
> @@ -1372,6 +1372,20 @@ See
>  .TP
>  .I [heap]
>  The process's heap.
> +.TP
> +.IR [anon: name ] " (since Linux 5.17)"
> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
> +A named private anonymous mapping.
> +Set with
> +.BR prctl (2)
> +.BR PR_SET_VMA_ANON_NAME .
> +.TP
> +.IR [anon_shmem: name ] " (since Linux 6.2)"
> +.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
> +A named shared anonymous mapping.
> +Set with
> +.BR prctl (2)
> +.BR PR_SET_VMA_ANON_NAME .
>  .in
>  .RE
>  .IP
> --
> 2.39.0
>

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

* Re: [PATCH v2] prctl.2, proc.5: Document VMA naming
  2023-01-10 21:02 ` Suren Baghdasaryan
@ 2023-01-10 21:12   ` Alejandro Colomar
  2023-01-10 22:56     ` Suren Baghdasaryan
  0 siblings, 1 reply; 7+ messages in thread
From: Alejandro Colomar @ 2023-01-10 21:12 UTC (permalink / raw)
  To: Suren Baghdasaryan, Nick Gregory
  Cc: linux-man, ccross, keescook, Pasha Tatashin


[-- Attachment #1.1: Type: text/plain, Size: 3538 bytes --]

Hi Nick and Suren!

On 1/10/23 22:02, Suren Baghdasaryan wrote:
> On Sat, Jan 7, 2023 at 2:19 PM Nick Gregory <nick@nickgregory.me> wrote:
>>
>> Bring in man page changes from the patch set by Colin Cross
>> <ccross@google.com> [0], and document the corresponding virtual names in
>> procfs.
> 
> Hi Nick,
> The content LGTM (not an expert in formatting).

The formatting is perfect, AFAICS. :)

> You even captured the
> recent addition of named shared anonymous mapping support (CC'ing
> Pasha)! Thanks for doing this!

Do you want me to wait for him to have a look, or should I just apply?

> 
>>
>> Signed-off-by: Nick Gregory <nick@nickgregory.me>
>> Cc: Colin Cross <ccross@google.com>
>> Cc: Suren Baghdasaryan <surenb@google.com>
>> Cc: Kees Cook <keescook@chromium.org>
> 
> Reviewed-by: Suren Baghdasaryan <surenb@google.com>

Thanks for the patch and the review!

Cheers,

Alex

> 
>>
>> [0] https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/
>> ---
>>   man2/prctl.2 | 34 ++++++++++++++++++++++++++++++++++
>>   man5/proc.5  | 14 ++++++++++++++
>>   2 files changed, 48 insertions(+)
>>
>> diff --git a/man2/prctl.2 b/man2/prctl.2
>> index 74f86ff49..2c8d52ade 100644
>> --- a/man2/prctl.2
>> +++ b/man2/prctl.2
>> @@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the
>>   .B CONFIG_CHECKPOINT_RESTORE
>>   option enabled.
>>   .RE
>> +.\" prctl PR_SET_VMA
>> +.TP
>> +.BR PR_SET_VMA " (since Linux 5.17)"
>> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
>> +Sets an attribute specified in
>> +.I arg2
>> +for virtual memory areas starting from the address specified in
>> +.I arg3
>> +and spanning the size specified in
>> +.IR arg4 .
>> +.I arg5
>> +specifies the value of the attribute to be set.
>> +.IP
>> +Note that assigning an attribute to a virtual memory area
>> +might prevent it from being merged with adjacent virtual memory areas
>> +due to the difference in that attribute's value.
>> +.IP
>> +Currently,
>> +.I arg2
>> +must be one of:
>> +.RS
>> +.TP
>> +.B PR_SET_VMA_ANON_NAME
>> +Set a name for anonymous virtual memory areas.
>> +.I arg5
>> +should be a pointer to a null-terminated string containing the name.
>> +The name length including null byte cannot exceed 80 bytes.
>> +If
>> +.I arg5
>> +is NULL, the name of the appropriate anonymous virtual memory areas
>> +will be reset.
>> +The name can contain only printable ascii characters (including space),
>> +except \(aq[\(aq, \(aq]\(aq, \(aq\e\(aq, \(aq$\(aq, and \(aq\(ga\(aq.
>> +.RE
>>   .\" prctl PR_MPX_ENABLE_MANAGEMENT
>>   .TP
>>   .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
>> diff --git a/man5/proc.5 b/man5/proc.5
>> index 65a4c38e3..e0a64d486 100644
>> --- a/man5/proc.5
>> +++ b/man5/proc.5
>> @@ -1372,6 +1372,20 @@ See
>>   .TP
>>   .I [heap]
>>   The process's heap.
>> +.TP
>> +.IR [anon: name ] " (since Linux 5.17)"
>> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
>> +A named private anonymous mapping.
>> +Set with
>> +.BR prctl (2)
>> +.BR PR_SET_VMA_ANON_NAME .
>> +.TP
>> +.IR [anon_shmem: name ] " (since Linux 6.2)"
>> +.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
>> +A named shared anonymous mapping.
>> +Set with
>> +.BR prctl (2)
>> +.BR PR_SET_VMA_ANON_NAME .
>>   .in
>>   .RE
>>   .IP
>> --
>> 2.39.0
>>

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

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

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

* Re: [PATCH v2] prctl.2, proc.5: Document VMA naming
  2023-01-10 21:12   ` Alejandro Colomar
@ 2023-01-10 22:56     ` Suren Baghdasaryan
  2023-01-10 23:01       ` Alejandro Colomar
  2023-01-10 23:02       ` Pasha Tatashin
  0 siblings, 2 replies; 7+ messages in thread
From: Suren Baghdasaryan @ 2023-01-10 22:56 UTC (permalink / raw)
  To: Alejandro Colomar
  Cc: Nick Gregory, linux-man, ccross, keescook, Pasha Tatashin

On Tue, Jan 10, 2023 at 1:12 PM Alejandro Colomar
<alx.manpages@gmail.com> wrote:
>
> Hi Nick and Suren!
>
> On 1/10/23 22:02, Suren Baghdasaryan wrote:
> > On Sat, Jan 7, 2023 at 2:19 PM Nick Gregory <nick@nickgregory.me> wrote:
> >>
> >> Bring in man page changes from the patch set by Colin Cross
> >> <ccross@google.com> [0], and document the corresponding virtual names in
> >> procfs.
> >
> > Hi Nick,
> > The content LGTM (not an expert in formatting).
>
> The formatting is perfect, AFAICS. :)
>
> > You even captured the
> > recent addition of named shared anonymous mapping support (CC'ing
> > Pasha)! Thanks for doing this!
>
> Do you want me to wait for him to have a look, or should I just apply?

I CC'ed Pasha as FYI. I don't think he will have any objections.
Thanks for checking!

>
> >
> >>
> >> Signed-off-by: Nick Gregory <nick@nickgregory.me>
> >> Cc: Colin Cross <ccross@google.com>
> >> Cc: Suren Baghdasaryan <surenb@google.com>
> >> Cc: Kees Cook <keescook@chromium.org>
> >
> > Reviewed-by: Suren Baghdasaryan <surenb@google.com>
>
> Thanks for the patch and the review!
>
> Cheers,
>
> Alex
>
> >
> >>
> >> [0] https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/
> >> ---
> >>   man2/prctl.2 | 34 ++++++++++++++++++++++++++++++++++
> >>   man5/proc.5  | 14 ++++++++++++++
> >>   2 files changed, 48 insertions(+)
> >>
> >> diff --git a/man2/prctl.2 b/man2/prctl.2
> >> index 74f86ff49..2c8d52ade 100644
> >> --- a/man2/prctl.2
> >> +++ b/man2/prctl.2
> >> @@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the
> >>   .B CONFIG_CHECKPOINT_RESTORE
> >>   option enabled.
> >>   .RE
> >> +.\" prctl PR_SET_VMA
> >> +.TP
> >> +.BR PR_SET_VMA " (since Linux 5.17)"
> >> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
> >> +Sets an attribute specified in
> >> +.I arg2
> >> +for virtual memory areas starting from the address specified in
> >> +.I arg3
> >> +and spanning the size specified in
> >> +.IR arg4 .
> >> +.I arg5
> >> +specifies the value of the attribute to be set.
> >> +.IP
> >> +Note that assigning an attribute to a virtual memory area
> >> +might prevent it from being merged with adjacent virtual memory areas
> >> +due to the difference in that attribute's value.
> >> +.IP
> >> +Currently,
> >> +.I arg2
> >> +must be one of:
> >> +.RS
> >> +.TP
> >> +.B PR_SET_VMA_ANON_NAME
> >> +Set a name for anonymous virtual memory areas.
> >> +.I arg5
> >> +should be a pointer to a null-terminated string containing the name.
> >> +The name length including null byte cannot exceed 80 bytes.
> >> +If
> >> +.I arg5
> >> +is NULL, the name of the appropriate anonymous virtual memory areas
> >> +will be reset.
> >> +The name can contain only printable ascii characters (including space),
> >> +except \(aq[\(aq, \(aq]\(aq, \(aq\e\(aq, \(aq$\(aq, and \(aq\(ga\(aq.
> >> +.RE
> >>   .\" prctl PR_MPX_ENABLE_MANAGEMENT
> >>   .TP
> >>   .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
> >> diff --git a/man5/proc.5 b/man5/proc.5
> >> index 65a4c38e3..e0a64d486 100644
> >> --- a/man5/proc.5
> >> +++ b/man5/proc.5
> >> @@ -1372,6 +1372,20 @@ See
> >>   .TP
> >>   .I [heap]
> >>   The process's heap.
> >> +.TP
> >> +.IR [anon: name ] " (since Linux 5.17)"
> >> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
> >> +A named private anonymous mapping.
> >> +Set with
> >> +.BR prctl (2)
> >> +.BR PR_SET_VMA_ANON_NAME .
> >> +.TP
> >> +.IR [anon_shmem: name ] " (since Linux 6.2)"
> >> +.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
> >> +A named shared anonymous mapping.
> >> +Set with
> >> +.BR prctl (2)
> >> +.BR PR_SET_VMA_ANON_NAME .
> >>   .in
> >>   .RE
> >>   .IP
> >> --
> >> 2.39.0
> >>
>
> --
> <http://www.alejandro-colomar.es/>

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

* Re: [PATCH v2] prctl.2, proc.5: Document VMA naming
  2023-01-10 22:56     ` Suren Baghdasaryan
@ 2023-01-10 23:01       ` Alejandro Colomar
  2023-01-10 23:02       ` Pasha Tatashin
  1 sibling, 0 replies; 7+ messages in thread
From: Alejandro Colomar @ 2023-01-10 23:01 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: Nick Gregory, linux-man, ccross, keescook, Pasha Tatashin


[-- Attachment #1.1: Type: text/plain, Size: 4144 bytes --]

On 1/10/23 23:56, Suren Baghdasaryan wrote:
> On Tue, Jan 10, 2023 at 1:12 PM Alejandro Colomar
> <alx.manpages@gmail.com> wrote:
>>
>> Hi Nick and Suren!
>>
>> On 1/10/23 22:02, Suren Baghdasaryan wrote:
>>> On Sat, Jan 7, 2023 at 2:19 PM Nick Gregory <nick@nickgregory.me> wrote:
>>>>
>>>> Bring in man page changes from the patch set by Colin Cross
>>>> <ccross@google.com> [0], and document the corresponding virtual names in
>>>> procfs.
>>>
>>> Hi Nick,
>>> The content LGTM (not an expert in formatting).
>>
>> The formatting is perfect, AFAICS. :)
>>
>>> You even captured the
>>> recent addition of named shared anonymous mapping support (CC'ing
>>> Pasha)! Thanks for doing this!
>>
>> Do you want me to wait for him to have a look, or should I just apply?
> 
> I CC'ed Pasha as FYI. I don't think he will have any objections.
> Thanks for checking!

Thank you!

Patch applied, and tags added.

Cheers,

Alex

> 
>>
>>>
>>>>
>>>> Signed-off-by: Nick Gregory <nick@nickgregory.me>
>>>> Cc: Colin Cross <ccross@google.com>
>>>> Cc: Suren Baghdasaryan <surenb@google.com>
>>>> Cc: Kees Cook <keescook@chromium.org>
>>>
>>> Reviewed-by: Suren Baghdasaryan <surenb@google.com>
>>
>> Thanks for the patch and the review!
>>
>> Cheers,
>>
>> Alex
>>
>>>
>>>>
>>>> [0] https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/
>>>> ---
>>>>    man2/prctl.2 | 34 ++++++++++++++++++++++++++++++++++
>>>>    man5/proc.5  | 14 ++++++++++++++
>>>>    2 files changed, 48 insertions(+)
>>>>
>>>> diff --git a/man2/prctl.2 b/man2/prctl.2
>>>> index 74f86ff49..2c8d52ade 100644
>>>> --- a/man2/prctl.2
>>>> +++ b/man2/prctl.2
>>>> @@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the
>>>>    .B CONFIG_CHECKPOINT_RESTORE
>>>>    option enabled.
>>>>    .RE
>>>> +.\" prctl PR_SET_VMA
>>>> +.TP
>>>> +.BR PR_SET_VMA " (since Linux 5.17)"
>>>> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
>>>> +Sets an attribute specified in
>>>> +.I arg2
>>>> +for virtual memory areas starting from the address specified in
>>>> +.I arg3
>>>> +and spanning the size specified in
>>>> +.IR arg4 .
>>>> +.I arg5
>>>> +specifies the value of the attribute to be set.
>>>> +.IP
>>>> +Note that assigning an attribute to a virtual memory area
>>>> +might prevent it from being merged with adjacent virtual memory areas
>>>> +due to the difference in that attribute's value.
>>>> +.IP
>>>> +Currently,
>>>> +.I arg2
>>>> +must be one of:
>>>> +.RS
>>>> +.TP
>>>> +.B PR_SET_VMA_ANON_NAME
>>>> +Set a name for anonymous virtual memory areas.
>>>> +.I arg5
>>>> +should be a pointer to a null-terminated string containing the name.
>>>> +The name length including null byte cannot exceed 80 bytes.
>>>> +If
>>>> +.I arg5
>>>> +is NULL, the name of the appropriate anonymous virtual memory areas
>>>> +will be reset.
>>>> +The name can contain only printable ascii characters (including space),
>>>> +except \(aq[\(aq, \(aq]\(aq, \(aq\e\(aq, \(aq$\(aq, and \(aq\(ga\(aq.
>>>> +.RE
>>>>    .\" prctl PR_MPX_ENABLE_MANAGEMENT
>>>>    .TP
>>>>    .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
>>>> diff --git a/man5/proc.5 b/man5/proc.5
>>>> index 65a4c38e3..e0a64d486 100644
>>>> --- a/man5/proc.5
>>>> +++ b/man5/proc.5
>>>> @@ -1372,6 +1372,20 @@ See
>>>>    .TP
>>>>    .I [heap]
>>>>    The process's heap.
>>>> +.TP
>>>> +.IR [anon: name ] " (since Linux 5.17)"
>>>> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
>>>> +A named private anonymous mapping.
>>>> +Set with
>>>> +.BR prctl (2)
>>>> +.BR PR_SET_VMA_ANON_NAME .
>>>> +.TP
>>>> +.IR [anon_shmem: name ] " (since Linux 6.2)"
>>>> +.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
>>>> +A named shared anonymous mapping.
>>>> +Set with
>>>> +.BR prctl (2)
>>>> +.BR PR_SET_VMA_ANON_NAME .
>>>>    .in
>>>>    .RE
>>>>    .IP
>>>> --
>>>> 2.39.0
>>>>
>>
>> --
>> <http://www.alejandro-colomar.es/>

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

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

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

* Re: [PATCH v2] prctl.2, proc.5: Document VMA naming
  2023-01-10 22:56     ` Suren Baghdasaryan
  2023-01-10 23:01       ` Alejandro Colomar
@ 2023-01-10 23:02       ` Pasha Tatashin
  2023-01-10 23:03         ` Alejandro Colomar
  1 sibling, 1 reply; 7+ messages in thread
From: Pasha Tatashin @ 2023-01-10 23:02 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: Alejandro Colomar, Nick Gregory, linux-man, ccross, keescook,
	pasha.tatashin

On Tue, Jan 10, 2023 at 5:56 PM Suren Baghdasaryan <surenb@google.com> wrote:
>
> On Tue, Jan 10, 2023 at 1:12 PM Alejandro Colomar
> <alx.manpages@gmail.com> wrote:
> >
> > Hi Nick and Suren!
> >
> > On 1/10/23 22:02, Suren Baghdasaryan wrote:
> > > On Sat, Jan 7, 2023 at 2:19 PM Nick Gregory <nick@nickgregory.me> wrote:
> > >>
> > >> Bring in man page changes from the patch set by Colin Cross
> > >> <ccross@google.com> [0], and document the corresponding virtual names in
> > >> procfs.
> > >
> > > Hi Nick,
> > > The content LGTM (not an expert in formatting).
> >
> > The formatting is perfect, AFAICS. :)
> >
> > > You even captured the
> > > recent addition of named shared anonymous mapping support (CC'ing
> > > Pasha)! Thanks for doing this!
> >
> > Do you want me to wait for him to have a look, or should I just apply?
>
> I CC'ed Pasha as FYI. I don't think he will have any objections.
> Thanks for checking!
>
> >
> > >
> > >>
> > >> Signed-off-by: Nick Gregory <nick@nickgregory.me>
> > >> Cc: Colin Cross <ccross@google.com>
> > >> Cc: Suren Baghdasaryan <surenb@google.com>
> > >> Cc: Kees Cook <keescook@chromium.org>
> > >
> > > Reviewed-by: Suren Baghdasaryan <surenb@google.com>
> >
> > Thanks for the patch and the review!
> >
> > Cheers,
> >
> > Alex
> >
> > >
> > >>
> > >> [0] https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/
> > >> ---
> > >>   man2/prctl.2 | 34 ++++++++++++++++++++++++++++++++++
> > >>   man5/proc.5  | 14 ++++++++++++++
> > >>   2 files changed, 48 insertions(+)
> > >>
> > >> diff --git a/man2/prctl.2 b/man2/prctl.2
> > >> index 74f86ff49..2c8d52ade 100644
> > >> --- a/man2/prctl.2
> > >> +++ b/man2/prctl.2
> > >> @@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the
> > >>   .B CONFIG_CHECKPOINT_RESTORE
> > >>   option enabled.
> > >>   .RE
> > >> +.\" prctl PR_SET_VMA
> > >> +.TP
> > >> +.BR PR_SET_VMA " (since Linux 5.17)"
> > >> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
> > >> +Sets an attribute specified in
> > >> +.I arg2
> > >> +for virtual memory areas starting from the address specified in
> > >> +.I arg3
> > >> +and spanning the size specified in
> > >> +.IR arg4 .
> > >> +.I arg5
> > >> +specifies the value of the attribute to be set.
> > >> +.IP
> > >> +Note that assigning an attribute to a virtual memory area
> > >> +might prevent it from being merged with adjacent virtual memory areas
> > >> +due to the difference in that attribute's value.
> > >> +.IP
> > >> +Currently,
> > >> +.I arg2
> > >> +must be one of:
> > >> +.RS
> > >> +.TP
> > >> +.B PR_SET_VMA_ANON_NAME
> > >> +Set a name for anonymous virtual memory areas.
> > >> +.I arg5
> > >> +should be a pointer to a null-terminated string containing the name.
> > >> +The name length including null byte cannot exceed 80 bytes.
> > >> +If
> > >> +.I arg5
> > >> +is NULL, the name of the appropriate anonymous virtual memory areas
> > >> +will be reset.
> > >> +The name can contain only printable ascii characters (including space),
> > >> +except \(aq[\(aq, \(aq]\(aq, \(aq\e\(aq, \(aq$\(aq, and \(aq\(ga\(aq.
> > >> +.RE
> > >>   .\" prctl PR_MPX_ENABLE_MANAGEMENT
> > >>   .TP
> > >>   .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
> > >> diff --git a/man5/proc.5 b/man5/proc.5
> > >> index 65a4c38e3..e0a64d486 100644
> > >> --- a/man5/proc.5
> > >> +++ b/man5/proc.5
> > >> @@ -1372,6 +1372,20 @@ See
> > >>   .TP
> > >>   .I [heap]
> > >>   The process's heap.
> > >> +.TP
> > >> +.IR [anon: name ] " (since Linux 5.17)"
> > >> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
> > >> +A named private anonymous mapping.
> > >> +Set with
> > >> +.BR prctl (2)
> > >> +.BR PR_SET_VMA_ANON_NAME .
> > >> +.TP
> > >> +.IR [anon_shmem: name ] " (since Linux 6.2)"
> > >> +.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
> > >> +A named shared anonymous mapping.
> > >> +Set with
> > >> +.BR prctl (2)
> > >> +.BR PR_SET_VMA_ANON_NAME .

LGTM, thank you

Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>

Pasha

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

* Re: [PATCH v2] prctl.2, proc.5: Document VMA naming
  2023-01-10 23:02       ` Pasha Tatashin
@ 2023-01-10 23:03         ` Alejandro Colomar
  0 siblings, 0 replies; 7+ messages in thread
From: Alejandro Colomar @ 2023-01-10 23:03 UTC (permalink / raw)
  To: Pasha Tatashin, Suren Baghdasaryan
  Cc: Nick Gregory, linux-man, ccross, keescook, pasha.tatashin


[-- Attachment #1.1: Type: text/plain, Size: 4323 bytes --]



On 1/11/23 00:02, Pasha Tatashin wrote:
> On Tue, Jan 10, 2023 at 5:56 PM Suren Baghdasaryan <surenb@google.com> wrote:
>>
>> On Tue, Jan 10, 2023 at 1:12 PM Alejandro Colomar
>> <alx.manpages@gmail.com> wrote:
>>>
>>> Hi Nick and Suren!
>>>
>>> On 1/10/23 22:02, Suren Baghdasaryan wrote:
>>>> On Sat, Jan 7, 2023 at 2:19 PM Nick Gregory <nick@nickgregory.me> wrote:
>>>>>
>>>>> Bring in man page changes from the patch set by Colin Cross
>>>>> <ccross@google.com> [0], and document the corresponding virtual names in
>>>>> procfs.
>>>>
>>>> Hi Nick,
>>>> The content LGTM (not an expert in formatting).
>>>
>>> The formatting is perfect, AFAICS. :)
>>>
>>>> You even captured the
>>>> recent addition of named shared anonymous mapping support (CC'ing
>>>> Pasha)! Thanks for doing this!
>>>
>>> Do you want me to wait for him to have a look, or should I just apply?
>>
>> I CC'ed Pasha as FYI. I don't think he will have any objections.
>> Thanks for checking!
>>
>>>
>>>>
>>>>>
>>>>> Signed-off-by: Nick Gregory <nick@nickgregory.me>
>>>>> Cc: Colin Cross <ccross@google.com>
>>>>> Cc: Suren Baghdasaryan <surenb@google.com>
>>>>> Cc: Kees Cook <keescook@chromium.org>
>>>>
>>>> Reviewed-by: Suren Baghdasaryan <surenb@google.com>
>>>
>>> Thanks for the patch and the review!
>>>
>>> Cheers,
>>>
>>> Alex
>>>
>>>>
>>>>>
>>>>> [0] https://lore.kernel.org/linux-mm/20211019215511.3771969-2-surenb@google.com/
>>>>> ---
>>>>>    man2/prctl.2 | 34 ++++++++++++++++++++++++++++++++++
>>>>>    man5/proc.5  | 14 ++++++++++++++
>>>>>    2 files changed, 48 insertions(+)
>>>>>
>>>>> diff --git a/man2/prctl.2 b/man2/prctl.2
>>>>> index 74f86ff49..2c8d52ade 100644
>>>>> --- a/man2/prctl.2
>>>>> +++ b/man2/prctl.2
>>>>> @@ -769,6 +769,40 @@ This feature is available only if the kernel is built with the
>>>>>    .B CONFIG_CHECKPOINT_RESTORE
>>>>>    option enabled.
>>>>>    .RE
>>>>> +.\" prctl PR_SET_VMA
>>>>> +.TP
>>>>> +.BR PR_SET_VMA " (since Linux 5.17)"
>>>>> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
>>>>> +Sets an attribute specified in
>>>>> +.I arg2
>>>>> +for virtual memory areas starting from the address specified in
>>>>> +.I arg3
>>>>> +and spanning the size specified in
>>>>> +.IR arg4 .
>>>>> +.I arg5
>>>>> +specifies the value of the attribute to be set.
>>>>> +.IP
>>>>> +Note that assigning an attribute to a virtual memory area
>>>>> +might prevent it from being merged with adjacent virtual memory areas
>>>>> +due to the difference in that attribute's value.
>>>>> +.IP
>>>>> +Currently,
>>>>> +.I arg2
>>>>> +must be one of:
>>>>> +.RS
>>>>> +.TP
>>>>> +.B PR_SET_VMA_ANON_NAME
>>>>> +Set a name for anonymous virtual memory areas.
>>>>> +.I arg5
>>>>> +should be a pointer to a null-terminated string containing the name.
>>>>> +The name length including null byte cannot exceed 80 bytes.
>>>>> +If
>>>>> +.I arg5
>>>>> +is NULL, the name of the appropriate anonymous virtual memory areas
>>>>> +will be reset.
>>>>> +The name can contain only printable ascii characters (including space),
>>>>> +except \(aq[\(aq, \(aq]\(aq, \(aq\e\(aq, \(aq$\(aq, and \(aq\(ga\(aq.
>>>>> +.RE
>>>>>    .\" prctl PR_MPX_ENABLE_MANAGEMENT
>>>>>    .TP
>>>>>    .BR PR_MPX_ENABLE_MANAGEMENT ", " PR_MPX_DISABLE_MANAGEMENT " (since Linux 3.19, removed in Linux 5.4; only on x86)"
>>>>> diff --git a/man5/proc.5 b/man5/proc.5
>>>>> index 65a4c38e3..e0a64d486 100644
>>>>> --- a/man5/proc.5
>>>>> +++ b/man5/proc.5
>>>>> @@ -1372,6 +1372,20 @@ See
>>>>>    .TP
>>>>>    .I [heap]
>>>>>    The process's heap.
>>>>> +.TP
>>>>> +.IR [anon: name ] " (since Linux 5.17)"
>>>>> +.\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
>>>>> +A named private anonymous mapping.
>>>>> +Set with
>>>>> +.BR prctl (2)
>>>>> +.BR PR_SET_VMA_ANON_NAME .
>>>>> +.TP
>>>>> +.IR [anon_shmem: name ] " (since Linux 6.2)"
>>>>> +.\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
>>>>> +A named shared anonymous mapping.
>>>>> +Set with
>>>>> +.BR prctl (2)
>>>>> +.BR PR_SET_VMA_ANON_NAME .
> 
> LGTM, thank you
> 
> Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>

This tag is out just for a few seconds :P

Cheers,

Alex

> 
> Pasha

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

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

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

end of thread, other threads:[~2023-01-10 23:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 22:19 [PATCH v2] prctl.2, proc.5: Document VMA naming Nick Gregory
2023-01-10 21:02 ` Suren Baghdasaryan
2023-01-10 21:12   ` Alejandro Colomar
2023-01-10 22:56     ` Suren Baghdasaryan
2023-01-10 23:01       ` Alejandro Colomar
2023-01-10 23:02       ` Pasha Tatashin
2023-01-10 23:03         ` Alejandro Colomar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.