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: <CAJfpegu8byHvPk3_KM3f1HE0dyaytVtsjZcUH5RB4pfwbQHEYA@mail.gmail.com>
Date:	Mon, 26 Mar 2012 15:22:09 +0200
From:	Miklos Szeredi <miklos@...redi.hu>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, Trond.Myklebust@...app.com,
	sfrench@...ba.org, sage@...dream.net, ericvh@...il.com,
	mszeredi@...e.cz
Subject: Re: [PATCH 03/25] vfs: split __dentry_open()

On Sat, Mar 24, 2012 at 3:12 PM, Christoph Hellwig <hch@...radead.org> wrote:
> On Wed, Mar 07, 2012 at 10:22:20PM +0100, Miklos Szeredi wrote:
>> From: Miklos Szeredi <mszeredi@...e.cz>
>>
>> Split __dentry_open() into two functions:
>>
>>   do_dentry_open() - does most of the actual work, doesn't put file on failure
>>   open_check_o_direct() - after a successful open, checks direct_IO method
>>
>> This will allow i_op->atomic_open to do just the file initialization and leave
>> the direct_IO checking to the VFS.
>
> I think the O_DIRECT checks should move out of the VFS.  The direct I/O
> method isn't called from the VFS anywhere, but just from the
> generic_file_* routines in filemap.c, which suggest doing the O_DIRECT
> check in there as well.

Returning the error at the earliest opportunity (from open as opposed
to read/write) makes sense.  Given that some apps may actually rely on
the return value from open to verify O_DIRECT support, it doesn't seem
to be a good idea to move the checks to read/write.

Thanks,
Miklos
--
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