diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2020-06-11 21:02:46 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-06-11 21:02:46 +0300 |
commit | 37d1a04b13a6d2fec91a6813fc034947a27db034 (patch) | |
tree | c6a8d7d0df96a6eb1ddb53a12885761cb72e0e92 /lib/usercopy.c | |
parent | 37f8173dd84936ea78000ed1cad24f8b18d48ebb (diff) | |
parent | 97a9474aeb789183a1d0712e66a4283860279ac9 (diff) | |
download | linux-37d1a04b13a6d2fec91a6813fc034947a27db034.tar.xz |
Rebase locking/kcsan to locking/urgent
Merge the state of the locking kcsan branch before the read/write_once()
and the atomics modifications got merged.
Squash the fallout of the rebase on top of the read/write once and atomic
fallback work into the merge. The history of the original branch is
preserved in tag locking-kcsan-2020-06-02.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'lib/usercopy.c')
-rw-r--r-- | lib/usercopy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/usercopy.c b/lib/usercopy.c index ca2a697a2061..b26509f112f9 100644 --- a/lib/usercopy.c +++ b/lib/usercopy.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 -#include <linux/uaccess.h> #include <linux/bitops.h> +#include <linux/instrumented.h> +#include <linux/uaccess.h> /* out-of-line parts */ @@ -10,7 +11,7 @@ unsigned long _copy_from_user(void *to, const void __user *from, unsigned long n unsigned long res = n; might_fault(); if (likely(access_ok(from, n))) { - kasan_check_write(to, n); + instrument_copy_from_user(to, from, n); res = raw_copy_from_user(to, from, n); } if (unlikely(res)) @@ -25,7 +26,7 @@ unsigned long _copy_to_user(void __user *to, const void *from, unsigned long n) { might_fault(); if (likely(access_ok(to, n))) { - kasan_check_read(from, n); + instrument_copy_to_user(to, from, n); n = raw_copy_to_user(to, from, n); } return n; |