[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <874k0aqfyf.fsf@linux.ibm.com>
Date: Fri, 24 Jun 2022 11:44:08 -0300
From: Fabiano Rosas <farosas@...ux.ibm.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>,
linuxppc-dev@...ts.ozlabs.org, LKML <linux-kernel@...r.kernel.org>,
Michael Ellerman <mpe@...erman.id.au>
Cc: "Jason A. Donenfeld" <Jason@...c4.com>, stable@...r.kernel.org
Subject: Re: [PATCH v2 2/2] powerpc/kvm: don't crash on missing rng, and use
darn
"Jason A. Donenfeld" <Jason@...c4.com> 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@...r.kernel.org # v4.1+
> Cc: Michael Ellerman <mpe@...erman.id.au>
> Fixes: e928e9cb3601 ("KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.")
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
Reviewed-by: Fabiano Rosas <farosas@...ux.ibm.com>
Powered by blists - more mailing lists