Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751583Ab3JDXI3 (ORCPT ); Fri, 4 Oct 2013 19:08:29 -0400 Received: from mail-lb0-f177.google.com ([209.85.217.177]:56725 "EHLO mail-lb0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951Ab3JDXI1 (ORCPT ); Fri, 4 Oct 2013 19:08:27 -0400 MIME-Version: 1.0 In-Reply-To: References: <20131003201332.GA3500@dztty> <20131004085911.GA2157@dztty> <20131004182353.GA2600@dztty> <20131004191113.GA3916@dztty> <20131004192712.GA4334@dztty> <20131004194142.GA4524@dztty> <87fvsgy7cn.fsf@xmission.com> From: Andy Lutomirski Date: Fri, 4 Oct 2013 16:08:06 -0700 Message-ID: Subject: Re: [PATCH v2 2/9] procfs: add proc_allow_access() to check if file's opener may access task To: "Eric W. Biederman" Cc: Djalal Harouni , Kees Cook , Al Viro , Andrew Morton , Linus Torvalds , Ingo Molnar , "Serge E. Hallyn" , Cyrill Gorcunov , David Rientjes , LKML , Linux FS Devel , "kernel-hardening@lists.openwall.com" , Djalal Harouni 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: 840 Lines: 19 On Fri, Oct 4, 2013 at 3:59 PM, Andy Lutomirski wrote: > > I'd really like a solution where there are no read or write > implementations in the entire kernel that check permissions. Failing > that, just getting it for procfs would be nice. (uid_map, etc will > probably need to be revoked on unshare for this to work.) By "check permissions" I mean using anything but f_cred. uid_map won't need any form of revoke, though -- the stuct file already points at a particular target ns. I wonder why the CAP_SYS_ADMIN check is in map_write instead of open, though. --Andy -- 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/