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] [day] [month] [year] [list]
Message-ID: <CAJF2gTRXyMX+9C_aEDbxAsxWDD2rbnDWO775YDZ3EmrQ=QinfQ@mail.gmail.com>
Date: Mon, 10 Mar 2025 10:13:24 +0800
From: Guo Ren <guoren@...nel.org>
To: Xi Ruoyao <xry111@...111.site>
Cc: Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>, 
	Palmer Dabbelt <palmer@...belt.com>, Fangrui Song <i@...kray.me>, Tiezhu Yang <yangtiezhu@...ngson.cn>, 
	linux-csky@...r.kernel.org, loongarch@...ts.linux.dev, 
	linux-riscv@...ts.infradead.org, linux-arch@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: Ping: [PATCH 0/3] Drop explicit --hash-style= setting for new

On Wed, Mar 5, 2025 at 9:27 PM Xi Ruoyao <xry111@...111.site> wrote:
>
> Ping.
>
> On Mon, 2025-02-24 at 19:20 +0800, Xi Ruoyao wrote:
> > For riscv, csky, and LoongArch, GNU hash had already become the de-
> > facto
> > standard when they borned, so there's no Glibc/Musl releases for them
> > without GNU hash support, and the traditional SysV hash is just
> > wasting
> > space for them.
> >
> > Remove those settings and follow the distro toolchain default, which
> > is
> > likely --hash-style=gnu.  In the past it could break vDSO self tests,
> > but now the issue has been addressed by commit
> > e0746bde6f82 ("selftests/vDSO: support DT_GNU_HASH").
> >
> > Xi Ruoyao (3):
> >   riscv: vDSO: Remove --hash-style=both
The patch's comment is incorrect; when I removed --hash-style=both,
the output still contained the HASH, and no space was saved.

--hash-style=both and after the patch are the same:
Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .hash             HASH             0000000000000120  00000120
       000000000000003c  0000000000000004   A       3     0     8
  [ 2] .gnu.hash         GNU_HASH         0000000000000160  00000160
       0000000000000044  0000000000000000   A       3     0     8

But, --hash-style=gnu could save space:
Section Headers:
  [Nr] Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
  [ 0]                   NULL             0000000000000000  00000000
       0000000000000000  0000000000000000           0     0     0
  [ 1] .gnu.hash         GNU_HASH         0000000000000120  00000120
       0000000000000044  0000000000000000   A       2     0     8


Here is my GCC VERSION:
Using built-in specs.
COLLECT_GCC=/rvhome/ren.guo/source/toolchain/rv64lp64/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/rvhome/ren.guo/source/toolchain/rv64lp64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/13.2.0/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with:
/home/runner/work/riscv-gnu-toolchain/riscv-gnu-toolchain/gcc/configure
--target=riscv64-unknown-linux-gnu --prefix=/opt/riscv
--with-sysroot=/opt/riscv/sysroot --with-pkgversion=
--with-system-zlib --enable-shared --enable-tls
--enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp
--disable-libquadmath --disable-libsanitizer --disable-nls
--disable-bootstrap --src=.././gcc --disable-default-pie
--disable-multilib --with-abi=lp64d --with-arch=rv64gc
--with-tune=rocket --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-O2
-mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-O2    -mcmodel=medlow'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.2.0 ()

So, do you mean "--hash-style=gnu"?

> >   csky: vDSO: Remove --hash-style=both
> >   LoongArch: vDSO: Remove --hash-style=sysv
> >
> >  arch/csky/kernel/vdso/Makefile  | 2 +-
> >  arch/loongarch/vdso/Makefile    | 2 +-
> >  arch/riscv/kernel/vdso/Makefile | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
>
> --
> Xi Ruoyao <xry111@...111.site>
> School of Aerospace Science and Technology, Xidian University



-- 
Best Regards
 Guo Ren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ