Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756846Ab1D1DkL (ORCPT ); Wed, 27 Apr 2011 23:40:11 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:49649 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836Ab1D1DkK (ORCPT ); Wed, 27 Apr 2011 23:40:10 -0400 Date: Thu, 28 Apr 2011 04:40:03 +0100 From: Al Viro To: Will Drewry Cc: KOSAKI Motohiro , linux-kernel@vger.kernel.org, kees.cook@canonical.com, eparis@redhat.com, agl@chromium.org, mingo@elte.hu, jmorris@namei.org, rostedt@goodmis.org, Andrew Morton , Alexey Dobriyan , David Howells , David Rientjes , Stephen Wilson Subject: Re: [PATCH 4/7] seccomp_filter: add process state reporting Message-ID: <20110428034003.GG9487@ZenIV.linux.org.uk> References: <1303960136-14298-1-git-send-email-wad@chromium.org> <1303960136-14298-3-git-send-email-wad@chromium.org> <20110428122334.D197.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 786 Lines: 16 On Wed, Apr 27, 2011 at 10:24:20PM -0500, Will Drewry wrote: > Definitely. Would it make sense to have /proc//seccomp and > /proc//seccomp_filter? Just one question: WTF bother with S_IRUSR? Note that it's absolutely _useless_ in procfs; any kind of permission checks must be done in read(2) time since doing it in open(2) is worthless. Consider execve() on suid binary; oops, there goes your uid and there goes the effect of checks done by open(2). And if you *do* checks in read(2), why bother duplicating them in open(2)? -- 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/