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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0912181057040.24513@makko.or.mcafeemobile.com>
Date:	Fri, 18 Dec 2009 10:59:00 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Roland Dreier <rdreier@...co.com>
cc:	Al Viro <viro@...IV.linux.org.uk>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] anonfd: Make file read-only if fops->write is not
 set

On Fri, 18 Dec 2009, Roland Dreier wrote:

> It seems a couple places such as arch/ia64/kernel/perfmon.c and
> drivers/infiniband/core/uverbs_main.c could use anon_inode_getfile()
> instead of a private pseudo-fs + alloc_file(), if only there were a way
> to get a read-only file.  So provide this by having anon_inode_getfile()
> create a read-only file if the fops->write passed in is NULL.
> 
> Signed-off-by: Roland Dreier <rolandd@...co.com>
> ---
>  > Good grief, what for?  We are already passing O_NDELAY in flags argument,
>  > why not add O_RDWR/O_RDONLY to it?  It's not as if we had that many
>  > callers, after all...
> 
> fair enough, I wasn't sure if I really liked changing the meaning of the
> flags argument without any indication of that in the function signature,
> but definitely the code is nicer.
> 
> so would something like this make sense?  if so I'll send follow-ups
> converting ia64 / perfmon and infiniband / uverbs to anon_inodes.

Looks OK to me.


- Davide


--
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