Re: [PATCH v6 1/3] powerpc/powernv: Avoid crashing if rng is NULL

2022-07-29 Thread Michael Ellerman
On Thu, 28 Jul 2022 00:32:17 +1000, Michael Ellerman wrote: > On a bare-metal Power8 system that doesn't have an "ibm,power-rng", a > malicious QEMU and guest that ignore the absence of the > KVM_CAP_PPC_HWRNG flag, and calls H_RANDOM anyway, will dereference a > NULL pointer. > > In practice all

[PATCH v6 1/3] powerpc/powernv: Avoid crashing if rng is NULL

2022-07-27 Thread Michael Ellerman
On a bare-metal Power8 system that doesn't have an "ibm,power-rng", a malicious QEMU and guest that ignore the absence of the KVM_CAP_PPC_HWRNG flag, and calls H_RANDOM anyway, will dereference a NULL pointer. In practice all Power8 machines have an "ibm,power-rng", but let's not rely on that, add