lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4Y=7WgtkzYds-FJ1fkjNC72ArCkRpvyXkEWEtxoY=MAhw@mail.gmail.com>
Date: Thu, 7 Nov 2024 12:31:31 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Brian Gerst <brgerst@...il.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, 
	Ingo Molnar <mingo@...nel.org>, "H . Peter Anvin" <hpa@...or.com>, Thomas Gleixner <tglx@...utronix.de>, 
	Borislav Petkov <bp@...en8.de>, Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH v5 06/16] x86/relocs: Handle R_X86_64_REX_GOTPCRELX relocations

On Thu, Nov 7, 2024 at 12:27 PM Brian Gerst <brgerst@...il.com> wrote:
>
> On Thu, Nov 7, 2024 at 6:20 AM Uros Bizjak <ubizjak@...il.com> wrote:
> >
> > On Tue, Nov 5, 2024 at 4:58 PM Brian Gerst <brgerst@...il.com> wrote:
> > >
> > > Clang may produce R_X86_64_REX_GOTPCRELX relocations when redefining the
> > > stack protector location.  Treat them as another type of PC-relative
> > > relocation.
> > >
> > > Signed-off-by: Brian Gerst <brgerst@...il.com>
> > > ---
> > >  arch/x86/tools/relocs.c | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > >
> > > diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c
> > > index 6afe2e5e9102..7d7fc7f0a250 100644
> > > --- a/arch/x86/tools/relocs.c
> > > +++ b/arch/x86/tools/relocs.c
> > > @@ -32,6 +32,11 @@ static struct relocs         relocs32;
> > >  static struct relocs           relocs32neg;
> > >  static struct relocs           relocs64;
> > >  # define FMT PRIu64
> > > +
> > > +#ifndef R_X86_64_REX_GOTPCRELX
> > > +#define R_X86_64_REX_GOTPCRELX 42
> > > +#endif
> >
> > The next patch (7/16) introduces the above definition to
> > arch/x86/include/asm/elf.h. If you swap patches 6 and 7 in the series,
> > you won't have to introduce the above conditional definition.
>
> This is a userspace tool, so it's using the build host libc headers.

Ah, indeed.

Thanks,
Uros.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ