summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/uaccess.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-07-08 11:51:28 +0200
committerIngo Molnar <mingo@kernel.org>2016-07-08 11:51:28 +0200
commit946e0f6ffcaa614012d646f4cf84efdd62628c8b (patch)
tree37d31fd748f98ec4fb7897997a2745228bf0c2da /arch/x86/include/asm/uaccess.h
parent67d7a982bab6702d84415ea889996fae72a7d3b2 (diff)
parenta99cde438de0c4c0cecc1d1af1a55a75b10bfdef (diff)
downloadblackbird-obmc-linux-946e0f6ffcaa614012d646f4cf84efdd62628c8b.tar.gz
blackbird-obmc-linux-946e0f6ffcaa614012d646f4cf84efdd62628c8b.zip
Merge tag 'v4.7-rc6' into x86/mm, to merge fixes before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/uaccess.h')
-rw-r--r--arch/x86/include/asm/uaccess.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 86c48f359686..d40ec723f799 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -5,6 +5,7 @@
*/
#include <linux/errno.h>
#include <linux/compiler.h>
+#include <linux/kasan-checks.h>
#include <linux/thread_info.h>
#include <linux/string.h>
#include <asm/asm.h>
@@ -118,7 +119,7 @@ struct exception_table_entry {
extern int fixup_exception(struct pt_regs *regs, int trapnr);
extern bool ex_has_fault_handler(unsigned long ip);
-extern int early_fixup_exception(unsigned long *ip);
+extern void early_fixup_exception(struct pt_regs *regs, int trapnr);
/*
* These are the main single-value transfer routines. They automatically
@@ -740,6 +741,8 @@ copy_from_user(void *to, const void __user *from, unsigned long n)
might_fault();
+ kasan_check_write(to, n);
+
/*
* While we would like to have the compiler do the checking for us
* even in the non-constant size case, any false positives there are
@@ -773,6 +776,8 @@ copy_to_user(void __user *to, const void *from, unsigned long n)
{
int sz = __compiletime_object_size(from);
+ kasan_check_read(from, n);
+
might_fault();
/* See the comment in copy_from_user() above. */
OpenPOWER on IntegriCloud