All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@linux.ibm.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	linuxppc-dev@lists.ozlabs.org,
	LKML <linux-kernel@vger.kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>, stable@vger.kernel.org
Subject: Re: [PATCH v2 2/2] powerpc/kvm: don't crash on missing rng, and use darn
Date: Fri, 24 Jun 2022 11:44:08 -0300	[thread overview]
Message-ID: <874k0aqfyf.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220624142322.2049826-3-Jason@zx2c4.com>

"Jason A. Donenfeld" <Jason@zx2c4.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@vger.kernel.org # v4.1+
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Fixes: e928e9cb3601 ("KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.")
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>


      reply	other threads:[~2022-06-24 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 14:23 [PATCH v2 0/2] powerpc rng cleanups Jason A. Donenfeld
2022-06-24 14:23 ` [PATCH v2 1/2] powerpc/powernv: rename remaining rng powernv_ functions to pnv_ Jason A. Donenfeld
2022-06-24 14:43   ` Fabiano Rosas
2022-06-24 14:23 ` [PATCH v2 2/2] powerpc/kvm: don't crash on missing rng, and use darn Jason A. Donenfeld
2022-06-24 14:44   ` Fabiano Rosas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874k0aqfyf.fsf@linux.ibm.com \
    --to=farosas@linux.ibm.com \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.