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]
Date:   Thu, 27 Jul 2023 11:55:30 +0100
From:   Joey Gouly <joey.gouly@....com>
To:     Will Deacon <will@...nel.org>
CC:     Jisheng Zhang <jszhang@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <nd@....com>
Subject: Re: [PATCH] arm64: vdso: remove two .altinstructions related symbols

Hi,

On Thu, Jul 27, 2023 at 11:19:27AM +0100, Will Deacon wrote:
> On Thu, Jul 27, 2023 at 01:36:19AM +0800, Jisheng Zhang wrote:
> > The two symbols __alt_instructions and __alt_instructions_end are not
> > used, remove them.
> > 
> > Signed-off-by: Jisheng Zhang <jszhang@...nel.org>
> > ---
> >  arch/arm64/kernel/vdso/vdso.lds.S | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
> > index 6028f1fe2d1c..45354f2ddf70 100644
> > --- a/arch/arm64/kernel/vdso/vdso.lds.S
> > +++ b/arch/arm64/kernel/vdso/vdso.lds.S
> > @@ -50,9 +50,7 @@ SECTIONS
> >  
> >  	. = ALIGN(4);
> >  	.altinstructions : {
> > -		__alt_instructions = .;
> >  		*(.altinstructions)
> > -		__alt_instructions_end = .;
> >  	}
> 
> If we don't need the symbols, then why do we need this section at all?

Looks like it was a copy/paste from my commit 4e3bca8f7cdd ("arm64: alternative: patch alternatives in the vDSO").
The VDSO patching code searches for a section named '.altinstructions' by
reading the VDSO as an ELF file, and doesn't use the __alt_instructions /
__alt_instructions_end symbols.  The kernel patching code uses the
__alt_instructions symbol (from the vmlinux.ld.S linker script).

So it's safe to remove these, but the section itself needs to stay.

Thanks,
Joey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ