1. 12 9月, 2009 1 次提交
    • L
      Merge branch 'kmemleak' of git://linux-arm.org/linux-2.6 · 1b195b17
      Linus Torvalds 提交于
      * 'kmemleak' of git://linux-arm.org/linux-2.6:
        kmemleak: Improve the "Early log buffer exceeded" error message
        kmemleak: fix sparse warning for static declarations
        kmemleak: fix sparse warning over overshadowed flags
        kmemleak: move common painting code together
        kmemleak: add clear command support
        kmemleak: use bool for true/false questions
        kmemleak: Do no create the clean-up thread during kmemleak_disable()
        kmemleak: Scan all thread stacks
        kmemleak: Don't scan uninitialized memory when kmemcheck is enabled
        kmemleak: Ignore the aperture memory hole on x86_64
        kmemleak: Printing of the objects hex dump
        kmemleak: Do not report alloc_bootmem blocks as leaks
        kmemleak: Save the stack trace for early allocations
        kmemleak: Mark the early log buffer as __initdata
        kmemleak: Dump object information on request
        kmemleak: Allow rescheduling during an object scanning
      1b195b17
  2. 11 9月, 2009 7 次提交
  3. 10 9月, 2009 11 次提交
    • R
      binfmt_elf: fix PT_INTERP bss handling · 9f0ab4a3
      Roland McGrath 提交于
      In fs/binfmt_elf.c, load_elf_interp() calls padzero() for .bss even if
      the PT_LOAD has no PROT_WRITE and no .bss.  This generates EFAULT.
      
      Here is a small test case.  (Yes, there are other, useful PT_INTERP
      which have only .text and no .data/.bss.)
      
      	----- ptinterp.S
      	_start: .globl _start
      		 nop
      		 int3
      	-----
      	$ gcc -m32 -nostartfiles -nostdlib -o ptinterp ptinterp.S
      	$ gcc -m32 -Wl,--dynamic-linker=ptinterp -o hello hello.c
      	$ ./hello
      	Segmentation fault  # during execve() itself
      
      	After applying the patch:
      	$ ./hello
      	Trace trap  # user-mode execution after execve() finishes
      
      If the ELF headers are actually self-inconsistent, then dying is fine.
      But having no PROT_WRITE segment is perfectly normal and correct if
      there is no segment with p_memsz > p_filesz (i.e. bss).  John Reiser
      suggested checking for PROT_WRITE in the bss logic.  I think it makes
      most sense to simply apply the bss logic only when there is bss.
      
      This patch looks less trivial than it is due to some reindentation.
      It just moves the "if (last_bss > elf_bss) {" test up to include the
      partial-page bss logic as well as the more-pages bss logic.
      Reported-by: NJohn Reiser <jreiser@bitwagon.com>
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      9f0ab4a3
    • J
      TPM: Fixup boot probe timeout for tpm_tis driver · ec579358
      Jason Gunthorpe 提交于
      When probing the device in tpm_tis_init the call request_locality
      uses timeout_a, which wasn't being initalized until after
      request_locality. This results in request_locality falsely timing
      out if the chip is still starting. Move the initialization to before
      request_locality.
      
      This probably only matters for embedded cases (ie mine), a BIOS likely
      gets the TPM into a state where this code path isn't necessary.
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Acked-by: NRajiv Andrade <srajiv@linux.vnet.ibm.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      ec579358
    • L
      Merge branch 'lookup-permissions-cleanup' · 526b6780
      Linus Torvalds 提交于
      * lookup-permissions-cleanup:
        jffs2/jfs/xfs: switch over to 'check_acl' rather than 'permission()'
        ext[234]: move over to 'check_acl' permission model
        shmfs: use 'check_acl' instead of 'permission'
        Make 'check_acl()' a first-class filesystem op
        Simplify exec_permission_lite(), part 3
        Simplify exec_permission_lite() further
        Simplify exec_permission_lite() logic
        Do not call 'ima_path_check()' for each path component
      526b6780
    • R
      binfmt_elf: fix PT_INTERP bss handling · 752015d1
      Roland McGrath 提交于
      In fs/binfmt_elf.c, load_elf_interp() calls padzero() for .bss even if
      the PT_LOAD has no PROT_WRITE and no .bss.  This generates EFAULT.
      
      Here is a small test case.  (Yes, there are other, useful PT_INTERP
      which have only .text and no .data/.bss.)
      
      	----- ptinterp.S
      	_start: .globl _start
      		 nop
      		 int3
      	-----
      	$ gcc -m32 -nostartfiles -nostdlib -o ptinterp ptinterp.S
      	$ gcc -m32 -Wl,--dynamic-linker=ptinterp -o hello hello.c
      	$ ./hello
      	Segmentation fault  # during execve() itself
      
      	After applying the patch:
      	$ ./hello
      	Trace trap  # user-mode execution after execve() finishes
      
      If the ELF headers are actually self-inconsistent, then dying is fine.
      But having no PROT_WRITE segment is perfectly normal and correct if
      there is no segment with p_memsz > p_filesz (i.e. bss).  John Reiser
      suggested checking for PROT_WRITE in the bss logic.  I think it makes
      most sense to simply apply the bss logic only when there is bss.
      
      This patch looks less trivial than it is due to some reindentation.
      It just moves the "if (last_bss > elf_bss) {" test up to include the
      partial-page bss logic as well as the more-pages bss logic.
      Reported-by: NJohn Reiser <jreiser@bitwagon.com>
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      752015d1
    • D
      sysfs: Add labeling support for sysfs · ddd29ec6
      David P. Quigley 提交于
      This patch adds a setxattr handler to the file, directory, and symlink
      inode_operations structures for sysfs. The patch uses hooks introduced in the
      previous patch to handle the getting and setting of security information for
      the sysfs inodes. As was suggested by Eric Biederman the struct iattr in the
      sysfs_dirent structure has been replaced by a structure which contains the
      iattr, secdata and secdata length to allow the changes to persist in the event
      that the inode representing the sysfs_dirent is evicted. Because sysfs only
      stores this information when a change is made all the optional data is moved
      into one dynamically allocated field.
      
      This patch addresses an issue where SELinux was denying virtd access to the PCI
      configuration entries in sysfs. The lack of setxattr handlers for sysfs
      required that a single label be assigned to all entries in sysfs. Granting virtd
      access to every entry in sysfs is not an acceptable solution so fine grained
      labeling of sysfs is required such that individual entries can be labeled
      appropriately.
      
      [sds:  Fixed compile-time warnings, coding style, and setting of inode security init flags.]
      Signed-off-by: NDavid P. Quigley <dpquigl@tycho.nsa.gov>
      Signed-off-by: NStephen D. Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      ddd29ec6
    • D
      LSM/SELinux: inode_{get,set,notify}secctx hooks to access LSM security context information. · 1ee65e37
      David P. Quigley 提交于
      This patch introduces three new hooks. The inode_getsecctx hook is used to get
      all relevant information from an LSM about an inode. The inode_setsecctx is
      used to set both the in-core and on-disk state for the inode based on a context
      derived from inode_getsecctx.The final hook inode_notifysecctx will notify the
      LSM of a change for the in-core state of the inode in question. These hooks are
      for use in the labeled NFS code and addresses concerns of how to set security
      on an inode in a multi-xattr LSM. For historical reasons Stephen Smalley's
      explanation of the reason for these hooks is pasted below.
      
      Quote Stephen Smalley
      
      inode_setsecctx:  Change the security context of an inode.  Updates the
      in core security context managed by the security module and invokes the
      fs code as needed (via __vfs_setxattr_noperm) to update any backing
      xattrs that represent the context.  Example usage:  NFS server invokes
      this hook to change the security context in its incore inode and on the
      backing file system to a value provided by the client on a SETATTR
      operation.
      
      inode_notifysecctx:  Notify the security module of what the security
      context of an inode should be.  Initializes the incore security context
      managed by the security module for this inode.  Example usage:  NFS
      client invokes this hook to initialize the security context in its
      incore inode to the value provided by the server for the file when the
      server returned the file's attributes to the client.
      Signed-off-by: NDavid P. Quigley <dpquigl@tycho.nsa.gov>
      Acked-by: NSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      1ee65e37
    • D
      VFS: Factor out part of vfs_setxattr so it can be called from the SELinux hook for inode_setsecctx. · b1ab7e4b
      David P. Quigley 提交于
      This factors out the part of the vfs_setxattr function that performs the
      setting of the xattr and its notification. This is needed so the SELinux
      implementation of inode_setsecctx can handle the setting of the xattr while
      maintaining the proper separation of layers.
      Signed-off-by: NDavid P. Quigley <dpquigl@tycho.nsa.gov>
      Acked-by: NSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      b1ab7e4b
    • L
      Linux 2.6.31 · 74fca6a4
      Linus Torvalds 提交于
      74fca6a4
    • S
      RDMA/iwcm: Reject the connection when the cm_id is destroyed · cb58160e
      Steve Wise 提交于
      If the cm_id of a connect request is destroyed prior to the ULP
      accepting or rejecting the connection, then the provider never cleans
      up the connection.  The iwcm should explicitly reject these
      connections if the cm_id is destroyed.
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      cb58160e
    • S
      RDMA/cxgb3: Clean up properly on FW mismatch failures · ffc40c64
      Steve Wise 提交于
      FW mismatches can cause a crash in the iw_cxgb3 event handler.
      
      - NULL the t3cdev->ulp pointer on failures in cxio_rdev_open()
      - Silently ignore events when the ulp ptr is NULL in iwch_err_handler()
      Signed-off-by: NSteve Wise <swise@opengridcomputing.com>
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      ffc40c64
    • S
      13a23933
  4. 09 9月, 2009 15 次提交
  5. 08 9月, 2009 6 次提交