Commit aad859c4 by Wolfgang Bumiller

seccomp: open memfd read-write

Makes it easier to implement syscalls which need to write to a buffer passed by user space as a pointer. Signed-off-by: 's avatarWolfgang Bumiller <w.bumiller@proxmox.com>
parent 8b4aaf8b
......@@ -1400,7 +1400,7 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
}
snprintf(mem_path, sizeof(mem_path), "/proc/%d/mem", req->pid);
fd_mem = open(mem_path, O_RDONLY | O_CLOEXEC);
fd_mem = open(mem_path, O_RDWR | O_CLOEXEC);
if (fd_mem < 0) {
seccomp_notify_default_answer(fd, req, resp, hdlr);
SYSERROR("Failed to open process memory for seccomp notify request");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment