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: <164323528189.5493.7196087998245554506@noble.neil.brown.name>
Date:   Thu, 27 Jan 2022 09:14:41 +1100
From:   "NeilBrown" <neilb@...e.de>
To:     "Christoph Hellwig" <hch@...radead.org>
Cc:     "Trond Myklebust" <trond.myklebust@...merspace.com>,
        "Anna Schumaker" <anna.schumaker@...app.com>,
        "Chuck Lever" <chuck.lever@...cle.com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Mel Gorman" <mgorman@...e.de>,
        "Christoph Hellwig" <hch@...radead.org>,
        "David Howells" <dhowells@...hat.com>, linux-nfs@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/23] VFS: Add FMODE_CAN_ODIRECT file flag

On Mon, 24 Jan 2022, Christoph Hellwig wrote:
> On Mon, Jan 24, 2022 at 02:48:32PM +1100, NeilBrown wrote:
> > Currently various places test if direct IO is possible on a file by
> > checking for the existence of the direct_IO address space operation.
> > This is a poor choice, as the direct_IO operation may not be used - it is
> > only used if the generic_file_*_iter functions are called for direct IO
> > and some filesystems - particularly NFS - don't do this.
> > 
> > Instead, introduce a new f_mode flag: FMODE_CAN_ODIRECT and change the
> > various places to check this (avoiding pointer dereferences).
> > do_dentry_open() will set this flag if ->direct_IO is present, so
> > filesystems do not need to be changed.
> > 
> > NFS *is* changed, to set the flag explicitly and discard the direct_IO
> > entry in the address_space_operations for files.
> 
> Looks good:
> 
> Reviewed-by: Christoph Hellwig <hch@....de>
> 
> It would be nice to throw in a cleanup to remove noop_direct_IO as well.

I don't want to add this to the present series.  When it lands I'll send
patches to the various filesystems to switch to using FMODE_CAN_ODIRECT.

Thanks,
NeilBrown

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ