Re: [PATCH 1/4] lib/strn*,objtool: Enforce user_access_begin() rules
From: Josh Poimboeuf
Date: Fri Apr 08 2022 - 10:09:17 EST
On Fri, Apr 08, 2022 at 11:45:53AM +0200, Peter Zijlstra wrote:
> Apparently GCC can fail to inline a 'static inline' single caller
> function:
>
> lib/strnlen_user.o: warning: objtool: strnlen_user()+0x33: call to do_strnlen_user() with UACCESS enabled
> lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x33: call to do_strncpy_from_user() with UACCESS enabled
>
> Reported-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Presumably because of
ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += -fno-inline-functions-called-once
endif
which I've been wanting to remove since its only true purpose seems to
be creating countless __always_inline patches...
--
Josh