Bug 27028 - FAIL: gdb.arch/i386-pkru.exp: pkru register
Summary: FAIL: gdb.arch/i386-pkru.exp: pkru register
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: testsuite (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 12.1
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-07 14:31 UTC by Tom de Vries
Modified: 2021-12-01 13:41 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2020-12-07 14:31:51 UTC
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.
...
Comment 1 Tom de Vries 2021-11-29 09:44:44 UTC
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?