From ce3d9e487fa703f03bb826bcacd5b910d803830a Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Thu, 1 Aug 2024 01:47:59 +1200 Subject: [PATCH] Make the `MADV_COLD` syscall privileged so it works in sandboxes. Resolves #3793 --- src/preload/syscallbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preload/syscallbuf.c b/src/preload/syscallbuf.c index 2564a12d7f2..40c2bf60252 100644 --- a/src/preload/syscallbuf.c +++ b/src/preload/syscallbuf.c @@ -2372,7 +2372,7 @@ static long sys_madvise(struct syscall_info* call) { } if (advice == MADV_DONTNEED) { - ret = untraced_syscall3(syscallno, addr, length, MADV_COLD); + ret = privileged_untraced_syscall3(syscallno, addr, length, MADV_COLD); commit_raw_syscall(syscallno, ptr, ret); if (ret < 0) { return traced_raw_syscall(call);