From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757237AbYEWJUS (ORCPT ); Fri, 23 May 2008 05:20:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754461AbYEWJUE (ORCPT ); Fri, 23 May 2008 05:20:04 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:45091 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753718AbYEWJUD (ORCPT ); Fri, 23 May 2008 05:20:03 -0400 Date: Fri, 23 May 2008 05:20:02 -0400 From: Christoph Hellwig To: Miklos Szeredi Cc: linux-fsdevel@vger.kernel.org, hch@infradead.org, viro@ZenIV.linux.org.uk, linux-kernel@vger.kernel.org, Mikulas Patocka Subject: Re: [patch 05/14] hpfs: dont call permission() Message-ID: <20080523092002.GC27119@infradead.org> References: <20080521171458.077908538@szeredi.hu> <20080521171548.148636128@szeredi.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080521171548.148636128@szeredi.hu> User-Agent: Mutt/1.5.17 (2007-11-01) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 21, 2008 at 07:15:03PM +0200, Miklos Szeredi wrote: > From: Miklos Szeredi > > hpfs_unlink() calls permission() prior to truncating the file. HPFS > doesn't define a .permission method, so replace with explicit call to > generic_permission(). > > This is equivalent, except that devcgroup_inode_permission() and > security_inode_permission() are not called. > > The truncation is just an implementation detail of the unlink, so > these security checks are unnecessary. > > I suspect that even calling generic_permission() is unnecessary, since > we shouldn't mind if the file isn't writable. But I leave that to the > maintainer to decide. Okay to me but rather pointless. And I agree to the last stance that the whole logic in hpfs_unlink really needs sorting out by someone who understands that filesystem.