diff options
author | Benjamin Gray <bgray@linux.ibm.com> | 2023-06-19 10:36:26 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-06-19 10:36:26 +0300 |
commit | be98fcf7c10dea74e9c3e2cd0018e47bdee67442 (patch) | |
tree | 2536fca1dfd218dd60b68e8eb7b222e82e849f79 /arch/powerpc/include/asm/processor.h | |
parent | 5bcba4e6c13f0c889da1f9e67ee10accd9ca4c19 (diff) | |
download | linux-be98fcf7c10dea74e9c3e2cd0018e47bdee67442.tar.xz |
powerpc/dexcr: Support userspace ROP protection
The ISA 3.1B hashst and hashchk instructions use a per-cpu SPR HASHKEYR
to hold a key used in the hash calculation. This key should be different
for each process to make it harder for a malicious process to recreate
valid hash values for a victim process.
Add support for storing a per-thread hash key, and setting/clearing
HASHKEYR appropriately.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230616034846.311705-6-bgray@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/processor.h')
-rw-r--r-- | arch/powerpc/include/asm/processor.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index e96c9b8c2a60..8a6754ffdc7e 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -264,6 +264,7 @@ struct thread_struct { unsigned long mmcr3; unsigned long sier2; unsigned long sier3; + unsigned long hashkeyr; #endif }; |