1. 01 10月, 2013 1 次提交
  2. 28 8月, 2013 1 次提交
  3. 10 4月, 2013 1 次提交
  4. 04 3月, 2013 1 次提交
    • E
      fs: Limit sys_mount to only request filesystem modules. · 7f78e035
      Eric W. Biederman 提交于
      Modify the request_module to prefix the file system type with "fs-"
      and add aliases to all of the filesystems that can be built as modules
      to match.
      
      A common practice is to build all of the kernel code and leave code
      that is not commonly needed as modules, with the result that many
      users are exposed to any bug anywhere in the kernel.
      
      Looking for filesystems with a fs- prefix limits the pool of possible
      modules that can be loaded by mount to just filesystems trivially
      making things safer with no real cost.
      
      Using aliases means user space can control the policy of which
      filesystem modules are auto-loaded by editing /etc/modprobe.d/*.conf
      with blacklist and alias directives.  Allowing simple, safe,
      well understood work-arounds to known problematic software.
      
      This also addresses a rare but unfortunate problem where the filesystem
      name is not the same as it's module name and module auto-loading
      would not work.  While writing this patch I saw a handful of such
      cases.  The most significant being autofs that lives in the module
      autofs4.
      
      This is relevant to user namespaces because we can reach the request
      module in get_fs_type() without having any special permissions, and
      people get uncomfortable when a user specified string (in this case
      the filesystem type) goes all of the way to request_module.
      
      After having looked at this issue I don't think there is any
      particular reason to perform any filtering or permission checks beyond
      making it clear in the module request that we want a filesystem
      module.  The common pattern in the kernel is to call request_module()
      without regards to the users permissions.  In general all a filesystem
      module does once loaded is call register_filesystem() and go to sleep.
      Which means there is not much attack surface exposed by loading a
      filesytem module unless the filesystem is mounted.  In a user
      namespace filesystems are not mounted unless .fs_flags = FS_USERNS_MOUNT,
      which most filesystems do not set today.
      Acked-by: NSerge Hallyn <serge.hallyn@canonical.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Reported-by: NKees Cook <keescook@google.com>
      Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      7f78e035
  5. 18 1月, 2013 1 次提交
  6. 10 1月, 2013 1 次提交
  7. 31 10月, 2012 1 次提交
    • S
      usb: gadget: always update HS/SS descriptors and create a copy of them · 10287bae
      Sebastian Andrzej Siewior 提交于
      HS and SS descriptors are staticaly created. They are updated during the
      bind process with the endpoint address, string id or interface numbers.
      
      After that, the descriptor chain is linked to struct usb_function which
      is used by composite in order to serve the GET_DESCRIPTOR requests,
      number of available configs and so on.
      
      There is no need to assign the HS descriptor only if the UDC supports
      HS speed because composite won't report those to the host if HS support
      has not been reached. The same reasoning is valid for SS.
      
      This patch makes sure each function updates HS/SS descriptors
      unconditionally and uses the newly introduced helper function to create a
      copy the descriptors for the speed which is supported by the UDC.
      
      While at that, also rename f->descriptors to f->fs_descriptors in order
      to make it more explicit what that means.
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      10287bae
  8. 27 9月, 2012 1 次提交
  9. 21 9月, 2012 1 次提交
  10. 07 9月, 2012 1 次提交
  11. 04 6月, 2012 1 次提交
  12. 15 5月, 2012 1 次提交
  13. 04 5月, 2012 1 次提交
  14. 11 4月, 2012 2 次提交
  15. 21 3月, 2012 1 次提交
  16. 17 3月, 2012 1 次提交
  17. 24 1月, 2012 1 次提交
  18. 09 1月, 2012 1 次提交
    • A
      functionfs: unfuck failure exits on mount · 5b5f9560
      Al Viro 提交于
      * if you do dput() of root dentry, do *not* follow that with iput() of root
      inode.
      * while we are at it, don't do that dput() at all - you are leaving the pointer
      in ->s_root and your ->kill_sb() will be very unhappy with that.  It will do
      proper dput(), though, so the easiest way is to leave that to it entirely.
      * freeing ->s_fs_info is also best left to ->kill_sb() (which will do it
      anyway), especially since we leave the pointer in place.
      * that xchg() in ->kill_sb() is not a bug per se, but it's a plain and simple
      masturbation with fewer excuses than Onan had...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5b5f9560
  19. 12 12月, 2011 1 次提交
  20. 01 11月, 2011 1 次提交
  21. 10 9月, 2011 1 次提交
    • K
      usb gadget: clean up FSF boilerplate text · 28c9fc68
      Klaus Schwarzkopf 提交于
      remove the following two paragraphs as they are not needed:
      
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      License for more details.
      
      You should have received a copy of the GNU General Public License along with
      this program; if not, write to the Free Software Foundation, Inc.,59
      Temple Place - Suite 330, Boston, MA  02111-1307, USA.
      Signed-off-by: NKlaus Schwarzkopf <schwarzkopf@sensortherm.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      28c9fc68
  22. 29 6月, 2011 1 次提交
  23. 05 2月, 2011 1 次提交
  24. 11 12月, 2010 1 次提交
  25. 18 11月, 2010 2 次提交
  26. 17 11月, 2010 3 次提交
  27. 29 10月, 2010 1 次提交
  28. 27 10月, 2010 1 次提交
  29. 26 10月, 2010 1 次提交
    • C
      fs: do not assign default i_ino in new_inode · 85fe4025
      Christoph Hellwig 提交于
      Instead of always assigning an increasing inode number in new_inode
      move the call to assign it into those callers that actually need it.
      For now callers that need it is estimated conservatively, that is
      the call is added to all filesystems that do not assign an i_ino
      by themselves.  For a few more filesystems we can avoid assigning
      any inode number given that they aren't user visible, and for others
      it could be done lazily when an inode number is actually needed,
      but that's left for later patches.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      85fe4025
  30. 11 8月, 2010 3 次提交
  31. 22 7月, 2010 1 次提交
  32. 21 5月, 2010 2 次提交
    • R
      USB: gadget: f_fs.c needs to include pagemap.h · b0608690
      Randy Dunlap 提交于
      Fix g_ffs build error, add a needed header file:
      
      drivers/usb/gadget/f_fs.c:1064:error: 'PAGE_CACHE_SIZE' undeclared (first use in this function)
      drivers/usb/gadget/f_fs.c:1065:error: 'PAGE_CACHE_SHIFT' undeclared (first use in this function)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NMichał Nazarewicz <m.nazarewicz@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b0608690
    • M
      USB: f_fs: the FunctionFS driver · ddf8abd2
      Michal Nazarewicz 提交于
      The FunctionFS is a USB composite function that can be used
      with the composite framework to create an USB gadget.
      
      >From kernel point of view it is just a composite function with
      some unique behaviour.  It may be added to an USB
      configuration only after the user space driver has registered
      by writing descriptors and strings (the user space program has
      to provide the same information that kernel level composite
      functions provide when they are added to the configuration).
      
      >From user space point of view it is a file system which when
      mounted provide an "ep0" file.  User space driver need to
      write descriptors and strings to that file.  It does not need
      to worry about endpoints, interfaces or strings numbers but
      simply provide descriptors such as if the function was the
      only one (endpoints and strings numbers starting from one and
      interface numbers starting from core).  The FunctionFS changes
      numbers of those as needed also handling situation when
      numbers differ in different configurations.
      
      When descriptors and strings are written "ep#" files appear
      (one for each declared endpoint) which handle communication on
      a single endpoint.  Again, FunctionFS takes care of the real
      numbers and changing of the configuration (which means that
      "ep1" file may be really mapped to (say) endpoint 3 (and when
      configuration changes to (say) endpoint 2)).  "ep0" is used
      for receiving events and handling setup requests.
      
      When all files are closed the function disables itself.
      Signed-off-by: NMichal Nazarewicz <m.nazarewicz@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ddf8abd2