summaryrefslogtreecommitdiff
path: root/arch/um/kernel/exec.c
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2024-07-03 15:45:28 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-07-03 17:09:49 +0200
commit76ed9158e1d474e963fc59da7a461b27a2212c5a (patch)
tree815dd1fd2568cdcc27d75178249cc809027ca80b /arch/um/kernel/exec.c
parent542dc79f6ea601788704a79ff54283c2bea265e9 (diff)
um: Rework syscall handling
Rework syscall handling to be platform independent. Also create a clean split between queueing of syscalls and flushing them out, removing the need to keep state in the code that triggers the syscalls. The code adds syscall_data_len to the global mm_id structure. This will be used later to allow surrounding code to track whether syscalls still need to run and if errors occurred. Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net> Link: https://patch.msgid.link/20240703134536.1161108-5-benjamin@sipsolutions.net Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/kernel/exec.c')
-rw-r--r--arch/um/kernel/exec.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index 827a0d3fa589..5c8836b012e9 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -22,15 +22,11 @@
void flush_thread(void)
{
- void *data = NULL;
- int ret;
-
arch_flush_thread(&current->thread.arch);
- ret = unmap(&current->mm->context.id, 0, TASK_SIZE, 1, &data);
- if (ret) {
- printk(KERN_ERR "%s - clearing address space failed, err = %d\n",
- __func__, ret);
+ unmap(&current->mm->context.id, 0, TASK_SIZE);
+ if (syscall_stub_flush(&current->mm->context.id) < 0) {
+ printk(KERN_ERR "%s - clearing address space failed", __func__);
force_sig(SIGKILL);
}
get_safe_registers(current_pt_regs()->regs.gp,