linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: "Kees Cook" <keescook@chromium.org>,
	"Fāng-ruì Sòng" <maskray@google.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Russell King" <linux@armlinux.org.uk>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH] arm/build: Always handle .ARM.exidx and .ARM.extab sections
Date: Tue, 13 Oct 2020 15:56:08 -0700	[thread overview]
Message-ID: <CAKwvOdnM4UHFy1jrnfoKPG_S6CQpWMTCpuxTkbN+_AGe2Ov0SQ@mail.gmail.com> (raw)
In-Reply-To: <20201013032607.GA2091780@ubuntu-m3-large-x86>

On Mon, Oct 12, 2020 at 8:26 PM Nathan Chancellor
<natechancellor@gmail.com> wrote:
>
> On Mon, Oct 12, 2020 at 02:26:52PM -0700, Kees Cook wrote:
> > On Mon, Oct 12, 2020 at 02:22:03PM -0700, Fāng-ruì Sòng wrote:
> > > On Mon, Oct 12, 2020 at 2:11 PM 'Nick Desaulniers' via Clang Built
> > > Linux <clang-built-linux@googlegroups.com> wrote:
> > > >
> > > > Please submit to:
> > > > https://www.arm.linux.org.uk/developer/patches/add.php
>
> This should go through the tip tree (hence sending it straight to Ingo)
> since the patch that this fixes was there. I guess it does not
> necessarily matter now that the breakage is in mainline but basing a
> set of patches on a non -rc tag is a little taboo I thought so not sure
> it is appropriate to go through Russell for now. It is up to the
> maintainers though, I will submit it wherever it needs to go.

Ah got it, yeah I don't really care which tree this goes up in.

>
> > > > >
> > > > > Fixes: 5a17850e251a ("arm/build: Warn on orphan section placement")
> > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/1152
> > > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > > > > ---
> > > > >  arch/arm/kernel/vmlinux.lds.S | 4 ++++
> > > > >  1 file changed, 4 insertions(+)
> > > > >
> > > > > diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> > > > > index 5f4922e858d0..a2c0d96b0580 100644
> > > > > --- a/arch/arm/kernel/vmlinux.lds.S
> > > > > +++ b/arch/arm/kernel/vmlinux.lds.S
> > > > > @@ -40,6 +40,10 @@ SECTIONS
> > > > >                 ARM_DISCARD
> > > > >  #ifndef CONFIG_SMP_ON_UP
> > > > >                 *(.alt.smp.init)
> > > > > +#endif
> > > > > +#ifndef CONFIG_ARM_UNWIND
> > > > > +               *(.ARM.exidx*)
> > > >
> > > > I don't think we need the wildcard, as without this line, I see:
> > > >
> > > > ld.lld: warning: <internal>:(.ARM.exidx) is being placed in '.ARM.exidx'
> > >
> > > We may need the wildcard if there are -ffunction-sections builds.
> > > In clang, .ARM.exidx* cannot be removed even with -fno-unwind-tables
> > > -fno-exceptions.
> >
> > Does it need to be:
> >
> >       *(.ARM.exidx) *(.ARM.exidx.*)
> >       *(.ARM.extab) *(.ARM.extab.*)
> >
> > ?
>
> I tested the patch and saw no warnings with what I sent. I can change it
> to that if it is more proper though!

We don't have LTO working on 32b ARM yet, so I'm not worried about
-ffunction-sections for this (yet).  The ld.bfd linker scripts didn't
seem to use the non-wildcard and wildcard suggestion; just the
wildcarded.  (Maybe they have the same "bug?")  I'm happy to revisit
though if we plan to get LTO up and running on 32b ARM.
-- 
Thanks,
~Nick Desaulniers

      reply	other threads:[~2020-10-14  9:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 22:48 Nathan Chancellor
2020-10-12 21:10 ` Nick Desaulniers
2020-10-12 21:22   ` Fāng-ruì Sòng
2020-10-12 21:26     ` Kees Cook
2020-10-13  3:26       ` Nathan Chancellor
2020-10-13 22:56         ` Nick Desaulniers [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=CAKwvOdnM4UHFy1jrnfoKPG_S6CQpWMTCpuxTkbN+_AGe2Ov0SQ@mail.gmail.com \
    --to=ndesaulniers@google.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkp@intel.com \
    --cc=maskray@google.com \
    --cc=mingo@kernel.org \
    --cc=natechancellor@gmail.com \
    --subject='Re: [PATCH] arm/build: Always handle .ARM.exidx and .ARM.extab sections' \
    /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).