1. 13 12月, 2016 10 次提交
    • L
      Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6cdf89b1
      Linus Torvalds 提交于
      Pull locking updates from Ingo Molnar:
       "The tree got pretty big in this development cycle, but the net effect
        is pretty good:
      
          115 files changed, 673 insertions(+), 1522 deletions(-)
      
        The main changes were:
      
         - Rework and generalize the mutex code to remove per arch mutex
           primitives. (Peter Zijlstra)
      
         - Add vCPU preemption support: add an interface to query the
           preemption status of vCPUs and use it in locking primitives - this
           optimizes paravirt performance. (Pan Xinhui, Juergen Gross,
           Christian Borntraeger)
      
         - Introduce cpu_relax_yield() and remov cpu_relax_lowlatency() to
           clean up and improve the s390 lock yielding machinery and its core
           kernel impact. (Christian Borntraeger)
      
         - Micro-optimize mutexes some more. (Waiman Long)
      
         - Reluctantly add the to-be-deprecated mutex_trylock_recursive()
           interface on a temporary basis, to give the DRM code more time to
           get rid of its locking hacks. Any other users will be NAK-ed on
           sight. (We turned off the deprecation warning for the time being to
           not pollute the build log.) (Peter Zijlstra)
      
         - Improve the rtmutex code a bit, in light of recent long lived
           bugs/races. (Thomas Gleixner)
      
         - Misc fixes, cleanups"
      
      * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
        x86/paravirt: Fix bool return type for PVOP_CALL()
        x86/paravirt: Fix native_patch()
        locking/ww_mutex: Use relaxed atomics
        locking/rtmutex: Explain locking rules for rt_mutex_proxy_unlock()/init_proxy_locked()
        locking/rtmutex: Get rid of RT_MUTEX_OWNER_MASKALL
        x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()
        locking/mutex: Break out of expensive busy-loop on {mutex,rwsem}_spin_on_owner() when owner vCPU is preempted
        locking/osq: Break out of spin-wait busy waiting loop for a preempted vCPU in osq_lock()
        Documentation/virtual/kvm: Support the vCPU preemption check
        x86/xen: Support the vCPU preemption check
        x86/kvm: Support the vCPU preemption check
        x86/kvm: Support the vCPU preemption check
        kvm: Introduce kvm_write_guest_offset_cached()
        locking/core, x86/paravirt: Implement vcpu_is_preempted(cpu) for KVM and Xen guests
        locking/spinlocks, s390: Implement vcpu_is_preempted(cpu)
        locking/core, powerpc: Implement vcpu_is_preempted(cpu)
        sched/core: Introduce the vcpu_is_preempted(cpu) interface
        sched/wake_q: Rename WAKE_Q to DEFINE_WAKE_Q
        locking/core: Provide common cpu_relax_yield() definition
        locking/mutex: Don't mark mutex_trylock_recursive() as deprecated, temporarily
        ...
      6cdf89b1
    • L
      Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3940cf0b
      Linus Torvalds 提交于
      Pull EFI updates from Ingo Molnar:
       "The main changes in this development cycle were:
      
         - Implement EFI dev path parser and other changes to fully support
           thunderbolt devices on Apple Macbooks (Lukas Wunner)
      
         - Add RNG seeding via the EFI stub, on ARM/arm64 (Ard Biesheuvel)
      
         - Expose EFI framebuffer configuration to user-space, to improve
           tooling (Peter Jones)
      
         - Misc fixes and cleanups (Ivan Hu, Wei Yongjun, Yisheng Xie, Dan
           Carpenter, Roy Franz)"
      
      * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/libstub: Make efi_random_alloc() allocate below 4 GB on 32-bit
        thunderbolt: Compile on x86 only
        thunderbolt, efi: Fix Kconfig dependencies harder
        thunderbolt, efi: Fix Kconfig dependencies
        thunderbolt: Use Device ROM retrieved from EFI
        x86/efi: Retrieve and assign Apple device properties
        efi: Allow bitness-agnostic protocol calls
        efi: Add device path parser
        efi/arm*/libstub: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table
        efi/libstub: Add random.c to ARM build
        efi: Add support for seeding the RNG from a UEFI config table
        MAINTAINERS: Add ARM and arm64 EFI specific files to EFI subsystem
        efi/libstub: Fix allocation size calculations
        efi/efivar_ssdt_load: Don't return success on allocation failure
        efifb: Show framebuffer layout as device attributes
        efi/efi_test: Use memdup_user() as a cleanup
        efi/efi_test: Fix uninitialized variable 'rv'
        efi/efi_test: Fix uninitialized variable 'datasize'
        efi/arm*: Fix efi_init() error handling
        efi: Remove unused include of <linux/version.h>
      3940cf0b
    • L
      Merge branch 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9ad1aeec
      Linus Torvalds 提交于
      Pull SMP bootup updates from Ingo Molnar:
       "Three changes to unify/standardize some of the bootup message printing
        in kernel/smp.c between architectures"
      
      * 'core-smp-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        kernel/smp: Tell the user we're bringing up secondary CPUs
        kernel/smp: Make the SMP boot message common on all arches
        kernel/smp: Define pr_fmt() for smp.c
      9ad1aeec
    • L
      Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 718c0ddd
      Linus Torvalds 提交于
      Pull RCU updates from Ingo Molnar:
       "The main RCU changes in this development cycle were:
      
         - Miscellaneous fixes, including a change to call_rcu()'s rcu_head
           alignment check.
      
         - Security-motivated list consistency checks, which are disabled by
           default behind DEBUG_LIST.
      
         - Torture-test updates.
      
         - Documentation updates, yet again just simple changes"
      
      * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        torture: Prevent jitter from delaying build-only runs
        torture: Remove obsolete files from rcutorture .gitignore
        rcu: Don't kick unless grace period or request
        rcu: Make expedited grace periods recheck dyntick idle state
        torture: Trace long read-side delays
        rcu: RCU_TRACE enables event tracing as well as debugfs
        rcu: Remove obsolete comment from __call_rcu()
        rcu: Remove obsolete rcu_check_callbacks() header comment
        rcu: Tighten up __call_rcu() rcu_head alignment check
        Documentation/RCU: Fix minor typo
        documentation: Present updated RCU guarantee
        bug: Avoid Kconfig warning for BUG_ON_DATA_CORRUPTION
        lib/Kconfig.debug: Fix typo in select statement
        lkdtm: Add tests for struct list corruption
        bug: Provide toggle for BUG on data corruption
        list: Split list_del() debug checking into separate function
        rculist: Consolidate DEBUG_LIST for list_add_rcu()
        list: Split list_add() debug checking into separate function
      718c0ddd
    • L
      Merge tag 'cris-for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris · 8fa3b6f9
      Linus Torvalds 提交于
      Pull CRIS updates from Jesper Nilsson:
       "Three patches for minor issues"
      
      * tag 'cris-for-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/jesper/cris:
        cris: No need to append -O2 and $(LINUXINCLUDE)
        tty: serial: make crisv10 explicitly non-modular
        cris: Only build flash rescue image if CONFIG_ETRAX_AXISFLASHMAP is selected
      8fa3b6f9
    • L
      Merge tag 'openrisc-for-linus' of git://github.com/openrisc/linux · 56e9461a
      Linus Torvalds 提交于
      Pull Openrisc updates from Stafford Horne:
      
       - changes to MAINTAINER for openrisc
      
       - probably biggest actual change is the move to memblock from bootmem
      
       - ... plus several bug and build fixes
      
      * tag 'openrisc-for-linus' of git://github.com/openrisc/linux:
        openrisc: prevent VGA console, fix builds
        openrisc: include l.swa in check for write data pagefault
        openrisc: Updates after openrisc.net has been lost
        openrisc: Consolidate setup to use memblock instead of bootmem
        openrisc: remove the redundant of_platform_populate
        openrisc: add NR_CPUS Kconfig default value
        openrisc: Support both old (or32) and new (or1k) toolchain
        openrisc: Add thread-local storage (TLS) support
        openrisc: restore all regs on rt_sigreturn
        openrisc: fix PTRS_PER_PGD define
      56e9461a
    • L
      Merge tag 'm68k-for-v4.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 709c12e3
      Linus Torvalds 提交于
      Pull m68k updates from Geert Uytterhoeven:
       "Use seq_puts() for fixed strings"
      
      * tag 'm68k-for-v4.10-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k/atari: Use seq_puts() in atari_get_hardware_list()
        m68k/amiga: Use seq_puts() in amiga_get_hardware_list()
      709c12e3
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32 · 669bb4c5
      Linus Torvalds 提交于
      Pull AVR32 updates from Hans-Christian Noren Egtvedt.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
        avr32: wire up pkey syscalls
        AVR32-pio: Replace two seq_printf() calls by seq_puts() in pio_bank_show()
        AVR32-pio: Use seq_putc() in pio_bank_show()
        AVR32-clock: Combine nine seq_printf() calls into one call in clk_show()
        AVR32-clock: Use seq_putc() in two functions
      669bb4c5
    • L
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu · 0261b5d3
      Linus Torvalds 提交于
      Pull m68knommu updates from Greg Ungerer:
       "There are two sets of changes in this pull.
      
        The largest is the addition of the ColdFire platform side i2c support
        (the IO addressing, setup and clock definitions). The i2c hardware
        module itself is driven by the kernels existing iMX i2c driver.
      
        The other change is the addition of support for the Amcore board"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
        m68knommu: AMCORE board, add iMX i2c support
        m68k: add Sysam AMCORE open board support
        m68knommu: platform support for i2c devices on ColdFire SoC
      0261b5d3
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 067d14f0
      Linus Torvalds 提交于
      Pull sparc updates from David Miller:
       "Just a bunch of small cleanups and fixes here, and support for user
        probes from Allen Pais"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: fix a building error reported by kbuild
        sparc64: fix typo in pgd_clear()
        sparc64: restore irq in error paths in iommu
        sparc: leon: Fix a retry loop in leon_init_timers()
        sparc64: make string buffers large enough
        sparc64: move dereference after check for NULL
        sparc: kernel: use builtin_platform_driver
        sparc64:Support User Probes for sparc
      067d14f0
  2. 12 12月, 2016 26 次提交
  3. 11 12月, 2016 4 次提交
    • P
      netfilter: nft_counter: rework atomic dump and reset · d84701ec
      Pablo Neira 提交于
      Dump and reset doesn't work unless cmpxchg64() is used both from packet
      and control plane paths. This approach is going to be slow though.
      Instead, use a percpu seqcount to fetch counters consistently, then
      subtract bytes and packets in case a reset was requested.
      
      The cpu that running over the reset code is guaranteed to own this stats
      exclusively, we have to turn counters into signed 64bit though so stats
      update on reset don't get wrong on underflow.
      
      This patch is based on original sketch from Eric Dumazet.
      
      Fixes: 43da04a5 ("netfilter: nf_tables: atomic dump and reset for stateful objects")
      Suggested-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d84701ec
    • P
      x86/paravirt: Fix bool return type for PVOP_CALL() · 11f254db
      Peter Zijlstra 提交于
      Commit:
      
        3cded417 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()")
      
      introduced a paravirt op with bool return type [*]
      
      It turns out that the PVOP_CALL*() macros miscompile when rettype is
      bool. Code that looked like:
      
         83 ef 01                sub    $0x1,%edi
         ff 15 32 a0 d8 00       callq  *0xd8a032(%rip)        # ffffffff81e28120 <pv_lock_ops+0x20>
         84 c0                   test   %al,%al
      
      ended up looking like so after PVOP_CALL1() was applied:
      
         83 ef 01                sub    $0x1,%edi
         48 63 ff                movslq %edi,%rdi
         ff 14 25 20 81 e2 81    callq  *0xffffffff81e28120
         48 85 c0                test   %rax,%rax
      
      Note how it tests the whole of %rax, even though a typical bool return
      function only sets %al, like:
      
        0f 95 c0                setne  %al
        c3                      retq
      
      This is because ____PVOP_CALL() does:
      
      		__ret = (rettype)__eax;
      
      and while regular integer type casts truncate the result, a cast to
      bool tests for any !0 value. Fix this by explicitly truncating to
      sizeof(rettype) before casting.
      
      [*] The actual bug should've been exposed in commit:
            446f3dc8 ("locking/core, x86/paravirt: Implement vcpu_is_preempted(cpu) for KVM and Xen guests")
          but that didn't properly implement the paravirt call.
      Reported-by: Nkernel test robot <xiaolong.ye@intel.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alok Kataria <akataria@vmware.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Anvin <hpa@zytor.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: 3cded417 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()")
      Link: http://lkml.kernel.org/r/20161208154349.346057680@infradead.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      11f254db
    • P
      x86/paravirt: Fix native_patch() · 45dbea5f
      Peter Zijlstra 提交于
      While chasing a regression I noticed we potentially patch the wrong
      code in native_patch().
      
      If we do not select the native code sequence, we must use the default
      patcher, not fall-through the switch case.
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alok Kataria <akataria@vmware.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Anvin <hpa@zytor.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: kernel test robot <xiaolong.ye@intel.com>
      Fixes: 3cded417 ("x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()")
      Link: http://lkml.kernel.org/r/20161208154349.270616999@infradead.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      45dbea5f
    • I
      6f387515