projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3650b22
)
kcsan: selftest: Ensure that address is at least PAGE_SIZE
author
Marco Elver
<elver@google.com>
Thu, 22 Oct 2020 11:45:52 +0000
(13:45 +0200)
committer
Paul E. McKenney
<paulmck@kernel.org>
Tue, 3 Nov 2020 01:08:50 +0000
(17:08 -0800)
In preparation of supporting only addresses not within the NULL page,
change the selftest to never use addresses that are less than PAGE_SIZE.
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/kcsan/selftest.c
patch
|
blob
|
history
diff --git
a/kernel/kcsan/selftest.c
b/kernel/kcsan/selftest.c
index d98bc208d06db8cb24ffac73d684b99b4bde436c..9014a3a82cf9c18b2e2159dd13d71b66150a3983 100644
(file)
--- a/
kernel/kcsan/selftest.c
+++ b/
kernel/kcsan/selftest.c
@@
-33,6
+33,9
@@
static bool test_encode_decode(void)
unsigned long addr;
prandom_bytes(&addr, sizeof(addr));
+ if (addr < PAGE_SIZE)
+ addr = PAGE_SIZE;
+
if (WARN_ON(!check_encodable(addr, size)))
return false;