* V2 [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
@ 2018-07-18 16:44 H.J. Lu
2018-07-18 16:55 ` Rical Jasan
0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 2018-07-18 16:44 UTC (permalink / raw
To: Rical Jasan, Carlos O'Donell, Joseph S. Myers; +Cc: GNU C Library
[-- Attachment #1: Type: text/plain, Size: 2399 bytes --]
On Tue, Jul 17, 2018 at 10:22 PM, Rical Jasan <rj@2c3t.io> wrote:
> On 07/17/2018 08:04 PM, H.J. Lu wrote:
>> diff --git a/manual/tunables.texi b/manual/tunables.texi
>> index be33c9fc79..7998b3b7e6 100644
>> --- a/manual/tunables.texi
>> +++ b/manual/tunables.texi
>> @@ -356,3 +356,26 @@ to set threshold in bytes for non temporal store.
>>
>> This tunable is specific to i386 and x86-64.
>> @end deftp
>> +
>> +@deftp Tunable glibc.tune.x86_ibt
>> +The @code{glibc.tune.x86_ibt=[on|off|permissive]} tunable allows the user> +to control how indirect branch tracking (IBT) should be enabled.
>
> It seems out of place to list the available options like that in the
> textual context here (for reasons similar to why we don't write function
> calls within paragraphs; e.g., @code{foo(x, y)}), but I do see some
> precedent with other tunables currently in the manual. Instead, I would
> follow up the above sentence with, "Accepted values are @code{on},
> @code{off}, and @code{permissive}."
Fixed.
>> +@code{on} always turns on IBT regardless of whether IBT is enabled in the
>> +executable and its dependent shared libraries. @code{off} always turns
>> +off IBT regardless of whether IBT is enabled in the executable and its
>> +dependent shared libraries. @code{permissive} is the same as the default.
>
> Which is the default and what does it do?
Fixed.
>> +This tunable is specific to i386 and x86-64.
>> +@end deftp
>> +
>> +@deftp Tunable glibc.tune.x86_shstk
>> +The @code{glibc.tune.x86_shstk=[on|off|permissive]} tunable allows the
>> +user to control how shadow stack (SHSTK) should be enabled. @code{on}
>
> Should "shadow stack" be prefixed with a definite article ("the shadow
> stack")? Similarly for SHSTK below.
I don't think SHSTK needs a "the" prefix as we don't use the SSE.
>> +always turns on SHSTK regardless of whether SHSTK is enabled in the
>> +executable and its dependent shared libraries. @code{off} always turns
>> +off SHSTK regardless of whether SHSTK is enabled in the executable and
>> +its dependent shared libraries. @code{permissive} turns off SHSTK when
>> +dlopening a legacy shared library, instead of returns an error.
>
> "instead of returning"?
Fixed.
> Also, what does "legacy" mean in this context?
Fixed/
>> +This tunable is specific to i386 and x86-64.
>> +@end deftp
>
Here is the updated patch. OK for master?
Thanks.
--
H.J.
[-- Attachment #2: 0001-x86-CET-Document-glibc.tune.x86_ibt-and-glibc.tune.x.patch --]
[-- Type: text/x-patch, Size: 2139 bytes --]
From d3954e238462ca5da54d9cf5b0b955dd8ee1b93c Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 17 Jul 2018 19:51:23 -0700
Subject: [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
* manual/tunables.texi: Document glibc.tune.x86_ibt and
glibc.tune.x86_shstk.
---
manual/tunables.texi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/manual/tunables.texi b/manual/tunables.texi
index be33c9fc79..13426ce238 100644
--- a/manual/tunables.texi
+++ b/manual/tunables.texi
@@ -356,3 +356,31 @@ to set threshold in bytes for non temporal store.
This tunable is specific to i386 and x86-64.
@end deftp
+
+@deftp Tunable glibc.tune.x86_ibt
+The @code{glibc.tune.x86_ibt=[on|off|permissive]} tunable allows the user
+to control how indirect branch tracking (IBT) should be enabled. Accepted
+values are @code{on}, @code{off}, and @code{permissive}. @code{on} always
+turns on IBT regardless of whether IBT is enabled in the executable and
+its dependent shared libraries. @code{off} always turns off IBT regardless
+of whether IBT is enabled in the executable and its dependent shared
+libraries. @code{permissive} is the same as the default which disables
+IBT on non-CET executables and shared libraries.
+
+This tunable is specific to i386 and x86-64.
+@end deftp
+
+@deftp Tunable glibc.tune.x86_shstk
+The @code{glibc.tune.x86_shstk=[on|off|permissive]} tunable allows the
+user to control how the shadow stack (SHSTK) should be enabled. Accepted
+values are @code{on}, @code{off}, and @code{permissive}. @code{on}
+always turns on SHSTK regardless of whether SHSTK is enabled in the
+executable and its dependent shared libraries. @code{off} always turns
+off SHSTK regardless of whether SHSTK is enabled in the executable and
+its dependent shared libraries. @code{permissive} changes how dlopen
+works on non-CET shared libraries. By default, when SHSTK is enabled,
+dlopening a non-CET shared library returns an error. With
+@code{permissive}, it turns off SHSTK instead.
+
+This tunable is specific to i386 and x86-64.
+@end deftp
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: V2 [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
2018-07-18 16:44 V2 [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk H.J. Lu
@ 2018-07-18 16:55 ` Rical Jasan
2018-07-18 17:27 ` H.J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Rical Jasan @ 2018-07-18 16:55 UTC (permalink / raw
To: H.J. Lu, Carlos O'Donell, Joseph S. Myers; +Cc: GNU C Library
On 07/18/2018 09:44 AM, H.J. Lu wrote:
...
> diff --git a/manual/tunables.texi b/manual/tunables.texi
> index be33c9fc79..13426ce238 100644
> --- a/manual/tunables.texi
> +++ b/manual/tunables.texi
> @@ -356,3 +356,31 @@ to set threshold in bytes for non temporal store.
>
> This tunable is specific to i386 and x86-64.
> @end deftp
> +
> +@deftp Tunable glibc.tune.x86_ibt
> +The @code{glibc.tune.x86_ibt=[on|off|permissive]} tunable allows the user
I meant to just use @code{glibc.tune.x86_ibt} here, and then list the
options after, like you did below.
> +to control how indirect branch tracking (IBT) should be enabled. Accepted
> +values are @code{on}, @code{off}, and @code{permissive}. @code{on} always
> +turns on IBT regardless of whether IBT is enabled in the executable and
> +its dependent shared libraries. @code{off} always turns off IBT regardless
> +of whether IBT is enabled in the executable and its dependent shared
> +libraries. @code{permissive} is the same as the default which disables
> +IBT on non-CET executables and shared libraries.
> +
> +This tunable is specific to i386 and x86-64.
> +@end deftp
> +
> +@deftp Tunable glibc.tune.x86_shstk
> +The @code{glibc.tune.x86_shstk=[on|off|permissive]} tunable allows the
And here.
> +user to control how the shadow stack (SHSTK) should be enabled. Accepted
> +values are @code{on}, @code{off}, and @code{permissive}. @code{on}
> +always turns on SHSTK regardless of whether SHSTK is enabled in the
> +executable and its dependent shared libraries. @code{off} always turns
> +off SHSTK regardless of whether SHSTK is enabled in the executable and
> +its dependent shared libraries. @code{permissive} changes how dlopen
> +works on non-CET shared libraries. By default, when SHSTK is enabled,
> +dlopening a non-CET shared library returns an error. With
> +@code{permissive}, it turns off SHSTK instead.
> +
> +This tunable is specific to i386 and x86-64.
> +@end deftp
> -- 2.17.1
The permissive explanations are much better, thank you.
Rical
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: V2 [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
2018-07-18 16:55 ` Rical Jasan
@ 2018-07-18 17:27 ` H.J. Lu
2018-07-18 17:40 ` Rical Jasan
2018-07-18 18:26 ` Carlos O'Donell
0 siblings, 2 replies; 5+ messages in thread
From: H.J. Lu @ 2018-07-18 17:27 UTC (permalink / raw
To: Rical Jasan; +Cc: Carlos O'Donell, Joseph S. Myers, GNU C Library
[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]
On Wed, Jul 18, 2018 at 9:55 AM, Rical Jasan <rj@2c3t.io> wrote:
> On 07/18/2018 09:44 AM, H.J. Lu wrote:
> ...
>> diff --git a/manual/tunables.texi b/manual/tunables.texi
>> index be33c9fc79..13426ce238 100644
>> --- a/manual/tunables.texi
>> +++ b/manual/tunables.texi
>> @@ -356,3 +356,31 @@ to set threshold in bytes for non temporal store.
>>
>> This tunable is specific to i386 and x86-64.
>> @end deftp
>> +
>> +@deftp Tunable glibc.tune.x86_ibt
>> +The @code{glibc.tune.x86_ibt=[on|off|permissive]} tunable allows the user
>
> I meant to just use @code{glibc.tune.x86_ibt} here, and then list the
> options after, like you did below.
Fixed.
>> +to control how indirect branch tracking (IBT) should be enabled. Accepted
>> +values are @code{on}, @code{off}, and @code{permissive}. @code{on} always
>> +turns on IBT regardless of whether IBT is enabled in the executable and
>> +its dependent shared libraries. @code{off} always turns off IBT regardless
>> +of whether IBT is enabled in the executable and its dependent shared
>> +libraries. @code{permissive} is the same as the default which disables
>> +IBT on non-CET executables and shared libraries.
>> +
>> +This tunable is specific to i386 and x86-64.
>> +@end deftp
>> +
>> +@deftp Tunable glibc.tune.x86_shstk
>> +The @code{glibc.tune.x86_shstk=[on|off|permissive]} tunable allows the
>
> And here.
Fixed.
Here is the updated patch. OK for master?
Thanks.
--
H.J.
[-- Attachment #2: 0001-x86-CET-Document-glibc.tune.x86_ibt-and-glibc.tune.x.patch --]
[-- Type: text/x-patch, Size: 2099 bytes --]
From ae2b7b566530aa6a83f6afe589245418d1946952 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 17 Jul 2018 19:51:23 -0700
Subject: [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
* manual/tunables.texi: Document glibc.tune.x86_ibt and
glibc.tune.x86_shstk.
---
manual/tunables.texi | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/manual/tunables.texi b/manual/tunables.texi
index be33c9fc79..bb4819bdf1 100644
--- a/manual/tunables.texi
+++ b/manual/tunables.texi
@@ -356,3 +356,31 @@ to set threshold in bytes for non temporal store.
This tunable is specific to i386 and x86-64.
@end deftp
+
+@deftp Tunable glibc.tune.x86_ibt
+The @code{glibc.tune.x86_ibt} tunable allows the user to control how
+indirect branch tracking (IBT) should be enabled. Accepted values are
+@code{on}, @code{off}, and @code{permissive}. @code{on} always turns
+on IBT regardless of whether IBT is enabled in the executable and its
+dependent shared libraries. @code{off} always turns off IBT regardless
+of whether IBT is enabled in the executable and its dependent shared
+libraries. @code{permissive} is the same as the default which disables
+IBT on non-CET executables and shared libraries.
+
+This tunable is specific to i386 and x86-64.
+@end deftp
+
+@deftp Tunable glibc.tune.x86_shstk
+The @code{glibc.tune.x86_shstk} tunable allows the user to control how
+the shadow stack (SHSTK) should be enabled. Accepted values are
+@code{on}, @code{off}, and @code{permissive}. @code{on} always turns on
+SHSTK regardless of whether SHSTK is enabled in the executable and its
+dependent shared libraries. @code{off} always turns off SHSTK regardless
+of whether SHSTK is enabled in the executable and its dependent shared
+libraries. @code{permissive} changes how dlopen works on non-CET shared
+libraries. By default, when SHSTK is enabled, dlopening a non-CET shared
+library returns an error. With @code{permissive}, it turns off SHSTK
+instead.
+
+This tunable is specific to i386 and x86-64.
+@end deftp
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: V2 [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
2018-07-18 17:27 ` H.J. Lu
@ 2018-07-18 17:40 ` Rical Jasan
2018-07-18 18:26 ` Carlos O'Donell
1 sibling, 0 replies; 5+ messages in thread
From: Rical Jasan @ 2018-07-18 17:40 UTC (permalink / raw
To: H.J. Lu; +Cc: Carlos O'Donell, Joseph S. Myers, GNU C Library
On 07/18/2018 10:27 AM, H.J. Lu wrote:
> Here is the updated patch. OK for master?
LGTM.
Rical
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: V2 [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
2018-07-18 17:27 ` H.J. Lu
2018-07-18 17:40 ` Rical Jasan
@ 2018-07-18 18:26 ` Carlos O'Donell
1 sibling, 0 replies; 5+ messages in thread
From: Carlos O'Donell @ 2018-07-18 18:26 UTC (permalink / raw
To: H.J. Lu, Rical Jasan; +Cc: Joseph S. Myers, GNU C Library
On 07/18/2018 01:27 PM, H.J. Lu wrote
> From ae2b7b566530aa6a83f6afe589245418d1946952 Mon Sep 17 00:00:00 2001
> From: "H.J. Lu" <hjl.tools@gmail.com>
> Date: Tue, 17 Jul 2018 19:51:23 -0700
> Subject: [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk
>
> * manual/tunables.texi: Document glibc.tune.x86_ibt and
> glibc.tune.x86_shstk.
> ---
OK for 2.28.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> manual/tunables.texi | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/manual/tunables.texi b/manual/tunables.texi
> index be33c9fc79..bb4819bdf1 100644
> --- a/manual/tunables.texi
> +++ b/manual/tunables.texi
> @@ -356,3 +356,31 @@ to set threshold in bytes for non temporal store.
>
> This tunable is specific to i386 and x86-64.
> @end deftp
> +
> +@deftp Tunable glibc.tune.x86_ibt
> +The @code{glibc.tune.x86_ibt} tunable allows the user to control how
> +indirect branch tracking (IBT) should be enabled. Accepted values are
> +@code{on}, @code{off}, and @code{permissive}. @code{on} always turns
> +on IBT regardless of whether IBT is enabled in the executable and its
> +dependent shared libraries. @code{off} always turns off IBT regardless
> +of whether IBT is enabled in the executable and its dependent shared
> +libraries. @code{permissive} is the same as the default which disables
> +IBT on non-CET executables and shared libraries.
> +
OK. Though I'm always squeamish about starting sentences with @code{foo}.
> +This tunable is specific to i386 and x86-64.
> +@end deftp
> +
> +@deftp Tunable glibc.tune.x86_shstk
> +The @code{glibc.tune.x86_shstk} tunable allows the user to control how
> +the shadow stack (SHSTK) should be enabled. Accepted values are
> +@code{on}, @code{off}, and @code{permissive}. @code{on} always turns on
> +SHSTK regardless of whether SHSTK is enabled in the executable and its
> +dependent shared libraries. @code{off} always turns off SHSTK regardless
> +of whether SHSTK is enabled in the executable and its dependent shared
> +libraries. @code{permissive} changes how dlopen works on non-CET shared
> +libraries. By default, when SHSTK is enabled, dlopening a non-CET shared
> +library returns an error. With @code{permissive}, it turns off SHSTK
> +instead.
OK.
> +
> +This tunable is specific to i386 and x86-64.
> +@end deftp
> -- 2.17.1
--
Cheers,
Carlos.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-18 18:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-18 16:44 V2 [PATCH] x86/CET: Document glibc.tune.x86_ibt and glibc.tune.x86_shstk H.J. Lu
2018-07-18 16:55 ` Rical Jasan
2018-07-18 17:27 ` H.J. Lu
2018-07-18 17:40 ` Rical Jasan
2018-07-18 18:26 ` Carlos O'Donell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).