Skip to content
  1. Oct 28, 2021
    • Linus Torvalds's avatar
      Merge tag 'nios2_fixes_for_v5.15_part3' of... · 646b0de5
      Linus Torvalds authored
      Merge tag 'nios2_fixes_for_v5.15_part3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux
      
      Pull nios2 fix from Dinh Nguyen:
       "Fix a build error for allmodconfig"
      
      * tag 'nios2_fixes_for_v5.15_part3' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
        nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST
      646b0de5
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · ab2aa486
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Nothing very exciting here, it has been a quiet cycle overall. Usual
        collection of small bug fixes:
      
         - irdma issues with CQ entries, VLAN completions and a mutex deadlock
      
         - Incorrect DCT packets in mlx5
      
         - Userspace triggered overflows in qib
      
         - Locking error in hfi
      
         - Typo in errno value in qib/hfi1
      
         - Double free in qedr
      
         - Leak of random kernel memory to userspace with a netlink callback"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/sa_query: Use strscpy_pad instead of memcpy to copy a string
        RDMA/irdma: Do not hold qos mutex twice on QP resume
        RDMA/irdma: Set VLAN in UD work completion correctly
        RDMA/mlx5: Initialize the ODP xarray when creating an ODP MR
        rdma/qedr: Fix crash due to redundant release of device's qp memory
        RDMA/rdmavt: Fix error code in rvt_create_qp()
        IB/hfi1: Fix abba locking issue with sc_disable()
        IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields
        RDMA/mlx5: Set user priority for DCT
        RDMA/irdma: Process extended CQ entries correctly
      ab2aa486
  2. Oct 27, 2021
    • Guenter Roeck's avatar
      nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST · 4a089e95
      Guenter Roeck authored
      nios2:allmodconfig builds fail with
      
      make[1]: *** No rule to make target 'arch/nios2/boot/dts/""',
      	needed by 'arch/nios2/boot/dts/built-in.a'.  Stop.
      make: [Makefile:1868: arch/nios2/boot/dts] Error 2 (ignored)
      
      This is seen with compile tests since those enable NIOS2_DTB_SOURCE_BOOL,
      which in turn enables NIOS2_DTB_SOURCE. This causes the build error
      because the default value for NIOS2_DTB_SOURCE is an empty string.
      Disable NIOS2_DTB_SOURCE_BOOL for compile tests to avoid the error.
      
      Fixes: 2fc8483f
      
       ("nios2: Build infrastructure")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDinh Nguyen <dinguyen@kernel.org>
      4a089e95
    • Linus Torvalds's avatar
      Merge tag 'arm-soc-fixes-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · d25f2743
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "One last set of small fixes for the soc tree:
      
         - Incorrect ethernet phy settings found on i.mx and allwinner
           platforms
      
         - a revert for a Qualcomm DT change that caused a boot regression
      
         - four patches for incorrect settings in i.MX DT files
      
         - new MAINTAINER file entries for dhcom boards
      
         - a Kconfig fix for a reset driver that became unselectable
      
         - three more code changes for bugs in reset drivers"
      
      * tag 'arm-soc-fixes-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        MAINTAINERS: Add maintainers for DHCOM i.MX6 and DHCOM/DHCOR STM32MP1
        Revert "arm64: dts: qcom: sm8250: remove bus clock from the mdss node for sm8250 target"
        arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY
        arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency
        arm64: dts: imx8mm-kontron: Fix polarity of reg_rst_eth2
        arm64: dts: imx8mm-...
      d25f2743
  3. Oct 26, 2021
    • Christoph Niedermaier's avatar
      MAINTAINERS: Add maintainers for DHCOM i.MX6 and DHCOM/DHCOR STM32MP1 · 05d5da3c
      Christoph Niedermaier authored
      
      
      Add maintainers for DH electronics DHCOM i.MX6
      and DHCOM/DHCOR STM32MP1 boards.
      
      Signed-off-by: default avatarChristoph Niedermaier <cniedermaier@dh-electronics.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: kernel@dh-electronics.com
      Cc: arnd@arndb.de
      Link: https://lore.kernel.org/r/20211025073706.2794-1-cniedermaier@dh-electronics.com'
      To: soc@kernel.org
      To: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      05d5da3c
    • Arnd Bergmann's avatar
      Merge tag 'qcom-arm64-fixes-for-5.15-2' of... · f44e8f91
      Arnd Bergmann authored
      
      Merge tag 'qcom-arm64-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes
      
      Qualcomm ARM64 DTS one more fix for 5.15
      
      This reverts a clock change in the Qualcomm RB5 devicetree which in some
      combinations of firmware and configuration causes the device to crash
      during boot.
      
      Data on an adjacent platform indicates that this is probably not be the
      root cause of the problem, but this resolves the regression seen on RB5
      and will allow the SM8250 platform to boot v5.15.
      
      * tag 'qcom-arm64-fixes-for-5.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
        Revert "arm64: dts: qcom: sm8250: remove bus clock from the mdss node for sm8250 target"
      
      Link: https://lore.kernel.org/r/20211025201213.1145348-1-bjorn.andersson@linaro.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      f44e8f91
    • Amit Pundir's avatar
      Revert "arm64: dts: qcom: sm8250: remove bus clock from the mdss node for sm8250 target" · e091b836
      Amit Pundir authored
      This reverts commit 001ce978.
      
      This upstream commit broke AOSP (post Android 12 merge) build
      on RB5. The device either silently crashes into USB crash mode
      after android boot animation or we see a blank blue screen
      with following dpu errors in dmesg:
      
      [  T444] hw recovery is not complete for ctl:3
      [  T444] [drm:dpu_encoder_phys_vid_prepare_for_kickoff:539] [dpu error]enc31 intf1 ctl 3 reset failure: -22
      [  T444] [drm:dpu_encoder_phys_vid_wait_for_commit_done:513] [dpu error]vblank timeout
      [  T444] [drm:dpu_kms_wait_for_commit_done:454] [dpu error]wait for commit done returned -110
      [    C7] [drm:dpu_encoder_frame_done_timeout:2127] [dpu error]enc31 frame done timeout
      [  T444] [drm:dpu_encoder_phys_vid_wait_for_commit_done:513] [dpu error]vblank timeout
      [  T444] [drm:dpu_kms_wait_for_commit_done:454] [dpu error]wait for commit done returned -110
      
      Fixes: 001ce978
      
       ("arm64: dts: qcom: sm8250: remove bus clock from the mdss node for sm8250 target")
      Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
      Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Link: https://lore.kernel.org/r/20211014135410.4136412-1-dmitry.baryshkov@linaro.org
      e091b836
    • Linus Torvalds's avatar
      Linux 5.15-rc7 · 3906fe9b
      Linus Torvalds authored
      3906fe9b
    • Matthew Wilcox (Oracle)'s avatar
      secretmem: Prevent secretmem_users from wrapping to zero · cb685432
      Matthew Wilcox (Oracle) authored
      Commit 11086054 ("mm/secretmem: use refcount_t instead of atomic_t")
      attempted to fix the problem of secretmem_users wrapping to zero and
      allowing suspend once again.
      
      But it was reverted in commit 87066fdd
      
       ("Revert 'mm/secretmem: use
      refcount_t instead of atomic_t'") because of the problems it caused - a
      refcount_t was not semantically the right type to use.
      
      Instead prevent secretmem_users from wrapping to zero by forbidding new
      users if the number of users has wrapped from positive to negative.
      This stops a long way short of reaching the necessary 4 billion users
      where it wraps to zero again, so there's no need to be clever with
      special anti-wrap types or checking the return value from atomic_inc().
      
      Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Cc: Jordy Zomer <jordy@pwning.systems>
      Cc: Kees Cook <keescook@chromium.org>,
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Mike Rapoport <rppt@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cb685432
    • Linus Torvalds's avatar
      spi: Fix tegra20 build with CONFIG_PM=n once again · ac8a6eba
      Linus Torvalds authored
      Commit efafec27 ("spi: Fix tegra20 build with CONFIG_PM=n") already
      fixed the build without PM support once.  There was an alternative fix
      by Guenter in commit 2bab9409 ("spi: tegra20-slink: Declare runtime
      suspend and resume functions conditionally"), and Mark then merged the
      two correctly in ffb1e76f ("Merge tag 'v5.15-rc2' into spi-5.15").
      
      But for some inexplicable reason, Mark then merged things _again_ in
      commit 59c4e190
      
       ("Merge tag 'v5.15-rc3' into spi-5.15"), and screwed
      things up at that point, and the __maybe_unused attribute on
      tegra_slink_runtime_resume() went missing.
      
      Reinstate it, so that alpha (and other architectures without PM support)
      builds cleanly again.
      
      Btw, this is another prime example of how random back-merges are not
      good.  Just don't do them.  Subsystem developers should not merge my
      tree in any normal circumstances.  Both of those merge commits pointed
      to above are bad: even the one that got the merge result right doesn't
      even mention _why_ it was done, and the one that got it wrong is
      obviously broken.
      
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: Mark Brown <broonie@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ac8a6eba
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · c2b43854
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
      
       - Fix clang-related relocation warning in futex code
      
       - Fix incorrect use of get_kernel_nofault()
      
       - Fix bad code generation in __get_user_check() when kasan is enabled
      
       - Ensure TLB function table is correctly aligned
      
       - Remove duplicated string function definitions in decompressor
      
       - Fix link-time orphan section warnings
      
       - Fix old-style function prototype for arch_init_kprobes()
      
       - Only warn about XIP address when not compile testing
      
       - Handle BE32 big endian for keystone2 remapping
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 9148/1: handle CONFIG_CPU_ENDIAN_BE32 in arch/arm/kernel/head.S
        ARM: 9141/1: only warn about XIP address when not compile testing
        ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype
        ARM: 9138/1: fix link warning with XIP + frame-pointer
        ARM: 9134/1: remove duplicate memcpy() definition
        ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned
        ARM: 9132/1: Fix __get_user_check failure with ARM KASAN images
        ARM: 9125/1: fix incorrect use of get_kernel_nofault()
        ARM: 9122/1: select HAVE_FUTEX_CMPXCHG
      c2b43854
    • Linus Torvalds's avatar
      Merge tag 'libata-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 4862649f
      Linus Torvalds authored
      Pull libata fix from Damien Le Moal:
       "A single fix in this pull request addressing an invalid error code
        return in the sata_mv driver (from Zheyu)"
      
      * tag 'libata-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        ata: sata_mv: Fix the error handling of mv_chip_id()
      4862649f
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · a51aec41
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Some late pin control fixes, the most generally annoying will probably
        be the AMD IRQ storm fix affecting the Microsoft surface.
      
        Summary:
      
         - Three fixes pertaining to Broadcom DT bindings. Some stuff didn't
           work out as inteded, we need to back out
      
         - A resume bug fix in the STM32 driver
      
         - Disable and mask the interrupts on probe in the AMD pinctrl driver,
           affecting Microsoft surface"
      
      * tag 'pinctrl-v5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: amd: disable and mask interrupts on probe
        pinctrl: stm32: use valid pin identifier in stm32_pinctrl_resume()
        Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode"
        dt-bindings: pinctrl: brcm,ns-pinmux: drop unneeded CRU from example
        Revert "dt-bindings: pinctrl: bcm4708-pinmux: rework binding to use syscon"
      a51aec41
  4. Oct 25, 2021
    • Mark Zhang's avatar
      RDMA/sa_query: Use strscpy_pad instead of memcpy to copy a string · 64733956
      Mark Zhang authored
      When copying the device name, the length of the data memcpy copied exceeds
      the length of the source buffer, which cause the KASAN issue below.  Use
      strscpy_pad() instead.
      
       BUG: KASAN: slab-out-of-bounds in ib_nl_set_path_rec_attrs+0x136/0x320 [ib_core]
       Read of size 64 at addr ffff88811a10f5e0 by task rping/140263
       CPU: 3 PID: 140263 Comm: rping Not tainted 5.15.0-rc1+ #1
       Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
       Call Trace:
        dump_stack_lvl+0x57/0x7d
        print_address_description.constprop.0+0x1d/0xa0
        kasan_report+0xcb/0x110
        kasan_check_range+0x13d/0x180
        memcpy+0x20/0x60
        ib_nl_set_path_rec_attrs+0x136/0x320 [ib_core]
        ib_nl_make_request+0x1c6/0x380 [ib_core]
        send_mad+0x20a/0x220 [ib_core]
        ib_sa_path_rec_get+0x3e3/0x800 [ib_core]
        cma_query_ib_route+0x29b/0x390 [rdma_cm]
        rdma_resolve_route+0x308/0x3e0 [rdma_cm]
        ucma_resolve_route+0xe1/0x150 [rdma_ucm]
        ucma_write+0x17b/0x1f0 [rdma_ucm]
        vfs_write+0x142/0x4d0
        ksys_write+0x133/0x160
        do_syscall_64+0x43/0x90
        entry_SYSCALL_64_after_hwframe+0x44/0xae
       RIP: 0033:0x7f26499aa90f
       Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 29 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 5c fd ff ff 48
       RSP: 002b:00007f26495f2dc0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
       RAX: ffffffffffffffda RBX: 00000000000007d0 RCX: 00007f26499aa90f
       RDX: 0000000000000010 RSI: 00007f26495f2e00 RDI: 0000000000000003
       RBP: 00005632a8315440 R08: 0000000000000000 R09: 0000000000000001
       R10: 0000000000000000 R11: 0000000000000293 R12: 00007f26495f2e00
       R13: 00005632a83154e0 R14: 00005632a8315440 R15: 00005632a830a810
      
       Allocated by task 131419:
        kasan_save_stack+0x1b/0x40
        __kasan_kmalloc+0x7c/0x90
        proc_self_get_link+0x8b/0x100
        pick_link+0x4f1/0x5c0
        step_into+0x2eb/0x3d0
        walk_component+0xc8/0x2c0
        link_path_walk+0x3b8/0x580
        path_openat+0x101/0x230
        do_filp_open+0x12e/0x240
        do_sys_openat2+0x115/0x280
        __x64_sys_openat+0xce/0x140
        do_syscall_64+0x43/0x90
        entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Fixes: 2ca546b9
      
       ("IB/sa: Route SA pathrecord query through netlink")
      Link: https://lore.kernel.org/r/72ede0f6dab61f7f23df9ac7a70666e07ef314b0.1635055496.git.leonro@nvidia.com
      Signed-off-by: default avatarMark Zhang <markzhang@nvidia.com>
      Reviewed-by: default avatarMark Bloch <mbloch@nvidia.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      64733956
    • LABBE Corentin's avatar
      ARM: 9148/1: handle CONFIG_CPU_ENDIAN_BE32 in arch/arm/kernel/head.S · 00568b8a
      LABBE Corentin authored
      My intel-ixp42x-welltech-epbx100 no longer boot since 4.14.
      This is due to commit 463dbba4
      
       ("ARM: 9104/2: Fix Keystone 2 kernel
      mapping regression")
      which forgot to handle CONFIG_CPU_ENDIAN_BE32 as possible BE config.
      
      Suggested-by: default avatarKrzysztof Hałasa <khalasa@piap.pl>
      Fixes: 463dbba4
      
       ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
      Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      00568b8a
    • Zheyu Ma's avatar
      ata: sata_mv: Fix the error handling of mv_chip_id() · a0023bb9
      Zheyu Ma authored
      
      
      mv_init_host() propagates the value returned by mv_chip_id() which in turn
      gets propagated by mv_pci_init_one() and hits local_pci_probe().
      
      During the process of driver probing, the probe function should return < 0
      for failure, otherwise, the kernel will treat value > 0 as success.
      
      Since this is a bug rather than a recoverable runtime error we should
      use dev_alert() instead of dev_err().
      
      Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      a0023bb9
    • Linus Torvalds's avatar
      Revert "mm/secretmem: use refcount_t instead of atomic_t" · 87066fdd
      Linus Torvalds authored
      This reverts commit 11086054
      
      .
      
      Converting the "secretmem_users" counter to a refcount is incorrect,
      because a refcount is special in zero and can't just be incremented (but
      a count of users is not, and "no users" is actually perfectly valid and
      not a sign of a free'd resource).
      
      Reported-by: default avatar <syzbot+75639e6a0331cd61d3e2@syzkaller.appspotmail.com>
      Cc: Jordy Zomer <jordy@pwning.systems>
      Cc: Kees Cook <keescook@chromium.org>,
      Cc: Jordy Zomer <jordy@jordyzomer.github.io>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Mike Rapoport <rppt@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      87066fdd
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · b20078fd
      Linus Torvalds authored
      Pull autofs fix from Al Viro:
       "Fix for a braino of mine (in getting rid of open-coded
        dentry_path_raw() in autofs a couple of cycles ago).
      
        Mea culpa...  Obvious -stable fodder"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        autofs: fix wait name hash calculation in autofs_wait()
      b20078fd
    • Linus Torvalds's avatar
      Merge tag 'sched_urgent_for_v5.15_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 6c62666d
      Linus Torvalds authored
      Pull scheduler fix from Borislav Petkov:
       "Reset clang's Shadow Call Stack on hotplug to prevent it from
        overflowing"
      
      * tag 'sched_urgent_for_v5.15_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/scs: Reset the shadow stack when idle_task_exit
      6c62666d
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.15_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 16bc1776
      Linus Torvalds authored
      Pull x86 fix from Borislav Petkov:
       "A single change adding Dave Hansen to our maintainers team"
      
      * tag 'x86_urgent_for_v5.15_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        MAINTAINERS: Add Dave Hansen to the x86 maintainer team
      16bc1776
    • Linus Torvalds's avatar
      Merge tag '5.15-rc6-ksmbd-fixes' of git://git.samba.org/ksmbd · c460e789
      Linus Torvalds authored
      Pull ksmbd fixes from Steve French:
       "Ten fixes for the ksmbd kernel server, for improved security and
        additional buffer overflow checks:
      
         - a security improvement to session establishment to reduce the
           possibility of dictionary attacks
      
         - fix to ensure that maximum i/o size negotiated in the protocol is
           not less than 64K and not more than 8MB to better match expected
           behavior
      
         - fix for crediting (flow control) important to properly verify that
           sufficient credits are available for the requested operation
      
         - seven additional buffer overflow, buffer validation checks"
      
      * tag '5.15-rc6-ksmbd-fixes' of git://git.samba.org/ksmbd:
        ksmbd: add buffer validation in session setup
        ksmbd: throttle session setup failures to avoid dictionary attacks
        ksmbd: validate OutputBufferLength of QUERY_DIR, QUERY_INFO, IOCTL requests
        ksmbd: validate credit charge after validating SMB2 PDU body size
        ksmbd: add buffer validation for smb direct
        ksmbd: limit read/write/trans buffer size not to exceed 8MB
        ksmbd: validate compound response buffer
        ksmbd: fix potencial 32bit overflow from data area check in smb2_write
        ksmbd: improve credits management
        ksmbd: add validation in smb2_ioctl
      c460e789
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 0f386a60
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Ten fixes, seven of which are in drivers.
      
        The core fixes are one to fix a potential crash on resume, one to sort
        out our reference count releases to avoid releasing in-use modules and
        one to adjust the cmd per lun calculation to avoid an overflow in
        hyper-v"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: ufs-pci: Force a full restore after suspend-to-disk
        scsi: qla2xxx: Fix unmap of already freed sgl
        scsi: qla2xxx: Fix a memory leak in an error path of qla2x00_process_els()
        scsi: qla2xxx: Return -ENOMEM if kzalloc() fails
        scsi: sd: Fix crashes in sd_resume_runtime()
        scsi: mpi3mr: Fix duplicate device entries when scanning through sysfs
        scsi: core: Put LLD module refcnt after SCSI device is released
        scsi: storvsc: Fix validation for unsolicited incoming packets
        scsi: iscsi: Fix set_param() handling
        scsi: core: Fix shost->cmd_per_lun calculation in scsi_add_host_with_dma()
      0f386a60
  5. Oct 23, 2021
    • Linus Torvalds's avatar
      Merge tag 'block-5.15-2021-10-22' of git://git.kernel.dk/linux-block · 9c0c4d24
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Fix for the cgroup code not ussing irq safe stats updates, and one fix
        for an error handling condition in add_partition()"
      
      * tag 'block-5.15-2021-10-22' of git://git.kernel.dk/linux-block:
        block: fix incorrect references to disk objects
        blk-cgroup: blk_cgroup_bio_start() should use irq-safe operations on blkg->iostat_cpu
      9c0c4d24
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.15-2021-10-22' of git://git.kernel.dk/linux-block · da4d34b6
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Two fixes for the max workers limit API that was introduced this
        series: one fix for an issue with that code, and one fixing a linked
        timeout regression in this series"
      
      * tag 'io_uring-5.15-2021-10-22' of git://git.kernel.dk/linux-block:
        io_uring: apply worker limits to previous users
        io_uring: fix ltimeout unprep
        io_uring: apply max_workers limit to all future users
        io-wq: max_worker fixes
      da4d34b6
    • Linus Torvalds's avatar
      Merge tag 'fuse-fixes-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 5ab2ed0a
      Linus Torvalds authored
      Pull fuse fixes from Miklos Szeredi:
       "Syzbot discovered a race in case of reusing the fuse sb (introduced in
        this cycle).
      
        Fix it by doing the s_fs_info initialization at the proper place"
      
      * tag 'fuse-fixes-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: clean up error exits in fuse_fill_super()
        fuse: always initialize sb->s_fs_info
        fuse: clean up fuse_mount destruction
        fuse: get rid of fuse_put_super()
        fuse: check s_root when destroying sb
      5ab2ed0a
    • Linus Torvalds's avatar
      Merge tag 'hyperv-fixes-signed-20211022' of... · 477b4e80
      Linus Torvalds authored
      Merge tag 'hyperv-fixes-signed-20211022' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyper-v fix from Wei Liu:
      
       - Fix vmbus ARM64 build (Arnd Bergmann)
      
      * tag 'hyperv-fixes-signed-20211022' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        hyperv/vmbus: include linux/bitops.h
      477b4e80
    • Arnd Bergmann's avatar
      hyperv/vmbus: include linux/bitops.h · 8017c996
      Arnd Bergmann authored
      
      
      On arm64 randconfig builds, hyperv sometimes fails with this
      error:
      
      In file included from drivers/hv/hv_trace.c:3:
      In file included from drivers/hv/hyperv_vmbus.h:16:
      In file included from arch/arm64/include/asm/sync_bitops.h:5:
      arch/arm64/include/asm/bitops.h:11:2: error: only <linux/bitops.h> can be included directly
      In file included from include/asm-generic/bitops/hweight.h:5:
      include/asm-generic/bitops/arch_hweight.h:9:9: error: implicit declaration of function '__sw_hweight32' [-Werror,-Wimplicit-function-declaration]
      include/asm-generic/bitops/atomic.h:17:7: error: implicit declaration of function 'BIT_WORD' [-Werror,-Wimplicit-function-declaration]
      
      Include the correct header first.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Link: https://lore.kernel.org/r/20211018131929.2260087-1-arnd@kernel.org
      Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
      8017c996
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1d4590f5
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix two regressions, one related to ACPI power resources
        management and one that broke ACPI tools compilation.
      
        Specifics:
      
         - Stop turning off unused ACPI power resources in an unknown state to
           address a regression introduced during the 5.14 cycle (Rafael
           Wysocki).
      
         - Fix an ACPI tools build issue introduced recently when the minimal
           stdarg.h was added (Miguel Bernal Marin)"
      
      * tag 'acpi-5.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: PM: Do not turn off power resources in unknown state
        ACPI: tools: fix compilation error
      1d4590f5
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · cd82c4a7
      Linus Torvalds authored
      Pull more x86 kvm fixes from Paolo Bonzini:
      
       - Cache coherency fix for SEV live migration
      
       - Fix for instruction emulation with PKU
      
       - fixes for rare delaying of interrupt delivery
      
       - fix for SEV-ES buffer overflow
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: SEV-ES: go over the sev_pio_data buffer in multiple passes if needed
        KVM: SEV-ES: keep INS functions together
        KVM: x86: remove unnecessary arguments from complete_emulator_pio_in
        KVM: x86: split the two parts of emulator_pio_in
        KVM: SEV-ES: clean up kvm_sev_es_ins/outs
        KVM: x86: leave vcpu->arch.pio.count alone in emulator_pio_in_out
        KVM: SEV-ES: rename guest_ins_data to sev_pio_data
        KVM: SEV: Flush cache on non-coherent systems before RECEIVE_UPDATE_DATA
        KVM: MMU: Reset mmu->pkru_mask to avoid stale data
        KVM: nVMX: promptly process interrupts delivered while in guest mode
        KVM: x86: check for interrupts before deciding whether to exit the fast path
      cd82c4a7
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-tools' · 7a748900
      Rafael J. Wysocki authored
      Merge a fix for a recent ACPI tools bild regresson.
      
      * acpi-tools:
        ACPI: tools: fix compilation error
      7a748900
  6. Oct 22, 2021
    • Paolo Bonzini's avatar
      KVM: SEV-ES: go over the sev_pio_data buffer in multiple passes if needed · 95e16b47
      Paolo Bonzini authored
      The PIO scratch buffer is larger than a single page, and therefore
      it is not possible to copy it in a single step to vcpu->arch/pio_data.
      Bound each call to emulator_pio_in/out to a single page; keep
      track of how many I/O operations are left in vcpu->arch.sev_pio_count,
      so that the operation can be restarted in the complete_userspace_io
      callback.
      
      For OUT, this means that the previous kvm_sev_es_outs implementation
      becomes an iterator of the loop, and we can consume the sev_pio_data
      buffer before leaving to userspace.
      
      For IN, instead, consuming the buffer and decreasing sev_pio_count
      is always done in the complete_userspace_io callback, because that
      is when the memcpy is done into sev_pio_data.
      
      Cc: stable@vger.kernel.org
      Fixes: 7ed9abfe
      
       ("KVM: SVM: Support string IO operations for an SEV-ES guest")
      Reported-by: default avatarFelix Wilhelm <fwilhelm@google.com>
      Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      95e16b47
    • Paolo Bonzini's avatar
      KVM: SEV-ES: keep INS functions together · 4fa4b38d
      Paolo Bonzini authored
      Make the diff a little nicer when we actually get to fixing
      the bug.  No functional change intended.
      
      Cc: stable@vger.kernel.org
      Fixes: 7ed9abfe
      
       ("KVM: SVM: Support string IO operations for an SEV-ES guest")
      Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4fa4b38d
    • Paolo Bonzini's avatar
      KVM: x86: remove unnecessary arguments from complete_emulator_pio_in · 6b5efc93
      Paolo Bonzini authored
      complete_emulator_pio_in can expect that vcpu->arch.pio has been filled in,
      and therefore does not need the size and count arguments.  This makes things
      nicer when the function is called directly from a complete_userspace_io
      callback.
      
      No functional change intended.
      
      Cc: stable@vger.kernel.org
      Fixes: 7ed9abfe
      
       ("KVM: SVM: Support string IO operations for an SEV-ES guest")
      Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      6b5efc93
    • Paolo Bonzini's avatar
      KVM: x86: split the two parts of emulator_pio_in · 3b27de27
      Paolo Bonzini authored
      emulator_pio_in handles both the case where the data is pending in
      vcpu->arch.pio.count, and the case where I/O has to be done via either
      an in-kernel device or a userspace exit.  For SEV-ES we would like
      to split these, to identify clearly the moment at which the
      sev_pio_data is consumed.  To this end, create two different
      functions: __emulator_pio_in fills in vcpu->arch.pio.count, while
      complete_emulator_pio_in clears it and releases vcpu->arch.pio.data.
      
      Because this patch has to be backported, things are left a bit messy.
      kernel_pio() operates on vcpu->arch.pio, which leads to emulator_pio_in()
      having with two calls to complete_emulator_pio_in().  It will be fixed
      in the next release.
      
      While at it, remove the unused void* val argument of emulator_pio_in_out.
      The function currently hardcodes vcpu->arch.pio_data as the
      source/destination buffer, which sucks but will be fixed after the more
      severe SEV-ES buffer overflow.
      
      No functional change intended.
      
      Cc: stable@vger.kernel.org
      Fixes: 7ed9abfe
      
       ("KVM: SVM: Support string IO operations for an SEV-ES guest")
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      3b27de27
    • Paolo Bonzini's avatar
      KVM: SEV-ES: clean up kvm_sev_es_ins/outs · ea724ea4
      Paolo Bonzini authored
      A few very small cleanups to the functions, smushed together because
      the patch is already very small like this:
      
      - inline emulator_pio_in_emulated and emulator_pio_out_emulated,
        since we already have the vCPU
      
      - remove the data argument and pull setting vcpu->arch.sev_pio_data into
        the caller
      
      - remove unnecessary clearing of vcpu->arch.pio.count when
        emulation is done by the kernel (and therefore vcpu->arch.pio.count
        is already clear on exit from emulator_pio_in and emulator_pio_out).
      
      No functional change intended.
      
      Cc: stable@vger.kernel.org
      Fixes: 7ed9abfe
      
       ("KVM: SVM: Support string IO operations for an SEV-ES guest")
      Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ea724ea4
    • Paolo Bonzini's avatar
      KVM: x86: leave vcpu->arch.pio.count alone in emulator_pio_in_out · 0d33b1ba
      Paolo Bonzini authored
      Currently emulator_pio_in clears vcpu->arch.pio.count twice if
      emulator_pio_in_out performs kernel PIO.  Move the clear into
      emulator_pio_out where it is actually necessary.
      
      No functional change intended.
      
      Cc: stable@vger.kernel.org
      Fixes: 7ed9abfe
      
       ("KVM: SVM: Support string IO operations for an SEV-ES guest")
      Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0d33b1ba
    • Paolo Bonzini's avatar
      KVM: SEV-ES: rename guest_ins_data to sev_pio_data · b5998402
      Paolo Bonzini authored
      We will be using this field for OUTS emulation as well, in case the
      data that is pushed via OUTS spans more than one page.  In that case,
      there will be a need to save the data pointer across exits to userspace.
      
      So, change the name to something that refers to any kind of PIO.
      Also spell out what it is used for, namely SEV-ES.
      
      No functional change intended.
      
      Cc: stable@vger.kernel.org
      Fixes: 7ed9abfe
      
       ("KVM: SVM: Support string IO operations for an SEV-ES guest")
      Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b5998402
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2021-10-22' of git://anongit.freedesktop.org/drm/drm · 64222515
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Nothing too crazy at the end of the cycle, the kmb modesetting fixes
        are probably a bit large but it's not a major driver, and its fixing
        monitor doesn't turn on type problems.
      
        Otherwise it's just a few minor patches, one ast regression revert, an
        msm power stability fix.
      
        ast:
         - fix regression with connector detect
      
        msm:
         - fix power stability issue
      
        msxfb:
         - fix crash on unload
      
        panel:
         - sync fix
      
        kmb:
         - modesetting fixes"
      
      * tag 'drm-fixes-2021-10-22' of git://anongit.freedesktop.org/drm/drm:
        Revert "drm/ast: Add detect function support"
        drm/kmb: Enable ADV bridge after modeset
        drm/kmb: Corrected typo in handle_lcd_irq
        drm/kmb: Disable change of plane parameters
        drm/kmb: Remove clearing DPHY regs
        drm/kmb: Limit supported mode to 1080p
        drm/kmb: Work around for higher system clock
        drm/panel: ilitek-ili9881c: Fix sync for Feixin K101-IM2BYL02 panel
        drm: mxsfb: Fix NULL pointer dereference crash on unload
        drm/msm/devfreq: Restrict idle clamping to a618 for now
      64222515
    • Mike Rapoport's avatar
      memblock: exclude MEMBLOCK_NOMAP regions from kmemleak · 658aafc8
      Mike Rapoport authored
      Vladimir Zapolskiy reports:
      
      Commit a7259df7 ("memblock: make memblock_find_in_range method
      private") invokes a kernel panic while running kmemleak on OF platforms
      with nomaped regions:
      
        Unable to handle kernel paging request at virtual address fff000021e00000
        [...]
          scan_block+0x64/0x170
          scan_gray_list+0xe8/0x17c
          kmemleak_scan+0x270/0x514
          kmemleak_write+0x34c/0x4ac
      
      The memory allocated from memblock is registered with kmemleak, but if
      it is marked MEMBLOCK_NOMAP it won't have linear map entries so an
      attempt to scan such areas will fault.
      
      Ideally, memblock_mark_nomap() would inform kmemleak to ignore
      MEMBLOCK_NOMAP memory, but it can be called before kmemleak interfaces
      operating on physical addresses can use __va() conversion.
      
      Make sure that functions that mark allocated memory as MEMBLOCK_NOMAP
      take care of informing kmemleak to ignore such memory.
      
      Link: https://lore.kernel.org/all/8ade5174-b143-d621-8c8e-dc6a1898c6fb@linaro.org
      Link: https://lore.kernel.org/all/c30ff0a2-d196-c50d-22f0-bd50696b1205@quicinc.com
      Fixes: a7259df7
      
       ("memblock: make memblock_find_in_range method private")
      Reported-by: default avatarVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: default avatarVladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
      Tested-by: default avatarQian Cai <quic_qiancai@quicinc.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      658aafc8
    • Mike Rapoport's avatar
      Revert "memblock: exclude NOMAP regions from kmemleak" · 6c9a5455
      Mike Rapoport authored
      Commit 6e44bd6d ("memblock: exclude NOMAP regions from kmemleak")
      breaks boot on EFI systems with kmemleak and VM_DEBUG enabled:
      
        efi: Processing EFI memory map:
        efi:   0x000090000000-0x000091ffffff [Conventional|   |  |  |  |  |  |  |  |  |   |WB|WT|WC|UC]
        efi:   0x000092000000-0x0000928fffff [Runtime Data|RUN|  |  |  |  |  |  |  |  |   |WB|WT|WC|UC]
        ------------[ cut here ]------------
        kernel BUG at mm/kmemleak.c:1140!
        Internal error: Oops - BUG: 0 [#1] SMP
        Modules linked in:
        CPU: 0 PID: 0 Comm: swapper Not tainted 5.15.0-rc6-next-20211019+ #104
        pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
        pc : kmemleak_free_part_phys+0x64/0x8c
        lr : kmemleak_free_part_phys+0x38/0x8c
        sp : ffff800011eafbc0
        x29: ffff800011eafbc0 x28: 1fffff7fffb41c0d x27: fffffbfffda0e068
        x26: 0000000092000000 x25: 1ffff000023d5f94 x24: ffff800011ed84d0
        x23: ffff800011ed84c0 x22: ffff800011ed83d8 x21: 0000000000900000
        x20: ffff800011782000 x19: 0000000092000000 x18: ffff800011ee0730
        x17: 0000000000000000 x16: 0000000000000000 x15: 1ffff0000233252c
        x14: ffff800019a905a0 x13: 0000000000000001 x12: ffff7000023d5ed7
        x11: 1ffff000023d5ed6 x10: ffff7000023d5ed6 x9 : dfff800000000000
        x8 : ffff800011eaf6b7 x7 : 0000000000000001 x6 : ffff800011eaf6b0
        x5 : 00008ffffdc2a12a x4 : ffff7000023d5ed7 x3 : 1ffff000023dbf99
        x2 : 1ffff000022f0463 x1 : 0000000000000000 x0 : ffffffffffffffff
        Call trace:
         kmemleak_free_part_phys+0x64/0x8c
         memblock_mark_nomap+0x5c/0x78
         reserve_regions+0x294/0x33c
         efi_init+0x2d0/0x490
         setup_arch+0x80/0x138
         start_kernel+0xa0/0x3ec
         __primary_switched+0xc0/0xc8
        Code: 34000041 97d526e7 f9418e80 36000040 (d4210000)
        random: get_random_bytes called from print_oops_end_marker+0x34/0x80 with crng_init=0
        ---[ end trace 0000000000000000 ]---
      
      The crash happens because kmemleak_free_part_phys() tries to use __va()
      before memstart_addr is initialized and this triggers a VM_BUG_ON() in
      arch/arm64/include/asm/memory.h:
      
      Revert 6e44bd6d
      
       ("memblock: exclude NOMAP regions from kmemleak"),
      the issue it is fixing will be fixed differently.
      
      Reported-by: default avatarQian Cai <quic_qiancai@quicinc.com>
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c9a5455