aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/skas/syscall.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-14 20:17:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-14 20:17:34 -0400
commitf2772a0e4833d1af1901b6f1a38136fb71d1350c (patch)
tree28bf6f0944d745e19947273022224ebc6b2d07c8 /arch/um/kernel/skas/syscall.c
parentfcd98147ac71f35b69e2f50b5fddc5524dd2dfa8 (diff)
parentb482e48d29f1461fd0d059a17f32bcfa274127b3 (diff)
Merge tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger: - A new timer mode, time travel, for testing with UML - Many bugixes/improvements for the serial line driver - Various bugfixes * tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT um: Fix kcov crash during startup um: configs: Remove useless UEVENT_HELPER_PATH um: Support time travel mode um: Pass nsecs to os timer functions um: Remove drivers/ssl.h um: Don't garbage collect in deactivate_all_fds() um: Silence lockdep complaint about mmap_sem um: Remove locking in deactivate_all_fds() um: Timer code cleanup um: fix os_timer_one_shot() um: Fix IRQ controller regression on console read
Diffstat (limited to 'arch/um/kernel/skas/syscall.c')
-rw-r--r--arch/um/kernel/skas/syscall.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c
index b783ac87d98a..44bb10785075 100644
--- a/arch/um/kernel/skas/syscall.c
+++ b/arch/um/kernel/skas/syscall.c
@@ -10,12 +10,23 @@
10#include <sysdep/ptrace.h> 10#include <sysdep/ptrace.h>
11#include <sysdep/ptrace_user.h> 11#include <sysdep/ptrace_user.h>
12#include <sysdep/syscalls.h> 12#include <sysdep/syscalls.h>
13#include <shared/timer-internal.h>
13 14
14void handle_syscall(struct uml_pt_regs *r) 15void handle_syscall(struct uml_pt_regs *r)
15{ 16{
16 struct pt_regs *regs = container_of(r, struct pt_regs, regs); 17 struct pt_regs *regs = container_of(r, struct pt_regs, regs);
17 int syscall; 18 int syscall;
18 19
20 /*
21 * If we have infinite CPU resources, then make every syscall also a
22 * preemption point, since we don't have any other preemption in this
23 * case, and kernel threads would basically never run until userspace
24 * went to sleep, even if said userspace interacts with the kernel in
25 * various ways.
26 */
27 if (time_travel_mode == TT_MODE_INFCPU)
28 schedule();
29
19 /* Initialize the syscall number and default return value. */ 30 /* Initialize the syscall number and default return value. */
20 UPT_SYSCALL_NR(r) = PT_SYSCALL_NR(r->gp); 31 UPT_SYSCALL_NR(r) = PT_SYSCALL_NR(r->gp);
21 PT_REGS_SET_SYSCALL_RETURN(regs, -ENOSYS); 32 PT_REGS_SET_SYSCALL_RETURN(regs, -ENOSYS);