lkml.org 
[lkml]   [2023]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 2/6] x86/entry_64: Add VERW just before userspace transition
From


On 25.10.23 г. 23:52 ч., Pawan Gupta wrote:

<snip>

> @@ -1520,6 +1530,7 @@ SYM_CODE_START(ignore_sysret)
> UNWIND_HINT_END_OF_STACK
> ENDBR
> mov $-ENOSYS, %eax
> + CLEAR_CPU_BUFFERS

nit: Just out of curiosity is it really needed in this case or it's
doesn for the sake of uniformity so that all ring3 transitions are
indeed covered??

> sysretl
> SYM_CODE_END(ignore_sysret)
> #endif
> diff --git a/arch/x86/entry/entry_64_compat.S b/arch/x86/entry/entry_64_compat.S
> index 70150298f8bd..245697eb8485 100644
> --- a/arch/x86/entry/entry_64_compat.S
> +++ b/arch/x86/entry/entry_64_compat.S
> @@ -271,6 +271,7 @@ SYM_INNER_LABEL(entry_SYSRETL_compat_unsafe_stack, SYM_L_GLOBAL)
> xorl %r9d, %r9d
> xorl %r10d, %r10d
> swapgs
> + CLEAR_CPU_BUFFERS
> sysretl
> SYM_INNER_LABEL(entry_SYSRETL_compat_end, SYM_L_GLOBAL)
> ANNOTATE_NOENDBR
>

\
 
 \ /
  Last update: 2023-10-26 18:26    [W:0.242 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site