lkml.org 
[lkml]   [2020]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V3 02/13] entry: Provide generic syscall exit function
On Thu, Jul 16, 2020 at 08:22:10PM +0200, Thomas Gleixner wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
>
> Like syscall entry all architectures have similar and pointlessly different
> code to handle pending work before returning from a syscall to user space.
>
> 1) One-time syscall exit work:
> - rseq syscall exit
> - audit
> - syscall tracing
> - tracehook (single stepping)
>
> 2) Preparatory work
> - Exit to user mode loop (common TIF handling).
> - Architecture specific one time work arch_exit_to_user_mode_prepare()
> - Address limit and lockdep checks
>
> 3) Final transition (lockdep, tracing, context tracking, RCU). Invokes
> arch_exit_to_user_mode() to handle e.g. speculation mitigations
>
> Provide a generic version based on the x86 code which has all the RCU and
> instrumentation protections right.
>
> Provide a variant for interrupt return to user mode as well which shares
> the above #2 and #3 work items.
>
> After syscall_exit_to_user_mode() and irqentry_exit_to_user_mode() the
> architecture code just has to return to user space. The code after
> returning from these functions must not be instrumented.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

This looks correct to me. Did you happen to run the seccomp selftests
under this series?

Reviewed-by: Kees Cook <keescook@chromium.org>

--
Kees Cook

\
 
 \ /
  Last update: 2020-07-16 22:56    [W:0.156 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site