From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f47.google.com ([209.85.215.47]:32781 "EHLO mail-lf0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbcAVUvP (ORCPT ); Fri, 22 Jan 2016 15:51:15 -0500 Received: by mail-lf0-f47.google.com with SMTP id m198so54537315lfm.0 for ; Fri, 22 Jan 2016 12:51:14 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20160122200442.GF17997@ZenIV.linux.org.uk> References: <20160122071147.GY17997@ZenIV.linux.org.uk> <20160122170838.GZ17997@ZenIV.linux.org.uk> <20160122174338.GA17997@ZenIV.linux.org.uk> <20160122183720.GB17997@ZenIV.linux.org.uk> <20160122200442.GF17997@ZenIV.linux.org.uk> Date: Fri, 22 Jan 2016 15:51:13 -0500 Message-ID: Subject: Re: Orangefs ABI documentation From: Mike Marshall To: Al Viro Cc: Linus Torvalds , linux-fsdevel Content-Type: text/plain; charset=UTF-8 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Nope... I guess that's why the original developer called copy_attributes_to_inode every time... I need to at least check permissions... if a file's permissions change via an external source, say from 755 to 700, the other guy can still cat the file once... -Mike On Fri, Jan 22, 2016 at 3:04 PM, Al Viro wrote: > On Fri, Jan 22, 2016 at 02:21:44PM -0500, Mike Marshall wrote: >> Al... >> >> I think that my commit f987f4c28 >> "don't trigger copy_attributes_to_inode from d_revalidate." >> doesn't really do the job... I think I at least need to >> write code that checks some of the attributes and >> fails the revalidate if they got changed via some >> external process... does that sound right? > > Won't your orangefs_revalidate_lookup() spot the changed handle? Anyway, > some sanity checks in there might be a good idea - at least "has the > object type somehow changed without handle going stale?"... > > Said that, what should be picking e.g. chmod/chown by external source? > You don't have ->permission() instances in there, so inode->i_mode is > used directly by generic_inode_permission()...