Skip to content

Commit

Permalink
Make the MADV_COLD syscall privileged so it works in sandboxes.
Browse files Browse the repository at this point in the history
Resolves #3793
  • Loading branch information
rocallahan committed Jul 31, 2024
1 parent 0f13ad5 commit ce3d9e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/preload/syscallbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce3d9e4

Please sign in to comment.