From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756253AbcE0T0N (ORCPT ); Fri, 27 May 2016 15:26:13 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:60262 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755102AbcE0T0L (ORCPT ); Fri, 27 May 2016 15:26:11 -0400 Date: Fri, 27 May 2016 20:26:05 +0100 From: Al Viro To: Linus Torvalds Cc: Seung-Woo Kim , linux-fsdevel , Linux Kernel Mailing List , jh80.chung@sungmsung.com, Chanwoo Choi , Casey Schaufler Subject: Re: [BUG] Panic when systemd boot do mkdir on tmpfs mounted path with smack enabled environment Message-ID: <20160527192605.GQ14480@ZenIV.linux.org.uk> References: <001301d1b808$31a437f0$94eca7d0$@samsung.com> <20160527151141.GO14480@ZenIV.linux.org.uk> <20160527185150.GP14480@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 27, 2016 at 12:01:05PM -0700, Linus Torvalds wrote: > Al, if you want Casey to help test, I think you should write out the > full git repository address, rather than just say "See > vfs.git#smack-fix". > > Anybody who isn't used to pulling for you will just wonder where you > keep your tree. And even I, who _am_ used to pulling from you, would > have to look it up, so it's a lot more convenient if you actually > write out the whole thing, Point taken. > Casey, Al is talking about > > git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs smack-fix > > and Al, please make your commit messages more informative than just > "switch ->setxattr() to passing dentry and inode separately". You can > see that from the patch. Please add a _why_ something is done, not > just what it does. Umm... Would something along the lines of switch ->setxattr() to passing inode and dentry separately smack ->d_instantiate() uses ->setxattr(), so to be able to call it before we'd hashed the new dentry and attached it to inode, we ->setxattr() instances get the inode as an explicit argument rather than obtaining it from dentry. Similar change for ->getxattr() had been done commit ce23e64. Unlike ->getxattr() (which is used both by selinux and smack instances of ->d_instantiate()) ->setxattr() is used only by smack one and unfortunately it had been missed back then. be detailed enough for the second one with switch xattr_handler->set() to passing inode and dentry separately preparation for similar switch in ->setxattr() (see the next commit for rationale) for the first one?