public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [v1, 0/2] Initialize Vector registers in the first-use trap
@ 2023-06-27  1:55 Andy Chiu
  2023-06-27  1:55 ` [v1, 1/2] riscv: vector: clear V-reg " Andy Chiu
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Andy Chiu @ 2023-06-27  1:55 UTC (permalink / raw)
  To: linux-riscv, palmer, paul.walmsley
  Cc: vineetg, greentime.hu, guoren, bjorn, Andy Chiu, Albert Ou

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


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-04 15:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27  1:55 [v1, 0/2] Initialize Vector registers in the first-use trap Andy Chiu
2023-06-27  1:55 ` [v1, 1/2] riscv: vector: clear V-reg " Andy Chiu
2023-06-27  7:28   ` Björn Töpel
2023-06-27  1:55 ` [v1, 2/2] selftests: Test RISC-V Vector's first-use handler Andy Chiu
2023-06-27  7:46   ` Björn Töpel
2023-06-27 15:39     ` Andy Chiu
2023-07-04 14:42 ` [v1, 0/2] Initialize Vector registers in the first-use trap Palmer Dabbelt
2023-07-04 15:02 ` patchwork-bot+linux-riscv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox