[v1, 0/2] Initialize Vector registers in the first-use trap
Andy Chiu
andy.chiu at sifive.com
Mon Jun 26 18:55:53 PDT 2023
Before applying this series, We only initialize the space for saving
Vector registers. This is not enough as Vector registers themselves also
neeeded to be initialized before dropping back into userspace. Or, we
may risk leaking a process's data left in Vector register to another
process. This can be verified by only applying the second patch and
running the test.
Andy Chiu (2):
riscv: vector: clear V-reg in the first-use trap
selftests: Test RISC-V Vector's first-use handler
arch/riscv/kernel/vector.c | 1 +
.../testing/selftests/riscv/vector/.gitignore | 1 +
tools/testing/selftests/riscv/vector/Makefile | 6 +-
.../selftests/riscv/vector/v_initval_nolibc.c | 68 +++++++++++++++++++
4 files changed, 75 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/riscv/vector/v_initval_nolibc.c
--
2.17.1
More information about the linux-riscv
mailing list