From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoDj4-0007Pg-UP for qemu-devel@nongnu.org; Wed, 04 Dec 2013 09:47:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoDiw-0006vv-0h for qemu-devel@nongnu.org; Wed, 04 Dec 2013 09:46:54 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:60644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoDiv-0006vD-TZ for qemu-devel@nongnu.org; Wed, 04 Dec 2013 09:46:45 -0500 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Dec 2013 09:46:44 -0500 Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 55D48C9003E for ; Wed, 4 Dec 2013 09:46:40 -0500 (EST) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp22034.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rB4Ekfj4196918 for ; Wed, 4 Dec 2013 14:46:41 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rB4Ekfkp028678 for ; Wed, 4 Dec 2013 09:46:41 -0500 Message-ID: <529F404F.80703@linux.vnet.ibm.com> Date: Wed, 04 Dec 2013 09:46:39 -0500 From: Corey Bryant MIME-Version: 1.0 References: <1382440906-3852-1-git-send-email-otubo@linux.vnet.ibm.com> <3468561.4aYf2ZG3eq@sifl> <20131122154841.GA3232@stefanha-thinkpad.redhat.com> <7966284.CJrPIyrYnI@sifl> <20131204093946.GA19096@stefanha-thinkpad.redhat.com> <529F2C48.3060304@linux.vnet.ibm.com> In-Reply-To: <529F2C48.3060304@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-1.7] seccomp: setting "-sandbox on" by default List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Otubo , Stefan Hajnoczi Cc: Paul Moore , Paolo Bonzini , qemu-devel , Anthony Liguori 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. >