[PATCH v4 1/1] aarch64: Add LD_DEBUG=security to log BTI and GCS warnings
Yury Khrustalev
yury.khrustalev@arm.com
Fri Jan 9 10:07:18 GMT 2026
On Thu, Jan 08, 2026 at 03:00:44PM -0300, Adhemerval Zanella Netto wrote:
>
> On 08/01/26 13:45, Adhemerval Zanella Netto wrote:
> >
> > On 08/01/26 05:24, Yury Khrustalev wrote:
> >> Introduce DL_DEBUG_SECURITY mask to enable messages related to
> >> loading modules that lack certain target-dependent hardening
> >> or security features.
> >>
> >> Use this mask for warnings related to AArch64 BTI and GCS.
> >
> > Running a make check -j$(nproc) on a system that supports BTI I saw:
> >
> > FAIL: misc/tst-bti-ld-debug-both
> > FAIL: misc/tst-bti-ld-debug-dlopen
> > FAIL: misc/tst-bti-ld-debug-exe
> >
> > $ cat misc/tst-bti-ld-debug-both.out
> > Could not find expected pattern in 'security: not compatible with AArch64 BTI: /home/azanella/projects/glibc/build/aarch64-linux-gnu/misc/'
> >
> > $ cat misc/tst-bti-ld-debug-dlopen.out
> > library tst-bti-mod-unprot.so loaded normally
> > Could not find expected pattern in 'security: not compatible with AArch64 BTI: /home/azanella/projects/glibc/build/aarch64-linux-gnu/misc/'
> >
> > $ cat misc/tst-bti-ld-debug-exe.out
> > Could not find expected pattern in 'security: not compatible with AArch64 BTI: /home/azanella/projects/glibc/build/aarch64-linux-gnu/misc/'
> >
> > However, while running the test manually it does work:
> >
> > $ make test t=misc/tst-bti-ld-debug-both
> > [...]
> > PASS: misc/tst-bti-ld-debug-both
> > original exit status 0
> > 2303701: security: not compatible with AArch64 BTI: /home/azanella/projects/glibc/build/aarch64-linux-gnu/misc/tst-bti-ld-debug-both
> > 2303701: security: not compatible with AArch64 BTI: /home/azanella/projects/glibc/build/aarch64-linux-gnu/misc/tst-bti-mod-unprot.so
> >
> > Usually it *might* some issue with make tests rule definitions, but I could
> > not pinpoint the issue yet. I will issue another make check.
>
> It seems to be a transient issue, I saw not issue on a make check and a
> 'misc/tst-bti-ld-debug-both' fail on another (running sequentially on the
> same machine).
I've never seen this when I test on FVP. Could you share what the test
prints when it fails? If you run test executable directly with the
corresponding tunable value, does it fail to show the warnings too?
Could the issue be the full absolute path in the expected pattern?
Thanks,
Yury
More information about the Libc-alpha
mailing list