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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090511040019.GI8633@ZenIV.linux.org.uk>
Date:	Mon, 11 May 2009 05:00:19 +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 11:46:15AM +0900, hooanon05@...oo.co.jp wrote:
> My poor English may make me misunderstood.
> Please let me make sure.
> Do you mean FMODE_EXEC was passed to struct file before this commit?
> 
> Previous open_exec() used to call
> 	file = nameidata_to_filp(&nd, O_RDONLY|O_LARGEFILE)
> and it calls
> 	filp = __dentry_open(nd->path.dentry, nd->path.mnt, flags, filp,
> 				     NULL);
> __dentry_open()
> {
> 	f->f_flags = flags;
> 	f->f_mode = ((flags+1) & O_ACCMODE) | FMODE_LSEEK |
> 				FMODE_PREAD | FMODE_PWRITE;
> 	;;;
> }
> 
> So FMODE_EXEC was not set to f_flags/f_mode, O_RDONLY|O_LARGEFILE only.

Nope.  It ended up in nd->intent.open.flags due to path_lookup_open().
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.

So f_flags is exactly where that thing used to end up, if it ended up
anywhere at all.
--
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