Re: [RFC][PATCH 17/22] x86: setup_sigcontext(): list user_access_{begin,end}() into callers

From: Linus Torvalds
Date: Mon Mar 23 2020 - 14:56:46 EST


On Mon, Mar 23, 2020 at 11:40 AM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> -static int setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
> +static __always_inline int setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,

Same deal here: just marking it __always_inline is not enough - make
the naming show that this does the unsafe accesses.

So call it "unsafe_setup_sigcontext()" if you're doing unsafe
accesses, so that *EVERYTHING* that gets done in between the
"user_access_begin/end()" is clearly marked as being special.

Not just for objdump, but for people too.

Linus