diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-04 20:18:17 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-04 20:18:17 +0200 |
commit | 6c51e67b64d169419fb13318035bb442f9176612 (patch) | |
tree | ae6c64a9d703983f9df5f72e74419de2e388e32b /arch/arm64/include/asm/uaccess.h | |
parent | Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/... (diff) | |
parent | arm64/syscalls: Check address limit on user-mode return (diff) | |
download | linux-6c51e67b64d169419fb13318035bb442f9176612.tar.xz linux-6c51e67b64d169419fb13318035bb442f9176612.zip |
Merge branch 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull syscall updates from Ingo Molnar:
"Improve the security of set_fs(): we now check the address limit on a
number of key platforms (x86, arm, arm64) before returning to
user-space - without adding overhead to the typical system call fast
path"
* 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
arm64/syscalls: Check address limit on user-mode return
arm/syscalls: Check address limit on user-mode return
x86/syscalls: Check address limit on user-mode return
Diffstat (limited to 'arch/arm64/include/asm/uaccess.h')
-rw-r--r-- | arch/arm64/include/asm/uaccess.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index fab46a0ea223..a801a48a7972 100644 --- a/arch/arm64/include/asm/uaccess.h +++ b/arch/arm64/include/asm/uaccess.h @@ -45,6 +45,9 @@ static inline void set_fs(mm_segment_t fs) { current_thread_info()->addr_limit = fs; + /* On user-mode return, check fs is correct */ + set_thread_flag(TIF_FSCHECK); + /* * Enable/disable UAO so that copy_to_user() etc can access * kernel memory with the unprivileged instructions. |