diff options
author | Mark Rutland <mark.rutland@arm.com> | 2023-08-21 18:35:26 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2023-08-23 10:32:39 +0200 |
commit | 1dfe3a5a7cefbe2162cecb759f3933baea22c393 (patch) | |
tree | f78b2a7b553e2feb8ebe183ac97413f4e7b3c6a5 /kernel/entry | |
parent | Linux 6.5-rc3 (diff) | |
download | linux-1dfe3a5a7cefbe2162cecb759f3933baea22c393.tar.xz linux-1dfe3a5a7cefbe2162cecb759f3933baea22c393.zip |
entry: Remove empty addr_limit_user_check()
Back when set_fs() was a generic API for altering the address limit,
addr_limit_user_check() was a safety measure to prevent userspace being
able to issue syscalls with an unbound limit.
With the the removal of set_fs() as a generic API, the last user of
addr_limit_user_check() was removed in commit:
b5a5a01d8e9a44ec ("arm64: uaccess: remove addr_limit_user_check()")
... as since that commit, no architecture defines TIF_FSCHECK, and hence
addr_limit_user_check() always expands to nothing.
Remove addr_limit_user_check(), updating the comment in
exit_to_user_mode_prepare() to no longer refer to it. At the same time,
the comment is reworded to be a little more generic so as to cover
kmap_assert_nomap() in addition to lockdep_sys_exit().
No functional change.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230821163526.2319443-1-mark.rutland@arm.com
Diffstat (limited to 'kernel/entry')
-rw-r--r-- | kernel/entry/common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/entry/common.c b/kernel/entry/common.c index be61332c66b5..d7ee4bc3f2ba 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -205,8 +205,7 @@ static void exit_to_user_mode_prepare(struct pt_regs *regs) arch_exit_to_user_mode_prepare(regs, ti_work); - /* Ensure that the address limit is intact and no locks are held */ - addr_limit_user_check(); + /* Ensure that kernel state is sane for a return to userspace */ kmap_assert_nomap(); lockdep_assert_irqs_disabled(); lockdep_sys_exit(); |