Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932067AbaBDQRa (ORCPT ); Tue, 4 Feb 2014 11:17:30 -0500 Received: from mail-ve0-f178.google.com ([209.85.128.178]:39292 "EHLO mail-ve0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382AbaBDQR1 (ORCPT ); Tue, 4 Feb 2014 11:17:27 -0500 MIME-Version: 1.0 In-Reply-To: <1391513615.2766.18.camel@menhir> References: <1391013467-7598-1-git-send-email-ilya.dryomov@inktank.com> <20140130075421.GA10050@infradead.org> <20140203102943.GF11829@infradead.org> <20140203215908.GD10323@ZenIV.linux.org.uk> <20140203224034.GF10323@ZenIV.linux.org.uk> <1391513615.2766.18.camel@menhir> Date: Tue, 4 Feb 2014 08:17:26 -0800 X-Google-Sender-Auth: F3LIxvhRZbalihP3Fwe4179g_zk Message-ID: Subject: Re: [PATCH v2] ceph: fix posix ACL hooks From: Linus Torvalds To: Steven Whitehouse Cc: Al Viro , Christoph Hellwig , Ilya Dryomov , Sage Weil , Dave Jones , Linux Kernel Mailing List , ceph-devel@vger.kernel.org, linux-fsdevel , Guangliang Zhao , Li Wang , zheng.z.yan@intel.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 4, 2014 at 3:33 AM, Steven Whitehouse wrote: > > The other question that I have relating to that side of things, is why > security_inode_permission() is called from __inode_permission() rather > than from generic_permission() ? Maybe there is a good reason, but I > can't immediately see what it is at the moment. "generic_permission()" is just a helper that implements the default UNIX permissions, and won't necessarily even be called. A filesystem could decide not to call it at all, and in fact there are cases that don't (eg coda or the bad_inode case). The inode_permission() class of helpers, in contrast, is what gets called by the VFS layer itself. So if you want to catch all permission checks (and that would be security_inode_permission()) then you need to catch it there. Linus -- 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/