[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200811234340.GA1318440@rani.riverdale.lan>
Date: Tue, 11 Aug 2020 19:43:40 -0400
From: Arvind Sankar <nivedita@...m.mit.edu>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Arvind Sankar <nivedita@...m.mit.edu>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Fangrui Song <maskray@...gle.com>,
clang-built-linux <clang-built-linux@...glegroups.com>,
e5ten.arch@...il.com,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Ard Biesheuvel <ardb@...nel.org>,
Kees Cook <keescook@...omium.org>,
LKML <linux-kernel@...r.kernel.org>,
"# 3.4.x" <stable@...r.kernel.org>
Subject: Re: [PATCH] x86/boot/compressed: Disable relocation relaxation for
non-pie link
On Tue, Aug 11, 2020 at 04:04:40PM -0700, Nick Desaulniers wrote:
> On Tue, Aug 11, 2020 at 3:44 PM Arvind Sankar <nivedita@...m.mit.edu> wrote:
> >
> > On Tue, Aug 11, 2020 at 10:58:40AM -0700, Nick Desaulniers wrote:
> > > > Cc: stable@...r.kernel.org # 4.19.x
> > >
> > > Thanks Arvind, good write up. Just curious about this stable tag, how
> > > come you picked 4.19? I can see boot failures in our CI for x86+LLD
> > > back to 4.9. Can we amend that tag to use `# 4.9`? I'd be happy to
> > > help submit backports should they fail to apply cleanly.
> > > https://travis-ci.com/github/ClangBuiltLinux/continuous-integration/builds/179237488
> > >
> >
> > 4.19 renamed LDFLAGS to KBUILD_LDFLAGS. For 4.4, 4.9 and 4.14 the patch
> > needs to be modified, KBUILD_LDFLAGS -> LDFLAGS, so I figured we should
> > submit backports separately. For 4.19 onwards, it should apply without
> > changes I think.
>
> Cool, sounds good. I'll keep an eye out for when stable goes to pick this up.
>
> tglx, Ingo, BP, can we pretty please get this in tip/urgent for
> inclusion into 5.9?
> --
> Thanks,
> ~Nick Desaulniers
Another alternative is to just do this unconditionally instead of even
checking for the -pie flag. None of the GOTPCRELs are in the
decompressor, so they shouldn't be performance-sensitive at all.
It still wouldn't apply cleanly to all the stable versions, but
backporting would be even simpler.
What do you think?
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 3962f592633d..10c2ba59d192 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -43,6 +43,7 @@ KBUILD_CFLAGS += -Wno-pointer-sign
KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += -D__DISABLE_EXPORTS
+KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no)
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
GCOV_PROFILE := n
Powered by blists - more mailing lists