[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=0R76r6YqNiOhGNt_XrA_t_ZbuBbNNdNXV4CWpDy0+Bg@mail.gmail.com>
Date: Wed, 17 Aug 2022 15:08:01 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Nathan Chancellor <nathan@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] x86/build: Move '-mindirect-branch-cs-prefix' out of
GCC-only block
On Wed, Aug 17, 2022 at 11:56 AM Nathan Chancellor <nathan@...nel.org> wrote:
>
> LLVM 16 will have support for this flag so move it out of the GCC-only
> block to allow LLVM builds to take advantage of it.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/1665
> Link: https://github.com/llvm/llvm-project/commit/6f867f9102838ebe314c1f3661fdf95700386e5a
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
Thanks for the patch, I also boot tested this (in virtual guests for
both 64b and 32b).
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>
Peter, is there anything else special about these prefixes needed to
make use of them?
> ---
>
> I was not sure if this information is relevant for the commit message
> but I can boot without any issues on my test machines (two Intel and one
> AMD).
>
> arch/x86/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 7854685c5f25..987da87c7778 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -14,13 +14,13 @@ endif
>
> ifdef CONFIG_CC_IS_GCC
> RETPOLINE_CFLAGS := $(call cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register)
> -RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix)
> RETPOLINE_VDSO_CFLAGS := $(call cc-option,-mindirect-branch=thunk-inline -mindirect-branch-register)
> endif
> ifdef CONFIG_CC_IS_CLANG
> RETPOLINE_CFLAGS := -mretpoline-external-thunk
> RETPOLINE_VDSO_CFLAGS := -mretpoline
> endif
> +RETPOLINE_CFLAGS += $(call cc-option,-mindirect-branch-cs-prefix)
>
> ifdef CONFIG_RETHUNK
> RETHUNK_CFLAGS := -mfunction-return=thunk-extern
>
> base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
> --
> 2.37.2
>
>
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists