From: Seth Forshee <seth.forshee@canonical.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
kbuild-all@01.org,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
kbuild test robot <lkp@intel.com>
Subject: Re: [kbuild:kbuild 5/19] drivers/atm/eni.o: warning: objtool: eni_init_one()+0xe42: indirect call found in RETPOLINE build
Date: Wed, 17 Jul 2019 09:44:07 -0500 [thread overview]
Message-ID: <20190717144407.GU5418@ubuntu-xps13> (raw)
In-Reply-To: <CAK7LNASDRFuwC4jxvjgs0bUU8EJ93k1_eQTynK2wRfJCRfmFjw@mail.gmail.com>
On Wed, Jul 17, 2019 at 11:52:07AM +0900, Masahiro Yamada wrote:
> On Wed, Jul 17, 2019 at 1:20 AM Josh Poimboeuf <jpoimboe@redhat.com> wrote:
> >
> > On Tue, Jul 16, 2019 at 07:42:49AM -0500, Seth Forshee wrote:
> > > On Tue, Jul 16, 2019 at 03:57:24PM +0900, Masahiro Yamada wrote:
> > > > (+ Josh Poimboeuf)
> > > >
> > > > On Tue, Jul 16, 2019 at 8:44 AM kbuild test robot <lkp@intel.com> wrote:
> > > > >
> > > > > tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
> > > > > head: 0ff0c3753e06c0420c80dac1b0187a442b372acb
> > > > > commit: 2eaf4e87ba258cc3f27e486cdf32d5ba76303c6f [5/19] kbuild: add -fcf-protection=none to retpoline flags
> > > > > config: x86_64-randconfig-s2-07160214 (attached as .config)
> > > > > compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
> > > > > reproduce:
> > > > > git checkout 2eaf4e87ba258cc3f27e486cdf32d5ba76303c6f
> > > > > # save the attached .config to linux build tree
> > > > > make ARCH=x86_64
> > > >
> > > > 0-day bot reports objtool warnings with the following applied:
> > > > https://patchwork.kernel.org/patch/11037379/
> > > >
> > > > I have no idea about objtool.
> > > >
> > > > Is it better to drop this patch for now?
> > >
> > > I'm surprised that the change would have any impact on a build with
> > > gcc-4.9, since -fcf-protection seems to have been introduced in gcc-8. I
> > > guess there's no full build log that would let us see the actual flags
> > > passed to the compiler.
> > >
> > > I'll try to reproduce this result. If you think the patch should be
> > > dropped in the meantime, that's fine.
> >
> > The problem with this patch is that it's breaking the following check in
> > arch/x86/Makefile. GCC 4.9 doesn't support retpolines, so it's supposed
> > to fail with the below error.
> >
> > ifdef CONFIG_RETPOLINE
> > ifeq ($(RETPOLINE_CFLAGS),)
> > @echo "You are building kernel with non-retpoline compiler." >&2
> > @echo "Please update your compiler." >&2
> > @false
> > endif
> > endif
> >
> > Maybe the flags should be placed in another variable other than
> > RETPOLINE_CFLAGS.
>
>
>
> Josh,
> Thanks. You are right.
>
>
> Seth,
> I think you can add the flag to KBUILD_CFLAGS.
>
> If you want to make sure this does not affect non-retpoline
> build, you can surround the code with ifdef.
>
> ifdef CONFIG_RETPOLINE
> KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
> endif
Thanks, I'll send an updated patch shortly.
Seth
prev parent reply other threads:[~2019-07-17 14:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 23:44 [kbuild:kbuild 5/19] drivers/atm/eni.o: warning: objtool: eni_init_one()+0xe42: indirect call found in RETPOLINE build kbuild test robot
2019-07-16 6:57 ` Masahiro Yamada
2019-07-16 12:42 ` Seth Forshee
2019-07-16 13:59 ` Masahiro Yamada
2019-07-16 16:20 ` Josh Poimboeuf
2019-07-17 2:52 ` Masahiro Yamada
2019-07-17 14:44 ` Seth Forshee [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=20190717144407.GU5418@ubuntu-xps13 \
--to=seth.forshee@canonical.com \
--cc=jpoimboe@redhat.com \
--cc=kbuild-all@01.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=yamada.masahiro@socionext.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.