lkml.org 
[lkml]   [2020]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] objtool: Documentation: document UACCESS warnings
From
Date
On 3/24/20 5:43 AM, Nick Desaulniers wrote:
> Compiling with Clang and CONFIG_KASAN=y was exposing a few warnings:
> call to memset() with UACCESS enabled
>
> Document how to fix these for future travelers.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/876
> Suggested-by: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Looks good, a minor nitpick below.

> ---
> .../Documentation/stack-validation.txt | 20 +++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/tools/objtool/Documentation/stack-validation.txt b/tools/objtool/Documentation/stack-validation.txt
> index de094670050b..156fee13ba02 100644
> --- a/tools/objtool/Documentation/stack-validation.txt
> +++ b/tools/objtool/Documentation/stack-validation.txt
> @@ -289,6 +289,26 @@ they mean, and suggestions for how to fix them.
> might be corrupt due to a gcc bug. For more details, see:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646
>
> +9. file.o: warning: objtool: funcA() call to funcB() with UACCESS enabled
> +
> + This means that an unexpected call to a non-whitelisted function exists
> + outside of arch-specific guards.
> + X86: SMAP (stac/clac): __uaccess_begin()/__uaccess_end()
> + ARM: PAN: uaccess_enable()/uaccess_enable()
^^^^^^
uaccess_disable()

> +
> + These functions should called to denote a minimal critical section around
> + access to __user variables. See also: https://lwn.net/Articles/517475/

--
Kamalesh

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