Merge tag 'core-entry-2023-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core entry code update from Thomas Gleixner: "A single update to the core entry code, which removes the empty user address limit check which is a leftover of the removed TIF_FSCHECK" * tag 'core-entry-2023-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Remove empty addr_limit_user_check()
This commit is contained in:
@ -283,22 +283,6 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
|
|||||||
#define SYSCALL32_DEFINE6 SYSCALL_DEFINE6
|
#define SYSCALL32_DEFINE6 SYSCALL_DEFINE6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Called before coming back to user-mode. Returning to user-mode with an
|
|
||||||
* address limit different than USER_DS can allow to overwrite kernel memory.
|
|
||||||
*/
|
|
||||||
static inline void addr_limit_user_check(void)
|
|
||||||
{
|
|
||||||
#ifdef TIF_FSCHECK
|
|
||||||
if (!test_thread_flag(TIF_FSCHECK))
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TIF_FSCHECK
|
|
||||||
clear_thread_flag(TIF_FSCHECK);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These syscall function prototypes are kept in the same order as
|
* These syscall function prototypes are kept in the same order as
|
||||||
* include/uapi/asm-generic/unistd.h. Architecture specific entries go below,
|
* include/uapi/asm-generic/unistd.h. Architecture specific entries go below,
|
||||||
|
@ -205,8 +205,7 @@ static void exit_to_user_mode_prepare(struct pt_regs *regs)
|
|||||||
|
|
||||||
arch_exit_to_user_mode_prepare(regs, ti_work);
|
arch_exit_to_user_mode_prepare(regs, ti_work);
|
||||||
|
|
||||||
/* Ensure that the address limit is intact and no locks are held */
|
/* Ensure that kernel state is sane for a return to userspace */
|
||||||
addr_limit_user_check();
|
|
||||||
kmap_assert_nomap();
|
kmap_assert_nomap();
|
||||||
lockdep_assert_irqs_disabled();
|
lockdep_assert_irqs_disabled();
|
||||||
lockdep_sys_exit();
|
lockdep_sys_exit();
|
||||||
|
Reference in New Issue
Block a user