1. 27 Jan, 2016 1 commit
  2. 25 Jan, 2016 1 commit
  3. 21 Jan, 2016 3 commits
    • Stephen Rothwell's avatar
      powerpc: Remove newly added extra definition of pmd_dirty · 0e2bce74
      Stephen Rothwell authored
      Commit d5d6a443 ("arch/powerpc/include/asm/pgtable-ppc64.h:
      add pmd_[dirty|mkclean] for THP") added a new identical definition
      of pmd_dirty(). Remove it again.
      
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      0e2bce74
    • Alan Modra's avatar
      powerpc: Simplify module TOC handling · c153693d
      Alan Modra authored
      PowerPC64 uses the symbol .TOC. much as other targets use
      _GLOBAL_OFFSET_TABLE_. It identifies the value of the GOT pointer (or in
      powerpc parlance, the TOC pointer). Global offset tables are generally
      local to an executable or shared library, or in the kernel, module. Thus
      it does not make sense for a module to resolve a relocation against
      .TOC. to the kernel's .TOC. value. A module has its own .TOC., and
      indeed the powerpc64 module relocation processing ignores the kernel
      value of .TOC. and instead calculates a module-local value.
      
      This patch removes code involved in exporting the kernel .TOC., tweaks
      modpost to ignore an undefined .TOC., and the module loader to twiddle
      the section symbol so that .TOC. isn't seen as undefined.
      
      Note that if the kernel was compiled with -msingle-pic-base then ELFv2
      would not have function global entry code setting up r2. In that case
      the module call stubs would need to be modified to set up r2 using the
      kernel .TOC. value, requiring some of this code to be reinstated.
      
      mpe: Furthermore a change in binutils master (not yet released) causes
      the current way we handle the TOC to no longer work when building with
      MODVERSIONS=y and RELOCATABLE=n. The symptom is that modules can not be
      loaded due to there being no version found for TOC.
      
      Cc: stable@vger.kernel.org # 3.16+
      Signed-off-by: default avatarAlan Modra <amodra@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      c153693d
    • Chandan Rajendra's avatar
      powerpc: Wire up copy_file_range() syscall · d7f9ee60
      Chandan Rajendra authored
      Test runs on a ppc64 BE guest succeeded using modified fstests.
      
      Also tested on ppc64 LE using a home made test - mpe.
      Signed-off-by: default avatarChandan Rajendra <chandan@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      d7f9ee60
  4. 20 Jan, 2016 24 commits
  5. 19 Jan, 2016 11 commits
    • Yevgeny Pats's avatar
      KEYS: Fix keyring ref leak in join_session_keyring() · 23567fd0
      Yevgeny Pats authored
      This fixes CVE-2016-0728.
      
      If a thread is asked to join as a session keyring the keyring that's already
      set as its session, we leak a keyring reference.
      
      This can be tested with the following program:
      
      	#include <stddef.h>
      	#include <stdio.h>
      	#include <sys/types.h>
      	#include <keyutils.h>
      
      	int main(int argc, const char *argv[])
      	{
      		int i = 0;
      		key_serial_t serial;
      
      		serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
      				"leaked-keyring");
      		if (serial < 0) {
      			perror("keyctl");
      			return -1;
      		}
      
      		if (keyctl(KEYCTL_SETPERM, serial,
      			   KEY_POS_ALL | KEY_USR_ALL) < 0) {
      			perror("keyctl");
      			return -1;
      		}
      
      		for (i = 0; i < 100; i++) {
      			serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
      					"leaked-keyring");
      			if (serial < 0) {
      				perror("keyctl");
      				return -1;
      			}
      		}
      
      		return 0;
      	}
      
      If, after the program has run, there something like the following line in
      /proc/keys:
      
      3f3d898f I--Q---   100 perm 3f3f0000     0     0 keyring   leaked-keyring: empty
      
      with a usage count of 100 * the number of times the program has been run,
      then the kernel is malfunctioning.  If leaked-keyring has zero usages or
      has been garbage collected, then the problem is fixed.
      Reported-by: default avatarYevgeny Pats <yevgeny@perception-point.io>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarDon Zickus <dzickus@redhat.com>
      Acked-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Acked-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      23567fd0
    • Mattia Dongili's avatar
      Keyboard backlight control for some Vaio Fit models · 800f2017
      Mattia Dongili authored
      SVF1521P6EW, SVF1521DCXW, SVF13N1L2ES and likely most SVF*.
      do not expose separate timeout controls in auto mode.
      Signed-off-by: default avatarDominik Matta <dominik@matta.sk>
      Signed-off-by: default avatarMattia Dongili <malattia@linux.it>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      800f2017
    • Azael Avalos's avatar
      platform/x86: Add rfkill dependency to ACPI_TOSHIBA entry · dc4522be
      Azael Avalos authored
      Commit 2fdde834 ("toshiba_acpi: Add WWAN RFKill support") added
      WWAN rfkill support to the driver, but the KConfig entry was not
      updated to add the RFKill dependency, causing a broken build if
      RFKill is not selected.
      
      This patch adds the RFKILL dependency to the KConfig entry, fixing
      the build issue.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      dc4522be
    • Qipeng Zha's avatar
      platform:x86: add Intel P-Unit mailbox IPC driver · fdca4f16
      Qipeng Zha authored
      This driver provides support for P-Unit mailbox IPC on Intel platforms.
      The heart of the P-Unit is the Foxton microcontroller and its firmware,
      which provide mailbox interface for power management usage.
      Signed-off-by: default avatarQipeng Zha <qipeng.zha@intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      fdca4f16
    • Qipeng Zha's avatar
      intel_pmc_ipc: update acpi resource structure for Punit · 8cc7fb4a
      Qipeng Zha authored
      BIOS restructure exported memory resources for Punit
      in acpi table, So update resources for Punit.
      Signed-off-by: default avatarQipeng Zha <qipeng.zha@intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      8cc7fb4a
    • Josh Boyer's avatar
      ideapad-laptop: Add Lenovo ideapad Y700-17ISK to no_hw_rfkill dmi list · edde316a
      Josh Boyer authored
      One of the newest ideapad models also lacks a physical hw rfkill switch,
      and trying to read the hw rfkill switch through the ideapad module
      causes it to always reported blocking breaking wifi.
      
      Fix it by adding this model to the DMI list.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1286293
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJosh Boyer <jwboyer@fedoraproject.org>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      edde316a
    • Andy Lutomirski's avatar
      dell-wmi: Improve unknown hotkey handling · cbc61f11
      Andy Lutomirski authored
      If DMI lists a hotkey that we don't recognize, log and ignore it
      instead of trying to map it to keycode 0.  I haven't seen this happen,
      but it will help maintain the key map in the future and it will help
      avoid sending bogus events.
      
      This also improves the message that we log when we get an unknown key
      event.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Reviewed-by: default avatarPali Rohár <pali.rohar@gmail.com>
      [dvhart: remove BUILD_BUG_ON per mutual agreement on list]
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      cbc61f11
    • Matthew Garrett's avatar
      apple-gmux: Assign apple_gmux_data before registering · c1e1655b
      Matthew Garrett authored
      Registering the handler after both GPUs will trigger a DDC switch for
      connector reprobing. This will oops if apple_gmux_data hasn't already
      been assigned. Reorder the code to do that.
      
      [Lukas: More generally, this commit fixes a race condition that
      is triggered by invoking a handler callback between the call to
      vga_switcheroo_register_handler() and the assignment of
      apple_gmux_data.]
      Tested-by: default avatarPierre Moreau <pierre.morrow@free.fr>
          [MBP  5,3 2009  nvidia MCP79 + G96        pre-retina  15"]
      Tested-by: default avatarPaul Hordiienko <pvt.gord@gmail.com>
          [MBP  6,2 2010  intel ILK + nvidia GT216  pre-retina  15"]
      Tested-by: default avatarLukas Wunner <lukas@wunner.de>
          [MBP  9,1 2012  intel IVB + nvidia GK107  pre-retina  15"]
      Tested-by: default avatarWilliam Brown <william@blackhats.net.au>
          [MBP  8,2 2011  intel SNB + amd turks     pre-retina  15"]
      Tested-by: default avatarBruno Bierbaumer <bruno@bierbaumer.net>
          [MBP 11,3 2013  intel HSW + nvidia GK107  retina      15"]
      Signed-off-by: default avatarMatthew Garrett <matthew.garrett@nebula.com>
      Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      c1e1655b
    • Azael Avalos's avatar
      toshiba_acpi: Fix keyboard backlight sysfs entries not being updated · 65e3cf9c
      Azael Avalos authored
      Certain Toshiba models with the second generation keyboard backlight
      (type 2) do not generate the keyboard backlight changed event (0x92),
      and thus, the sysfs entries are never being updated.
      
      This patch adds a workquee and a global boolean variable to address
      the issue.
      
      For those models that do generate the event, the sysfs entries are
      being updated via the *notify function and the boolean is set to
      true to avoid a second call to update the entries.
      
      For those models that do not generate the event, the workquee is
      used to update the sysfs entries and also to emulate the event via
      netlink, to make userspace aware of such change.
      Signed-off-by: default avatarAzael Avalos <coproscefalo@gmail.com>
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      65e3cf9c
    • Linus Torvalds's avatar
      Merge branch 'for-4.5/core' of git://git.kernel.dk/linux-block · 7c24d9f3
      Linus Torvalds authored
      Pull core block updates from Jens Axboe:
       "We don't have a lot of core changes this time around, it's mostly in
        drivers, which will come in a subsequent pull.
      
        The cores changes include:
      
         - blk-mq
              - Prep patch from Christoph, changing blk_mq_alloc_request() to
                take flags instead of just using gfp_t for sleep/nosleep.
              - Doc patch from me, clarifying the difference between legacy
                and blk-mq for timer usage.
              - Fixes from Raghavendra for memory-less numa nodes, and a reuse
                of CPU masks.
      
         - Cleanup from Geliang Tang, using offset_in_page() instead of open
           coding it.
      
         - From Ilya, rename request_queue slab to it reflects what it holds,
           and a fix for proper use of bdgrab/put.
      
         - A real fix for the split across stripe boundaries from Keith.  We
           yanked a broken version of this from 4.4-rc final, this one works.
      
         - From Mike Krinkin, emit a trace message when we split.
      
         - From Wei Tang, two small cleanups, not explicitly clearing memory
           that is already cleared"
      
      * 'for-4.5/core' of git://git.kernel.dk/linux-block:
        block: use bd{grab,put}() instead of open-coding
        block: split bios to max possible length
        block: add call to split trace point
        blk-mq: Avoid memoryless numa node encoded in hctx numa_node
        blk-mq: Reuse hardware context cpumask for tags
        blk-mq: add a flags parameter to blk_mq_alloc_request
        Revert "blk-flush: Queue through IO scheduler when flush not required"
        block: clarify blk_add_timer() use case for blk-mq
        bio: use offset_in_page macro
        block: do not initialise statics to 0 or NULL
        block: do not initialise globals to 0 or NULL
        block: rename request_queue slab cache
      7c24d9f3
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 99e38df8
      Linus Torvalds authored
      Pull IOMMU updates from Joerg Roedel:
       "The updates include:
      
         - Small code cleanups in the AMD IOMMUv2 driver
      
         - Scalability improvements for the DMA-API implementation of the AMD
           IOMMU driver.  This is just a starting point, but already showed
           some good improvements in my tests.
      
         - Removal of the unused Renesas IPMMU/IPMMUI driver
      
         - Updates for ARM-SMMU include:
            * Some fixes to get the driver working nicely on Broadcom hardware
            * A change to the io-pgtable API to indicate the unit in which to
              flush (all callers converted, with Ack from Laurent)
            * Use of devm_* for allocating/freeing the SMMUv3 buffers
      
         - Some other small fixes and improvements for other drivers"
      
      * tag 'iommu-updates-v4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (46 commits)
        iommu/vt-d: Fix up error handling in alloc_iommu
        iommu/vt-d: Check the return value of iommu_device_create()
        iommu/amd: Remove an unneeded condition
        iommu/amd: Preallocate dma_ops apertures based on dma_mask
        iommu/amd: Use trylock to aquire bitmap_lock
        iommu/amd: Make dma_ops_domain->next_index percpu
        iommu/amd: Relax locking in dma_ops path
        iommu/amd: Initialize new aperture range before making it visible
        iommu/amd: Build io page-tables with cmpxchg64
        iommu/amd: Allocate new aperture ranges in dma_ops_alloc_addresses
        iommu/amd: Optimize dma_ops_free_addresses
        iommu/amd: Remove need_flush from struct dma_ops_domain
        iommu/amd: Iterate over all aperture ranges in dma_ops_area_alloc
        iommu/amd: Flush iommu tlb in dma_ops_free_addresses
        iommu/amd: Rename dma_ops_domain->next_address to next_index
        iommu/amd: Remove 'start' parameter from dma_ops_area_alloc
        iommu/amd: Flush iommu tlb in dma_ops_aperture_alloc()
        iommu/amd: Retry address allocation within one aperture
        iommu/amd: Move aperture_range.offset to another cache-line
        iommu/amd: Add dma_ops_aperture_alloc() function
        ...
      99e38df8