LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: zhenzhong.duan@oracle.com
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, Andy Lutomirski <luto@kernel.org>,
	konrad.wilk@oracle.com, David Woodhouse <dwmw@amazon.co.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	srinivas.eeda@oracle.com, Borislav Petkov <bp@suse.de>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Michal Marek <michal.lkml@markovi.net>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH 1/3] retpolines: Only enable retpoline when compiler support it
Date: Tue, 30 Oct 2018 18:39:24 +0900	[thread overview]
Message-ID: <CAK7LNAQG62vzFpDC_xoTEh6CuxmRVU7jAtVe7YpVmqou1hEagQ@mail.gmail.com> (raw)
In-Reply-To: <e63900bc-d7af-4a57-aa96-f6cc84b89e09@default>

Hi,



On Tue, Oct 30, 2018 at 3:57 PM Zhenzhong Duan
<zhenzhong.duan@oracle.com> wrote:
>
> Since retpoline capable compilers are widely available, make
> CONFIG_RETPOLINE hard depend on it.
>
> Change KBUILD to use CONFIG_RETPOLINE_SUPPORT to avoid conflict with
> CONFIG_RETPOLINE which is used by kernel.
>
> With all that stuff, 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@oracle.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: David Woodhouse <dwmw@amazon.co.uk>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> ---


Instead of adding another CONFIG option,
does it make sense to add compiler support checks
to 'depends on' syntax ?


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)
         default y
         select STACK_VALIDATION if HAVE_STACK_VALIDATION






-- 
Best Regards
Masahiro Yamada

  parent reply	other threads:[~2018-10-30  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-30  6:55 Zhenzhong Duan
2018-10-30  8:32 ` Peter Zijlstra
2018-10-31  4:58   ` Zhenzhong Duan
2018-10-30  9:39 ` Masahiro Yamada [this message]
2018-10-30 10:09   ` Peter Zijlstra
2018-10-31  5:55     ` Zhenzhong Duan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNAQG62vzFpDC_xoTEh6CuxmRVU7jAtVe7YpVmqou1hEagQ@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=bp@suse.de \
    --cc=daniel@iogearbox.net \
    --cc=dwmw@amazon.co.uk \
    --cc=hpa@zytor.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=srinivas.eeda@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=zhenzhong.duan@oracle.com \
    --subject='Re: [PATCH 1/3] retpolines: Only enable retpoline when compiler support it' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).