From 2c3a6c37ac363654846ba31c715cc2298d0284f4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 5 Jan 2020 23:20:33 +0100 Subject: [PATCH] Kernel: Paper over SMAP violations in clock_{gettime,nanosleep}() Just put some SmapDisablers here to unbreak the nesalizer port. --- Kernel/Process.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index 1b1d0ecac9b..5dfa8cda271 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -3738,6 +3738,7 @@ int Process::sys$clock_gettime(clockid_t clock_id, timespec* ts) if (!validate_write_typed(ts)) return -EFAULT; + SmapDisabler disabler; switch (clock_id) { case CLOCK_MONOTONIC: ts->tv_sec = g_uptime / TICKS_PER_SECOND; @@ -3770,6 +3771,7 @@ int Process::sys$clock_nanosleep(const Syscall::SC_clock_nanosleep_params* param bool is_absolute = flags & TIMER_ABSTIME; + SmapDisabler disabler; switch (clock_id) { case CLOCK_MONOTONIC: { u64 wakeup_time;