Re: [PATCH v2 1/2] retpolines: Only enable retpoline support when compiler support it
From: Ingo Molnar
Date: Thu Nov 01 2018 - 05:50:09 EST
* Zhenzhong Duan <zhenzhong.duan@xxxxxxxxxx> wrote:
> Since retpoline capable compilers are widely available, make
> CONFIG_RETPOLINE hard depend on it.
>
> The check of RETPOLINE is changed to CONFIG_RETPOLINE.
>
> This change is based on suggestion in https://lkml.org/lkml/2018/9/18/1016
>
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@xxxxxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Please turn such 'based on suggestions' into proper tags as well, i.e.
something like:
Suggested-by: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
> config RETPOLINE
> bool "Avoid speculative indirect branches in kernel"
> + depends on $(cc-option,-mindirect-branch=thunk-extern -mindirect-branch-register) || \
> + $(cc-option,-mretpoline-external-thunk)
At least a comment should be added that this is the retpoline feature
check for GCC and Clang.
Also, whitespace damage plus the two options should align vertically.
Thanks,
Ingo