From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [GIT PULL] Audit fixes for 3.19 #2 Date: Thu, 1 Jan 2015 18:41:08 +0000 Message-ID: <20150101184108.GA28149@ZenIV.linux.org.uk> References: <3159430.4MhUX0bhoZ@sifl> <3787508.5gHb8qD3XR@sifl> <20150101000149.GP22149@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20150101000149.GP22149@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org To: Paul Moore Cc: Linus Torvalds , linux-audit@redhat.com, Linux Kernel Mailing List List-Id: linux-audit@redhat.com On Thu, Jan 01, 2015 at 12:01:49AM +0000, Al Viro wrote: > Umm... How about just adding a function that would be used instead of > all those > struct filename filename = { .name = name }; > and created an object that would be destroyed later by putname()? ... such as getname_kernel(), actually. There are 5 places like that: fs/exec.c:open_exec(), fs/namei.c:do_path_lookup(), fs/namei.c:kern_path_mountpoint(), fs/namei.c:do_file_open_root(), fs/open.c:filp_open(). Said that, I'm not sure that no call chains allow names just under PATH_MAX, so getname_kernel() might need to be taught to handle those.