All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtiofsd: Add restart_syscall to the seccomp whitelist
@ 2021-02-01 19:33 Greg Kurz
  2021-02-01 19:52 ` Dr. David Alan Gilbert
  2021-02-03 14:27 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Kurz @ 2021-02-01 19:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dr. David Alan Gilbert, Stefan Hajnoczi, 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.

Signed-off-by: Greg Kurz <groug@kaod.org>
---

This has passed Travis and gitlab CI without errors.

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

diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c
index a60d7da4b4e2..da03e97d35e4 100644
--- a/tools/virtiofsd/passthrough_seccomp.c
+++ b/tools/virtiofsd/passthrough_seccomp.c
@@ -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),
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtiofsd: Add restart_syscall to the seccomp whitelist
  2021-02-01 19:33 [PATCH] virtiofsd: Add restart_syscall to the seccomp whitelist Greg Kurz
@ 2021-02-01 19:52 ` Dr. David Alan Gilbert
  2021-02-03 14:27 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2021-02-01 19:52 UTC (permalink / raw)
  To: Greg Kurz; +Cc: qemu-devel, Stefan Hajnoczi

* Greg Kurz (groug@kaod.org) 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!


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> 
> This has passed Travis and gitlab CI without errors.
> 
>  tools/virtiofsd/passthrough_seccomp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/virtiofsd/passthrough_seccomp.c b/tools/virtiofsd/passthrough_seccomp.c
> index a60d7da4b4e2..da03e97d35e4 100644
> --- a/tools/virtiofsd/passthrough_seccomp.c
> +++ b/tools/virtiofsd/passthrough_seccomp.c
> @@ -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),
> -- 
> 2.26.2
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] virtiofsd: Add restart_syscall to the seccomp whitelist
  2021-02-01 19:33 [PATCH] virtiofsd: Add restart_syscall to the seccomp whitelist Greg Kurz
  2021-02-01 19:52 ` Dr. David Alan Gilbert
@ 2021-02-03 14:27 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2021-02-03 14:27 UTC (permalink / raw)
  To: Greg Kurz; +Cc: qemu-devel, Dr. David Alan Gilbert

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On Mon, Feb 01, 2021 at 08:33:05PM +0100, Greg Kurz 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.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> 
> This has passed Travis and gitlab CI without errors.
> 
>  tools/virtiofsd/passthrough_seccomp.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-03 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 19:33 [PATCH] virtiofsd: Add restart_syscall to the seccomp whitelist Greg Kurz
2021-02-01 19:52 ` Dr. David Alan Gilbert
2021-02-03 14:27 ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.