1. 25 Sep, 2015 2 commits
    • Andy Lutomirski's avatar
      x86/sched/64: Don't save flags on context switch (reinstated) · 3f2c5085
      Andy Lutomirski authored
      This reinstates the following commit:
      
        2c7577a7 ("sched/x86_64: Don't save flags on context switch")
      
      which was reverted in:
      
        512255a2 ("Revert 'sched/x86_64: Don't save flags on context switch'")
      
      Historically, Linux has always saved and restored EFLAGS across
      context switches.  As far as I know, the only reason to do this
      is because of the NT flag.  In particular, if something calls
      switch_to() with the NT flag set, then we don't want to leak the
      NT flag into a different task that might try to IRET and fail
      because NT is set.
      
      Before this commit:
      
        8c7aa698 ("x86_64, entry: Filter RFLAGS.NT on entry from userspace")
      
      we could run system call bodies with NT set.  This would be a DoS or possibly
      privilege escalation hole if scheduling in such a system call would leak
      NT into a different task.
      
      Importantly, we don't need to worry about NT being set while
      preemptible or across page faults.  The only way we can schedule
      due to preemption or a page fault is in an interrupt entry that
      nests inside the SYSENTER prologue.  The CPU will clear NT when
      entering through an interrupt gate, so we won't schedule with NT
      set.
      
      The only other interesting flags are IOPL and AC.  Allowing
      switch_to() to change IOPL has no effect, as the value loaded
      during kernel execution doesn't matter at all except between a
      SYSENTER entry and the subsequent PUSHF, and anythign that
      interrupts in that window will restore IOPL on return.
      
      If we call __switch_to() with AC set, we have bigger problems.
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/d4440fdc2a89247bffb7c003d2a9a2952bd46827.1441146105.git.luto@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3f2c5085
    • Ingo Molnar's avatar
  2. 22 Sep, 2015 1 commit
    • Linus Torvalds's avatar
      Merge branch 'for-4.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · bcee19f4
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "The threadgroup locking changes which went in during 4.2 devel cycle
        added write locking of a percpu_rwsem in cgroup task migration path;
        unfortunately, that involved expedited rcu syncing which turned out to
        be too slow and heavy for certain workloads.  The patchset which is
        dependent on this one didn't get committed during that devel cycle, so
        these two patches can be reverted safely.
      
        Oleg reworked percpu_rwsem for 4.4 so that the writer path is a lot
        lighter.  The reported issue goes away with Oleg's reworked
        percpu_rwsem and I'll reapply these patches on the for-4.4 branch so
        that they can land together with Oleg's changes"
      
      * 'for-4.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        Revert "sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem"
        Revert "cgroup: simplify threadgroup locking"
      bcee19f4
  3. 21 Sep, 2015 4 commits
  4. 20 Sep, 2015 11 commits
    • Linus Torvalds's avatar
      Linux 4.3-rc2 · 1f93e4a9
      Linus Torvalds authored
      1f93e4a9
    • Kees Cook's avatar
      x86/entry/vsyscall: Add CONFIG to control default · 3dc33bd3
      Kees Cook authored
      Most modern systems can run with vsyscall=none. In an effort to
      provide a way for build-time defaults to lack legacy settings,
      this adds a new CONFIG to select the type of vsyscall mapping to
      use, similar to the existing "vsyscall" command line parameter.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20150813005519.GA11696@www.outflux.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3dc33bd3
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm · 99bc7215
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Three fixes and a resulting cleanup for -rc2:
      
         - Andre Przywara reported that he was seeing a warning with the new
           cast inside DMA_ERROR_CODE's definition, and fixed the incorrect
           use.
      
         - Doug Anderson noticed that kgdb causes a "scheduling while atomic"
           bug.
      
         - OMAP5 folk noticed that their Thumb-2 compiled X servers crashed
           when enabling support to cover ARMv6 CPUs due to a kernel bug
           leaking some conditional context into the signal handler"
      
      * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
        ARM: 8425/1: kgdb: Don't try to stop the machine when setting breakpoints
        ARM: 8437/1: dma-mapping: fix build warning with new DMA_ERROR_CODE definition
        ARM: get rid of needless #if in signal handling code
        ARM: fix Thumb2 signal handling when ARMv6 is enabled
      99bc7215
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-4.3-rc2' of... · 30ec5682
      Linus Torvalds authored
      Merge tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "This update contains 7 fixes for problems ranging from build failurs
        to incorrect error reporting"
      
      * tag 'linux-kselftest-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: exec: revert to default emit rule
        selftests: change install command to rsync
        selftests: mqueue: simplify the Makefile
        selftests: mqueue: allow extra cflags
        selftests: rename jump label to static_keys
        selftests/seccomp: add support for s390
        seltests/zram: fix syntax error
      30ec5682
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 009884f3
      Linus Torvalds authored
      Pull power management and ACPI updates from Rafael Wysocki:
       "Included are: a somewhat late devfreq update which however is mostly
        fixes and cleanups with one new thing only (the PPMUv2 support on
        Exynos5433), an ACPI cpufreq driver fixup and two ACPI core cleanups
        related to preprocessor directives.
      
        Specifics:
      
         - Fix a memory allocation size in the devfreq core (Xiaolong Ye).
      
         - Fix a mistake in the exynos-ppmu DT binding (Javier Martinez
           Canillas).
      
         - Add support for PPMUv2 ((Platform Performance Monitoring Unit
           version 2.0) on the Exynos5433 SoCs (Chanwoo Choi).
      
         - Fix a type casting bug in the Exynos PPMU code (MyungJoo Ham).
      
         - Assorted devfreq code cleanups and optimizations (Javi Merino,
           MyungJoo Ham, Viresh Kumar).
      
         - Fix up the ACPI cpufreq driver to use a more lightweight way to get
           to its private data in the ->get() callback (Rafael J Wysocki).
      
         - Fix a CONFIG_ prefix bug in one of the ACPI drivers and make the
           ACPI subsystem use IS_ENABLED() instead of #ifdefs in function
           bodies (Sudeep Holla)"
      
      * tag 'pm+acpi-4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: acpi-cpufreq: Use cpufreq_cpu_get_raw() in ->get()
        ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED()
        ACPI: int340x_thermal: add missing CONFIG_ prefix
        PM / devfreq: Fix incorrect type issue.
        PM / devfreq: tegra: Update governor to use devfreq_update_stats()
        PM / devfreq: comments for get_dev_status usage updated
        PM / devfreq: drop comment about thermal setting max_freq
        PM / devfreq: cache the last call to get_dev_status()
        PM / devfreq: Drop unlikely before IS_ERR(_OR_NULL)
        PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
        PM / devfreq: exynos-ppmu: Update documentation to support PPMUv2
        PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433
        PM / devfreq: event: Remove incorrect property in exynos-ppmu DT binding
      009884f3
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · d590b2d4
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A few driver fixes for tegra, rockchip, and st SoCs and a two-liner in
        the framework to avoid oops when get_parent ops return out of range
        values on tegra platforms"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        drivers: clk: st: Rename st_pll3200c32_407_c0_x into st_pll3200c32_cx_x
        clk: check for invalid parent index of orphans in __clk_init()
        clk: tegra: dfll: Properly protect OPP list
        clk: rockchip: add critical clock for rk3368
      d590b2d4
    • Linus Torvalds's avatar
      Merge tag 'led-fixes-for-v4.3-rc2' of... · e6827baf
      Linus Torvalds authored
      Merge tag 'led-fixes-for-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
      
      Pull LED fixes from Jacek Anaszewski:
       - fix module autoload for six OF platform drivers (aat1290, bcm6328,
         bcm6358, ktd2692, max77693, ns2)
       - aat1290: add missing static modifier
       - ipaq-micro: add missing LEDS_CLASS dependency
       - lp55xx: correct Kconfig dependecy for f/w user helper
      
      * tag 'led-fixes-for-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
        leds:lp55xx: Correct Kconfig dependency for f/w user helper
        leds: leds-ipaq-micro: Add LEDS_CLASS dependency
        leds: aat1290: add 'static' modifier to init_mm_current_scale
        leds: leds-ns2: Fix module autoload for OF platform driver
        leds: max77693: Fix module autoload for OF platform driver
        leds: ktd2692: Fix module autoload for OF platform driver
        leds: bcm6358: Fix module autoload for OF platform driver
        leds: bcm6328: Fix module autoload for OF platform driver
        leds: aat1290: Fix module autoload for OF platform driver
      e6827baf
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · dc847d5b
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "The new hfi1 driver in staging/rdma has had a number of fixup patches
        since being added to the tree.  This is the first batch of those fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/hfi: Properly set permissions for user device files
        IB/hfi1: mask vs shift confusion
        IB/hfi1: clean up some defines
        IB/hfi1: info leak in get_ctxt_info()
        IB/hfi1: fix a locking bug
        IB/hfi1: checking for NULL instead of IS_ERR
        IB/hfi1: fix sdma_descq_cnt parameter parsing
        IB/hfi1: fix copy_to/from_user() error handling
        IB/hfi1: fix pstateinfo from returning improperly byteswapped value
      dc847d5b
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 2673ee56
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
      
       - a boot regression (since v4.2) fix for some ARM configurations from
         Tyler
      
       - regression (since v4.1) fixes for mkfs.xfs on a DAX enabled device
         from Jeff.  These are tagged for -stable.
      
       - a pair of locking fixes from Axel that are hidden from lockdep since
         they involve device_lock().  The "btt" one is tagged for -stable, the
         other only applies to the new "pfn" mechanism in v4.3.
      
       - a fix for the pmem ->rw_page() path to use wmb_pmem() from Ross.
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        mm: fix type cast in __pfn_to_phys()
        pmem: add proper fencing to pmem_rw_page()
        libnvdimm: pfn_devs: Fix locking in namespace_store
        libnvdimm: btt_devs: Fix locking in namespace_store
        blockdev: don't set S_DAX for misaligned partitions
        dax: fix O_DIRECT I/O to the last block of a blockdev
      2673ee56
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 133bb595
      Linus Torvalds authored
      Pull block updates from Jens Axboe:
       "This is a bit bigger than it should be, but I could (did) not want to
        send it off last week due to both wanting extra testing, and expecting
        a fix for the bounce regression as well.  In any case, this contains:
      
         - Fix for the blk-merge.c compilation warning on gcc 5.x from me.
      
         - A set of back/front SG gap merge fixes, from me and from Sagi.
           This ensures that we honor SG gapping for integrity payloads as
           well.
      
         - Two small fixes for null_blk from Matias, fixing a leak and a
           capacity propagation issue.
      
         - A blkcg fix from Tejun, fixing a NULL dereference.
      
         - A fast clone optimization from Ming, fixing a performance
           regression since the arbitrarily sized bio's were introduced.
      
         - Also from Ming, a regression fix for bouncing IOs"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: fix bounce_end_io
        block: blk-merge: fast-clone bio when splitting rw bios
        block: blkg_destroy_all() should clear q->root_blkg and ->root_rl.blkg
        block: Copy a user iovec if it includes gaps
        block: Refuse adding appending a gapped integrity page to a bio
        block: Refuse request/bio merges with gaps in the integrity payload
        block: Check for gaps on front and back merges
        null_blk: fix wrong capacity when bs is not 512 bytes
        null_blk: fix memory leak on cleanup
        block: fix bogus compiler warnings in blk-merge.c
      133bb595
    • Chris Mason's avatar
      fs-writeback: unplug before cond_resched in writeback_sb_inodes · 590dca3a
      Chris Mason authored
      Commit 505a666e ("writeback: plug writeback in wb_writeback() and
      writeback_inodes_wb()") has us holding a plug during writeback_sb_inodes,
      which increases the merge rate when relatively contiguous small files
      are written by the filesystem.  It helps both on flash and spindles.
      
      For an fs_mark workload creating 4K files in parallel across 8 drives,
      this commit improves performance ~9% more by unplugging before calling
      cond_resched().  cond_resched() doesn't trigger an implicit unplug, so
      explicitly getting the IO down to the device before scheduling reduces
      latencies for anyone waiting on clean pages.
      
      It also cuts down on how often we use kblockd to unplug, which means
      less work bouncing from one workqueue to another.
      
      Many more details about how we got here:
      
        https://lkml.org/lkml/2015/9/11/570Signed-off-by: default avatarChris Mason <clm@fb.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      590dca3a
  5. 19 Sep, 2015 1 commit
  6. 18 Sep, 2015 21 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-bus' · 0f40314b
      Rafael J. Wysocki authored
      * acpi-bus:
        ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED()
        ACPI: int340x_thermal: add missing CONFIG_ prefix
      0f40314b
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-devfreq' · 7dc1d36e
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: acpi-cpufreq: Use cpufreq_cpu_get_raw() in ->get()
      
      * pm-devfreq:
        PM / devfreq: Fix incorrect type issue.
        PM / devfreq: tegra: Update governor to use devfreq_update_stats()
        PM / devfreq: comments for get_dev_status usage updated
        PM / devfreq: drop comment about thermal setting max_freq
        PM / devfreq: cache the last call to get_dev_status()
        PM / devfreq: Drop unlikely before IS_ERR(_OR_NULL)
        PM / devfreq: exynos-ppmu: bit-wise operation bugfix.
        PM / devfreq: exynos-ppmu: Update documentation to support PPMUv2
        PM / devfreq: exynos-ppmu: Add the support of PPMUv2 for Exynos5433
        PM / devfreq: event: Remove incorrect property in exynos-ppmu DT binding
      7dc1d36e
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 00ade1f5
      Linus Torvalds authored
      Pull virtio fixes and cleanups from Michael Tsirkin:
       "This fixes the virtio-test tool, and improves the error handling for
        virtio-ccw"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio/s390: handle failures of READ_VQ_CONF ccw
        tools/virtio: propagate V=X to kernel build
        vhost: move features to core
        tools/virtio: fix build after 4.2 changes
      00ade1f5
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 3ae83945
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "Mostly stable material, a lot of ARM fixes"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (22 commits)
        sched: access local runqueue directly in single_task_running
        arm/arm64: KVM: Remove 'config KVM_ARM_MAX_VCPUS'
        arm64: KVM: Remove all traces of the ThumbEE registers
        arm: KVM: Disable virtual timer even if the guest is not using it
        arm64: KVM: Disable virtual timer even if the guest is not using it
        arm/arm64: KVM: vgic: Check for !irqchip_in_kernel() when mapping resources
        KVM: s390: Replace incorrect atomic_or with atomic_andnot
        arm: KVM: Fix incorrect device to IPA mapping
        arm64: KVM: Fix user access for debug registers
        KVM: vmx: fix VPID is 0000H in non-root operation
        KVM: add halt_attempted_poll to VCPU stats
        kvm: fix zero length mmio searching
        kvm: fix double free for fast mmio eventfd
        kvm: factor out core eventfd assign/deassign logic
        kvm: don't try to register to KVM_FAST_MMIO_BUS for non mmio eventfd
        KVM: make the declaration of functions within 80 characters
        KVM: arm64: add workaround for Cortex-A57 erratum #852523
        KVM: fix polling for guest halt continued even if disable it
        arm/arm64: KVM: Fix PSCI affinity info return value for non valid cores
        arm64: KVM: set {v,}TCR_EL2 RES1 bits
        ...
      3ae83945
    • Ira Weiny's avatar
      IB/hfi: Properly set permissions for user device files · e116a64f
      Ira Weiny authored
      Some of the device files are required to be user accessible for PSM while
      most should remain accessible only by root.
      
      Add a parameter to hfi1_cdev_init which controls if the user should have access
      to this device which places it in a different class with the appropriate
      devnode callback.
      
      In addition set the devnode call back for the existing class to be a bit more
      explicit for those permissions.
      
      Finally remove the unnecessary null check before class_destroy
      Tested-by: default avatarDonald Dutile <ddutile@redhat.com>
      Signed-off-by: Haralanov, Mitko (mitko.haralanov@intel.com)
      Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      e116a64f
    • Dan Carpenter's avatar
      IB/hfi1: mask vs shift confusion · 7d630467
      Dan Carpenter authored
      We are shifting by the _MASK macros instead of the _SHIFT ones.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      7d630467
    • Dan Carpenter's avatar
      IB/hfi1: clean up some defines · 3f2686a2
      Dan Carpenter authored
      I added spaces around operators so it matches kernel style because
      normally "-1ULL" is a number and " - 1" is a subtract operation.  Also
      removed some superflous "ULL" types so "1ULL" becomes "1".
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      3f2686a2
    • Dan Carpenter's avatar
      IB/hfi1: info leak in get_ctxt_info() · ebe6b2e8
      Dan Carpenter authored
      The cinfo struct has a hole after the last struct member so we need to
      zero it out.  Otherwise we disclose some uninitialized stack data.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      ebe6b2e8
    • Dan Carpenter's avatar
      IB/hfi1: fix a locking bug · 951842b0
      Dan Carpenter authored
      mutex_trylock() returns zero on failure, not EBUSY.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      951842b0
    • Dan Carpenter's avatar
      IB/hfi1: checking for NULL instead of IS_ERR · 50b19729
      Dan Carpenter authored
      __get_txreq() returns an ERR_PTR() but this checks for NULL so it would
      oops on failure.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      50b19729
    • Mike Marciniszyn's avatar
      IB/hfi1: fix sdma_descq_cnt parameter parsing · aeef010a
      Mike Marciniszyn authored
      The boolean tests should have been or-ed.
      Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
      Reviewed-by: default avatarJubin John <jubin.john@intel.com>
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      aeef010a
    • Dan Carpenter's avatar
      IB/hfi1: fix copy_to/from_user() error handling · e1df0068
      Dan Carpenter authored
      copy_to/from_user() returns the number of bytes which we were not able
      to copy.  It doesn't return an error code.
      
      Also a couple places had a printk() on error and I removed that because
      people can take advantage of it to fill /var/log/messages with spam.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      e1df0068
    • Ira Weiny's avatar
      IB/hfi1: fix pstateinfo from returning improperly byteswapped value · aadfc3b2
      Ira Weiny authored
      Byteswap link_width_downgrade_*_active values before sending on the wire.  In
      addition properly define the Port State Info structure.
      Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
      Reviewed-by: default avatarChristian Gomez <christian.gomez@intel.com>
      Signed-off-by: default avatarRimmer, Todd <todd.rimmer@intel.com>
      Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
      Acked-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      aadfc3b2
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fadb97b0
      Linus Torvalds authored
      Pull irq updates from Thomas Gleixner:
       "This is a rather large update post rc1 due to the final steps of
        cleanups and API changes which had to wait for the preparatory patches
        to hit your tree.
      
         - Regression fixes for ARM GIC irqchips
      
         - Regression fixes and lockdep anotations for renesas irq chips
      
         - The leftovers of the cleanup and preparatory patches which have
           been ignored by maintainers
      
         - Final conversions of the newly merged users of obsolete APIs
      
         - Final removal of obsolete APIs
      
         - Final removal of ARM artifacts which had been introduced during the
           conversion of ARM to the generic interrupt code.
      
         - Final split of the irq_data into chip specific and common data to
           reflect the needs of hierarchical irq domains.
      
         - Treewide removal of the first argument of interrupt flow handlers,
           i.e. the irq number, which is not used by the majority of handlers
           and simple to retrieve from the other argument the irq descriptor.
      
         - A few comment updates and build warning fixes"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
        arm64: Remove ununsed set_irq_flags
        ARM: Remove ununsed set_irq_flags
        sh: Kill off set_irq_flags usage
        irqchip: Kill off set_irq_flags usage
        gpu/drm: Kill off set_irq_flags usage
        genirq: Remove irq argument from irq flow handlers
        genirq: Move field 'msi_desc' from irq_data into irq_common_data
        genirq: Move field 'affinity' from irq_data into irq_common_data
        genirq: Move field 'handler_data' from irq_data into irq_common_data
        genirq: Move field 'node' from irq_data into irq_common_data
        irqchip/gic-v3: Use IRQD_FORWARDED_TO_VCPU flag
        irqchip/gic: Use IRQD_FORWARDED_TO_VCPU flag
        genirq: Provide IRQD_FORWARDED_TO_VCPU status flag
        genirq: Simplify irq_data_to_desc()
        genirq: Remove __irq_set_handler_locked()
        pinctrl/pistachio: Use irq_set_handler_locked
        gpio: vf610: Use irq_set_handler_locked
        powerpc/mpc8xx: Use irq_set_handler_locked()
        powerpc/ipic: Use irq_set_handler_locked()
        powerpc/cpm2: Use irq_set_handler_locked()
        ...
      fadb97b0
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 09784fb8
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "A single regression fix for the x86 dma allocator which got wreckaged
        in the merge window"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/pci/dma: Fix gfp flags for coherent DMA memory allocation
      09784fb8
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · f240bdd2
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix 32-bit TCE table init in kdump kernel from Nish
      
       - Fix kdump with non-power-of-2 crashkernel= from Nish
      
       - Abort cxl_pci_enable_device_hook() if PCI channel is offline from
         Andrew
      
       - Fix to release DRC when configure_connector() fails from Bharata
      
       - Wire up sys_userfaultfd()
      
       - Fix race condition in tearing down MSI interrupts from Paul
      
       - Fix unbalanced pci_dev_get() in cxl_probe() from Daniel
      
       - Fix cxl build failure due to -Wunused-variable gcc behaviour change
         from Ian
      
       - Tell the toolchain to use ABI v2 when building an LE boot wrapper
         from Benh
      
       - Fix THP to recompute hash value after a failed update from Aneesh
      
       - 32-bit memcpy/memset: only use dcbz once cache is enabled from
         Christophe
      
      * tag 'powerpc-4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc32: memset: only use dcbz once cache is enabled
        powerpc32: memcpy: only use dcbz once cache is enabled
        powerpc/mm: Recompute hash value after a failed update
        powerpc/boot: Specify ABI v2 when building an LE boot wrapper
        cxl: Fix build failure due to -Wunused-variable behaviour change
        cxl: Fix unbalanced pci_dev_get in cxl_probe
        powerpc/MSI: Fix race condition in tearing down MSI interrupts
        powerpc: Wire up sys_userfaultfd()
        powerpc/pseries: Release DRC when configure_connector fails
        cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline
        powerpc/powernv/pci-ioda: fix kdump with non-power-of-2 crashkernel=
        powerpc/powernv/pci-ioda: fix 32-bit TCE table init in kdump kernel
      f240bdd2
    • Dominik Dingel's avatar
      sched: access local runqueue directly in single_task_running · 00cc1633
      Dominik Dingel authored
      Commit 2ee507c4 ("sched: Add function single_task_running to let a task
      check if it is the only task running on a cpu") referenced the current
      runqueue with the smp_processor_id.  When CONFIG_DEBUG_PREEMPT is enabled,
      that is only allowed if preemption is disabled or the currrent task is
      bound to the local cpu (e.g. kernel worker).
      
      With commit f7819512 ("kvm: add halt_poll_ns module parameter") KVM
      calls single_task_running. If CONFIG_DEBUG_PREEMPT is enabled that
      generates a lot of kernel messages.
      
      To avoid adding preemption in that cases, as it would limit the usefulness,
      we change single_task_running to access directly the cpu local runqueue.
      
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: <stable@vger.kernel.org>
      Fixes: 2ee507c4Signed-off-by: default avatarDominik Dingel <dingel@linux.vnet.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      00cc1633
    • Heiko Carstens's avatar
      s390: wire up separate socketcalls system calls · 977108f8
      Heiko Carstens authored
      As discussed on linux-arch all architectures should wire up the separate
      system calls that are hidden behind the socketcall multiplexer system call.
      
      It's just a couple more system calls and gives us a very small performance
      improvement.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      977108f8
    • Heiko Carstens's avatar
      s390/compat: remove superfluous compat wrappers · 7681df45
      Heiko Carstens authored
      A couple of compat wrapper functions are simply trampolines to the real
      system call. This happened because the compat wrapper defines will only
      sign and zero extend system call parameters which are of different size
      on s390/s390x (longs and pointers).
      All other parameters will be correctly sign and zero extended by the
      normal system call wrappers.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      7681df45
    • Heiko Carstens's avatar
      s390/compat: do not trace compat wrapper functions · a55b2ae7
      Heiko Carstens authored
      Add notrace to the compat wrapper define to disable tracing of compat
      wrapper functions. These are supposed to be very small and more or less
      just a trampoline to the real system call.
      
      Also fix indentation.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      a55b2ae7
    • Denys Vlasenko's avatar
      x86/asm/entry/32, selftests: Add 'test_syscall_vdso' test · c25be94f
      Denys Vlasenko authored
      This new test checks that all x86 registers are preserved across
      32-bit syscalls. It tests syscalls through VDSO (if available)
      and through INT 0x80, normally and under ptrace.
      
      If kernel is a 64-bit one, high registers (r8..r15) are poisoned
      before the syscall is called and are checked afterwards.
      
      They must be either preserved, or cleared to zero (but r11 is
      special); r12..15 must be preserved for INT 0x80.
      
      EFLAGS is checked for changes too, but change there is not
      considered to be a bug (paravirt kernels do not preserve
      arithmetic flags).
      
      Run-tested on 64-bit kernel:
      
      	$ ./test_syscall_vdso_32
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[OK]	Arguments are preserved across syscall
      	[NOTE]	R11 has changed:0000000000200ed7 - assuming clobbered by
      	SYSRET insn [OK]	R8..R15 did not leak kernel data
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      	[OK]	R8..R15 did not leak kernel data
      	[RUN]	Running tests under ptrace
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[OK]	Arguments are preserved across syscall
      	[OK]	R8..R15 did not leak kernel data
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      	[OK]	R8..R15 did not leak kernel data
      
      On 32-bit paravirt kernel:
      
      	$ ./test_syscall_vdso_32
      	[NOTE]	Not a 64-bit kernel, won't test R8..R15 leaks
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[WARN]	Flags before=0000000000200ed7 id 0 00 o d i s z 0 a 0 p 1 c
      	[WARN]	Flags  after=0000000000200246 id 0 00 i z 0 0 p 1
      	[WARN]	Flags change=0000000000000c91 0 00 o d s 0 a 0 0 c
      	[OK]	Arguments are preserved across syscall
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      	[RUN]	Running tests under ptrace
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[OK]	Arguments are preserved across syscall
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Acked-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Cc: linux-kernel@vger.kernel.org
      Link: http://lkml.kernel.org/r/1442427809-2027-1-git-send-email-dvlasenk@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c25be94f