1. 03 Jun, 2022 23 commits
    • Kees Cook's avatar
      nodemask: Fix return values to be unsigned · 0dfe5407
      Kees Cook authored
      The nodemask routines had mixed return values that provided potentially
      signed return values that could never happen. This was leading to the
      compiler getting confusing about the range of possible return values
      (it was thinking things could be negative where they could not be). Fix
      all the nodemask routines that should be returning unsigned
      (or bool) values. Silences:
      
       mm/swapfile.c: In function ‘setup_swap_info’:
       mm/swapfile.c:2291:47: error: array subscript -1 is below array bounds of ‘struct plist_node[]’ [-Werror=array-bounds]
        2291 |                                 p->avail_lists[i].prio = 1;
             |                                 ~~~~~~~~~~~~~~^~~
       In file included from mm/swapfile.c:16:
       ./include/linux/swap.h:292:27: note: while referencing ‘avail_lists’
         292 |         struct plist_node avail_lists[]; /*
             |                           ^~~~~~~~~~~
      Reported-by: default avatarChristophe de Dinechin <dinechin@redhat.com>
      Link: https://lore.kernel.org/lkml/20220414150855.2407137-3-dinechin@redhat.com/
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Zhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      0dfe5407
    • Kees Cook's avatar
      bitmap: Fix return values to be unsigned · 005f1700
      Kees Cook authored
      Both nodemask and bitmap routines had mixed return values that provided
      potentially signed return values that could never happen. This was
      leading to the compiler getting confusing about the range of possible
      return values (it was thinking things could be negative where they could
      not be). In preparation for fixing nodemask, fix all the bitmap routines
      that should be returning unsigned (or bool) values.
      
      Cc: Yury Norov <yury.norov@gmail.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: Christophe de Dinechin <dinechin@redhat.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Zhen Lei <thunder.leizhen@huawei.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      005f1700
    • Yury Norov's avatar
      KVM: x86: hyper-v: replace bitmap_weight() with hweight64() · d603fd8d
      Yury Norov authored
      kvm_hv_flush_tlb() applies bitmap API to a u64 variable valid_bank_mask.
      Since valid_bank_mask has a fixed size, we can use hweight64() and avoid
      excessive bloating.
      
      CC: Borislav Petkov <bp@alien8.de>
      CC: Dave Hansen <dave.hansen@linux.intel.com>
      CC: H. Peter Anvin <hpa@zytor.com>
      CC: Ingo Molnar <mingo@redhat.com>
      CC: Jim Mattson <jmattson@google.com>
      CC: Joerg Roedel <joro@8bytes.org>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Sean Christopherson <seanjc@google.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Vitaly Kuznetsov <vkuznets@redhat.com>
      CC: Wanpeng Li <wanpengli@tencent.com>
      CC: kvm@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      CC: x86@kernel.org
      Acked-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      d603fd8d
    • Yury Norov's avatar
      KVM: x86: hyper-v: fix type of valid_bank_mask · a7ef9b45
      Yury Norov authored
      In kvm_hv_flush_tlb(), valid_bank_mask is declared as unsigned long,
      but is used as u64, which is wrong for i386, and has been spotted by
      LKP after applying "KVM: x86: hyper-v: replace bitmap_weight() with
      hweight64()"
      
      https://lore.kernel.org/lkml/20220510154750.212913-12-yury.norov@gmail.com/
      
      But it's wrong even without that patch because now bitmap_weight()
      dereferences a word after valid_bank_mask on i386.
      
      >> include/asm-generic/bitops/const_hweight.h:21:76: warning: right shift count >= width of type
      +[-Wshift-count-overflow]
            21 | #define __const_hweight64(w) (__const_hweight32(w) + __const_hweight32((w) >> 32))
               |                                                                            ^~
         include/asm-generic/bitops/const_hweight.h:10:16: note: in definition of macro '__const_hweight8'
            10 |          ((!!((w) & (1ULL << 0))) +     \
               |                ^
         include/asm-generic/bitops/const_hweight.h:20:31: note: in expansion of macro '__const_hweight16'
            20 | #define __const_hweight32(w) (__const_hweight16(w) + __const_hweight16((w) >> 16))
               |                               ^~~~~~~~~~~~~~~~~
         include/asm-generic/bitops/const_hweight.h:21:54: note: in expansion of macro '__const_hweight32'
            21 | #define __const_hweight64(w) (__const_hweight32(w) + __const_hweight32((w) >> 32))
               |                                                      ^~~~~~~~~~~~~~~~~
         include/asm-generic/bitops/const_hweight.h:29:49: note: in expansion of macro '__const_hweight64'
            29 | #define hweight64(w) (__builtin_constant_p(w) ? __const_hweight64(w) : __arch_hweight64(w))
               |                                                 ^~~~~~~~~~~~~~~~~
         arch/x86/kvm/hyperv.c:1983:36: note: in expansion of macro 'hweight64'
          1983 |                 if (hc->var_cnt != hweight64(valid_bank_mask))
               |                                    ^~~~~~~~~
      
      CC: Borislav Petkov <bp@alien8.de>
      CC: Dave Hansen <dave.hansen@linux.intel.com>
      CC: H. Peter Anvin <hpa@zytor.com>
      CC: Ingo Molnar <mingo@redhat.com>
      CC: Jim Mattson <jmattson@google.com>
      CC: Joerg Roedel <joro@8bytes.org>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Sean Christopherson <seanjc@google.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: Vitaly Kuznetsov <vkuznets@redhat.com>
      CC: Wanpeng Li <wanpengli@tencent.com>
      CC: kvm@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      CC: x86@kernel.org
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Message-Id: <20220519171504.1238724-1-yury.norov@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a7ef9b45
    • Yury Norov's avatar
      ia64: cleanup remove_siblinginfo() · a570e68f
      Yury Norov authored
      remove_siblinginfo() initialises variable 'last', but never uses it.
      Drop unneeded code.
      
      CC: Ingo Molnar <mingo@kernel.org>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Valentin Schneider <vschneid@redhat.com>
      CC: linux-ia64@vger.kernel.org
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a570e68f
    • Yury Norov's avatar
      drm/amd/pm: use bitmap_{from,to}_arr32 where appropriate · 525d6515
      Yury Norov authored
      The smu_v1X_0_set_allowed_mask() uses bitmap_copy() to convert
      bitmap to 32-bit array. This may be wrong due to endiannes issues.
      Fix it by switching to bitmap_{from,to}_arr32.
      
      CC: Alexander Gordeev <agordeev@linux.ibm.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Christian Borntraeger <borntraeger@linux.ibm.com>
      CC: Claudio Imbrenda <imbrenda@linux.ibm.com>
      CC: David Hildenbrand <david@redhat.com>
      CC: Heiko Carstens <hca@linux.ibm.com>
      CC: Janosch Frank <frankja@linux.ibm.com>
      CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      CC: Sven Schnelle <svens@linux.ibm.com>
      CC: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      525d6515
    • Yury Norov's avatar
      KVM: s390: replace bitmap_copy with bitmap_{from,to}_arr64 where appropriate · da0f8e95
      Yury Norov authored
      Copying bitmaps from/to 64-bit arrays with bitmap_copy is not safe
      on 32-bit BE machines. Use designated functions instead.
      
      CC: Alexander Gordeev <agordeev@linux.ibm.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Christian Borntraeger <borntraeger@linux.ibm.com>
      CC: Claudio Imbrenda <imbrenda@linux.ibm.com>
      CC: David Hildenbrand <david@redhat.com>
      CC: Heiko Carstens <hca@linux.ibm.com>
      CC: Janosch Frank <frankja@linux.ibm.com>
      CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      CC: Sven Schnelle <svens@linux.ibm.com>
      CC: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      da0f8e95
    • Yury Norov's avatar
      lib/bitmap: add test for bitmap_{from,to}_arr64 · 2c523550
      Yury Norov authored
      Test newly added bitmap_{from,to}_arr64() functions similarly to
      already existing bitmap_{from,to}_arr32() tests.
      
      CC: Alexander Gordeev <agordeev@linux.ibm.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Christian Borntraeger <borntraeger@linux.ibm.com>
      CC: Claudio Imbrenda <imbrenda@linux.ibm.com>
      CC: David Hildenbrand <david@redhat.com>
      CC: Heiko Carstens <hca@linux.ibm.com>
      CC: Janosch Frank <frankja@linux.ibm.com>
      CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      CC: Sven Schnelle <svens@linux.ibm.com>
      CC: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      2c523550
    • Yury Norov's avatar
      lib: add bitmap_{from,to}_arr64 · 0a97953f
      Yury Norov authored
      Manipulating 64-bit arrays with bitmap functions is potentially dangerous
      because on 32-bit BE machines the order of halfwords doesn't match.
      Another issue is that compiler may throw a warning about out-of-boundary
      access.
      
      This patch adds bitmap_{from,to}_arr64 functions in addition to existing
      bitmap_{from,to}_arr32.
      
      CC: Alexander Gordeev <agordeev@linux.ibm.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Christian Borntraeger <borntraeger@linux.ibm.com>
      CC: Claudio Imbrenda <imbrenda@linux.ibm.com>
      CC: David Hildenbrand <david@redhat.com>
      CC: Heiko Carstens <hca@linux.ibm.com>
      CC: Janosch Frank <frankja@linux.ibm.com>
      CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      CC: Sven Schnelle <svens@linux.ibm.com>
      CC: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      0a97953f
    • Yury Norov's avatar
      lib/bitmap: extend comment for bitmap_(from,to)_arr32() · e041e0ac
      Yury Norov authored
      On LE systems bitmaps are naturally ordered, therefore we can potentially
      use bitmap_copy routines when converting from 32-bit arrays, even if host
      system is 64-bit. But it may lead to out-of-bond access due to unsafe
      typecast, and the bitmap_(from,to)_arr32 comment doesn't explain that
      clearly
      
      CC: Alexander Gordeev <agordeev@linux.ibm.com>
      CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      CC: Christian Borntraeger <borntraeger@linux.ibm.com>
      CC: Claudio Imbrenda <imbrenda@linux.ibm.com>
      CC: David Hildenbrand <david@redhat.com>
      CC: Heiko Carstens <hca@linux.ibm.com>
      CC: Janosch Frank <frankja@linux.ibm.com>
      CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      CC: Sven Schnelle <svens@linux.ibm.com>
      CC: Vasily Gorbik <gor@linux.ibm.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      e041e0ac
    • Anna-Maria Behnsen's avatar
      include/linux/find: Fix documentation · 6d7131bd
      Anna-Maria Behnsen authored
      The order of the arguments in function documentation doesn't fit the
      implementation. Change the documentation so that it corresponds to the
      code. This prevent people to get confused when reading the documentation.
      Signed-off-by: default avatarAnna-Maria Behnsen <anna-maria@linutronix.de>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      6d7131bd
    • Mauro Carvalho Chehab's avatar
      lib/bitmap.c make bitmap_print_bitmask_to_buf parseable · 430cd4a2
      Mauro Carvalho Chehab authored
      The documentation of such function is not on a proper ReST format,
      as reported by Sphinx:
      
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:532: WARNING: Unexpected indentation.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:526: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:532: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:532: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:533: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:536: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:542: WARNING: Unexpected indentation.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:536: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:536: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:543: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:552: WARNING: Unexpected indentation.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:545: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:545: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:552: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:552: WARNING: Inline emphasis start-string without end-string.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:554: WARNING: Block quote ends without a blank line; unexpected unindent.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:556: WARNING: Definition list ends without a blank line; unexpected unindent.
          Documentation/core-api/kernel-api:81: ./lib/bitmap.c:580: WARNING: Unexpected indentation.
      
      So, the produced output at:
      
      	https://www.kernel.org/doc/html/latest/core-api/kernel-api.html?#c.bitmap_print_bitmask_to_buf
      
      is broken. Fix it by adding spaces and marking the literal blocks.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      430cd4a2
    • Yury Norov's avatar
      MAINTAINERS: add cpumask and nodemask files to BITMAP_API · c6bc5a3c
      Yury Norov authored
      cpumask and nodemask APIs are thin wrappers around basic bitmap API, and
      corresponding files are not formally maintained. This patch adds them to
      BITMAP_API section, so that bitmap folks would have closer look at it.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      c6bc5a3c
    • Yury Norov's avatar
      arch/x86: replace nodes_weight with nodes_empty where appropriate · dcf23cca
      Yury Norov authored
      mm code calls nodes_weight() to check if any bit of a given nodemask is
      set. We can do it more efficiently with nodes_empty() because nodes_empty()
      stops traversing the nodemask as soon as it finds first set bit, while
      nodes_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      dcf23cca
    • Yury Norov's avatar
      mm/vmstat: replace cpumask_weight with cpumask_empty where appropriate · b55032f1
      Yury Norov authored
      mm/vmstat.c code calls cpumask_weight() to check if any bit of a given
      cpumask is set. We can do it more efficiently with cpumask_empty() because
      cpumask_empty() stops traversing the cpumask as soon as it finds first set
      bit, while cpumask_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Acked-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      b55032f1
    • Yury Norov's avatar
      clocksource: replace cpumask_weight with cpumask_empty in clocksource.c · 95e3a973
      Yury Norov authored
      clocksource_verify_percpu() calls cpumask_weight() to check if any bit of
      a given cpumask is set. We can do it more efficiently with cpumask_empty()
      because cpumask_empty() stops traversing the cpumask as soon as it finds
      first set bit, while cpumask_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      95e3a973
    • Yury Norov's avatar
      genirq/affinity: replace cpumask_weight with cpumask_empty where appropriate · 99248e35
      Yury Norov authored
      __irq_build_affinity_masks() calls cpumask_weight() to check if
      any bit of a given cpumask is set. We can do it more efficiently with
      cpumask_empty() because cpumask_empty() stops traversing the cpumask as
      soon as it finds first set bit, while cpumask_weight() counts all bits
      unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      99248e35
    • Yury Norov's avatar
      irq: mips: replace cpumask_weight with cpumask_empty where appropriate · d72002ae
      Yury Norov authored
      bcm6345_l1_of_init() calls cpumask_weight() to check if any bit of a given
      cpumask is set. We can do it more efficiently with cpumask_empty() because
      cpumask_empty() stops traversing the cpumask as soon as it finds first set
      bit, while cpumask_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      d72002ae
    • Yury Norov's avatar
      drm/i915/pmu: replace cpumask_weight with cpumask_empty where appropriate · a37e94fe
      Yury Norov authored
      i915_pmu_cpu_online() calls cpumask_weight() to check if any bit of a
      given cpumask is set. We can do it more efficiently with cpumask_empty()
      because cpumask_empty() stops traversing the cpumask as soon as it finds
      first set bit, while cpumask_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      a37e94fe
    • Yury Norov's avatar
      arch/x86: replace cpumask_weight with cpumask_empty where appropriate · 4aec74bc
      Yury Norov authored
      In some cases, arch/x86 code calls cpumask_weight() to check if any bit of
      a given cpumask is set. We can do it more efficiently with cpumask_empty()
      because cpumask_empty() stops traversing the cpumask as soon as it finds
      first set bit, while cpumask_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Reviewed-by: default avatarSteve Wahl <steve.wahl@hpe.com>
      4aec74bc
    • Yury Norov's avatar
      arch/ia64: replace cpumask_weight with cpumask_empty where appropriate · b6dad11d
      Yury Norov authored
      setup_arch() calls cpumask_weight() to check if any bit of a given cpumask
      is set. We can do it more efficiently with cpumask_empty() because
      cpumask_empty() stops traversing the cpumask as soon as it finds first set
      bit, while cpumask_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      b6dad11d
    • Yury Norov's avatar
      arch/alpha: replace cpumask_weight with cpumask_empty where appropriate · 71c1a517
      Yury Norov authored
      common_shutdown_1() calls cpumask_weight() to check if any bit of a
      given cpumask is set. We can do it more efficiently with cpumask_empty()
      because cpumask_empty() stops traversing the cpumask as soon as it finds
      first set bit, while cpumask_weight() counts all bits unconditionally.
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      71c1a517
    • Yury Norov's avatar
      risc-v: replace bitmap_weight with bitmap_empty in riscv_fill_hwcap() · 8f51558e
      Yury Norov authored
      bitmap_empty() is better than bitmap_weight() because it may return
      earlier, and improves on readability.
      
      CC: Albert Ou <aou@eecs.berkeley.edu>
      CC: Anup Patel <anup@brainfault.org>
      CC: Atish Patra <atishp@atishpatra.org>
      CC: Jisheng Zhang <jszhang@kernel.org>
      CC: Palmer Dabbelt <palmer@dabbelt.com>
      CC: Paul Walmsley <paul.walmsley@sifive.com>
      CC: Tsukasa OI <research_trasio@irq.a4lg.com>
      CC: linux-riscv@lists.infradead.org
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      8f51558e
  2. 02 May, 2022 8 commits
  3. 11 Apr, 2022 1 commit
  4. 10 Apr, 2022 8 commits
    • Linus Torvalds's avatar
      Merge tag 'tty-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 8b57b304
      Linus Torvalds authored
      Pull serial driver fix from Greg KH:
       "This is a single serial driver fix for a build issue that showed up
        due to changes that came in through the tty tree in 5.18-rc1 that were
        missed previously. It resolves a build error with the mpc52xx_uart
        driver.
      
        It has been in linux-next this week with no reported problems"
      
      * tag 'tty-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: serial: mpc52xx_uart: make rx/tx hooks return unsigned, part II.
      8b57b304
    • Linus Torvalds's avatar
      Merge tag 'staging-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 95aa17c3
      Linus Torvalds authored
      Pull staging driver fix from Greg KH:
       "Here is a single staging driver fix for 5.18-rc2 that resolves an
        endian issue for the r8188eu driver. It has been in linux-next all
        this week with no reported problems"
      
      * tag 'staging-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: r8188eu: Fix PPPoE tag insertion on little endian systems
      95aa17c3
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.18-rc2' of... · 33563138
      Linus Torvalds authored
      Merge tag 'driver-core-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core updates from Greg KH:
       "Here are two small driver core changes for 5.18-rc2.
      
        They are the final bits in the removal of the default_attrs field in
        struct kobj_type. I had to wait until after 5.18-rc1 for all of the
        changes to do this came in through different development trees, and
        then one new user snuck in. So this series has two changes:
      
         - removal of the default_attrs field in the powerpc/pseries/vas code.
      
           The change has been acked by the PPC maintainers to come through
           this tree
      
         - removal of default_attrs from struct kobj_type now that all
           in-kernel users are removed.
      
           This cleans up the kobject code a little bit and removes some
           duplicated functionality that confused people (now there is only
           one way to do default groups)
      
        Both of these have been in linux-next for all of this week with no
        reported problems"
      
      * tag 'driver-core-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        kobject: kobj_type: remove default_attrs
        powerpc/pseries/vas: use default_groups in kobj_type
      33563138
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · f58d3410
      Linus Torvalds authored
      Pull char/misc driver fix from Greg KH:
       "A single driver fix. It resolves the build warning issue on 32bit
        systems in the habannalabs driver that came in during the 5.18-rc1
        merge cycle.
      
        It has been in linux-next for all this week with no reported problems"
      
      * tag 'char-misc-5.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        habanalabs: Fix test build failures
      f58d3410
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 4ea3c642
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix KVM "lost kick" race, where an attempt to pull a vcpu out of the
         guest could be lost (or delayed until the next guest exit).
      
       - Disable SCV (system call vectored) when PR KVM guests could be run.
      
       - Fix KVM PR guests using SCV, by disallowing AIL != 0 for KVM PR
         guests.
      
       - Add a new KVM CAP to indicate if AIL == 3 is supported.
      
       - Fix a regression when hotplugging a CPU to a memoryless/cpuless node.
      
       - Make virt_addr_valid() stricter for 64-bit Book3E & 32-bit, which
         fixes crashes seen due to hardened usercopy.
      
       - Revert a change to max_mapnr which broke HIGHMEM.
      
      Thanks to Christophe Leroy, Fabiano Rosas, Kefeng Wang, Nicholas Piggin,
      and Srikar Dronamraju.
      
      * tag 'powerpc-5.18-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        Revert "powerpc: Set max_mapnr correctly"
        powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit
        KVM: PPC: Move kvmhv_on_pseries() into kvm_ppc.h
        powerpc/numa: Handle partially initialized numa nodes
        powerpc/64: Fix build failure with allyesconfig in book3s_64_entry.S
        KVM: PPC: Use KVM_CAP_PPC_AIL_MODE_3
        KVM: PPC: Book3S PR: Disallow AIL != 0
        KVM: PPC: Book3S PR: Disable SCV when AIL could be disabled
        KVM: PPC: Book3S HV P9: Fix "lost kick" race
      4ea3c642
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2022-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1519610b
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "A set of interrupt chip driver fixes:
      
         - A fix for a long standing bug in the ARM GICv3 redistributor
           polling which uses the wrong bit number to test.
      
         - Prevent translation of bogus ACPI table entries which map device
           interrupts into the IPI space on ARM GICs.
      
         - Don't write into the pending register of ARM GICV4 before the scan
           in hardware has completed.
      
         - A set of build and correctness fixes for the Qualcomm MPM driver"
      
      * tag 'irq-urgent-2022-04-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic, gic-v3: Prevent GSI to SGI translations
        irqchip/gic-v3: Fix GICR_CTLR.RWP polling
        irqchip/gic-v4: Wait for GICR_VPENDBASER.Dirty to clear before descheduling
        irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init()
        irq/qcom-mpm: Fix build error without MAILBOX
      1519610b
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9c6913b7
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Fix the MSI message data struct definition
      
       - Use local labels in the exception table macros to avoid symbol
         conflicts with clang LTO builds
      
       - A couple of fixes to objtool checking of the relatively newly added
         SLS and IBT code
      
       - Rename a local var in the WARN* macro machinery to prevent shadowing
      
      * tag 'x86_urgent_for_v5.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/msi: Fix msi message data shadow struct
        x86/extable: Prefer local labels in .set directives
        x86,bpf: Avoid IBT objtool warning
        objtool: Fix SLS validation for kcov tail-call replacement
        objtool: Fix IBT tail-call detection
        x86/bug: Prevent shadowing in __WARN_FLAGS
        x86/mm/tlb: Revert retpoline avoidance approach
      9c6913b7
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v5.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b51f86e9
      Linus Torvalds authored
      Pull perf fixes from Borislav Petkov:
      
       - A couple of fixes to cgroup-related handling of perf events
      
       - A couple of fixes to event encoding on Sapphire Rapids
      
       - Pass event caps of inherited events so that perf doesn't fail wrongly
         at fork()
      
       - Add support for a new Raptor Lake CPU
      
      * tag 'perf_urgent_for_v5.18_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Always set cpuctx cgrp when enable cgroup event
        perf/core: Fix perf_cgroup_switch()
        perf/core: Use perf_cgroup_info->active to check if cgroup is active
        perf/core: Don't pass task around when ctx sched in
        perf/x86/intel: Update the FRONTEND MSR mask on Sapphire Rapids
        perf/x86/intel: Don't extend the pseudo-encoding to GP counters
        perf/core: Inherit event_caps
        perf/x86/uncore: Add Raptor Lake uncore support
        perf/x86/msr: Add Raptor Lake CPU support
        perf/x86/cstate: Add Raptor Lake support
        perf/x86: Add Intel Raptor Lake support
      b51f86e9