Re: [PATCH v3] arm64: sysreg: make mrs_s and msr_s macros work with Clang and LTO
From: Kees Cook
Date: Wed Apr 17 2019 - 00:03:22 EST
On Tue, Apr 16, 2019 at 12:08 PM Mark Rutland <mark.rutland@xxxxxxx> wrote:
> On Mon, Apr 15, 2019 at 10:22:27AM -0700, Nick Desaulniers wrote:
> > On Mon, Apr 15, 2019 at 10:06 AM Mark Rutland <mark.rutland@xxxxxxx> wrote:
> > > It would be nice if we could simply rely on a more recent binutils these
> > > days, which supports the generic S<op0>_<op1>_<cn>_<Cm>_<op2> sysreg
> > > definition. That would mean we could get rid of the whole msr_s/mrs_s
> > > hack by turning that into a CPP macro which built that name.
> > >
> > > It looks like binutils has been able to do that since September 2014...
> > >
> > > Are folk using toolchains older than that to compile kernels?
> > Do you have a link to a commit? If we can pinpoint the binutils
> > version, that might help.
> IIUC any version of binutils with commit:
> df7b4545b2b49572 ("[PATCH/AArch64] Generic support for all system registers using mrs and msr")
> ... should be sufficent.
This appears to be binutils 2.25:
$ git describe --match 'binutils-2_*' --contains df7b4545b2b49572
Documentation/process/changes.rst lists 2.20 as current minimum for binutils.
Ubuntu's old LTS (Trusty, Apr 2014) has 2.24, and that release is
about to exit support this month.
Debian's old-stable (Apr 2015) has 2.25. It's about to exit support
when Debian Buster releases.
RHEL6 (2010) has 2.20. RHEL7 (2014) has 2.25.
It seems not unreasonable to require 2.25 at least for arm64 builds?