diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2024-07-03 15:45:26 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-07-03 17:09:48 +0200 |
commit | dc26184a9d4acde988e996a437b0301b81c1ae2d (patch) | |
tree | f5cf8f56284356306f06b968d512b3a5153bc9bf /arch/um/kernel/skas/clone.c | |
parent | d1d3a2e69b2419d77f8f99315ac931c5ba3cb475 (diff) | |
download | lwn-dc26184a9d4acde988e996a437b0301b81c1ae2d.tar.gz lwn-dc26184a9d4acde988e996a437b0301b81c1ae2d.zip |
um: Create signal stack memory assignment in stub_data
When we switch to use seccomp, we need both the signal stack and other
data (i.e. syscall information) to co-exist in the stub data. To
facilitate this, start by defining separate memory areas for the stack
and syscall data.
This moves the signal stack onto a new page as the memory area is not
sufficient to hold both signal stack and syscall information.
Only change the signal stack setup for now, as the syscall code will be
reworked later.
Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Link: https://patch.msgid.link/20240703134536.1161108-3-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/kernel/skas/clone.c')
-rw-r--r-- | arch/um/kernel/skas/clone.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/um/kernel/skas/clone.c b/arch/um/kernel/skas/clone.c index 62435187dda4..906f7454887c 100644 --- a/arch/um/kernel/skas/clone.c +++ b/arch/um/kernel/skas/clone.c @@ -27,9 +27,11 @@ stub_clone_handler(void) struct stub_data *data = get_stub_data(); long err; + /* syscall data as a temporary stack area (bottom half). */ err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD, - (unsigned long)data + - STUB_DATA_PAGES * UM_KERN_PAGE_SIZE / 2); + (unsigned long) data->syscall_data + + sizeof(data->syscall_data) / 2 - + sizeof(void *)); if (err) { data->parent_err = err; goto done; |