lkml.org 
[lkml]   [2019]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.1 01/60] x86/uaccess, kcov: Disable stack protector
    Date
    From: Peter Zijlstra <peterz@infradead.org>

    [ Upstream commit 40ea97290b08be2e038b31cbb33097d1145e8169 ]

    New tooling noticed this mishap:

    kernel/kcov.o: warning: objtool: write_comp_data()+0x138: call to __stack_chk_fail() with UACCESS enabled
    kernel/kcov.o: warning: objtool: __sanitizer_cov_trace_pc()+0xd9: call to __stack_chk_fail() with UACCESS enabled

    All the other instrumentation (KASAN,UBSAN) also have stack protector
    disabled.

    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    kernel/Makefile | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/kernel/Makefile b/kernel/Makefile
    index 6c57e78817da..62471e75a2b0 100644
    --- a/kernel/Makefile
    +++ b/kernel/Makefile
    @@ -30,6 +30,7 @@ KCOV_INSTRUMENT_extable.o := n
    # Don't self-instrument.
    KCOV_INSTRUMENT_kcov.o := n
    KASAN_SANITIZE_kcov.o := n
    +CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)

    # cond_syscall is currently not LTO compatible
    CFLAGS_sys_ni.o = $(DISABLE_LTO)
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-06-05 01:23    [W:4.200 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site