| f88723a6 | 17-Apr-2024 |
Benjamin Gray <bgray@linux.ibm.com> |
selftests/powerpc/dexcr: Add chdexcr utility
Adds a utility to exercise the prctl DEXCR inheritance in the shell. Supports setting and clearing each aspect.
Signed-off-by: Benjamin Gray <bgray@linu
selftests/powerpc/dexcr: Add chdexcr utility
Adds a utility to exercise the prctl DEXCR inheritance in the shell. Supports setting and clearing each aspect.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> [mpe: Use correct SPDX license, use execvp() for usability, print errors] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240417112325.728010-9-bgray@linux.ibm.com
show more ...
|
| 9c4866b2 | 17-Apr-2024 |
Benjamin Gray <bgray@linux.ibm.com> |
selftests/powerpc/dexcr: Add DEXCR config details to lsdexcr
Now that the DEXCR can be configured with prctl, add a section in lsdexcr that explains why each aspect is set the way it is.
Signed-off
selftests/powerpc/dexcr: Add DEXCR config details to lsdexcr
Now that the DEXCR can be configured with prctl, add a section in lsdexcr that explains why each aspect is set the way it is.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240417112325.728010-8-bgray@linux.ibm.com
show more ...
|
| 9930fba0 | 17-Apr-2024 |
Benjamin Gray <bgray@linux.ibm.com> |
selftests/powerpc/dexcr: Attempt to enable NPHIE in hashchk selftest
Now that a process can control its DEXCR to some extent, make the hashchk tests more reliable by explicitly setting the local and
selftests/powerpc/dexcr: Attempt to enable NPHIE in hashchk selftest
Now that a process can control its DEXCR to some extent, make the hashchk tests more reliable by explicitly setting the local and onexec NPHIE aspect.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240417112325.728010-7-bgray@linux.ibm.com
show more ...
|
| d7228a58 | 17-Apr-2024 |
Benjamin Gray <bgray@linux.ibm.com> |
selftests/powerpc/dexcr: Add -no-pie to hashchk tests
The hashchk tests want to verify that the hash key is changed over exec. It does so by calculating hashes at the same address across an exec. Th
selftests/powerpc/dexcr: Add -no-pie to hashchk tests
The hashchk tests want to verify that the hash key is changed over exec. It does so by calculating hashes at the same address across an exec. This is made simpler by disabling PIE functionality, so we can re-execute ourselves and be using the same addresses in the child.
While -fno-pie is already added, -no-pie is also required.
Fixes: bdb07f35a52f ("selftests/powerpc/dexcr: Add hashst/hashchk test") Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20240417112325.728010-2-bgray@linux.ibm.com
show more ...
|
| a16e472c | 19-Jun-2023 |
Benjamin Gray <bgray@linux.ibm.com> |
selftests/powerpc/dexcr: Add DEXCR status utility lsdexcr
Add a utility 'lsdexcr' to print the current DEXCR status. Useful for quickly checking the status such as when debugging test failures or ve
selftests/powerpc/dexcr: Add DEXCR status utility lsdexcr
Add a utility 'lsdexcr' to print the current DEXCR status. Useful for quickly checking the status such as when debugging test failures or verifying the new default DEXCR does what you want (for userspace at least). Example output:
# ./lsdexcr uDEXCR: 04000000 (NPHIE) HDEXCR: 00000000 Effective: 04000000 (NPHIE)
SBHE (0): clear (Speculative branch hint enable) IBRTPD (3): clear (Indirect branch recurrent target ...) SRAPD (4): clear (Subroutine return address ...) NPHIE * (5): set (Non-privileged hash instruction enable) PHIE (6): clear (Privileged hash instruction enable)
DEXCR[NPHIE] enabled: hashst/hashchk working
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230616034846.311705-12-bgray@linux.ibm.com
show more ...
|