Skip to content

Commit 78bb43e

Browse files
committed
Merge tag 'core-entry-2025-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull generic entry code updates from Thomas Gleixner: - Split the code into syscall and exception/interrupt parts to ease the conversion of ARM[64] to the generic entry infrastructure - Extend syscall user dispatching to support a single intercepted range instead of the default single non-intercepted range. That allows monitoring/analysis of a specific executable range, e.g. a library, and also provides flexibility for sandboxing scenarios - Cleanup and extend the user dispatch selftest * tag 'core-entry-2025-07-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Split generic entry into generic exception and syscall entry selftests: Add tests for PR_SYS_DISPATCH_INCLUSIVE_ON syscall_user_dispatch: Add PR_SYS_DISPATCH_INCLUSIVE_ON selftests: Fix errno checking in syscall_user_dispatch test
2 parents a0482e3 + 5173ac2 commit 78bb43e

File tree

13 files changed

+665
-565
lines changed

13 files changed

+665
-565
lines changed

Documentation/admin-guide/syscall-user-dispatch.rst

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,25 @@ following prctl:
5353

5454
prctl(PR_SET_SYSCALL_USER_DISPATCH, <op>, <offset>, <length>, [selector])
5555

56-
<op> is either PR_SYS_DISPATCH_ON or PR_SYS_DISPATCH_OFF, to enable and
57-
disable the mechanism globally for that thread. When
58-
PR_SYS_DISPATCH_OFF is used, the other fields must be zero.
59-
60-
[<offset>, <offset>+<length>) delimit a memory region interval
61-
from which syscalls are always executed directly, regardless of the
62-
userspace selector. This provides a fast path for the C library, which
63-
includes the most common syscall dispatchers in the native code
64-
applications, and also provides a way for the signal handler to return
56+
<op> is either PR_SYS_DISPATCH_EXCLUSIVE_ON/PR_SYS_DISPATCH_INCLUSIVE_ON
57+
or PR_SYS_DISPATCH_OFF, to enable and disable the mechanism globally for
58+
that thread. When PR_SYS_DISPATCH_OFF is used, the other fields must be zero.
59+
60+
For PR_SYS_DISPATCH_EXCLUSIVE_ON [<offset>, <offset>+<length>) delimit
61+
a memory region interval from which syscalls are always executed directly,
62+
regardless of the userspace selector. This provides a fast path for the
63+
C library, which includes the most common syscall dispatchers in the native
64+
code applications, and also provides a way for the signal handler to return
6565
without triggering a nested SIGSYS on (rt\_)sigreturn. Users of this
6666
interface should make sure that at least the signal trampoline code is
6767
included in this region. In addition, for syscalls that implement the
6868
trampoline code on the vDSO, that trampoline is never intercepted.
6969

70+
For PR_SYS_DISPATCH_INCLUSIVE_ON [<offset>, <offset>+<length>) delimit
71+
a memory region interval from which syscalls are dispatched based on
72+
the userspace selector. Syscalls from outside of the range are always
73+
executed directly.
74+
7075
[selector] is a pointer to a char-sized region in the process memory
7176
region, that provides a quick way to enable disable syscall redirection
7277
thread-wide, without the need to invoke the kernel directly. selector

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10126,6 +10126,7 @@ S: Maintained
1012610126
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry
1012710127
F: include/linux/entry-common.h
1012810128
F: include/linux/entry-kvm.h
10129+
F: include/linux/irq-entry-common.h
1012910130
F: kernel/entry/
1013010131

1013110132
GENERIC GPIO I2C DRIVER

arch/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,17 @@ config HOTPLUG_PARALLEL
6464
bool
6565
select HOTPLUG_SPLIT_STARTUP
6666

67+
config GENERIC_IRQ_ENTRY
68+
bool
69+
70+
config GENERIC_SYSCALL
71+
bool
72+
depends on GENERIC_IRQ_ENTRY
73+
6774
config GENERIC_ENTRY
6875
bool
76+
select GENERIC_IRQ_ENTRY
77+
select GENERIC_SYSCALL
6978

7079
config KPROBES
7180
bool "Kprobes"

0 commit comments

Comments
 (0)