aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/test_printf.c
diff options
context:
space:
mode:
authorJames Morris <james.morris@microsoft.com>2018-06-25 09:20:40 -0700
committerJames Morris <james.morris@microsoft.com>2018-06-25 09:20:40 -0700
commit57b54d74dd5c559bd35f2affaf11d8828aaf5733 (patch)
tree025d99f0d6b298fbdbf3ce942ec7868131444090 /lib/test_printf.c
parentMAINTAINERS: remove the outdated "LINUX SECURITY MODULE (LSM) FRAMEWORK" entry (diff)
parentLinux 4.18-rc2 (diff)
downloadwireguard-linux-57b54d74dd5c559bd35f2affaf11d8828aaf5733.tar.xz
wireguard-linux-57b54d74dd5c559bd35f2affaf11d8828aaf5733.zip
Merge tag 'v4.18-rc2' into next-general
Merge to Linux 4.18-rc2 for security subsystem developers.
Diffstat (limited to 'lib/test_printf.c')
-rw-r--r--lib/test_printf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/test_printf.c b/lib/test_printf.c
index 71ebfa43ad05..b2aa8f514844 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -204,7 +204,7 @@ test_string(void)
#if BITS_PER_LONG == 64
#define PTR_WIDTH 16
-#define PTR ((void *)0xffff0123456789ab)
+#define PTR ((void *)0xffff0123456789abUL)
#define PTR_STR "ffff0123456789ab"
#define ZEROS "00000000" /* hex 32 zero bits */
@@ -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");