lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 11 May 2009 07:52:07 +0100
From:	Al Viro <viro@...IV.linux.org.uk>
To:	hooanon05@...oo.co.jp
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Q. Switch open_exec() and sys_uselib() to do_open_filp()

On Mon, May 11, 2009 at 02:20:09PM +0900, hooanon05@...oo.co.jp wrote:
> 
> Al Viro:
> > Nope.  It ended up in nd->intent.open.flags due to path_lookup_open().
> 
> Yes.
> 
> 
> > Then lookup_instantiate_filp() from a filesystem that might care about
> > intents did
> >         nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt),
> >                                              nd->intent.open.flags - 1,
> >                                              nd->intent.open.file,
> >                                              open);
> > and nameidata_to_filp() ended up picking nd->intent.open.file.
> 
> FS supporting lookup_instantiate_filp() is rare, isn't it?
> Simple grep told me it is called by fuse, nfsv4, cifs, and 9p only.
> In other FS, FMODE_EXEC was dropped since nameidata_to_filp() (from
> open_exec() directly) doesn't pick intent.open.flags up.

The rest of filesystems simply ignore FMODE_EXEC completely, no matter where
it is.
 
> Anyway, I could confirm that setting FMODE_EXEC to f_flags is intended.
> Thank you for your quick responces.

NOTE: "intended" != "is promised to stay that way".  Indeed, this thread is
an excellent demonstration of the reasons for massaging the entire nightmare
into saner shape.  The call graph in the current form is an obscenity, the
number of possible codepaths is way too high, thanks to the intents mess and
the paths taken by the data are interesting and hard to trace, to put it
very mildly.

The things *will* change, and final destination of FMODE_EXEC may very well
be among those.  The commit in question did the following:
	* eliminate two special codepaths
	* make FMODE_EXEC treatment consistent (it's always propagated to
f_flags) without functionality changes (filesystems that ignored the intents
are ignoring that bit in f_flags completely anyway).

We might end up changing the treatment of that thing and it might very well
end up in f_mode.  However, that would be a separate patch and it's not for
this point in cycle.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ