18 Jan, 2012

40 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
    tg3: Fix single-vector MSI-X code
    openvswitch: Fix multipart datapath dumps.
    ipv6: fix per device IP snmp counters
    inetpeer: initialize ->redirect_genid in inet_getpeer()
    net: fix NULL-deref in WARN() in skb_gso_segment()
    net: WARN if skb_checksum_help() is called on skb requiring segmentation
    caif: Remove bad WARN_ON in caif_dev
    caif: Fix typo in Vendor/Product-ID for CAIF modems
    bnx2x: Disable AN KR work-around for BCM57810
    bnx2x: Remove AutoGrEEEn for BCM84833
    bnx2x: Remove 100Mb force speed for BCM84833
    bnx2x: Fix PFC setting on BCM57840
    bnx2x: Fix Super-Isolate mode for BCM84833
    net: fix some sparse errors
    net: kill duplicate included header
    net: sh-eth: Fix build error by the value which is not defined
    net: Use device model to get driver name in skb_gso_segment()
    bridge: BH already disabled in br_fdb_cleanup()
    net: move sock_update_memcg outside of CONFIG_INET
    mwl8k: Fixing Sparse ENDIAN CHECK warning
    ...

    Linus Torvalds
     
  • Kdump kernels leave MSI-X interrupts (as setup by the crashed kernel)
    enabled. However, kdump only enables one CPU in the new environment,
    thus causing tg3 to abort MSI-X setup. When the driver attempts to
    enable INTA or MSI interrupt modes on a kdump kernel, interrupt
    delivery fails.

    This patch attempts to workaround the problem by forcing the driver
    to enable a single MSI-X interrupt. In such a configuration, the
    device's multivector interrupt mode must be disabled.

    Signed-off-by: Matt Carlson
    Signed-off-by: David S. Miller

    Matt Carlson
     
  • The logic to split up the list of datapaths into multiple Netlink messages
    was simply wrong, causing the list to be terminated after the first part.
    Only about the first 50 datapaths would be dumped. This fixes the
    problem.

    Reported-by: Paul Ingram
    Signed-off-by: Ben Pfaff
    Signed-off-by: Jesse Gross
    Signed-off-by: David S. Miller

    Ben Pfaff
     
  • In commit 4ce3c183fca (snmp: 64bit ipstats_mib for all arches), I forgot
    to change the /proc/net/dev_snmp6/xxx output for IP counters.

    percpu array is 64bit per counter but the folding still used the 'long'
    variant, and output garbage on 32bit arches.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • ARM: fixes for ARM platforms

    Some fallout from the 3.3. merge window as well as a couple bug fixes
    for older preexisting bugs that seem valid to include at this time:

    * sched_clock changes broke picoxcell, fix included
    * BSYM bugs causing issues with thumb2-built kernels on SMP
    * Missing module.h include on msm.
    * A collection of bugfixes for samsung platforms that didn't make it into
    the first pull requests.

    * tag 'arm-soc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: make BSYM macro assembly only
    ARM: highbank: remove incorrect BSYM usage
    ARM: imx: remove incorrect BSYM usage
    ARM: exynos: remove incorrect BSYM usage
    ARM: ux500: add missing ENDPROC to headsmp.S
    ARM: msm: Add missing ENDPROC to headsmp.S
    ARM: versatile: Add missing ENDPROC to headsmp.S
    ARM: EXYNOS: Invert VCLK polarity for framebuffer on ORIGEN
    ARM: S3C64XX: Fix interrupt configuration for PCA935x on Cragganmore
    ARM: S3C64XX: Fix the memory mapped GPIOs on Cragganmore
    ARM: S3C64XX: Remove hsmmc1 from Cragganmore
    ARM: S3C64XX: Remove unconditional power domain disables
    ARM: SAMSUNG: Declare struct platform_device in plat/s3c64xx-spi.h
    ARM: SAMSUNG: dma-ops.h needs mach/dma.h
    ARM: SAMSUNG: Guard against multiple inclusion of plat/dma.h
    ARM: picoxcell: fix sched_clock() cleanup fallout
    ARM: msm: vreg is a module and so needs module.h

    Linus Torvalds
     
  • * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (53 commits)
    ARM: mach-shmobile: specify CHCLR registers on SH7372
    dma: shdma: fix runtime PM: clear channel buffers on reset
    dma/imx-sdma: save irq flags when use spin_lock in sdma_tx_submit
    dmaengine/ste_dma40: clear LNK on channel startup
    dmaengine: intel_mid_dma: remove legacy pm interface
    ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
    dmaengine: intel_mid_dma: error path fix
    dmaengine: intel_mid_dma: locking and freeing fixes
    mtd: gpmi-nand: move to dma_transfer_direction
    mtd: fix compile error for gpmi-nand
    mmc: mxs-mmc: fix the dma_transfer_direction migration
    dmaengine: add DMA_TRANS_NONE to dma_transfer_direction
    dma: mxs-dma: Don't use CLKGATE bits in CTRL0 to disable DMA channels
    dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe
    dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
    dma: mxs-dma: fix a typo in comment
    DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove
    video i.MX IPU: Fix display connections
    i.MX IPU DMA: Fix wrong burstsize settings
    dmaengine/ste_dma40: allow fixed physical channel
    ...

    Fix up conflicts in drivers/dma/{Kconfig,mxs-dma.c,pl330.c}

    The conflicts looked pretty trivial, but I'll ask people to verify them.

    Linus Torvalds
     
  • * 'upstream-linus' of git://github.com/jgarzik/libata-dev:
    [libata] ata_piix: Add Toshiba Satellite Pro A120 to the quirks list due to broken suspend functionality.
    [libata] add DVRTD08A and DVR-215 to NOSETXFER device quirk list
    [libata] pata_bf54x: Support sg list in bmdma transfer.
    [libata] sata_fsl: fix the controller operating mode
    [libata] enable ata port async suspend

    Linus Torvalds
     
  • JONGMAN HEO reports:

    With current linus git (commit a25a2b84), I got following build error,

    arch/x86/kernel/vm86_32.c: In function 'do_sys_vm86':
    arch/x86/kernel/vm86_32.c:340: error: implicit declaration of function '__audit_syscall_exit'
    make[3]: *** [arch/x86/kernel/vm86_32.o] Error 1

    OK, I can reproduce it (32bit allmodconfig with AUDIT=y, AUDITSYSCALL=n)

    It's due to commit d7e7528bcd45: "Audit: push audit success and retcode
    into arch ptrace.h".

    Reported-by: JONGMAN HEO
    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • due to broken suspend functionality.

    Signed-off-by: Benjamin Larsson
    Signed-off-by: Jeff Garzik

    Benjamin Larsson
     
  • Signed-off-by: Jeff Garzik

    Vladimir LAVALLADE
     
  • BF54x on-chip ATAPI controller allows maximum 0x1fffe bytes to be transfered
    in one ATAPI transfer. So, set the max sg_tablesize to 4.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Jeff Garzik

    Sonic Zhang
     
  • Configure the FSL SATA controller to the preferred, enterprise mode.

    Signed-off-by: Yutaka Ando
    Signed-off-by: Jerry Huang
    CC: Jeff Garzik
    Signed-off-by: Jeff Garzik

    Jerry Huang
     
  • This saves devices suspend/resume time.

    Tested system suspend/resume with SATA IDE/AHCI mode 3 times.
    Below is the time took for devices suspend/resume.

    SATA mode vanilla-kernel patched-kernel
    --------- --------------------- ---------------------
    IDE suspend: 0.744 suspend: 0.432
    (0.716, 0.768, 0.748) (0.440, 0.428, 0.428)

    resume: 5.084 resume: 2.209
    (5.100, 5.064, 5.088) (2.168, 2.232, 2.228)

    AHCI: suspend: 0.725 suspend: 0.449
    (0.740, 0.708, 0.728) (0.456, 0.448, 0.444)

    resume: 2.556 resume: 1.896
    (2.604, 2.492, 2.572) (1.932, 1.872, 1.884)

    Signed-off-by: Lin Ming
    Signed-off-by: Jeff Garzik

    Lin Ming
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    integrity: digital signature config option name change
    lib: Removed MPILIB, MPILIB_EXTRA, and SIGNATURE prompts
    lib: MPILIB Kconfig description update
    lib: digital signature dependency fix
    lib: digital signature config option name change
    encrypted-keys: fix rcu and sparse messages
    keys: fix trusted/encrypted keys sparse rcu_assign_pointer messages
    KEYS: Add missing smp_rmb() primitives to the keyring search code
    TOMOYO: Accept \000 as a valid character.
    security: update MAINTAINERS file with new git repo

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit: (29 commits)
    audit: no leading space in audit_log_d_path prefix
    audit: treat s_id as an untrusted string
    audit: fix signedness bug in audit_log_execve_info()
    audit: comparison on interprocess fields
    audit: implement all object interfield comparisons
    audit: allow interfield comparison between gid and ogid
    audit: complex interfield comparison helper
    audit: allow interfield comparison in audit rules
    Kernel: Audit Support For The ARM Platform
    audit: do not call audit_getname on error
    audit: only allow tasks to set their loginuid if it is -1
    audit: remove task argument to audit_set_loginuid
    audit: allow audit matching on inode gid
    audit: allow matching on obj_uid
    audit: remove audit_finish_fork as it can't be called
    audit: reject entry,always rules
    audit: inline audit_free to simplify the look of generic code
    audit: drop audit_set_macxattr as it doesn't do anything
    audit: inline checks for not needing to collect aux records
    audit: drop some potentially inadvisable likely notations
    ...

    Use evil merge to fix up grammar mistakes in Kconfig file.

    Bad speling and horrible grammar (and copious swearing) is to be
    expected, but let's keep it to commit messages and comments, rather than
    expose it to users in config help texts or printouts.

    Linus Torvalds
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    xfs: cleanup xfs_file_aio_write
    xfs: always return with the iolock held from xfs_file_aio_write_checks
    xfs: remove the i_new_size field in struct xfs_inode
    xfs: remove the i_size field in struct xfs_inode
    xfs: replace i_pin_wait with a bit waitqueue
    xfs: replace i_flock with a sleeping bitlock
    xfs: make i_flags an unsigned long
    xfs: remove the if_ext_max field in struct xfs_ifork
    xfs: remove the unused dm_attrs structure
    xfs: cleanup xfs_iomap_eof_align_last_fsb
    xfs: remove xfs_itruncate_data

    Linus Torvalds
     
  • * 'btrfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    btrfs: take allocation of ->tree_root into open_ctree()
    btrfs: let ->s_fs_info point to fs_info, not root...
    btrfs: consolidate failure exits in btrfs_mount() a bit
    btrfs: make free_fs_info() call ->kill_sb() unconditional
    btrfs: merge free_fs_info() calls on fill_super failures
    btrfs: kill pointless reassignment of ->s_fs_info in btrfs_fill_super()
    btrfs: make open_ctree() return int
    btrfs: sanitizing ->fs_info, part 5
    btrfs: sanitizing ->fs_info, part 4
    btrfs: sanitizing ->fs_info, part 3
    btrfs: sanitizing ->fs_info, part 2
    btrfs: sanitizing ->fs_info, part 1
    btrfs: fix a deadlock in btrfs_scan_one_device()
    btrfs: fix mount/umount race
    btrfs: get ->kill_sb() of its own
    btrfs: preparation to fixing mount/umount race

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (62 commits)
    Btrfs: use larger system chunks
    Btrfs: add a delalloc mutex to inodes for delalloc reservations
    Btrfs: space leak tracepoints
    Btrfs: protect orphan block rsv with spin_lock
    Btrfs: add allocator tracepoints
    Btrfs: don't call btrfs_throttle in file write
    Btrfs: release space on error in page_mkwrite
    Btrfs: fix btrfsck error 400 when truncating a compressed
    Btrfs: do not use btrfs_end_transaction_throttle everywhere
    Btrfs: add balance progress reporting
    Btrfs: allow for resuming restriper after it was paused
    Btrfs: allow for canceling restriper
    Btrfs: allow for pausing restriper
    Btrfs: add skip_balance mount option
    Btrfs: recover balance on mount
    Btrfs: save balance parameters to disk
    Btrfs: soft profile changing mode (aka soft convert)
    Btrfs: implement online profile changing
    Btrfs: do not reduce profile in do_chunk_alloc()
    Btrfs: virtual address space subset filter
    ...

    Fix up trivial conflict in fs/btrfs/ioctl.c due to the use of the new
    mnt_drop_write_file() helper.

    Linus Torvalds
     
  • Similar to SIGNATURE, rename INTEGRITY_DIGSIG to INTEGRITY_SIGNATURE.

    Signed-off-by: Dmitry Kasatkin
    Signed-off-by: James Morris

    Dmitry Kasatkin
     
  • As modules are expected to select MPILIB, MPILIB_EXTRA, and SIGNATURE,
    removed Kconfig prompts.

    Requested-by: Linus Torvalds
    Signed-off-by: Dmitry Kasatkin
    Signed-off-by: James Morris

    Dmitry Kasatkin
     
  • It was reported that description of the MPILIB_EXTRA is confusing.
    Indeed it was copy-paste typo. It is fixed here.

    Reported-by: Valdis Kletnieks
    Signed-off-by: Dmitry Kasatkin
    Signed-off-by: James Morris

    Dmitry Kasatkin
     
  • Randy Dunlap reported build break:

    ERROR: "crypto_alloc_shash" [lib/digsig.ko] undefined!
    ERROR: "crypto_shash_final" [lib/digsig.ko] undefined!
    ERROR: "crypto_shash_update" [lib/digsig.ko] undefined!
    ERROR: "crypto_destroy_tfm" [lib/digsig.ko] undefined!

    Added CRYPTO dependency and selected SHA1 algorithm.

    Reported-by: Randy Dunlap
    Signed-off-by: Dmitry Kasatkin
    Signed-off-by: James Morris

    Dmitry Kasatkin
     
  • It was reported that DIGSIG is confusing name for digital signature
    module. It was suggested to rename DIGSIG to SIGNATURE.

    Requested-by: Linus Torvalds
    Suggested-by: Pavel Machek
    Signed-off-by: Dmitry Kasatkin
    Signed-off-by: James Morris

    Dmitry Kasatkin
     
  • Enabling CONFIG_PROVE_RCU and CONFIG_SPARSE_RCU_POINTER resulted in
    "suspicious rcu_dereference_check() usage!" and "incompatible types
    in comparison expression (different address spaces)" messages.

    Access the masterkey directly when holding the rwsem.

    Changelog v1:
    - Use either rcu_read_lock()/rcu_derefence_key()/rcu_read_unlock()
    or remove the unnecessary rcu_derefence() - David Howells

    Reported-by: Dmitry Kasatkin
    Signed-off-by: Mimi Zohar
    Signed-off-by: David Howells
    Signed-off-by: James Morris

    Mimi Zohar
     
  • Define rcu_assign_keypointer(), which uses the key payload.rcudata instead
    of payload.data, to resolve the CONFIG_SPARSE_RCU_POINTER message:
    "incompatible types in comparison expression (different address spaces)"

    Replace the rcu_assign_pointer() calls in encrypted/trusted keys with
    rcu_assign_keypointer().

    Signed-off-by: Mimi Zohar
    Signed-off-by: David Howells
    Signed-off-by: James Morris

    Mimi Zohar
     
  • Add missing smp_rmb() primitives to the keyring search code.

    When keyring payloads are appended to without replacement (thus using up spare
    slots in the key pointer array), an smp_wmb() is issued between the pointer
    assignment and the increment of the key count (nkeys).

    There should be corresponding read barriers between the read of nkeys and
    dereferences of keys[n] when n is dependent on the value of nkeys.

    Signed-off-by: David Howells
    Reviewed-by: Paul E. McKenney
    Signed-off-by: James Morris

    David Howells
     
  • TOMOYO 2.5 in Linux 3.2 and later handles Unix domain socket's address.
    Thus, tomoyo_correct_word2() needs to accept \000 as a valid character, or
    TOMOYO 2.5 cannot handle Unix domain's abstract socket address.

    Reported-by: Steven Allen
    Signed-off-by: Tetsuo Handa
    CC: stable@vger.kernel.org [3.2+]
    Signed-off-by: James Morris

    Tetsuo Handa
     
  • This set of build failures just started appearing on parisc:

    In file included from drivers/input/serio/serio_raw.c:12:
    include/linux/kref.h: In function 'kref_get':
    include/linux/kref.h:40: error: 'TAINT_WARN' undeclared (first use in this function)
    include/linux/kref.h:40: error: (Each undeclared identifier is reported only once
    include/linux/kref.h:40: error: for each function it appears in.)
    include/linux/kref.h: In function 'kref_sub':
    include/linux/kref.h:65: error: 'TAINT_WARN' undeclared (first use in this function)

    It happens because TAINT_WARN is defined in kernel.h and this particular
    compile doesn't seem to include it (no idea why it's just manifesting ..
    probably some #include file untangling exposed it).

    Fix by adding

    #include

    to linux/kref.h

    Signed-off-by: James Bottomley
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    James Bottomley
     
  • Update MAINTAINERS file with new git repo:
    git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git

    Signed-off-by: James Morris

    James Morris
     
  • Jüri Aedla reported that the /proc//mem handling really isn't very
    robust, and it also doesn't match the permission checking of any of the
    other related files.

    This changes it to do the permission checks at open time, and instead of
    tracking the process, it tracks the VM at the time of the open. That
    simplifies the code a lot, but does mean that if you hold the file
    descriptor open over an execve(), you'll continue to read from the _old_
    VM.

    That is different from our previous behavior, but much simpler. If
    somebody actually finds a load where this matters, we'll need to revert
    this commit.

    I suspect that nobody will ever notice - because the process mapping
    addresses will also have changed as part of the execve. So you cannot
    actually usefully access the fd across a VM change simply because all
    the offsets for IO would have changed too.

    Reported-by: Jüri Aedla
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • audit_log_d_path() injects an additional space before the prefix,
    which serves no purpose and doesn't mix well with other audit_log*()
    functions that do not sneak extra characters into the log.

    Signed-off-by: Kees Cook
    Signed-off-by: Eric Paris

    Kees Cook
     
  • The use of s_id should go through the untrusted string path, just to be
    extra careful.

    Signed-off-by: Kees Cook
    Acked-by: Mimi Zohar
    Signed-off-by: Eric Paris

    Kees Cook
     
  • In the loop, a size_t "len" is used to hold the return value of
    audit_log_single_execve_arg(), which returns -1 on error. In that
    case the error handling (len
    Signed-off-by: Eric Paris

    Xi Wang
     
  • This allows audit to specify rules in which we compare two fields of a
    process. Such as is the running process uid != to the running process
    euid?

    Signed-off-by: Peter Moody
    Signed-off-by: Eric Paris

    Peter Moody
     
  • This completes the matrix of interfield comparisons between uid/gid
    information for the current task and the uid/gid information for inodes.
    aka I can audit based on differences between the euid of the process and
    the uid of fs objects.

    Signed-off-by: Peter Moody
    Signed-off-by: Eric Paris

    Peter Moody
     
  • Allow audit rules to compare the gid of the running task to the gid of the
    inode in question.

    Signed-off-by: Eric Paris

    Eric Paris
     
  • Rather than code the same loop over and over implement a helper function which
    uses some pointer magic to make it generic enough to be used numerous places
    as we implement more audit interfield comparisons

    Signed-off-by: Eric Paris

    Eric Paris
     
  • We wish to be able to audit when a uid=500 task accesses a file which is
    uid=0. Or vice versa. This patch introduces a new audit filter type
    AUDIT_FIELD_COMPARE which takes as an 'enum' which indicates which fields
    should be compared. At this point we only define the task->uid vs
    inode->uid, but other comparisons can be added.

    Signed-off-by: Eric Paris

    Eric Paris
     
  • This patch provides functionality to audit system call events on the
    ARM platform. The implementation was based off the structure of the
    MIPS platform and information in this
    (http://lists.fedoraproject.org/pipermail/arm/2009-October/000382.html)
    mailing list thread. The required audit_syscall_exit and
    audit_syscall_entry checks were added to ptrace using the standard
    registers for system call values (r0 through r3). A thread information
    flag was added for auditing (TIF_SYSCALL_AUDIT) and a meta-flag was
    added (_TIF_SYSCALL_WORK) to simplify modifications to the syscall
    entry/exit. Now, if either the TRACE flag is set or the AUDIT flag is
    set, the syscall_trace function will be executed. The prober changes
    were made to Kconfig to allow CONFIG_AUDITSYSCALL to be enabled.

    Due to platform availability limitations, this patch was only tested
    on the Android platform running the modified "android-goldfish-2.6.29"
    kernel. A test compile was performed using Code Sourcery's
    cross-compilation toolset and the current linux-3.0 stable kernel. The
    changes compile without error. I'm hoping, due to the simple modifications,
    the patch is "obviously correct".

    Signed-off-by: Nathaniel Husted
    Signed-off-by: Eric Paris

    Nathaniel Husted
     
  • Just a code cleanup really. We don't need to make a function call just for
    it to return on error. This also makes the VFS function even easier to follow
    and removes a conditional on a hot path.

    Signed-off-by: Eric Paris

    Eric Paris