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


Groups > linux.kernel > #1613274

RFC: reject unknown open flags

From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject RFC: reject unknown open flags
Date 2017-03-30 18:40 +0200
Message-ID <tqLh7-GX-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Linux has traditionally accepted random garbage in the flags argument to
the open syscall (including the later added openat).  This really harms
when adding new flags, because applications can't just probe for the
flag to actually work.  While rejecting unknown flags is an ABI change
strictly speaking I can't see what would actually get broken by it
in practice, so by the Linux rules it might not be an issue.

Below is the trivial series to reject unknown flags.  If this is not
acceptable there migh be some other ways, although they seem ugly:

 (a) add a new openat2 system call that enforces this behavior, and
     hope all majors libcs switch to using that by default to implement
     open(3).
 (b) add a new personality flag to enforce this behavior (or maybe
     opt in by default and allow admins to opt out of it)

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


Thread

RFC: reject unknown open flags Christoph Hellwig <hch@lst.de> - 2017-03-30 18:40 +0200
  [PATCH 1/2] fs: add a VALID_OPEN_FLAGS Christoph Hellwig <hch@lst.de> - 2017-03-30 18:40 +0200
  [PATCH 2/2] fs: reject unknown open flags Christoph Hellwig <hch@lst.de> - 2017-03-30 18:40 +0200
    Re: [PATCH 2/2] fs: reject unknown open flags Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 19:10 +0200
  Re: RFC: reject unknown open flags Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 19:10 +0200
    Re: RFC: reject unknown open flags Christoph Hellwig <hch@lst.de> - 2017-03-30 19:30 +0200
      Re: RFC: reject unknown open flags Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 20:30 +0200
        Re: RFC: reject unknown open flags Christoph Hellwig <hch@lst.de> - 2017-03-30 20:30 +0200
          Re: RFC: reject unknown open flags Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 20:50 +0200
            Re: RFC: reject unknown open flags Boaz Harrosh <boaz@plexistor.com> - 2017-03-30 22:10 +0200
        Re: RFC: reject unknown open flags Paul Eggert <eggert@cs.ucla.edu> - 2017-03-30 21:10 +0200
          Re: RFC: reject unknown open flags Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-30 21:20 +0200
    Re: RFC: reject unknown open flags Florian Weimer <fw@deneb.enyo.de> - 2017-03-30 21:40 +0200

csiph-web