1. 29 Apr, 2019 2 commits
    • Jakub Kicinski's avatar
      locking/static_key: Add support for deferred static branches · ad282a81
      Jakub Kicinski authored
      Add deferred static branches.  We can't unfortunately use the
      nice trick of encapsulating the entire structure in true/false
      variants, because the inside has to be either struct static_key_true
      or struct static_key_false.  Use defines to pass the appropriate
      members to the helpers separately.
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Reviewed-by: default avatarSimon Horman <simon.horman@netronome.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: alexei.starovoitov@gmail.com
      Cc: ard.biesheuvel@linaro.org
      Cc: oss-drivers@netronome.com
      Cc: yamada.masahiro@socionext.com
      Link: https://lkml.kernel.org/r/20190330000854.30142-2-jakub.kicinski@netronome.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ad282a81
    • Frederic Weisbecker's avatar
      locking/lockdep: Test all incompatible scenarios at once in check_irq_usage() · 948f8376
      Frederic Weisbecker authored
      check_prev_add_irq() tests all incompatible scenarios one after the
      other while adding a lock (@next) to a tree dependency (@prev):
      
      	LOCK_USED_IN_HARDIRQ          vs         LOCK_ENABLED_HARDIRQ
      	LOCK_USED_IN_HARDIRQ_READ     vs         LOCK_ENABLED_HARDIRQ
      	LOCK_USED_IN_SOFTIRQ          vs         LOCK_ENABLED_SOFTIRQ
      	LOCK_USED_IN_SOFTIRQ_READ     vs         LOCK_ENABLED_SOFTIRQ
      
      Also for these four scenarios, we must at least iterate the @prev
      backward dependency. Then if it matches the relevant LOCK_USED_* bit,
      we must also iterate the @next forward dependency.
      
      Therefore in the best case we iterate 4 times, in the worst case 8 times.
      
      A different approach can let us divide the number of branch iterations
      by 4:
      
      1) Iterate through @prev backward dependencies and accumulate all the IRQ
         uses in a single mask. In the best case where the current lock hasn't
         been used in IRQ, we stop here.
      
      2) Iterate through @next forward dependencies and try to find a lock
         whose usage is exclusive to the accumulated usages gathered in the
         previous step. If we find one (call it @lockA), we have found an
         incompatible use, otherwise we stop here. Only bad locking scenario
         go further. So a sane verification stop here.
      
      3) Iterate again through @prev backward dependency and find the lock
         whose usage matches @lockA in term of incompatibility. Call that
         lock @lockB.
      
      4) Report the incompatible usages of @lockA and @lockB
      
      If no incompatible use is found, the verification never goes beyond
      step 2 which means at most two iterations.
      
      The following compares the execution measurements of the function
      check_prev_add_irq():
      
                  Number of  calls   | Avg (ns)  | Stdev (ns) | Total time (ns)
        ------------------------------------------------------------------------
        Mainline         8452        |  2652     |    11962   |    22415143
        This patch       8452        |  1518     |     7090   |    12835602
      Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: https://lkml.kernel.org/r/20190402160244.32434-5-frederic@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      948f8376
  2. 18 Apr, 2019 5 commits
  3. 14 Apr, 2019 1 commit
  4. 10 Apr, 2019 16 commits
  5. 09 Apr, 2019 3 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 869e3305
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Off by one and bounds checking fixes in NFC, from Dan Carpenter.
      
       2) There have been many weird regressions in r8169 since we turned ASPM
          support on, some are still not understood nor completely resolved.
          Let's turn this back off for now. From Heiner Kallweit.
      
       3) Signess fixes for ethtool speed value handling, from Michael
          Zhivich.
      
       4) Handle timestamps properly in macb driver, from Paul Thomas.
      
       5) Two erspan fixes, it's the usual "skb ->data potentially reallocated
          and we're holding a stale protocol header pointer". From Lorenzo
          Bianconi.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        bnxt_en: Reset device on RX buffer errors.
        bnxt_en: Improve RX consumer index validity check.
        net: macb driver, check for SKBTX_HW_TSTAMP
        qlogic: qlcnic: fix use of SPEED_UNKNOWN ethtool constant
        broadcom: tg3: fix use of SPEED_UNKNOWN ethtool constant
        ethtool: avoid signed-unsigned comparison in ethtool_validate_speed()
        net: ip6_gre: fix possible use-after-free in ip6erspan_rcv
        net: ip_gre: fix possible use-after-free in erspan_rcv
        r8169: disable ASPM again
        MAINTAINERS: ieee802154: update documentation file pattern
        net: vrf: Fix ping failed when vrf mtu is set to 0
        selftests: add a tc matchall test case
        nfc: nci: Potential off by one in ->pipes[] array
        NFC: nci: Add some bounds checking in nci_hci_cmd_received()
      869e3305
    • Linus Torvalds's avatar
      Merge branch 'fixes-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · a556810d
      Linus Torvalds authored
      Pull TPM fixes from James Morris:
       "From Jarkko: These are critical fixes for v5.1. Contains also couple
        of new selftests for v5.1 features (partial reads in /dev/tpm0)"
      
      * 'fixes-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        selftests/tpm2: Open tpm dev in unbuffered mode
        selftests/tpm2: Extend tests to cover partial reads
        KEYS: trusted: fix -Wvarags warning
        tpm: Fix the type of the return value in calc_tpm2_event_size()
        KEYS: trusted: allow trusted.ko to initialize w/o a TPM
        tpm: fix an invalid condition in tpm_common_poll
        tpm: turn on TPM on suspend for TPM 1.x
      a556810d
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20190408' of git://github.com/jcmvbkbc/linux-xtensa · 10d43397
      Linus Torvalds authored
      Pull xtensa fixes from Max Filippov:
      
       - fix syscall number passed to trace_sys_exit
      
       - fix syscall number initialization in start_thread
      
       - fix level interpretation in the return_address
      
       - fix format string warning in init_pmd
      
      * tag 'xtensa-20190408' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: fix format string warning in init_pmd
        xtensa: fix return_address
        xtensa: fix initialization of pt_regs::syscall in start_thread
        xtensa: use actual syscall number in do_syscall_trace_leave
      10d43397
  6. 08 Apr, 2019 13 commits