1. 24 7月, 2014 1 次提交
  2. 11 7月, 2014 1 次提交
    • M
      powerpc/cell: Fix compilation with CONFIG_COREDUMP=n · e623fbf1
      Michael Ellerman 提交于
      Commit 046d662f "coredump: make core dump functionality optional"
      made the coredump optional, but didn't update the spufs code that
      depends on it. That leads to build errors such as:
      
        arch/powerpc/platforms/built-in.o: In function `.spufs_arch_write_note':
        coredump.c:(.text+0x22cd4): undefined reference to `.dump_emit'
        coredump.c:(.text+0x22cf4): undefined reference to `.dump_emit'
        coredump.c:(.text+0x22d0c): undefined reference to `.dump_align'
        coredump.c:(.text+0x22d48): undefined reference to `.dump_emit'
        coredump.c:(.text+0x22e7c): undefined reference to `.dump_skip'
      
      Fix it by adding some ifdefs in the cell code.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e623fbf1
  3. 11 6月, 2014 1 次提交
  4. 11 2月, 2014 1 次提交
  5. 09 11月, 2013 3 次提交
  6. 22 8月, 2013 1 次提交
  7. 29 6月, 2013 1 次提交
  8. 30 4月, 2013 1 次提交
  9. 24 4月, 2013 1 次提交
  10. 10 4月, 2013 1 次提交
  11. 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
  12. 23 2月, 2013 2 次提交
  13. 11 2月, 2013 1 次提交
  14. 21 12月, 2012 1 次提交
  15. 19 11月, 2012 1 次提交
    • E
      pidns: Use task_active_pid_ns where appropriate · 17cf22c3
      Eric W. Biederman 提交于
      The expressions tsk->nsproxy->pid_ns and task_active_pid_ns
      aka ns_of_pid(task_pid(tsk)) should have the same number of
      cache line misses with the practical difference that
      ns_of_pid(task_pid(tsk)) is released later in a processes life.
      
      Furthermore by using task_active_pid_ns it becomes trivial
      to write an unshare implementation for the the pid namespace.
      
      So I have used task_active_pid_ns everywhere I can.
      
      In fork since the pid has not yet been attached to the
      process I use ns_of_pid, to achieve the same effect.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      17cf22c3
  16. 27 9月, 2012 1 次提交
  17. 30 7月, 2012 5 次提交
  18. 23 7月, 2012 2 次提交
  19. 06 5月, 2012 1 次提交
  20. 21 3月, 2012 3 次提交
  21. 20 2月, 2012 1 次提交
    • D
      Wrap accesses to the fd_sets in struct fdtable · 1dce27c5
      David Howells 提交于
      Wrap accesses to the fd_sets in struct fdtable (for recording open files and
      close-on-exec flags) so that we can move away from using fd_sets since we
      abuse the fd_set structs by not allocating the full-sized structure under
      normal circumstances and by non-core code looking at the internals of the
      fd_sets.
      
      The first abuse means that use of FD_ZERO() on these fd_sets is not permitted,
      since that cannot be told about their abnormal lengths.
      
      This introduces six wrapper functions for setting, clearing and testing
      close-on-exec flags and fd-is-open flags:
      
      	void __set_close_on_exec(int fd, struct fdtable *fdt);
      	void __clear_close_on_exec(int fd, struct fdtable *fdt);
      	bool close_on_exec(int fd, const struct fdtable *fdt);
      	void __set_open_fd(int fd, struct fdtable *fdt);
      	void __clear_open_fd(int fd, struct fdtable *fdt);
      	bool fd_is_open(int fd, const struct fdtable *fdt);
      
      Note that I've prepended '__' to the names of the set/clear functions because
      they require the caller to hold a lock to use them.
      
      Note also that I haven't added wrappers for looking behind the scenes at the
      the array.  Possibly that should exist too.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Link: http://lkml.kernel.org/r/20120216174942.23314.1364.stgit@warthog.procyon.org.ukSigned-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      1dce27c5
  22. 04 1月, 2012 2 次提交
  23. 01 11月, 2011 3 次提交
    • P
      powerpc: remove non-required uses of include <linux/module.h> · ead53f22
      Paul Gortmaker 提交于
      None of the files touched here are modules, and they are not
      exporting any symbols either -- so there is no need to be including
      the module.h.  Builds of all the files remains successful.
      
      Even kernel/module.c does not need to include it, since it includes
      linux/moduleloader.h instead.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      ead53f22
    • P
      powerpc: various straight conversions from module.h --> export.h · 4b16f8e2
      Paul Gortmaker 提交于
      All these files were including module.h just for the basic
      EXPORT_SYMBOL infrastructure.  We can shift them off to the
      export.h header which is a way smaller footprint and thus
      realize some compile time gains.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      4b16f8e2
    • P
      powerpc: Fix up implicit sched.h users · 62fe91bb
      Paul Gortmaker 提交于
      They are getting it through device.h --> module.h path, but we want
      to clean that up.  This is a sample of what will happen if we don't:
      
        pseries/iommu.c: In function 'tce_build_pSeriesLP':
        pseries/iommu.c:136: error: implicit declaration of function 'show_stack'
      
        pseries/eeh.c: In function 'eeh_token_to_phys':
        pseries/eeh.c:359: error: 'init_mm' undeclared (first use in this function)
      
        pseries/eeh_event.c: In function 'eeh_event_handler':
        pseries/eeh_event.c:63: error: implicit declaration of function 'daemonize'
        pseries/eeh_event.c:64: error: implicit declaration of function 'set_current_state'
        pseries/eeh_event.c:64: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
        pseries/eeh_event.c:64: error: (Each undeclared identifier is reported only once
        pseries/eeh_event.c:64: error: for each function it appears in.)
        pseries/eeh_event.c: In function 'eeh_thread_launcher':
        pseries/eeh_event.c:109: error: 'CLONE_KERNEL' undeclared (first use in this function)
      
        hotplug-cpu.c: In function 'pseries_mach_cpu_die':
        hotplug-cpu.c:115: error: implicit declaration of function 'idle_task_exit'
      
        kernel/swsusp_64.c: In function 'do_after_copyback':
        kernel/swsusp_64.c:17: error: implicit declaration of function 'touch_softlockup_watchdog'
      
        cell/spufs/context.c: In function 'alloc_spu_context':
        cell/spufs/context.c:60: error: implicit declaration of function 'get_task_mm'
        cell/spufs/context.c:60: warning: assignment makes pointer from integer without a cast
        cell/spufs/context.c: In function 'spu_forget':
        cell/spufs/context.c:127: error: implicit declaration of function 'mmput'
      
        pasemi/dma_lib.c: In function 'pasemi_dma_stop_chan':
        pasemi/dma_lib.c:332: error: implicit declaration of function 'cond_resched'
      
        sysdev/fsl_lbc.c: In function 'fsl_lbc_ctrl_irq':
        sysdev/fsl_lbc.c:247: error: 'TASK_NORMAL' undeclared (first use in this function)
      
      Add in sched.h so these get the definitions they are looking for.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      62fe91bb
  24. 27 7月, 2011 1 次提交
  25. 21 7月, 2011 1 次提交
    • J
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik 提交于
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJosef Bacik <josef@redhat.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  26. 20 7月, 2011 1 次提交
  27. 04 5月, 2011 1 次提交