lkml.org 
[lkml]   [2015]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] Audit fixes for 3.19 #2
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.



\
 
 \ /
  Last update: 2015-01-01 20:21    [W:0.040 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site