From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Seth Forshee <seth.forshee@canonical.com>
Cc: Michal Marek <michal.lkml@markovi.net>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kbuild: add -fcf-protection=none to retpoline flags
Date: Mon, 15 Jul 2019 21:21:12 +0900 [thread overview]
Message-ID: <CAK7LNAT1wrc0WVOKGTJ3f1RZ+EUjYtJxmKv_2N6mU2STAUg4RA@mail.gmail.com> (raw)
In-Reply-To: <20190709184919.20178-1-seth.forshee@canonical.com>
On Wed, Jul 10, 2019 at 3:49 AM Seth Forshee <seth.forshee@canonical.com> wrote:
>
> -mindirect-branch and -fcf-protection are not compatible, and
> so kernel builds fail with a gcc build where -fcf-protection is
> enabled by default. Add -fcf-protection=none to the retpoline
> flags to fix this.
>
> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
> ---
Applied to linux-kbuild. Thanks.
> Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 3e4868a6498b..050f11d19777 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -636,6 +636,10 @@ RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk
> RETPOLINE_VDSO_CFLAGS_CLANG := -mretpoline
> RETPOLINE_CFLAGS := $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG)))
> RETPOLINE_VDSO_CFLAGS := $(call cc-option,$(RETPOLINE_VDSO_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_VDSO_CFLAGS_CLANG)))
> +# -mindirect-branch is incompatible with -fcf-protection, so ensure the
> +# latter is disabled
> +RETPOLINE_CFLAGS += $(call cc-option,-fcf-protection=none,)
> +RETPOLINE_VDSO_CFLAGS += $(call cc-option,-fcf-protection=none,)
> export RETPOLINE_CFLAGS
> export RETPOLINE_VDSO_CFLAGS
>
> --
> 2.20.1
>
--
Best Regards
Masahiro Yamada
prev parent reply other threads:[~2019-07-15 12:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 18:49 [PATCH] kbuild: add -fcf-protection=none to retpoline flags Seth Forshee
2019-07-15 12:21 ` Masahiro Yamada [this message]
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=CAK7LNAT1wrc0WVOKGTJ3f1RZ+EUjYtJxmKv_2N6mU2STAUg4RA@mail.gmail.com \
--to=yamada.masahiro@socionext.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=seth.forshee@canonical.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).