qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/1] seccomp branch queue
@ 2020-09-15 11:01 Eduardo Otubo
  2020-09-15 11:01 ` [PULL 1/1] seccomp: fix killing of whole process instead of thread Eduardo Otubo
  2020-09-15 12:48 ` [PULL 0/1] seccomp branch queue Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Eduardo Otubo @ 2020-09-15 11:01 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: Eduardo Otubo

The following changes since commit 2d2c73d0e3d504a61f868e46e6abd5643f38091b:

  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200914-1' into staging (2020-09-14 16:03:08 +0100)

are available in the Git repository at:

  git://github.com/otubo/qemu.git tags/pull-seccomp-20200915

for you to fetch changes up to e474e3aacf4276eb0781d11c45e2fab996f9dc56:

  seccomp: fix killing of whole process instead of thread (2020-09-15 12:56:26 +0200)

----------------------------------------------------------------
pull-seccomp-20200915

----------------------------------------------------------------
Daniel P. Berrangé (1):
      seccomp: fix killing of whole process instead of thread

 qemu-seccomp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.18.1



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

* [PULL 1/1] seccomp: fix killing of whole process instead of thread
  2020-09-15 11:01 [PULL 0/1] seccomp branch queue Eduardo Otubo
@ 2020-09-15 11:01 ` Eduardo Otubo
  2020-09-15 12:48 ` [PULL 0/1] seccomp branch queue Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Eduardo Otubo @ 2020-09-15 11:01 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: Daniel P . Berrangé

From: Daniel P. Berrangé <berrange@redhat.com>

Back in 2018 we introduced support for killing the whole QEMU process
instead of just one thread, when a seccomp rule is violated:

  commit bda08a5764d470f101fa38635d30b41179a313e1
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   Wed Aug 22 19:02:48 2018 +0200

    seccomp: prefer SCMP_ACT_KILL_PROCESS if available

Fast forward a year and we introduced a patch to avoid killing the
process for resource control syscalls tickled by Mesa.

  commit 9a1565a03b79d80b236bc7cc2dbce52a2ef3a1b8
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Wed Mar 13 09:49:03 2019 +0000

    seccomp: don't kill process for resource control syscalls

Unfortunately a logic bug effectively reverted the first commit
mentioned so that we go back to only killing the thread, not the whole
process.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Eduardo Otubo <otubo@redhat.com>
---
 qemu-seccomp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index e0a1829b3d..8325ecb766 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -136,8 +136,9 @@ static uint32_t qemu_seccomp_get_action(int set)
 
             if (qemu_seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &action) == 0) {
                 kill_process = 1;
+            } else {
+                kill_process = 0;
             }
-            kill_process = 0;
         }
         if (kill_process == 1) {
             return SCMP_ACT_KILL_PROCESS;
-- 
2.18.1



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

* Re: [PULL 0/1] seccomp branch queue
  2020-09-15 11:01 [PULL 0/1] seccomp branch queue Eduardo Otubo
  2020-09-15 11:01 ` [PULL 1/1] seccomp: fix killing of whole process instead of thread Eduardo Otubo
@ 2020-09-15 12:48 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2020-09-15 12:48 UTC (permalink / raw)
  To: Eduardo Otubo; +Cc: QEMU Developers

On Tue, 15 Sep 2020 at 12:02, Eduardo Otubo <otubo@redhat.com> wrote:
>
> The following changes since commit 2d2c73d0e3d504a61f868e46e6abd5643f38091b:
>
>   Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200914-1' into staging (2020-09-14 16:03:08 +0100)
>
> are available in the Git repository at:
>
>   git://github.com/otubo/qemu.git tags/pull-seccomp-20200915
>
> for you to fetch changes up to e474e3aacf4276eb0781d11c45e2fab996f9dc56:
>
>   seccomp: fix killing of whole process instead of thread (2020-09-15 12:56:26 +0200)
>
> ----------------------------------------------------------------
> pull-seccomp-20200915
>
> ----------------------------------------------------------------
> Daniel P. Berrangé (1):
>       seccomp: fix killing of whole process instead of thread
>
>  qemu-seccomp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Strictly speaking patches you send in a pullreq should have your
signed-off-by, but I figured in this case the acked-by was
close enough and it's only one patch.


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


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

end of thread, other threads:[~2020-09-15 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-15 11:01 [PULL 0/1] seccomp branch queue Eduardo Otubo
2020-09-15 11:01 ` [PULL 1/1] seccomp: fix killing of whole process instead of thread Eduardo Otubo
2020-09-15 12:48 ` [PULL 0/1] seccomp branch queue Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).