[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdnxqzMgs_CNd5xQgXBOt5GmirfCjKYk7d+cxEBEeKgLrg@mail.gmail.com>
Date: Thu, 4 Jun 2020 10:05:04 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Marco Elver <elver@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
kasan-dev <kasan-dev@...glegroups.com>,
LKML <linux-kernel@...r.kernel.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>
Subject: Re: [PATCH v2 2/2] kcov: Pass -fno-stack-protector with Clang
On Thu, Jun 4, 2020 at 7:56 AM 'Marco Elver' via Clang Built Linux
<clang-built-linux@...glegroups.com> wrote:
>
> For Clang, correctly pass -fno-stack-protector via a separate cc-option,
> as -fno-conserve-stack does not exist with Clang.
>
> Signed-off-by: Marco Elver <elver@...gle.com>
> ---
> kernel/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/Makefile b/kernel/Makefile
> index ce8716a04d0e..82153c47d2a6 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -35,7 +35,7 @@ KCOV_INSTRUMENT_stacktrace.o := n
> KCOV_INSTRUMENT_kcov.o := n
> KASAN_SANITIZE_kcov.o := n
> KCSAN_SANITIZE_kcov.o := n
> -CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector)
> +CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack) $(call cc-option, -fno-stack-protector)
All supported compiler versions understand -fno-stack-protector.
Please unwrap it from cc-option. That's one less compiler invocation
at build time.
>
> # cond_syscall is currently not LTO compatible
> CFLAGS_sys_ni.o = $(DISABLE_LTO)
> --
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists