Re: [PATCH 23/25] objtool: Add UACCESS validation

2019-05-07 Thread Peter Zijlstra
On Mon, Mar 18, 2019 at 04:39:03PM +0100, Peter Zijlstra wrote: > +static const char *uaccess_safe_builtin[] = { > + /* KASAN */ > + "kasan_report", > + "check_memory_region", > + /* KASAN out-of-line */ > + "__asan_loadN_noabort", > + "__asan_load1_noabort", > + "__asan

Re: [PATCH 23/25] objtool: Add UACCESS validation

2019-03-18 Thread Josh Poimboeuf
On Mon, Mar 18, 2019 at 04:39:03PM +0100, Peter Zijlstra wrote: > +++ b/tools/objtool/check.c > @@ -443,6 +443,82 @@ static void add_ignores(struct objtool_f > } > > /* > + * This is a whitelist of functions that is allowed to be called with AC set. s/is/are/ -- Josh

[PATCH 23/25] objtool: Add UACCESS validation

2019-03-18 Thread Peter Zijlstra
It is important that UACCESS regions are as small as possible; furthermore the UACCESS state is not scheduled, so doing anything that might directly call into the scheduler will cause random code to be ran with UACCESS enabled. Teach objtool too track UACCESS state and warn about any CALL made whi