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: <20220516102935.67505a91@donnerap.cambridge.arm.com>
Date:   Mon, 16 May 2022 10:29:35 +0100
From:   Andre Przywara <andre.przywara@....com>
To:     Catalin Marinas <catalin.marinas@....com>
Cc:     Will Deacon <will@...nel.org>, Shuah Khan <shuah@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Mark Brown <broonie@...nel.org>,
        linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kselftest/arm64: bti: force static linking

On Sun, 15 May 2022 11:05:23 +0100
Catalin Marinas <catalin.marinas@....com> wrote:

Hi,

> On Wed, May 11, 2022 at 06:21:29PM +0100, Andre Przywara wrote:
> > The "bti" selftests are built with -nostdlib, which apparently
> > automatically creates a statically linked binary, which is what we want
> > and need for BTI (to avoid interactions with the dynamic linker).
> > 
> > However this is not true when building a PIE binary, which some
> > toolchains (Ubuntu) configure as the default.
> > When compiling btitest with such a toolchain, it will create a
> > dynamically linked binary, which will probably fail some tests, as the
> > dynamic linker might not support BTI:
> > ===================
> > TAP version 13
> > 1..18
> > not ok 1 nohint_func/call_using_br_x0
> > not ok 2 nohint_func/call_using_br_x16
> > not ok 3 nohint_func/call_using_blr
> > ....
> > ===================
> > 
> > To make sure we create static binaries, add an explicit -static on the
> > linker command line. This forces static linking even if the toolchain
> > defaults to PIE builds, and fixes btitest runs on BTI enabled machines.
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@....com>  
> 
> Does this need to go in as a fix (cc stable, fixes tag)?

I dimly remember some discussion about stable fixes not being a real thing
for the selftests? In any case:

Fixes: 314bcbf09f14 ("kselftest: arm64: Add BTI tests")

Cheers,
Andre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ