On OBS SLE-15, I see: ... (gdb) print have_pkru()^M $1 = 1^M (gdb) PASS: gdb.arch/i386-pkru.exp: probe PKRU support print $pkru^M $2 = 1431655764^M (gdb) FAIL: gdb.arch/i386-pkru.exp: pkru register ... I can't reproduce this on my laptop, because: ... (gdb) print have_pkru()^M $1 = 0^M (gdb) PASS: gdb.arch/i386-pkru.exp: probe PKRU support UNSUPPORTED: gdb.arch/i386-pkru.exp: processor does not support protection key feature. ...
Hmm, 1431655764 is 0x0x55555554, and in kernel-parameters.txt we find: ... init_pkru= [X86] Specify the default memory protection keys rights register contents for all processes. 0x55555554 by default (disallow access to all but pkey 0). Can override in debugfs after boot. ... So, why does the test expect 0?
https://sourceware.org/pipermail/gdb-patches/2021-November/183939.html
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=a561456f2d426ae8ca9b8c41086cf846f334a9cd