From: Corey Bryant <coreyb@linux.vnet.ibm.com>
To: Eduardo Otubo <otubo@linux.vnet.ibm.com>,
Stefan Hajnoczi <stefanha@gmail.com>
Cc: Paul Moore <pmoore@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH for-1.7] seccomp: setting "-sandbox on" by default
Date: Wed, 04 Dec 2013 09:46:39 -0500 [thread overview]
Message-ID: <529F404F.80703@linux.vnet.ibm.com> (raw)
In-Reply-To: <529F2C48.3060304@linux.vnet.ibm.com>
On 12/04/2013 08:21 AM, Eduardo Otubo wrote:
>
>
> On 12/04/2013 07:39 AM, Stefan Hajnoczi wrote:
>> On Fri, Nov 22, 2013 at 11:00:24AM -0500, Paul Moore wrote:
>>>> Developers will only be happy with seccomp if it's easy and
>>>> rewarding to
>>>> support/debug.
>>>
>>> Agreed.
>>>
>>> As a developer, how do you feel about the audit/syslog based approach I
>>> mentioned earlier?
>>
>> I used the commands you posted (I think that's what you mean). They
>> produce useful output.
>>
>> The problem is that without an error message on stderr or from the
>> shell, no one will think "QEMU process dead and hung == check seccomp"
>> immediately. It's frustrating to deal with a "silent" failure.
>
> The process dies with a SIGKILL, and sig handling in Qemu is hard to
> implement due to dozen of external linked libraries that has their own
> signal masks and conflicts with seccomp. I've already tried this
> approach in the past (you can find in the list by searching for debug mode)
And just to be clear, the signal handling approach was only for debug
purposes.
There are basically three ways to fail a syscall with seccomp:
SECCOMP_RET_KILL - kernel kills the task immediately without executing
syscall
SECCOMP_RET_TRAP - kernel sends SIGSYS to the task without executing syscall
SECCOMP_RET_ERRNO - kernel returns an errno to the task wtihout
executing syscall
You could issue a better error messages if you used TRAP or ERRNO, but
giving control back to QEMU after (presumably) arbitrary code is being
executed sort of defeats the purpose.
--
Regards,
Corey Bryant
>
> The optimal goal here is to use virt-test and audit log to eliminate
> these sorts of things.
>
next prev parent reply other threads:[~2013-12-04 14:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 11:21 [Qemu-devel] [PATCH for-1.7] seccomp: setting "-sandbox on" by default Eduardo Otubo
2013-10-22 13:00 ` Anthony Liguori
2013-10-23 14:42 ` Eduardo Otubo
2013-10-30 10:04 ` Stefan Hajnoczi
2013-11-21 15:14 ` Paolo Bonzini
2013-11-21 15:48 ` Paul Moore
2013-11-21 16:22 ` Eduardo Otubo
2013-11-22 10:39 ` Stefan Hajnoczi
2013-11-22 14:44 ` Paul Moore
2013-11-22 15:48 ` Stefan Hajnoczi
2013-11-22 16:00 ` Paul Moore
2013-12-04 9:39 ` Stefan Hajnoczi
2013-12-04 13:21 ` Eduardo Otubo
2013-12-04 14:46 ` Corey Bryant [this message]
2013-12-05 13:15 ` Stefan Hajnoczi
2013-12-05 16:12 ` Will Drewry
2013-12-06 9:13 ` Stefan Hajnoczi
2013-12-06 15:40 ` Will Drewry
2013-12-07 8:13 ` Stefan Hajnoczi
2013-11-22 10:34 ` Stefan Hajnoczi
2013-11-22 14:38 ` Paul Moore
2013-12-04 13:17 ` Eduardo Otubo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=529F404F.80703@linux.vnet.ibm.com \
--to=coreyb@linux.vnet.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=otubo@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=pmoore@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).