Explain 'S' short-hand in malloc.conf

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Explain 'S' short-hand in malloc.conf

Christian Ludwig-3
The 'S' flag in malloc.conf(5) is a short-hand for several other flags. Explain
which flags it sets exactly.
---
 share/man/man5/malloc.conf.5 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/share/man/man5/malloc.conf.5 b/share/man/man5/malloc.conf.5
index 556e9934973..9c251edddfe 100644
--- a/share/man/man5/malloc.conf.5
+++ b/share/man/man5/malloc.conf.5
@@ -97,7 +97,15 @@ is called, even if the initial allocation was big enough.
 .\"for all operations.
 .\"Consult the source for this one.
 .It Cm S
-Enable all options suitable for security auditing.
+Enable all flags suitable for security auditing.
+This is short-hand for the flags
+.Cm C ,
+.Cm F ,
+.Cm G
+and
+.Cm J .
+It also disables the free page cache, see
+.Cm < .
 .It Cm U
 .Dq Free unmap .
 Enable use after free protection for larger allocations.
--
2.17.0

Reply | Threaded
Open this post in threaded view
|

Re: Explain 'S' short-hand in malloc.conf

Ingo Schwarze
Hi Christian,

Christian Ludwig wrote on Thu, May 03, 2018 at 04:57:55PM +0200:

> The 'S' flag in malloc.conf(5) is a short-hand for several other flags.
> Explain which flags it sets exactly.

Your diff is *not* OK.

These details are intentionally undocumented
because they change often.

This question was discussed multiple times in the past,
please check the archives.

Yours,
  Ingo


> --- a/share/man/man5/malloc.conf.5
> +++ b/share/man/man5/malloc.conf.5
> @@ -97,7 +97,15 @@ is called, even if the initial allocation was big enough.
>  .\"for all operations.
>  .\"Consult the source for this one.
>  .It Cm S
> -Enable all options suitable for security auditing.
> +Enable all flags suitable for security auditing.
> +This is short-hand for the flags
> +.Cm C ,
> +.Cm F ,
> +.Cm G
> +and
> +.Cm J .
> +It also disables the free page cache, see
> +.Cm < .
>  .It Cm U
>  .Dq Free unmap .
>  Enable use after free protection for larger allocations.

Reply | Threaded
Open this post in threaded view
|

Re: Explain 'S' short-hand in malloc.conf

Otto Moerbeek
In reply to this post by Christian Ludwig-3
On Thu, May 03, 2018 at 04:57:55PM +0200, Christian Ludwig wrote:

> The 'S' flag in malloc.conf(5) is a short-hand for several other flags. Explain
> which flags it sets exactly.
> ---
>  share/man/man5/malloc.conf.5 | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/share/man/man5/malloc.conf.5 b/share/man/man5/malloc.conf.5
> index 556e9934973..9c251edddfe 100644
> --- a/share/man/man5/malloc.conf.5
> +++ b/share/man/man5/malloc.conf.5
> @@ -97,7 +97,15 @@ is called, even if the initial allocation was big enough.
>  .\"for all operations.
>  .\"Consult the source for this one.
>  .It Cm S
> -Enable all options suitable for security auditing.
> +Enable all flags suitable for security auditing.
> +This is short-hand for the flags
> +.Cm C ,
> +.Cm F ,
> +.Cm G
> +and
> +.Cm J .
> +It also disables the free page cache, see
> +.Cm < .
>  .It Cm U
>  .Dq Free unmap .
>  Enable use after free protection for larger allocations.
> --
> 2.17.0

No, I prefer not to document this, so we can change it when we want.
       
        -Otto