From: Michael Ellerman <mpe@ellerman.id.au>
To: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] hwrng: pseries - port to new read API and fix stack corruption
Date: Fri, 31 Oct 2014 18:00:12 +1100 [thread overview]
Message-ID: <1414738812.21815.5.camel@concordia> (raw)
In-Reply-To: <20141031063233.1884.86309.stgit@bahia.local>
On Fri, 2014-10-31 at 07:50 +0100, Greg Kurz wrote:
> The add_early_randomness() function in drivers/char/hw_random/core.c passes
> a 16-byte buffer to pseries_rng_data_read(). Unfortunately, plpar_hcall()
> returns four 64-bit values and trashes 16 bytes on the stack.
Hmm, thanks. I thought I'd fixed that, but I guess I never sent the patch :}
> This bug has been lying around for a long time. It got unveiled by:
>
> commit d3cc7996473a7bdd33256029988ea690754e4e2a
> Author: Amit Shah <amit.shah@redhat.com>
> Date: Thu Jul 10 15:42:34 2014 +0530
>
> hwrng: fetch randomness only after device init
>
> It may trig a oops while loading or unloading the pseries-rng module for both
> PowerVM and PowerKVM guests.
>
> This patch does two things:
> - pass an intermediate well sized buffer to plpar_hcall(). This is acceptalbe
> since we're not on a hot path.
Well probably, can you do a before and after test of dd if=/dev/hwrng ?
> Cc'ing stable as I could reproduce back to 3.15.10
The right way to CC stable for a patch that isn't yet in upstream is to add:
CC: stable@vger.kernel.org
Before your Signed-off-by. They will then pick it up once it's merged into
Linus' tree. See Documentation/stable_kernel_rules.txt
cheers
next prev parent reply other threads:[~2014-10-31 7:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 6:50 [PATCH] hwrng: pseries - port to new read API and fix stack corruption Greg Kurz
2014-10-31 7:00 ` Michael Ellerman [this message]
2014-10-31 9:31 ` Greg Kurz
2014-10-31 9:36 ` Herbert Xu
2014-11-06 15:13 ` Herbert Xu
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=1414738812.21815.5.camel@concordia \
--to=mpe@ellerman.id.au \
--cc=gkurz@linux.vnet.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox