The patch titled Subject: lib/test_printf.c: call wait_for_random_bytes() before plain %p tests has been added to the -mm tree. Its filename is lib-test_printfc-call-wait_for_random_bytes-before-plain-%p-tests.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/lib-test_printfc-call-wait_for_random_bytes-before-plain-%25p-tests.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/lib-test_printfc-call-wait_for_random_bytes-before-plain-%25p-tests.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Thierry Escande <thierry.escande@xxxxxxxxxx> Subject: lib/test_printf.c: call wait_for_random_bytes() before plain %p tests 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. Link: http://lkml.kernel.org/r/20180604113708.11554-1-thierry.escande@xxxxxxxxxx Signed-off-by: Thierry Escande <thierry.escande@xxxxxxxxxx> Acked-by: Tobin C. Harding <me@xxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: David Miller <davem@xxxxxxxxxxxxx> Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/test_printf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff -puN lib/test_printf.c~lib-test_printfc-call-wait_for_random_bytes-before-plain-%p-tests lib/test_printf.c --- a/lib/test_printf.c~lib-test_printfc-call-wait_for_random_bytes-before-plain-%p-tests +++ a/lib/test_printf.c @@ -260,6 +260,13 @@ 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"); _ Patches currently in -mm which might be from thierry.escande@xxxxxxxxxx are lib-test_printfc-call-wait_for_random_bytes-before-plain-%p-tests.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html