Skip to content
  1. Dec 13, 2013
    • Linus Torvalds's avatar
      Merge tag 'keys-devel-20131210' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · 5dec682c
      Linus Torvalds authored
      Pull misc keyrings fixes from David Howells:
       "These break down into five sets:
      
         - A patch to error handling in the big_key type for huge payloads.
           If the payload is larger than the "low limit" and the backing store
           allocation fails, then big_key_instantiate() doesn't clear the
           payload pointers in the key, assuming them to have been previously
           cleared - but only one of them is.
      
           Unfortunately, the garbage collector still calls big_key_destroy()
           when sees one of the pointers with a weird value in it (and not
           NULL) which it then tries to clean up.
      
         - Three patches to fix the keyring type:
      
           * A patch to fix the hash function to correctly divide keyrings off
             from keys in the topology of the tree inside the associative
             array.  This is only a problem if searching through nested
             keyrings - and only if the hash function incorrectly puts the a
             keyring outside of the 0 branch of the root node.
      
           * A patch to fix keyrings' use of the associative array.  The
             __key_link_begin() function initially passes a NULL key pointer
             to assoc_array_insert() on the basis that it's holding a place in
             the tree whilst it does more allocation and stuff.
      
             This is only a problem when a node contains 16 keys that match at
             that level and we want to add an also matching 17th.  This should
             easily be manufactured with a keyring full of keyrings (without
             chucking any other sort of key into the mix) - except for (a)
             above which makes it on average adding the 65th keyring.
      
           * A patch to fix searching down through nested keyrings, where any
             keyring in the set has more than 16 keyrings and none of the
             first keyrings we look through has a match (before the tree
             iteration needs to step to a more distal node).
      
           Test in keyutils test suite:
      
              http://git.kernel.org/cgit/linux/kernel/git/dhowells/keyutils.git/commit/?id=8b4ae963ed92523aea18dfbb8cab3f4979e13bd1
      
         - A patch to fix the big_key type's use of a shmem file as its
           backing store causing audit messages and LSM check failures.  This
           is done by setting S_PRIVATE on the file to avoid LSM checks on the
           file (access to the shmem file goes through the keyctl() interface
           and so is gated by the LSM that way).
      
           This isn't normally a problem if a key is used by the context that
           generated it - and it's currently only used by libkrb5.
      
           Test in keyutils test suite:
      
              http://git.kernel.org/cgit/linux/kernel/git/dhowells/keyutils.git/commit/?id=d9a53cbab42c293962f2f78f7190253fc73bd32e
      
         - A patch to add a generated file to .gitignore.
      
         - A patch to fix the alignment of the system certificate data such
           that it it works on s390.  As I understand it, on the S390 arch,
           symbols must be 2-byte aligned because loading the address discards
           the least-significant bit"
      
      * tag 'keys-devel-20131210' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        KEYS: correct alignment of system_certificate_list content in assembly file
        Ignore generated file kernel/x509_certificate_list
        security: shmem: implement kernel private shmem inodes
        KEYS: Fix searching of nested keyrings
        KEYS: Fix multiple key add into associative array
        KEYS: Fix the keyring hash function
        KEYS: Pre-clear struct key on allocation
      5dec682c
    • Linus Torvalds's avatar
      Merge tag 'xfs-for-linus-v3.13-rc4' of git://oss.sgi.com/xfs/xfs · 48a2f0b2
      Linus Torvalds authored
      Pull xfs bugfixes from Ben Myers:
      
       - fix for buffer overrun in agfl with growfs on v4 superblock
      
       - return EINVAL if requested discard length is less than a block
      
       - fix possible memory corruption in xfs_attrlist_by_handle()
      
      * tag 'xfs-for-linus-v3.13-rc4' of git://oss.sgi.com/xfs/xfs:
        xfs: growfs overruns AGFL buffer on V4 filesystems
        xfs: don't perform discard if the given range length is less than block size
        xfs: underflow bug in xfs_attrlist_by_handle()
      48a2f0b2
    • Linus Torvalds's avatar
      futex: move user address verification up to common code · 5cdec2d8
      Linus Torvalds authored
      
      
      When debugging the read-only hugepage case, I was confused by the fact
      that get_futex_key() did an access_ok() only for the non-shared futex
      case, since the user address checking really isn't in any way specific
      to the private key handling.
      
      Now, it turns out that the shared key handling does effectively do the
      equivalent checks inside get_user_pages_fast() (it doesn't actually
      check the address range on x86, but does check the page protections for
      being a user page).  So it wasn't actually a bug, but the fact that we
      treat the address differently for private and shared futexes threw me
      for a loop.
      
      Just move the check up, so that it gets done for both cases.  Also, use
      the 'rw' parameter for the type, even if it doesn't actually matter any
      more (it's a historical artifact of the old racy i386 "page faults from
      kernel space don't check write protections").
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5cdec2d8
    • Linus Torvalds's avatar
      futex: fix handling of read-only-mapped hugepages · f12d5bfc
      Linus Torvalds authored
      The hugepage code had the exact same bug that regular pages had in
      commit 7485d0d3 ("futexes: Remove rw parameter from
      get_futex_key()").
      
      The regular page case was fixed by commit 9ea71503 ("futex: Fix
      regression with read only mappings"), but the transparent hugepage case
      (added in a5b338f2
      
      : "thp: update futex compound knowledge") case
      remained broken.
      
      Found by Dave Jones and his trinity tool.
      
      Reported-and-tested-by: default avatarDave Jones <davej@fedoraproject.org>
      Cc: stable@kernel.org # v2.6.38+
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Darren Hart <dvhart@linux.intel.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f12d5bfc
  2. Dec 11, 2013
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · 9538e100
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
       "Drop the unnecessary miscdevice.h includes that we forgot in commit
        487722cf ("watchdog: Get rid of MODULE_ALIAS_MISCDEV statements")
        and fix an oops for the sc1200_wdt driver"
      
      * git://www.linux-watchdog.org/linux-watchdog:
        sc1200_wdt: Fix oops
        watchdog: Drop unnecessary include of miscdevice.h
      9538e100
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 · 5e0af24c
      Linus Torvalds authored
      Pull AVR32 fixes from Hans-Christian Egtvedt.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
        avr32: favr-32: clk_round_rate() can return a zero upon error
        avr32: remove deprecated IRQF_DISABLED
        cpufreq_ at32ap-cpufreq.c: Fix section mismatch
        avr32: pm: Fix section mismatch
        avr32: Kill CONFIG_MTD_PARTITIONS
      5e0af24c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 22056614
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "One patch to increase the number of possible CPUs to 256, with the
        latest machine a single LPAR can have up to 101 CPUs.  Plus a number
        of bug fixes, the clock_gettime patch fixes a regression added in the
        3.13 merge window"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/time,vdso: fix clock_gettime for CLOCK_MONOTONIC
        s390/vdso: ectg gettime support for CLOCK_THREAD_CPUTIME_ID
        s390/vdso: fix access-list entry initialization
        s390: increase CONFIG_NR_CPUS limit
        s390/smp,sclp: fix size of sclp_cpu_info structure
        s390/sclp: replace uninitialized early_event_mask_sccb variable with sccb_early
        s390/dasd: fix memory leak caused by dangling references to request_queue
      22056614
    • Hendrik Brueckner's avatar
      KEYS: correct alignment of system_certificate_list content in assembly file · 62226983
      Hendrik Brueckner authored
      
      
      Apart from data-type specific alignment constraints, there are also
      architecture-specific alignment requirements.
      For example, on s390 symbols must be on even addresses implying a 2-byte
      alignment.  If the system_certificate_list_end symbol is on an odd address
      and if this address is loaded, the least-significant bit is ignored.  As a
      result, the load_system_certificate_list() fails to load the certificates
      because of a wrong certificate length calculation.
      
      To be safe, align system_certificate_list on an 8-byte boundary.  Also improve
      the length calculation of the system_certificate_list content.  Introduce a
      system_certificate_list_size (8-byte aligned because of unsigned long) variable
      that stores the length.  Let the linker calculate this size by introducing
      a start and end label for the certificate content.
      
      Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      62226983
    • Rusty Russell's avatar
      Ignore generated file kernel/x509_certificate_list · 7cfe5b33
      Rusty Russell authored
      
      
      $ git status
      # On branch pending-rebases
      # Untracked files:
      #   (use "git add <file>..." to include in what will be committed)
      #
      #	kernel/x509_certificate_list
      nothing added to commit but untracked files present (use "git add" to track)
      $
      
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      7cfe5b33
    • Dave Chinner's avatar
      xfs: growfs overruns AGFL buffer on V4 filesystems · f94c4457
      Dave Chinner authored
      This loop in xfs_growfs_data_private() is incorrect for V4
      superblocks filesystems:
      
      		for (bucket = 0; bucket < XFS_AGFL_SIZE(mp); bucket++)
      			agfl->agfl_bno[bucket] = cpu_to_be32(NULLAGBLOCK);
      
      For V4 filesystems, we don't have a agfl header structure, and so
      XFS_AGFL_SIZE() returns an entire sector's worth of entries, which
      we then index from an offset into the sector. Hence: buffer overrun.
      
      This problem was introduced in 3.10 by commit 77c95bba
      
       ("xfs: add
      CRC checks to the AGFL") which changed the AGFL structure but failed
      to update the growfs code to handle the different structures.
      
      Fix it by using the correct offset into the buffer for both V4 and
      V5 filesystems.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarJie Liu <jeff.liu@oracle.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit b7d961b3)
      f94c4457
    • Jie Liu's avatar
      xfs: don't perform discard if the given range length is less than block size · 2f42d612
      Jie Liu authored
      
      
      For discard operation, we should return EINVAL if the given range length
      is less than a block size, otherwise it will go through the file system
      to discard data blocks as the end range might be evaluated to -1, e.g,
      # fstrim -v -o 0 -l 100 /xfs7
      /xfs7: 9811378176 bytes were trimmed
      
      This issue can be triggered via xfstests/generic/288.
      
      Also, it seems to get the request queue pointer via bdev_get_queue()
      instead of the hard code pointer dereference is not a bad thing.
      
      Signed-off-by: default avatarJie Liu <jeff.liu@oracle.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit f9fd0135)
      2f42d612
  3. Dec 10, 2013
  4. Dec 09, 2013
    • Tom Lendacky's avatar
      crypto: scatterwalk - Use sg_chain_ptr on chain entries · 389a5390
      Tom Lendacky authored
      
      
      Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page
      call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is
      enabled. Use sg_chain_ptr instead of sg_page on a chain entry.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      389a5390
    • Linus Torvalds's avatar
      Merge tag 'tty-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 3f02ff5c
      Linus Torvalds authored
      Pull tty fix from Greg KH:
       "Here is a single n_tty fix for 3.13-rc3 that resolves a regression in
        3.12 that has been reported"
      
      * tag 'tty-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        n_tty: Fix missing newline echo
      3f02ff5c
    • Linus Torvalds's avatar
      Merge tag 'staging-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 2d4d4a8d
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are some bugfixes for the staging and IIO drivers for 3.13-rc3.
      
        The resolve the vm memory issue in the tidspbridge driver, fix a
        much-reported build failure in an ARM driver, and some other IIO
        bugfixes that have been reported"
      
      * tag 'staging-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        Staging: TIDSPBRIDGE: Use vm_iomap_memory for mmap-ing instead of remap_pfn_range
        Fix build failure for gp2ap020a00f.c
        iio: hid-sensors: Fix power and report state
        HID: hid-sensor-hub: Add logical min and max
      2d4d4a8d
    • Linus Torvalds's avatar
      Merge tag 'char-misc-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · f64001ef
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Nothing huge, just a few small bugfixes for problems reported, and a
        device id update"
      
      * tag 'char-misc-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        mei: add 9 series PCH mei device ids
        drivers/char/i8k.c: add Dell XPLS L421X
        MAINTAINERS: add HSI subsystem
        misc: mic: Suppress memory space sparse warnings
        misc: mic: Fix endianness issues.
        misc: mic: Fix user space namespace pollution from mic_common.h.
        misc: mic: Bug fix for sysfs poll usage.
        misc: mic: Minor bug fix in 'retry' loops.
        misc: mic: Change mic_notify(...) to return true.
        extcon: remove freed groups caused the panic or warning in unregister flow
        extcon: arizona: Get pdata from arizona structure not device
      f64001ef
    • Linus Torvalds's avatar
      Merge tag 'usb-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · b19d69c7
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a bunch of USB fixes for 3.13-rc3.
      
        Nothing major, but we seem to have an argument about a XHCI fix, so
        I'm not including a revert that Sarah requested, because that breaks a
        USB network driver, and I can't revert the USB network driver fix
        without reintroducing other bugs that it fixed.  So as it is,
        everything should now be working.  Worse case, I can revert the XHCI
        fix before 3.13-final is out, but it seems to work well here with my
        testing, so all should be good.
      
        Other than that, some driver updates based on reports"
      
      * tag 'usb-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (40 commits)
        usb: hub: Use correct reset for wedged USB3 devices that are NOTATTACHED
        usb: ohci-pxa27x: include linux/dma-mapping.h
        USB: cdc-acm: Added support for the Lenovo RD02-D400 USB Modem
        usb: tools: fix a regression issue that gcc can't link to pthread
        USB: switch maintainership of chipidea to Peter
        USB: pl2303: fixed handling of CS5 setting
        USB: ftdi_sio: fixed handling of unsupported CSIZE setting
        USB: mos7840: correct handling of CS5 setting
        USB: spcp8x5: correct handling of CS5 setting
        usb: wusbcore: fix deadlock in wusbhc_gtk_rekey
        usb: wusbcore: do device lookup while holding the hc mutex
        usb: wusbcore: send keepalives to unauthenticated devices
        USB: option: support new huawei devices
        USB: serial: option: blacklist interface 1 for Huawei E173s-6
        usb: xhci: Link TRB must not occur within a USB payload burst
        usb: gadget: f_mass_storage: call try_to_freeze only when its safe
        usb: gadget: tcm_usb_gadget: mark bot_cleanup_old_alt static
        usb: gadget: ffs: fix sparse warning
        usb: gadget: zero: module parameters can be static
        usb: gadget: storage: fix sparse warning
        ...
      b19d69c7