Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757178Ab2BWWeu (ORCPT ); Thu, 23 Feb 2012 17:34:50 -0500 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]:34826 "EHLO mail-lpp01m010-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756067Ab2BWWer (ORCPT ); Thu, 23 Feb 2012 17:34:47 -0500 MIME-Version: 1.0 In-Reply-To: References: <1329845435-2313-1-git-send-email-wad@chromium.org> <1329845435-2313-7-git-send-email-wad@chromium.org> <9edbabb2262e3d91a7b8c75dbec03d7f.squirrel@webmail.greenhost.nl> <4F45887A.5010809@zytor.com> <4F459109.1060205@zytor.com> Date: Thu, 23 Feb 2012 16:34:45 -0600 Message-ID: Subject: Re: [kernel-hardening] Re: [PATCH v10 07/11] signal, x86: add SIGSYS info and make it synchronous. From: Will Drewry To: kernel-hardening@lists.openwall.com Cc: Roland McGrath , "H. Peter Anvin" , Kees Cook , Andrew Lutomirski , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, netdev@vger.kernel.org, x86@kernel.org, arnd@arndb.de, davem@davemloft.net, mingo@redhat.com, oleg@redhat.com, peterz@infradead.org, rdunlap@xenotime.net, tglx@linutronix.de, eparis@redhat.com, serge.hallyn@canonical.com, djm@mindrot.org, scarybeasts@gmail.com, pmoore@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, eric.dumazet@gmail.com, markus@chromium.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1710 Lines: 39 On Thu, Feb 23, 2012 at 4:15 PM, Indan Zupancic wrote: > On Thu, February 23, 2012 20:26, Will Drewry wrote: >> Seems like there's an argument for another return code, >> SECCOMP_RET_CORE, that resets/unblocks the SIGSYS handler since the >> existing TRAP and KILL options seem to cover the other paths (signal >> handler and do_exit). > > What about making SECCOMP_RET_TRAP dump core/send SIGSYS if there is > no tracer with PTRACE_O_SECCOMP set? And perhaps go for a blockable > SIGSYS? That way you only have KILL, ERRNO and TRAP, with the last > one meaning deny, but giving someone else a chance to do something. > Or is that just confusing? I don't think it makes sense to mix up signal delivery for in-process handling and ptrace. In particular, TRACE calls must assume t the ptracer actually enacted a policy, but with TRAP as is, it always rejects it. > I don't think there should be too many return values, or else you > put too much runtime policy into the filters. I'd rather make it explicit than not. This will be a quagmire if any behavior is implicit. > Sending SIGSYS is useful, but it's quite a bit less useful if user > space can't handle it in a signal handler, so I don't think it's > worth it to make a unblockable version. I believe the point here would be that you'd get a useful coredump without needing to enforce that the process can't handle normal SIGSYS or other syscalls by blocking signal masking. cheers! will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/