LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Thierry Escande <thierry.escande@linaro.org>,
David Miller <davem@davemloft.net>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
"Tobin C . Harding" <me@tobin.cc>,
linux-kernel@vger.kernel.org,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH RESEND] lib/test_printf.c: call wait_for_random_bytes() before plain %p tests
Date: Mon, 25 Jun 2018 14:04:54 +0200 [thread overview]
Message-ID: <20180625120454.rtf7ram4euvgdc6w@pathway.suse.cz> (raw)
In-Reply-To: <20180625075020.xcb6jqup3dhq2agf@pathway.suse.cz>
On Mon 2018-06-25 09:50:20, Petr Mladek wrote:
> On Fri 2018-06-22 23:50:20, Thierry Escande wrote:
> > On 22/06/2018 22:53, Steven Rostedt wrote:
> > > On Thu, Jun 07, 2018 at 02:24:34PM +0200, Petr Mladek wrote:
> > > > On Mon 2018-06-04 13:37:08, Thierry Escande wrote:
> > > > > If the test_printf module is loaded before the crng is initialized, the
> > > > > plain 'p' tests will fail because the printed address will not be hashed
> > > > > and the buffer will contain '(ptrval)' instead.
> > > > > This patch adds a call to wait_for_random_bytes() before plain 'p' tests
> > > > > to make sure the crng is initialized.
> > > >
> > > > Hmm, my system did not boot with this patch and
> > > > CONFIG_TEST_PRINTF=y
> > >
> > > And neither does my test box. It killed my tests I was running, as one of the
> > > configs I test has this set.
> > >
> > > It appears that Andrew pulled it in and sent it to Linus, as it is in
> > > 4.18-rc1, and I need to now revert this patch to make my tests work.
> >
> > This patch has been superseded with a v2 and a v3 pushed into Petr
> > printk.git tree (https://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk.git/commit/?h=for-4.19&id=ce041c43f22298485122bab15c14d062383fbc67).
> > Sorry for the mess...
>
> Andrew,
>
> should I send the revert and the better fix to Linus or would you like
> to do so?
Below is the proposed revert-commit just in case people want to add
Reviewed-by tags or so.
From 043f891b70e6197bc181f3b087c2bd04c60fddd2 Mon Sep 17 00:00:00 2001
From: Petr Mladek <pmladek@suse.com>
Date: Mon, 25 Jun 2018 13:28:06 +0200
Subject: [PATCH] Revert "lib/test_printf.c: call wait_for_random_bytes()
before plain %p tests"
This reverts commit ee410f15b1418f2f4428e79980674c979081bcb7.
It might prevent the machine from boot. It would wait for enough
randomness at the very beginning of kernel_init(). But there is
basically nothing running in parallel that would help to produce
any randomness.
Reported-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Petr Mladek <pmladek@suse.com>
---
lib/test_printf.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/lib/test_printf.c b/lib/test_printf.c
index b2aa8f514844..cea592f402ed 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -260,13 +260,6 @@ plain(void)
{
int err;
- /*
- * Make sure crng is ready. Otherwise we get "(ptrval)" instead
- * of a hashed address when printing '%p' in plain_hash() and
- * plain_format().
- */
- wait_for_random_bytes();
-
err = plain_hash();
if (err) {
pr_warn("plain 'p' does not appear to be hashed\n");
--
2.13.7
prev parent reply other threads:[~2018-06-25 12:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 11:37 Thierry Escande
2018-06-05 12:43 ` Andy Shevchenko
2018-06-07 12:24 ` Petr Mladek
2018-06-07 18:47 ` Thierry Escande
2018-06-08 8:04 ` Petr Mladek
2018-06-08 9:07 ` Thierry Escande
2018-06-08 9:46 ` Andy Shevchenko
2018-06-08 10:32 ` Thierry Escande
2018-06-08 11:22 ` Petr Mladek
2018-06-08 11:28 ` Thierry Escande
2018-06-22 20:53 ` Steven Rostedt
2018-06-22 21:50 ` Thierry Escande
2018-06-25 7:50 ` Petr Mladek
2018-06-25 12:04 ` Petr Mladek [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=20180625120454.rtf7ram4euvgdc6w@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=andy.shevchenko@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=me@tobin.cc \
--cc=rostedt@goodmis.org \
--cc=thierry.escande@linaro.org \
--cc=torvalds@linux-foundation.org \
--subject='Re: [PATCH RESEND] lib/test_printf.c: call wait_for_random_bytes() before plain %p tests' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).