diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-01 16:11:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-01 16:11:38 -0700 |
commit | e148a8f948afc0b1eeb5c157b23b3d0a4d4517a5 (patch) | |
tree | 8449693b9d52f915c73bb9dcd07f263eb307f375 /include | |
parent | Merge branch 'uaccess.access_ok' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff) | |
parent | readdir.c: get rid of the last __put_user(), drop now-useless access_ok() (diff) | |
download | wireguard-linux-e148a8f948afc0b1eeb5c157b23b3d0a4d4517a5.tar.xz wireguard-linux-e148a8f948afc0b1eeb5c157b23b3d0a4d4517a5.zip |
Merge branch 'uaccess.readdir' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull uaccess/readdir updates from Al Viro:
"Finishing the conversion of readdir.c to unsafe_... API.
This includes the uaccess_{read,write}_begin series by Christophe
Leroy"
* 'uaccess.readdir' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
readdir.c: get rid of the last __put_user(), drop now-useless access_ok()
readdir.c: get compat_filldir() more or less in sync with filldir()
switch readdir(2) to unsafe_copy_dirent_name()
drm/i915/gem: Replace user_access_begin by user_write_access_begin
uaccess: Selectively open read or write user access
uaccess: Add user_read_access_begin/end and user_write_access_begin/end
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/uaccess.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 67f016010aad..9861c89f93be 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -378,6 +378,14 @@ extern long strnlen_unsafe_user(const void __user *unsafe_addr, long count); static inline unsigned long user_access_save(void) { return 0UL; } static inline void user_access_restore(unsigned long flags) { } #endif +#ifndef user_write_access_begin +#define user_write_access_begin user_access_begin +#define user_write_access_end user_access_end +#endif +#ifndef user_read_access_begin +#define user_read_access_begin user_access_begin +#define user_read_access_end user_access_end +#endif #ifdef CONFIG_HARDENED_USERCOPY void usercopy_warn(const char *name, const char *detail, bool to_user, |