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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFP8O3JdJ+NA_L4juLMN+C7ZsOws5OXJxxuoD+eq=6oSawkg0w@mail.gmail.com>
Date: Wed, 14 Aug 2024 20:28:35 -0700
From: Fangrui Song <maskray@...gle.com>
To: Xi Ruoyao <xry111@...111.site>
Cc: Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] arm64/vdso: Remove --hash-style=sysv

On Wed, Aug 14, 2024 at 6:23 PM Fangrui Song <maskray@...gle.com> wrote:
>
> On Wed, Aug 14, 2024 at 12:56 PM Xi Ruoyao <xry111@...111.site> wrote:
> >
> > On Thu, 2024-07-18 at 10:34 -0700, Fangrui Song wrote:
> > > glibc added support for .gnu.hash in 2006 and .hash has been obsoleted
> > > for more than one decade in many Linux distributions.  Using
> > > --hash-style=sysv might imply unaddressed issues and confuse readers.
> > >
> > > Just drop the option and rely on the linker default, which is likely
> > > "both", or "gnu" when the distribution really wants to eliminate sysv
> > > hash overhead.
> > >
> > > Similar to commit 6b7e26547fad ("x86/vdso: Emit a GNU hash").
> > >
> > > Signed-off-by: Fangrui Song <maskray@...gle.com>
> >
> > Hi Fangrui,
> >
> > If I read tools/testing/selftests/vDSO/parse_vdso.c correctly, it does
> > know DT_GNU_HASH as at now.  Thus after this change the vDSO selftests
> > are skipped with "Couldn't find __vdso_gettimeofday" etc if the distro
> > enables --hash-style=gnu by default.
> >
> > So it seems we need to add DT_GNU_HASH support for parse_vdso.c to keep
> > test coverage.
>
> Hi Xi,
>
> Perhaps the selftests file needs DT_GNU_HASH support like
> https://github.com/abseil/abseil-cpp/commit/1278ee9bd9bd4916181521fac96d6fa1100e38e6

Created https://lore.kernel.org/linux-kselftest/20240815032614.2747224-1-maskray@google.com/T/#u
([PATCH] selftests/vDSO: support DT_GNU_HASH)

>
> > > ---
> > >  arch/arm64/kernel/vdso/Makefile   | 2 +-
> > >  arch/arm64/kernel/vdso32/Makefile | 2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> > > index d63930c82839..d11da6461278 100644
> > > --- a/arch/arm64/kernel/vdso/Makefile
> > > +++ b/arch/arm64/kernel/vdso/Makefile
> > > @@ -21,7 +21,7 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti
> > >  # potential future proofing if we end up with internal calls to the exported
> > >  # routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
> > >  # preparation in build-time C")).
> > > -ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv       \
> > > +ldflags-y := -shared -soname=linux-vdso.so.1 \
> > >            -Bsymbolic --build-id=sha1 -n $(btildflags-y)
> > >
> > >  ifdef CONFIG_LD_ORPHAN_WARN
> > > diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
> > > index cc4508c604b2..25a2cb6317f3 100644
> > > --- a/arch/arm64/kernel/vdso32/Makefile
> > > +++ b/arch/arm64/kernel/vdso32/Makefile
> > > @@ -98,7 +98,7 @@ VDSO_AFLAGS += -D__ASSEMBLY__
> > >  # From arm vDSO Makefile
> > >  VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
> > >  VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
> > > -VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1
> > > +VDSO_LDFLAGS += -shared --build-id=sha1
> > >  VDSO_LDFLAGS += --orphan-handling=$(CONFIG_LD_ORPHAN_WARN_LEVEL)
> > >
> > >
> >
> > --
> > Xi Ruoyao <xry111@...111.site>
> > School of Aerospace Science and Technology, Xidian University
>
>
>
> --
> 宋方睿



-- 
宋方睿

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ