Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932682Ab2EVVR2 (ORCPT ); Tue, 22 May 2012 17:17:28 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:55560 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932438Ab2EVVRY convert rfc822-to-8bit (ORCPT ); Tue, 22 May 2012 17:17:24 -0400 MIME-Version: 1.0 In-Reply-To: <20120522210704.GK11775@ZenIV.linux.org.uk> References: <5d6179f59222155b72d9aa9f171e883c.squirrel@webmail.greenhost.nl> <20120522173942.GJ11775@ZenIV.linux.org.uk> <4FBBF84A.4070308@zytor.com> <20120522210704.GK11775@ZenIV.linux.org.uk> From: Roland McGrath Date: Tue, 22 May 2012 14:17:03 -0700 Message-ID: Subject: Re: seccomp and ptrace. what is the correct order? To: Al Viro Cc: Will Drewry , "H. Peter Anvin" , Indan Zupancic , Eric Paris , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, kernel-hardening@lists.openwall.com, mingo@redhat.com, oleg@redhat.com, peterz@infradead.org, rdunlap@xenotime.net, tglx@linutronix.de, luto@mit.edu, eparis@redhat.com, serge.hallyn@canonical.com, pmoore@redhat.com, akpm@linux-foundation.org, corbet@lwn.net, eric.dumazet@gmail.com, markus@chromium.org, coreyb@linux.vnet.ibm.com, keescook@chromium.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 23 On Tue, May 22, 2012 at 2:07 PM, Al Viro wrote: > FWIW, I'd prefer to have all that done inside __audit_syscall_entry(), > with > ? ? ? ?context->arch ? ? ? = syscall_get_arch(current, regs); > ? ? ? ?context->major ? ? ?= syscall_get_nr(current, regs); > ? ? ? ?syscall_get_arguments(current, regs, 0, 4, context->argv); > done instead of initializations from arguments we are doing there now. > I seriously doubt that it would lead to worse code than what we currently > have. ?If nothing else, we won't be passing that pile of arguments around. I always felt the same way about the audit code. (As a bonus, if the audit folks ever decide they want all six syscall arguments instead of just four, they wouldn't have to touch every arch.) But it will certainly produce drastically worse code for ia64. (Not that anybody cares about ia64.) Thanks, Roland -- 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/