Re: [PATCH v2 2/2] powerpc/kvm: don't crash on missing rng, and use darn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Jason A. Donenfeld" <Jason@xxxxxxxxx> writes:

> On POWER8 systems that don't have ibm,power-rng available, a guest that
> ignores the KVM_CAP_PPC_HWRNG flag and calls H_RANDOM anyway will
> dereference a NULL pointer. And on machines with darn instead of
> ibm,power-rng, H_RANDOM won't work at all.
>
> This patch kills two birds with one stone, by routing H_RANDOM calls to
> ppc_md.get_random_seed, and doing the real mode check inside of it.
>
> Cc: stable@xxxxxxxxxxxxxxx # v4.1+
> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Fixes: e928e9cb3601 ("KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.")
> Signed-off-by: Jason A. Donenfeld <Jason@xxxxxxxxx>

Reviewed-by: Fabiano Rosas <farosas@xxxxxxxxxxxxx>




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux