Failure in elf/tst-pie-address{,-static} on aarch64 with PAC/BTI release.

Aurelien Jarno aurelien@aurel32.net
Wed Jan 15 22:42:14 GMT 2025


Hi,

Commit e7b553272196 ("elf: Handle static PIE with non-zero load address
[BZ #31799]") added two news tests, elf/tst-pie-address and
elf/tst-pie-address-static. In my test builds for glibc 2.41, they fail
on aarch64 when PAC/BTI is enabled with the current HEAD.
elf/tst-pie-address fails with a SIGSEGV and elf/tst-pie-address-static
with a SIGILL.

This has been fixed by commit bce70034b112 ("elf: Check PDE load address
with non-empty text section") for the non-PAC/BTI case, but I still
observe the tests failures with PAC/BTI enabled in the compiler. This is
on a CPU which does not support PAC/BTI and which should interpret the
corresponding instructions as nop. I have tested building glibc with
both binutils 2.43.1 and 2.43.50.20250108 and both gcc 13.3.0 and gcc
14.2.0.

This can be reproduced with (at least here) with:

CC="gcc -mbranch-protection=standard" CXX="g++ -mbranch-protection=standard" ../glibc/configure --prefix=/usr && make -j4 && make -j4 check

Any idea?

Thanks
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                     http://aurel32.net


More information about the Libc-alpha mailing list