public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT pull] core/entry for v6.6-rc1
@ 2023-08-28 13:01 Thomas Gleixner
  2023-08-28 13:01 ` [GIT pull] irq/core " Thomas Gleixner
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Thomas Gleixner @ 2023-08-28 13:01 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, x86

Linus,

please pull the latest core/entry branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-entry-2023-08-28

up to:  1dfe3a5a7cef: entry: Remove empty addr_limit_user_check()


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.

Thanks,

	tglx

------------------>
Mark Rutland (1):
      entry: Remove empty addr_limit_user_check()


 include/linux/syscalls.h | 16 ----------------
 kernel/entry/common.c    |  3 +--
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 03e3d0121d5e..c4b9b66b0d05 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -283,22 +283,6 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event)
 #define SYSCALL32_DEFINE6 SYSCALL_DEFINE6
 #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
  * include/uapi/asm-generic/unistd.h. Architecture specific entries go below,
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();


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-09-05 16:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-28 13:01 [GIT pull] core/entry for v6.6-rc1 Thomas Gleixner
2023-08-28 13:01 ` [GIT pull] irq/core " Thomas Gleixner
2023-08-28 22:15   ` pr-tracker-bot
2023-08-28 13:01 ` [GIT pull] smp/core " Thomas Gleixner
2023-08-28 22:15   ` pr-tracker-bot
2023-09-05  2:33   ` Michael Ellerman
2023-08-28 21:07 ` [GIT pull] core/entry " Linus Torvalds
2023-08-28 21:32   ` Linus Torvalds
2023-08-28 21:38   ` Thomas Gleixner
2023-08-28 22:15 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox