Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1712829

Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating block-map-sealed file ranges

From "Kirill A. Shutemov" <kirill@shutemov.name>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating block-map-sealed file ranges
Date 2017-08-16 12:40 +0200
Message-ID <uf3TX-5SS-3@gated-at.bofh.it> (permalink)
References <ueDmN-68s-1@gated-at.bofh.it> <ueDmN-68s-17@gated-at.bofh.it> <ueGb0-7Uc-33@gated-at.bofh.it> <ueNFw-48q-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Aug 15, 2017 at 10:11:27AM -0700, Dan Williams wrote:
> > We had issues before with user-imposed ETXTBSY. See MAP_DENYWRITE.
> >
> > Are we sure it won't a source of denial-of-service attacks?
> 
> I believe MAP_DENYWRITE allowed any application with read access to be
> able to deny writes which is obviously problematic. MAP_DIRECT is
> different. You need write access to the file so you can already
> destroy data that another application might depend on, and this only
> blocks allocation and reflink.
> 
> However, I'm not opposed to adding more safety around this. I think we
> can address this concern with an fcntl seal as Dave suggests, but the
> seal only applies to the 'struct file' instance and only gates whether
> MAP_DIRECT is allowed on that file. The act of setting
> F_MAY_SEAL_IOMAP requires CAP_IMMUTABLE, but MAP_DIRECT does not. This
> allows the 'permission to mmap(MAP_DIRECT)' to be passed around with
> an open file descriptor.

Sounds like a good approach to me.

-- 
 Kirill A. Shutemov

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/3] MAP_DIRECT and block-map sealed files Dan Williams <dan.j.williams@intel.com> - 2017-08-15 08:20 +0200
  [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding  new mmap flags Dan Williams <dan.j.williams@intel.com> - 2017-08-15 08:20 +0200
    Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding  new mmap flags Jan Kara <jack@suse.cz> - 2017-08-15 14:30 +0200
      Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding  new mmap flags Dan Williams <dan.j.williams@intel.com> - 2017-08-15 18:30 +0200
    Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding  new mmap flags Andy Lutomirski <luto@kernel.org> - 2017-08-15 18:30 +0200
      Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding  new mmap flags Dan Williams <dan.j.williams@intel.com> - 2017-08-16 00:40 +0200
  [PATCH v4 1/3] fs, xfs: introduce S_IOMAP_SEALED Dan Williams <dan.j.williams@intel.com> - 2017-08-15 08:20 +0200
  [PATCH v4 3/3] fs,  xfs: introduce MAP_DIRECT for creating block-map-sealed file ranges Dan Williams <dan.j.williams@intel.com> - 2017-08-15 08:20 +0200
    Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating  block-map-sealed file ranges "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-08-15 11:20 +0200
      Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating  block-map-sealed file ranges Dan Williams <dan.j.williams@intel.com> - 2017-08-15 19:20 +0200
        Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating  block-map-sealed file ranges "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-08-16 12:40 +0200
    Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating  block-map-sealed file ranges Jan Kara <jack@suse.cz> - 2017-08-15 14:50 +0200
      Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating  block-map-sealed file ranges Dan Williams <dan.j.williams@intel.com> - 2017-08-15 18:30 +0200
        Re: [PATCH v4 3/3] fs, xfs: introduce MAP_DIRECT for creating  block-map-sealed file ranges Dan Williams <dan.j.williams@intel.com> - 2017-08-16 03:20 +0200
  Re: [PATCH v4 0/3] MAP_DIRECT and block-map sealed files Dave Chinner <david@fromorbit.com> - 2017-08-15 11:10 +0200

csiph-web