Commits on Apr 1, 2015
  1. @wildea01

    kvmtool: Add minimal support for macvtap

    In order to be useable by kvmtool, a macvtap interface requires
    some minimal configuration (basically setting up the offload bits).
    This requires skipping some of the low level TUN/TAP setup.
    
    To avoid adding yet another option, we extend the 'tapif' option
    to detect the use of a file (such as /dev/tap23).
    
    Assuming you've run the following as root:
    
    	# ip link add link eth0 name kvmtap0 type macvtap mode bridge
    	# chgrp kvm /dev/tap$(< /sys/class/net/kvmtap0/ifindex)
    	# chmod g+rw /dev/tap$(< /sys/class/net/kvmtap0/ifindex)
    
    it is fairly easy to have a script that does the following:
    
    	#!/bin/sh
    	addr=$(< /sys/class/net/kvmtap0/address)
    	tap=/dev/tap$(< /sys/class/net/kvmtap0/ifindex)
    
    	kvmtool/lkvm run --console virtio			\
    		-k /boot/zImage					\
    		-p "console=hvc0 earlyprintk"			\
    		-n trans=mmio,mode=tap,tapif=$tap,guest_mac=$addr
    
    and you now have your VM running, directly attached to the network.
    
    This patch also removes the TUNSETNOCSUM ioctl that has declared
    obsolete for quite some time now...
    
    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Marc Zyngier committed with wildea01 Mar 27, 2015
Commits on Jan 16, 2015
  1. @wildea01

    kvmtool: virtio-9p: Convert EMFILE error at the server to ENFILE for …

    …the guest
    
    If an open at the 9p server(host) fails with EMFILE (Too many open files for
    the process), we should return ENFILE(too many open files in the system) to
    the guest to indicate the actual status within the guest.
    
    This was uncovered during LTP, where getdtablesize01 fails to open the maximum
    number-open-files.
    
    getdtablesize01    0  TINFO  :  Maximum number of files a process can have opened is 1024
    getdtablesize01    0  TINFO  :  Checking with the value returned by getrlimit...RLIMIT_NOFILE
    getdtablesize01    1  TPASS  :  got correct dtablesize, value is 1024
    getdtablesize01    0  TINFO  :  Checking Max num of files that can be opened by a process.Should be: RLIMIT_NOFILE - 1
    getdtablesize01    2  TFAIL  :  getdtablesize01.c:102: 974 != 1023
    
    For a more practial impact:
    
     # ./getdtablesize01 &
    [1] 1834
     getdtablesize01    0  TINFO  :  Maximum number of files a process can have opened is 1024
     getdtablesize01    0  TINFO  :  Checking with the value returned by getrlimit...RLIMIT_NOFILE
     getdtablesize01    1  TPASS  :  got correct dtablesize, value is 1024
     getdtablesize01    0  TINFO  :  Checking Max num of files that can be opened by a process.Should be: RLIMIT_NOFILE - 1
     getdtablesize01    2  TFAIL  :  getdtablesize01.c:102: 974 != 1023
     [--- Modified to sleep indefinitely, without closing the files --- ]
    
     # ls
     bash: /bin/ls: Too many open files
    
    That gives a wrong error message for the bash, when getdtablesize01 has exhausted the system
    wide limits, giving false indicators.
    
    With the fix, we get :
    
     # ls
     bash: /bin/ls: Too many open files in system
    
    Acked-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Suzuki K. Poulose committed with wildea01 Jan 16, 2015
  2. @wildea01

    kvmtool: remove 8250 IRQ line reset on device_init

    Currently we reset the KVM interrupt line on initializing the 8250
    serial device emulation.
    For ARM this creates a problem where we use the in-kernel IRQ chip
    before having fully initialized it. But with the new kernel interface
    we cannot finish the GIC initialization before we know the number of
    used IRQs, so we have to wait until all devices have been created and
    initialized.
    Since the in-kernel GIC emulation resets the IRQ line anyway and also
    QEMU gets away without resetting it, the easiest solution is to drop
    the IRQ line reset.
    
    Signed-off-by: Andre Przywara <andre.przywara@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Andre Przywara committed with wildea01 Jan 9, 2015
  3. @wildea01

    Merge tag 'v3.18' into kvmtool/master

    Linux 3.18
    wildea01 committed Jan 16, 2015
Commits on Dec 17, 2014
  1. @wildea01

    kvmtool: remove warning about bzImage on non-x86 architectures

    Among the architectures supported by kvmtool, only x86 defines a
    bzImage format. So we shouldn't bother users of other architectures
    with a message about something that cannot work.
    Make the bzImage check dependent on compiling for x86.
    
    Signed-off-by: Andre Przywara <andre.przywara@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Andre Przywara committed with wildea01 Dec 17, 2014
  2. @wildea01

    kvmtool: ARM: advertise 8250 IRQs as level-triggered

    Both the 16550/8250 UART emulation in kvmtool as well as all the
    drivers and DTBs for real hardware use level triggered interrutpts.
    But the device tree currently describes them as being edge triggered,
    which can lead to hangs in guests.
    Use the new IRQ type parameter to properly describe the interrupts.
    This goes along the lines of a similar QEMU patch:
    http://git.qemu.org/?p=qemu.git;a=commitdiff;h=0be969a2d974971628fc4ed95834d22ecf0fd497
    
    Signed-off-by: Andre Przywara <andre.przywara@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Andre Przywara committed with wildea01 Dec 17, 2014
  3. @wildea01

    kvmtool: ARM: allow level interrupts in device tree

    Currently we describe every interrupt for each device in the FDT
    as being edge triggered.
    Add a parameter to the irq property generation to allow devices to
    specify their interrupts as level triggered if needed.
    
    Signed-off-by: Andre Przywara <andre.przywara@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Andre Przywara committed with wildea01 Dec 17, 2014
  4. @wildea01

    kvmtool: replace GIC specific IRQ type #defines

    We had GIC specific defines for the IRQ type identifiers in kvmtool.
    But in fact the specification of being a level or edge interrupt
    is quite generic, with the GIC binding using the generic Linux
    defines.
    So lets replace the GIC specific #defines in favour of the more
    general names copied from Linux' include/linux/irq.h.
    
    Signed-off-by: Andre Przywara <andre.przywara@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Andre Przywara committed with wildea01 Dec 17, 2014
  5. @wildea01

    kvmtool: ARM: fix initrd functionality

    lkvm -i is currently broken on ARM/ARM64.
    We should not try to convert smaller-than-4GB addresses into 64-bit
    big endian and then stuff them into u32 variables if we expect to read
    anything other than 0 out of it.
    Adjust the type to u64 to write the proper address in BE format into
    the /chosen node (and also match the address size we formely posted)
    and let Linux thus read the right values.
    This fixes initrd functionality for ARM and ARM64 guests.
    
    Signed-off-by: Andre Przywara <andre.przywara@arm.com>
    Acked-by: Marc Zyngier <marc.zyngier@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Andre Przywara committed with wildea01 Dec 17, 2014
  6. @wildea01

    Use the arch default transport method for network

    lkvm by default sets up a virtio-pci transport for network, if none is
    specified. This can be a problem on archs (e.g ARM64), where virtio-pci is
    not supported yet and cause the following warning at exit.
    
      # KVM compatibility warning.
    	virtio-net device was not detected.
    
    This patch changes it to make use of the default transport method for the
    architecture when none is specified. This will ensure that on every arch
    we get the network up by default in the VM.
    
    Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
    Acked-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Suzuki K. Poulose committed with wildea01 Dec 16, 2014
Commits on Dec 7, 2014
  1. @torvalds

    Linux 3.18

    torvalds committed Dec 7, 2014
  2. @torvalds

    Merge branch 'for-3.18-fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/tj/libata
    
    Pull libata fixes from Tejun Heo:
     "Three libata fixes for v3.18.  Nothing too interesting.  PCI ID ID and
      quirk additions to ahci and an error handling path fix in sata_fsl"
    
    * 'for-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
      ahci: disable MSI on SAMSUNG 0xa800 SSD
      sata_fsl: fix error handling of irq_of_parse_and_map
      AHCI: Add DeviceIDs for Sunrise Point-LP SATA controller
    torvalds committed Dec 7, 2014
Commits on Dec 6, 2014
  1. @torvalds

    Merge git://www.linux-watchdog.org/linux-watchdog

    Pull watchdog fix from Wim Van Sebroeck:
     "Fix the watchdog mask bit offset for Exynos7"
    
    * git://www.linux-watchdog.org/linux-watchdog:
      watchdog: s3c2410_wdt: Fix the mask bit offset for Exynos7
    torvalds committed Dec 6, 2014
  2. @torvalds

    Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/wsa/linux
    
    Pull i2c fixes from Wolfram Sang:
     "Here are two more driver bugfixes for I2C which would be good to have"
    
    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      i2c: cadence: Set the hardware time-out register to maximum value
      i2c: davinci: generate STP always when NACK is received
    torvalds committed Dec 6, 2014
Commits on Dec 5, 2014
  1. watchdog: s3c2410_wdt: Fix the mask bit offset for Exynos7

    The watchdog mask bit offset listed for Exynos7 is incorrect.
    Fix this.
    
    Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
    Acked-by: Naveen Krishna Chatradhi <naveenkrishna.ch@gmail.com
    Reviewd-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
    Abhilash Kesavan committed with Wim Van Sebroeck Oct 17, 2014
  2. @torvalds

    Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/tip/tip
    
    Pull x86 fixes from Thomas Gleixner:
     "Two final fixlets for 3.18:
       - Prevent microcode reload wreckage on 32bit
       - Unbreak cross compilation"
    
    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      x86, microcode: Limit the microcode reloading to 64-bit for now
      x86: Use $(OBJDUMP) instead of plain objdump
    torvalds committed Dec 5, 2014
  3. @torvalds

    Merge tag 'sound-3.18' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/tiwai/sound
    
    Pull sound fixlet from Takashi Iwai:
     "Just one commit for adding a copule of HD-audio quirk entries"
    
    * tag 'sound-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
      ALSA: hda/realtek - Add headset Mic support for new Dell machine
    torvalds committed Dec 5, 2014
  4. @torvalds

    Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

    Pull drm intel fixes from Dave Airlie:
     "Two intel stable fixes, that should be it from me for this round"
    
    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
      drm/i915: Unlock panel even when LVDS is disabled
      drm/i915: More cautious with pch fifo underruns
    torvalds committed Dec 4, 2014
  5. @torvalds

    Merge tag 'pm+acpi-3.18-rc8' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/rafael/linux-pm
    
    Pull ACPI backlight fix from Rafael Wysocki:
     "This is a simple fix for an ACPI backlight regression introduced by a
      recent commit that overlooked a corner case which should have been
      taken into account"
    
    * tag 'pm+acpi-3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      ACPI / video: update condition to check if device is in _DOD list
    torvalds committed Dec 4, 2014
  6. Merge tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.o…

    …rg/drm-intel into drm-fixes
    
    Silence some pch fifo underrun reports and panel locking backtraces,
    both cc: stable.
    
    * tag 'drm-intel-fixes-2014-12-04' of git://anongit.freedesktop.org/drm-intel:
      drm/i915: Unlock panel even when LVDS is disabled
      drm/i915: More cautious with pch fifo underruns
    Dave Airlie committed Dec 5, 2014
  7. @torvalds

    Merge tag 'media/v3.18-rc8' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/mchehab/linux-media
    
    Pull media fixes from Mauro Carvalho Chehab:
     "A core fix and some driver fixes:
       - regression fix in Remote Controller core affecting RC6 protocol
         handling
       - fix video buffer handling in cx23885
       - race fix in solo6x10
       - fix image selection in smiapp
       - fix reported payload size on s2255drv
       - two updates for MAINTAINERS file"
    
    * tag 'media/v3.18-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
      [media] rc-core: fix toggle handling in the rc6 decoder
      MAINTAINERS: Update mchehab's addresses
      [media] cx23885: use sg = sg_next(sg) instead of sg++
      [media] s2255drv: fix payload size for JPG, MJPEG
      [media] Update MAINTAINERS for solo6x10
      [media] solo6x10: fix a race in IRQ handler
      [media] smiapp: Only some selection targets are settable
    torvalds committed Dec 4, 2014
Commits on Dec 4, 2014
  1. @masahir0y @torvalds

    uapi: fix to export linux/vm_sockets.h

    A typo "header=y" was introduced by commit 7071cf7 ("uapi: add
    missing network related headers to kbuild").
    
    Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
    Cc: Stephen Hemminger <stephen@networkplumber.org>
    Cc: David Miller <davem@davemloft.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    masahir0y committed with torvalds Dec 4, 2014
  2. i2c: cadence: Set the hardware time-out register to maximum value

    Cadence I2C controller has bug wherein it generates invalid read transactions
    after timeout in master receiver mode. This driver does not use the HW
    timeout and this interrupt is disabled but the feature itself cannot be
    disabled. Hence, this patch writes the maximum value (0xFF) to this register.
    This is one of the workarounds to this bug and it will not avoid the issue
    completely but reduces the chances of error.
    
    Signed-off-by: Vishnu Motghare <vishnum@xilinx.com>
    Signed-off-by: Harini Katakam <harinik@xilinx.com>
    Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
    Cc: stable@kernel.org
    Vishnu Motghare committed with Wolfram Sang Dec 3, 2014
  3. @grygoriyS

    i2c: davinci: generate STP always when NACK is received

    According to I2C specification the NACK should be handled as follows:
    "When SDA remains HIGH during this ninth clock pulse, this is defined as the Not
    Acknowledge signal. The master can then generate either a STOP condition to
    abort the transfer, or a repeated START condition to start a new transfer."
    [I2C spec Rev. 6, 3.1.6: http://www.nxp.com/documents/user_manual/UM10204.pdf]
    
    Currently the Davinci i2c driver interrupts the transfer on receipt of a
    NACK but fails to send a STOP in some situations and so makes the bus
    stuck until next I2C IP reset (idle/enable).
    
    For example, the issue will happen during SMBus read transfer which
    consists from two i2c messages write command/address and read data:
    
    S Slave Address Wr A Command Code A Sr Slave Address Rd A D1..Dn A P
    <--- write -----------------------> <--- read --------------------->
    
    The I2C client device will send NACK if it can't recognize "Command Code"
    and it's expected from I2C master to generate STP in this case.
    But now, Davinci i2C driver will just exit with -EREMOTEIO and STP will
    not be generated.
    
    Hence, fix it by generating Stop condition (STP) always when NACK is received.
    
    This patch fixes Davinci I2C in the same way it was done for OMAP I2C
    commit cda2109 ("i2c: omap: query STP always when NACK is received").
    
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Reported-by: Hein Tibosch <hein_tibosch@yahoo.es>
    Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
    Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
    Cc: stable@kernel.org
    grygoriyS committed with Wolfram Sang Dec 1, 2014
  4. @htejun

    ahci: disable MSI on SAMSUNG 0xa800 SSD

    Just like 0x1600 which got blacklisted by 66a7cbc ("ahci: disable
    MSI instead of NCQ on Samsung pci-e SSDs on macbooks"), 0xa800 chokes
    on NCQ commands if MSI is enabled.  Disable MSI.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Dominik Mierzejewski <dominik@greysector.net>
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=89171
    Cc: stable@vger.kernel.org
    htejun committed Dec 4, 2014
  5. @amluto @torvalds

    context_tracking: Restore previous state in schedule_user

    It appears that some SCHEDULE_USER (asm for schedule_user) callers
    in arch/x86/kernel/entry_64.S are called from RCU kernel context,
    and schedule_user will return in RCU user context.  This causes RCU
    warnings and possible failures.
    
    This is intended to be a minimal fix suitable for 3.18.
    
    Reported-and-tested-by: Dave Jones <davej@redhat.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Frédéric Weisbecker <fweisbec@gmail.com>
    Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    amluto committed with torvalds Dec 3, 2014
Commits on Dec 3, 2014
  1. @torvalds

    Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/wsa/linux
    
    Pull i2c bugfixes from Wolfram Sang:
     "A few driver bugfixes for 3.18"
    
    * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      i2c: omap: fix i207 errata handling
      i2c: designware: prevent early stop on TX FIFO empty
      i2c: omap: fix NACK and Arbitration Lost irq handling
    torvalds committed Dec 3, 2014
  2. @torvalds

    Merge tag 'pci-v3.18-fixes-4' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/helgaas/pci
    
    Pull PCI fix from Bjorn Helgaas:
     "This fixes a Tegra20 regression that we introduced during the v3.18
      merge window"
    
    * tag 'pci-v3.18-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
      PCI: tegra: Use physical range for I/O mapping
    torvalds committed Dec 3, 2014
  3. @torvalds

    Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/glikely/linux
    
    Pull devicetree bugfix from Grant Likely:
     "One more bug fix for v3.18.  I debated whether or not to send you this
      merge request because we're at such a late rc.  The bug isn't critical
      in that there is only one system known to be affected and the patch is
      easy to backport.  The codepath is used by pretty much every DT based
      system, so there is risk a of regression (it /should/ be safe, but
      I've been bitten by stuff that should be safe before).  I've had it in
      linux-next for a week and haven't received any complaints.
    
      I think it probably should just be merged right away rather than
      waiting for the merge window and backporting.  It does fix a real bug
      and the code is theoretically safer after the change.  I can't think
      of any situation where it would be dangerous to reserve the DT memory
      an extra time.
    
      Summary from tag:
    
        Single bugfix for boot failure seen in the wild.  The memory reserve
        code tries to be clever about reserving the FDT, but it should just
        go ahead and reserve it unconditionally to avoid the problem of
        partial overlap described in the patch"
    
    * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux:
      of/fdt: memblock_reserve /memreserve/ regions in the case of partial overlap
    torvalds committed Dec 3, 2014
  4. @torvalds

    Merge branch 'for-linus' of git://git.kernel.dk/linux-block

    Pull block core regression fix from Jens Axboe:
     "Single fix for a regression introduced in this development cycle,
      where dm on top of dif/dix is broken.  From Darrick Wong"
    
    * 'for-linus' of git://git.kernel.dk/linux-block:
      block: fix regression where bio_integrity_process uses wrong bio_vec iterator
    torvalds committed Dec 3, 2014
  5. @torvalds

    Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

    Pull drm fixes from Dave Airlie:
     "Radeon and Nouveau fixes:
    
      So nouveau had a few regression introduced, Ben and Maarten finally
      tracked down the one that was causing problems on my MacBookPro, also
      nvidia gave some info on the an engine we were using incorrectly, so
      disable our use of it, and one regresion with pci hotplug affecting
      optimus users.
    
      Radeon has an oops fixs, sync fix, and one workaround to avoid broken
      functionality on 32-bit x86, this needs better root causing and a
      better fix, but the bandaid is a lot safer at this point"
    
    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
      drm/radeon: kernel panic in drm_calc_vbltimestamp_from_scanoutpos with 3.18.0-rc6
      drm/radeon: Ignore RADEON_GEM_GTT_WC on 32-bit x86
      drm/radeon: sync all BOs involved in a CS v2
      nouveau: move the hotplug ignore to correct place.
      drm/nouveau/gf116: remove copy1 engine
      drm/nouveau: prevent stale fence->channel pointers, and protect with rcu
      drm/nouveau/fifo/g84-: ack non-stall interrupt before handling it
    torvalds committed Dec 3, 2014
  6. @torvalds

    Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

    Pull networking fixes from David Miller:
    
     1) Fill in ethtool link parameters for all link types in cxgb4, from
        Hariprasad Shenai.
    
     2) Fix probe regressions in stmmac driver, from Huacai Chen.
    
     3) Network namespace leaks on errirs in rtnetlink, from Nicolas
        Dichtel.
    
     4) Remove erroneous BUG check which can actually trigger legitimately,
        in xen-netfront.  From Seth Forshee.
    
     5) Validate length of IFLA_BOND_ARP_IP_TARGET netlink attributes, from
        Thomas Grag.
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
      cxgb4: Fill in supported link mode for SFP modules
      xen-netfront: Remove BUGs on paged skb data which crosses a page boundary
      sh_eth: Fix sleeping function called from invalid context
      stmmac: platform: Move plat_dat checking earlier
      sh_eth: Fix skb alloc size and alignment adjust rule.
      rtnetlink: release net refcnt on error in do_setlink()
      bond: Check length of IFLA_BOND_ARP_IP_TARGET attributes
    torvalds committed Dec 3, 2014
  7. @torvalds

    Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/jmorris/linux-security
    
    Pull keyring/nfs fixes from James Morris:
     "From David Howells:
    
      The first one fixes the handling of maximum buffer size for key
      descriptions, fixing the size at 4095 + NUL char rather than whatever
      PAGE_SIZE happens to be and permits you to read back the full
      description without it getting clipped because some extra information
      got prepended.
    
      The second and third fix a bug in NFS idmapper handling whereby a key
      representing a mapping between an id and a name expires and causing
      EKEYEXPIRED to be seen internally in NFS (which prevents the mapping
      from happening) rather than re-looking up the mapping"
    
    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
      KEYS: request_key() should reget expired keys rather than give EKEYEXPIRED
      KEYS: Simplify KEYRING_SEARCH_{NO,DO}_STATE_CHECK flags
      KEYS: Fix the size of the key description passed to/from userspace
    torvalds committed Dec 3, 2014
  8. @torvalds

    Merge branch 'akpm' (patches from Andrew Morton)

    Merge misc fixes from Andrew Morton:
     "10 fixes"
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
      slab: fix nodeid bounds check for non-contiguous node IDs
      lib/genalloc.c: export devm_gen_pool_create() for modules
      mm: fix anon_vma_clone() error treatment
      mm: fix swapoff hang after page migration and fork
      fat: fix oops on corrupted vfat fs
      ipc/sem.c: fully initialize sem_array before making it visible
      drivers/input/evdev.c: don't kfree() a vmalloc address
      mm/vmpressure.c: fix race in vmpressure_work_fn()
      mm: frontswap: invalidate expired data on a dup-store failure
      mm: do not overwrite reserved pages counter at show_mem()
    torvalds committed Dec 3, 2014
  9. @paulusmack @torvalds

    slab: fix nodeid bounds check for non-contiguous node IDs

    The bounds check for nodeid in ____cache_alloc_node gives false
    positives on machines where the node IDs are not contiguous, leading to
    a panic at boot time.  For example, on a POWER8 machine the node IDs are
    typically 0, 1, 16 and 17.  This means that num_online_nodes() returns
    4, so when ____cache_alloc_node is called with nodeid = 16 the VM_BUG_ON
    triggers, like this:
    
      kernel BUG at /home/paulus/kernel/kvm/mm/slab.c:3079!
      Call Trace:
        .____cache_alloc_node+0x5c/0x270 (unreliable)
        .kmem_cache_alloc_node_trace+0xdc/0x360
        .init_list+0x3c/0x128
        .kmem_cache_init+0x1dc/0x258
        .start_kernel+0x2a0/0x568
        start_here_common+0x20/0xa8
    
    To fix this, we instead compare the nodeid with MAX_NUMNODES, and
    additionally make sure it isn't negative (since nodeid is an int).  The
    check is there mainly to protect the array dereference in the get_node()
    call in the next line, and the array being dereferenced is of size
    MAX_NUMNODES.  If the nodeid is in range but invalid (for example if the
    node is off-line), the BUG_ON in the next line will catch that.
    
    Fixes: 14e50c6 ("mm: slab: Verify the nodeid passed to ____cache_alloc_node")
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
    Reviewed-by: Pekka Enberg <penberg@kernel.org>
    Acked-by: David Rientjes <rientjes@google.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    paulusmack committed with torvalds Dec 2, 2014