riscv: Implement thread_struct whitelist for hardened usercopy
authorTong Tiangen <tongtiangen@huawei.com>
Fri, 2 Jul 2021 04:54:21 +0000 (04:54 +0000)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 4 Aug 2021 03:58:13 +0000 (20:58 -0700)
commit13e47bebbe83f58ddc41d2987567e97c5068a1ec
tree0dfd912f3db93075e176bff48aa743d0e6df30db
parent67979e927dd053bde3b71128495f651256b3161c
riscv: Implement thread_struct whitelist for hardened usercopy

This whitelists the FPU register state portion of the thread_struct for
copying to userspace, instead of the default entire struct.

Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig
arch/riscv/include/asm/processor.h