Skip to contentSkip to conversation

virtiofsd: Add restart_syscall to the seccomp whitelist

PATCH In review Greg Kurz 3 participants 3 messages Feb 1, 2021 – Feb 3, 2021

lore
Share & tools
lore

Greg Kurz

author
#0 lore raw

PATCH 1/1 virtiofsd: Add restart_syscall to the seccomp whitelist

This is how linux restarts some system calls after SIGSTOP/SIGCONT. This is needed to avoid virtiofsd termination when resuming execution under GDB for example.

---

This has passed Travis and gitlab CI without errors.

 tools/virtiofsd/passthrough_seccomp.c | 1 +
 1 file changed, 1 insertion(+)
tools/virtiofsd/passthrough_seccomp.c +1 -0
index a60d7da4b4e2..da03e97d35e4 100644
@@ -88,6 +88,7 @@ static const int syscall_whitelist[] = {
     SCMP_SYS(renameat),
     SCMP_SYS(renameat2),
     SCMP_SYS(removexattr),
+    SCMP_SYS(restart_syscall),
     SCMP_SYS(rt_sigaction),
     SCMP_SYS(rt_sigprocmask),
     SCMP_SYS(rt_sigreturn),
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · * Greg Kurz ([email protected]) wrote:

This is how linux restarts some system calls after SIGSTOP/SIGCONT. This is needed to avoid virtiofsd termination when resuming execution under GDB for example.

Ah!

Quoted 23 lines

---

This has passed Travis and gitlab CI without errors.

 tools/virtiofsd/passthrough_seccomp.c | 1 +
 1 file changed, 1 insertion(+)
tools/virtiofsd/passthrough_seccomp.c +1 -0
index a60d7da4b4e2..da03e97d35e4 100644
@@ -88,6 +88,7 @@ static const int syscall_whitelist[] = {
     SCMP_SYS(renameat),
     SCMP_SYS(renameat2),
     SCMP_SYS(removexattr),
+    SCMP_SYS(restart_syscall),
     SCMP_SYS(rt_sigaction),
     SCMP_SYS(rt_sigprocmask),
     SCMP_SYS(rt_sigreturn),
Signature · 1 line
2.26.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Reviewed-by on v1 1/1
#2 lore raw
In reply to Greg Kurz
Quoted 11 lines · Greg Kurz

This is how linux restarts some system calls after SIGSTOP/SIGCONT. This is needed to avoid virtiofsd termination when resuming execution under GDB for example.

---

This has passed Travis and gitlab CI without errors.

 tools/virtiofsd/passthrough_seccomp.c | 1 +
 1 file changed, 1 insertion(+)