[PATCH v5 11/16] x86/vsyscall: Document the fact that vsyscall=emulate disables LASS

Alexander Shishkin posted 16 patches 3 weeks, 6 days ago
[PATCH v5 11/16] x86/vsyscall: Document the fact that vsyscall=emulate disables LASS
Posted by Alexander Shishkin 3 weeks, 6 days ago
Since EMULATE mode of vsyscall disables LASS, because fixing the LASS
violations during the EMULATE mode would need complex instruction
decoding, document this fact in kernel-parameters.txt.

Cc: Andy Lutomirski <luto@kernel.org>
Suggested-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 1518343bbe22..4091dc48670a 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -7391,7 +7391,9 @@
 
 			emulate     Vsyscalls turn into traps and are emulated
 			            reasonably safely.  The vsyscall page is
-				    readable.
+				    readable.  This also disables the LASS
+				    feature to allow userspace to poke around
+				    the vsyscall page.
 
 			xonly       [default] Vsyscalls turn into traps and are
 			            emulated reasonably safely.  The vsyscall
-- 
2.45.2
Re: [PATCH v5 11/16] x86/vsyscall: Document the fact that vsyscall=emulate disables LASS
Posted by Sohil Mehta 3 weeks, 5 days ago
On 10/28/2024 9:07 AM, Alexander Shishkin wrote:
> Since EMULATE mode of vsyscall disables LASS, because fixing the LASS
> violations during the EMULATE mode would need complex instruction
> decoding, document this fact in kernel-parameters.txt.
> 
> Cc: Andy Lutomirski <luto@kernel.org>
> Suggested-by: Dave Hansen <dave.hansen@intel.com>
> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> ---
>  Documentation/admin-guide/kernel-parameters.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

It might be better to combine this patch with the previous one. Both the
patches are small enough and related to the same thing.

> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 1518343bbe22..4091dc48670a 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -7391,7 +7391,9 @@
>  
>  			emulate     Vsyscalls turn into traps and are emulated
>  			            reasonably safely.  The vsyscall page is
> -				    readable.
> +				    readable.  This also disables the LASS
> +				    feature to allow userspace to poke around
> +				    the vsyscall page.
>  

I am not sure if the person reading this guide would be aware of LASS.
Also the way the sentence is structured it might be easy to misinterpret
its meaning.

How about something like:

emulate     Vsyscalls turn into traps and are emulated
            reasonably safely.  The vsyscall page is
	    readable.  This disables the linear
	    address space separation (LASS) security
	    feature and makes the system less secure.


>  			xonly       [default] Vsyscalls turn into traps and are
>  			            emulated reasonably safely.  The vsyscall