summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-21 21:02:41 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-21 21:02:41 (GMT)
commit404a47410c26a115123885977053e9a1a4460929 (patch)
tree2056ef0fa74f6042606a10b8e7e4c191789b6584 /include
parenteae21770b4fed5597623aad0d618190fa60426ff (diff)
parent9fd4470ff4974c41b1db43c3b355b9085af9c12a (diff)
downloadlinux-404a47410c26a115123885977053e9a1a4460929.tar.xz
Merge branch 'uaccess' (batched user access infrastructure)
Expose an interface to allow users to mark several accesses together as being user space accesses, allowing batching of the surrounding user space access markers (SMAP on x86, PAN on arm64, domain register switching on arm). This is currently only used for the user string lenth and copying functions, where the SMAP overhead on x86 drowned the actual user accesses (only noticeable on newer microarchitectures that support SMAP in the first place, of course). * user access batching branch: Use the new batched user accesses in generic user string handling Add 'unsafe' user access functions for batched accesses x86: reorganize SMAP handling in user space accesses
Diffstat (limited to 'include')
-rw-r--r--include/linux/uaccess.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index 558129a..3495578 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -111,4 +111,11 @@ extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count);
#define probe_kernel_address(addr, retval) \
probe_kernel_read(&retval, addr, sizeof(retval))
+#ifndef user_access_begin
+#define user_access_begin() do { } while (0)
+#define user_access_end() do { } while (0)
+#define unsafe_get_user(x, ptr) __get_user(x, ptr)
+#define unsafe_put_user(x, ptr) __put_user(x, ptr)
+#endif
+
#endif /* __LINUX_UACCESS_H__ */