1. 18 Feb, 2017 1 commit
  2. 14 Feb, 2017 1 commit
  3. 11 Feb, 2017 1 commit
  4. 10 Feb, 2017 3 commits
    • Thomas Gleixner's avatar
      timerfd: Protect the might cancel mechanism proper · 1e38da30
      Thomas Gleixner authored
      The handling of the might_cancel queueing is not properly protected, so
      parallel operations on the file descriptor can race with each other and
      lead to list corruptions or use after free.
      
      Protect the context for these operations with a seperate lock.
      
      The wait queue lock cannot be reused for this because that would create a
      lock inversion scenario vs. the cancel lock. Replacing might_cancel with an
      atomic (atomic_t or atomic bit) does not help either because it still can
      race vs. the actual list operation.
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: "linux-fsdevel@vger.kernel.org"
      Cc: syzkaller <syzkaller@googlegroups.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: linux-fsdevel@vger.kernel.org
      Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701311521430.3457@nanosSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1e38da30
    • Mars Cheng's avatar
      timer_list: Remove useless cast when printing · 7551b02b
      Mars Cheng authored
      hrtimer_resolution is already unsigned int, not necessary to cast
      it when printing.
      Signed-off-by: default avatarMars Cheng <mars.cheng@mediatek.com>
      Cc: CC Hwang <cc.hwang@mediatek.com>
      Cc: wsd_upstream@mediatek.com
      Cc: Loda Chou <loda.chou@mediatek.com>
      Cc: Jades Shih <jades.shih@mediatek.com>
      Cc: Miles Chen <miles.chen@mediatek.com>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: My Chuang <my.chuang@mediatek.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Yingjoe Chen <yingjoe.chen@mediatek.com>
      Link: http://lkml.kernel.org/r/1486626615-5879-1-git-send-email-mars.cheng@mediatek.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      7551b02b
    • Kees Cook's avatar
      time: Remove CONFIG_TIMER_STATS · dfb4357d
      Kees Cook authored
      Currently CONFIG_TIMER_STATS exposes process information across namespaces:
      
      kernel/time/timer_list.c print_timer():
      
              SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
      
      /proc/timer_list:
      
       #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
      
      Given that the tracer can give the same information, this patch entirely
      removes CONFIG_TIMER_STATS.
      Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: linux-doc@vger.kernel.org
      Cc: Lai Jiangshan <jiangshanlai@gmail.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Xing Gao <xgao01@email.wm.edu>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Jessica Frazelle <me@jessfraz.com>
      Cc: kernel-hardening@lists.openwall.com
      Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: Petr Mladek <pmladek@suse.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Michal Marek <mmarek@suse.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-api@vger.kernel.org
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Link: http://lkml.kernel.org/r/20170208192659.GA32582@beastSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      dfb4357d
  5. 07 Feb, 2017 10 commits
  6. 04 Feb, 2017 1 commit
    • Waiman Long's avatar
      tick/broadcast: Reduce lock cacheline contention · 668802c2
      Waiman Long authored
      It was observed that on an Intel x86 system without the ARAT (Always
      running APIC timer) feature and with fairly large number of CPUs as
      well as CPUs coming in and out of intel_idle frequently, the lock
      contention on the tick_broadcast_lock can become significant.
      
      To reduce contention, the lock is put into its own cacheline and all
      the cpumask_var_t variables are put into the __read_mostly section.
      
      Running the SP benchmark of the NAS Parallel Benchmarks on a 4-socket
      16-core 32-thread Nehalam system, the performance number improved
      from 3353.94 Mop/s to 3469.31 Mop/s when this patch was applied on
      a 4.9.6 kernel.  This is a 3.4% improvement.
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1485799063-20857-1-git-send-email-longman@redhat.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      668802c2
  7. 30 Jan, 2017 1 commit
  8. 27 Jan, 2017 1 commit
  9. 22 Jan, 2017 1 commit
    • Jiri Slaby's avatar
      x86/timer: Make delay() work during early bootup · 4c45c516
      Jiri Slaby authored
      When a panic happens during bootup, "Rebooting in X seconds.." is
      shown, but reboot happens immediatelly. It is because panic() uses mdelay()
      and mdelay() calls __const_udelay() immediately, which does not
      work while booting.
      
      The per_cpu cpu_info.loops_per_jiffy value is not initialized yet, so
      __const_udelay() actually multiplies the number of loops by zero. This
      results in __const_udelay() to delay the execution only by a nanosecond
      or so.
      
      So check whether cpu_info.loops_per_jiffy is zero and use
      loops_per_jiffy in that case. mdelay() will not be so precise without
      proper calibration, but it works relatively well.
      
      Before:
      
        [    0.170039] delaying 100ms
        [    0.170828] done
      
      After
      
        [    0.214042] delaying 100ms
        [    0.313974] done
      
      I do not think the added check matters given we are about to spin the
      processor in the next few hundred cycles.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20170119114730.2670-1-jslaby@suse.cz
      [ Minor edits. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4c45c516
  10. 20 Jan, 2017 2 commits
  11. 14 Jan, 2017 6 commits
    • Peter Zijlstra's avatar
      math64, timers: Fix 32bit mul_u64_u32_shr() and friends · 9e3d6223
      Peter Zijlstra authored
      It turns out that while GCC-4.4 manages to generate 32x32->64 mult
      instructions for the 32bit mul_u64_u32_shr() code, any GCC after that
      fails horribly.
      
      Fix this by providing an explicit mul_u32_u32() function which can be
      architcture provided.
      Reported-by: default avatarChris Metcalf <cmetcalf@mellanox.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: Chris Metcalf <cmetcalf@mellanox.com> [for tile]
      Cc: Christopher S. Hall <christopher.s.hall@intel.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Laurent Vivier <lvivier@redhat.com>
      Cc: Liav Rehana <liavr@mellanox.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Parit Bhargava <prarit@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20161209083011.GD15765@worktop.programming.kicks-ass.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9e3d6223
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · e96f8f18
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "These are all over the place.
      
        The tracepoint part of the pull fixes a crash and adds a little more
        information to two tracepoints, while the rest are good old fashioned
        fixes"
      
      * 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        btrfs: make tracepoint format strings more compact
        Btrfs: add truncated_len for ordered extent tracepoints
        Btrfs: add 'inode' for extent map tracepoint
        btrfs: fix crash when tracepoint arguments are freed by wq callbacks
        Btrfs: adjust outstanding_extents counter properly when dio write is split
        Btrfs: fix lockdep warning about log_mutex
        Btrfs: use down_read_nested to make lockdep silent
        btrfs: fix locking when we put back a delayed ref that's too new
        btrfs: fix error handling when run_delayed_extent_op fails
        btrfs: return the actual error value from  from btrfs_uuid_tree_iterate
      e96f8f18
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-4.10-rc4' of git://github.com/ceph/ceph-client · 04e39627
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "Two small fixups for the filesystem changes that went into this merge
        window"
      
      * tag 'ceph-for-4.10-rc4' of git://github.com/ceph/ceph-client:
        ceph: fix get_oldest_context()
        ceph: fix mds cluster availability check
      04e39627
    • Linus Torvalds's avatar
      Merge tag 'vfio-v4.10-rc4' of git://github.com/awilliam/linux-vfio · af54efa4
      Linus Torvalds authored
      Pull VFIO fixes from Alex Williamson:
      
       - Cleanups and bug fixes for the mtty sample driver (Dan Carpenter)
      
       - Export and make use of has_capability() to fix incorrect use of
         ns_capable() for testing task capabilities (Jike Song)
      
      * tag 'vfio-v4.10-rc4' of git://github.com/awilliam/linux-vfio:
        vfio/type1: Remove pid_namespace.h include
        vfio iommu type1: fix the testing of capability for remote task
        capability: export has_capability
        vfio-mdev: remove some dead code
        vfio-mdev: buffer overflow in ioctl()
        vfio-mdev: return -EFAULT if copy_to_user() fails
      af54efa4
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 406732c9
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
      
       - fix for module unload vs deferred jump labels (note: there might be
         other buggy modules!)
      
       - two NULL pointer dereferences from syzkaller
      
       - also syzkaller: fix emulation of fxsave/fxrstor/sgdt/sidt, problem
         made worse during this merge window, "just" kernel memory leak on
         releases
      
       - fix emulation of "mov ss" - somewhat serious on AMD, less so on Intel
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: fix emulation of "MOV SS, null selector"
        KVM: x86: fix NULL deref in vcpu_scan_ioapic
        KVM: eventfd: fix NULL deref irqbypass consumer
        KVM: x86: Introduce segmented_write_std
        KVM: x86: flush pending lapic jump label updates on module unload
        jump_labels: API for flushing deferred jump label updates
      406732c9
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · a65c9259
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Fix huge_ptep_set_access_flags() to return "changed" when any of the
         ptes in the contiguous range is changed, not just the last one
      
       - Fix the adr_l assembly macro to work in modules under KASLR
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: assembler: make adr_l work in modules under KASLR
        arm64: hugetlb: fix the wrong return value for huge_ptep_set_access_flags
      a65c9259
  12. 13 Jan, 2017 3 commits
  13. 12 Jan, 2017 9 commits