lkml.org 
[lkml]   [2021]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 5/9] kentry: Remove enter_from/exit_to_user_mode()
Date
On Wed, Mar 17 2021 at 11:12, Andy Lutomirski wrote:
> -/**
> - * exit_to_user_mode - Fixup state when exiting to user mode
> - *
> - * Syscall/interrupt exit enables interrupts, but the kernel state is
> - * interrupts disabled when this is invoked. Also tell RCU about it.
> - *
> - * 1) Trace interrupts on state
> - * 2) Invoke context tracking if enabled to adjust RCU state
> - * 3) Invoke architecture specific last minute exit code, e.g. speculation
> - * mitigations, etc.: arch_exit_to_user_mode()
> - * 4) Tell lockdep that interrupts are enabled
> - *
> - * Invoked from architecture specific code when syscall_exit_to_user_mode()
> - * is not suitable as the last step before returning to userspace. Must be
> - * invoked with interrupts disabled and the caller must be
> - * non-instrumentable.
> - * The caller has to invoke syscall_exit_to_user_mode_work() before this.
> - */
> -void exit_to_user_mode(void);

Oh well. There is this in the C code:

> /* See comment for enter_from_user_mode() in entry-common.h */
> static __always_inline void __exit_from_user_mode(void)

> /* See comment for exit_to_user_mode() in entry-common.h */
> static __always_inline void __exit_to_user_mode(void)

So the comments are now stale and the documentation is lost.

Making the diffstat impressive is not the primary goal here.

And looking at the rest of the comments there are still references to
stuff you deleted. This is really not how it works.

Thanks,

tglx

\
 
 \ /
  Last update: 2021-03-19 19:09    [W:0.075 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site