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]
Date:   Fri, 13 Oct 2017 00:22:24 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     Jan Kara <jack@...e.cz>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>,
        linux-ext4 <linux-ext4@...r.kernel.org>,
        linux-xfs@...r.kernel.org, Christoph Hellwig <hch@...radead.org>,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        Ted Tso <tytso@....edu>,
        "Darrick J. Wong" <darrick.wong@...cle.com>
Subject: Re: [PATCH 17/19] ext4: Add support for MAP_SYNC flag

On Wed, Oct 11, 2017 at 03:11:21PM -0700, Dan Williams wrote:
> > +       /*
> > +        * We don't support synchronous mappings for non-DAX files. At least
> > +        * until someone comes with a sensible use case.
> > +        */
> > +       if (!IS_DAX(file_inode(file)) && (map_flags & MAP_SYNC))
> > +               return -EOPNOTSUPP;
> 
> Perhaps EPERM instead to differentiate the unsupported flags case?
> There's precedent for mmap returning EPERM for reasons other than
> incompatible PROT flags.

Why would we want to voluntarily use arcane errors for a entirely
new interface under our control?

-EOPNOTSUPP is nice and explicit about what is going on.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ