]> git.ipfire.org Git - thirdparty/qemu.git/commit
spapr: Generate random HASHPKEYR for spapr machines
authorNicholas Piggin <npiggin@gmail.com>
Thu, 19 Dec 2024 03:40:33 +0000 (13:40 +1000)
committerNicholas Piggin <npiggin@gmail.com>
Tue, 11 Mar 2025 12:43:32 +0000 (22:43 +1000)
commitd91b101da1075f57dda0f30f6802129328716da1
tree204446f882db2e34379655e0956b90e157438ab5
parentb4aa82dc3a698abdcdef342fc1f4620f888c3cf7
spapr: Generate random HASHPKEYR for spapr machines

The hypervisor is expected to create a value for the HASHPKEY SPR for
each partition. Currently it uses zero for all partitions, use a
random number instead, which in theory might make kernel ROP protection
more secure.

Signed-of-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241219034035.1826173-4-npiggin@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
hw/ppc/spapr.c
hw/ppc/spapr_cpu_core.c
include/hw/ppc/spapr.h