1. 14 Jul, 2022 2 commits
    • Thadeu Lima de Souza Cascardo's avatar
      x86/kvm: fix FASTOP_SIZE when return thunks are enabled · 84e7051c
      Thadeu Lima de Souza Cascardo authored
      The return thunk call makes the fastop functions larger, just like IBT
      does. Consider a 16-byte FASTOP_SIZE when CONFIG_RETHUNK is enabled.
      
      Otherwise, functions will be incorrectly aligned and when computing their
      position for differently sized operators, they will executed in the middle
      or end of a function, which may as well be an int3, leading to a crash
      like:
      
      [   36.091116] int3: 0000 [#1] SMP NOPTI
      [   36.091119] CPU: 3 PID: 1371 Comm: qemu-system-x86 Not tainted 5.15.0-41-generic #44
      [   36.091120] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014
      [   36.091121] RIP: 0010:xaddw_ax_dx+0x9/0x10 [kvm]
      [   36.091185] Code: 00 0f bb d0 c3 cc cc cc cc 48 0f bb d0 c3 cc cc cc cc 0f 1f 80 00 00 00 00 0f c0 d0 c3 cc cc cc cc 66 0f c1 d0 c3 cc cc cc cc <0f> 1f 80 00 00 00 00 0f c1 d0 c3 cc cc cc cc 48 0f c1 d0 c3 cc cc
      [   36.091186] RSP: 0018:ffffb1f541143c98 EFLAGS: 00000202
      [   36.091188] RAX: 0000000089abcdef RBX: 0000000000000001 RCX: 0000000000000000
      [   36.091188] RDX: 0000000076543210 RSI: ffffffffc073c6d0 RDI: 0000000000000200
      [   36.091189] RBP: ffffb1f541143ca0 R08: ffff9f1803350a70 R09: 0000000000000002
      [   36.091190] R10: ffff9f1803350a70 R11: 0000000000000000 R12: ffff9f1803350a70
      [   36.091190] R13: ffffffffc077fee0 R14: 0000000000000000 R15: 0000000000000000
      [   36.091191] FS:  00007efdfce8d640(0000) GS:ffff9f187dd80000(0000) knlGS:0000000000000000
      [   36.091192] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   36.091192] CR2: 0000000000000000 CR3: 0000000009b62002 CR4: 0000000000772ee0
      [   36.091195] PKRU: 55555554
      [   36.091195] Call Trace:
      [   36.091197]  <TASK>
      [   36.091198]  ? fastop+0x5a/0xa0 [kvm]
      [   36.091222]  x86_emulate_insn+0x7b8/0xe90 [kvm]
      [   36.091244]  x86_emulate_instruction+0x2f4/0x630 [kvm]
      [   36.091263]  ? kvm_arch_vcpu_load+0x7c/0x230 [kvm]
      [   36.091283]  ? vmx_prepare_switch_to_host+0xf7/0x190 [kvm_intel]
      [   36.091290]  complete_emulated_mmio+0x297/0x320 [kvm]
      [   36.091310]  kvm_arch_vcpu_ioctl_run+0x32f/0x550 [kvm]
      [   36.091330]  kvm_vcpu_ioctl+0x29e/0x6d0 [kvm]
      [   36.091344]  ? kvm_vcpu_ioctl+0x120/0x6d0 [kvm]
      [   36.091357]  ? __fget_files+0x86/0xc0
      [   36.091362]  ? __fget_files+0x86/0xc0
      [   36.091363]  __x64_sys_ioctl+0x92/0xd0
      [   36.091366]  do_syscall_64+0x59/0xc0
      [   36.091369]  ? syscall_exit_to_user_mode+0x27/0x50
      [   36.091370]  ? do_syscall_64+0x69/0xc0
      [   36.091371]  ? syscall_exit_to_user_mode+0x27/0x50
      [   36.091372]  ? __x64_sys_writev+0x1c/0x30
      [   36.091374]  ? do_syscall_64+0x69/0xc0
      [   36.091374]  ? exit_to_user_mode_prepare+0x37/0xb0
      [   36.091378]  ? syscall_exit_to_user_mode+0x27/0x50
      [   36.091379]  ? do_syscall_64+0x69/0xc0
      [   36.091379]  ? do_syscall_64+0x69/0xc0
      [   36.091380]  ? do_syscall_64+0x69/0xc0
      [   36.091381]  ? do_syscall_64+0x69/0xc0
      [   36.091381]  entry_SYSCALL_64_after_hwframe+0x61/0xcb
      [   36.091384] RIP: 0033:0x7efdfe6d1aff
      [   36.091390] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
      [   36.091391] RSP: 002b:00007efdfce8c460 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [   36.091393] RAX: ffffffffffffffda RBX: 000000000000ae80 RCX: 00007efdfe6d1aff
      [   36.091393] RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 000000000000000c
      [   36.091394] RBP: 0000558f1609e220 R08: 0000558f13fb8190 R09: 00000000ffffffff
      [   36.091394] R10: 0000558f16b5e950 R11: 0000000000000246 R12: 0000000000000000
      [   36.091394] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000
      [   36.091396]  </TASK>
      [   36.091397] Modules linked in: isofs nls_iso8859_1 kvm_intel joydev kvm input_leds serio_raw sch_fq_codel dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua ipmi_devintf ipmi_msghandler drm msr ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel virtio_net net_failover crypto_simd ahci xhci_pci cryptd psmouse virtio_blk libahci xhci_pci_renesas failover
      [   36.123271] ---[ end trace db3c0ab5a48fabcc ]---
      [   36.123272] RIP: 0010:xaddw_ax_dx+0x9/0x10 [kvm]
      [   36.123319] Code: 00 0f bb d0 c3 cc cc cc cc 48 0f bb d0 c3 cc cc cc cc 0f 1f 80 00 00 00 00 0f c0 d0 c3 cc cc cc cc 66 0f c1 d0 c3 cc cc cc cc <0f> 1f 80 00 00 00 00 0f c1 d0 c3 cc cc cc cc 48 0f c1 d0 c3 cc cc
      [   36.123320] RSP: 0018:ffffb1f541143c98 EFLAGS: 00000202
      [   36.123321] RAX: 0000000089abcdef RBX: 0000000000000001 RCX: 0000000000000000
      [   36.123321] RDX: 0000000076543210 RSI: ffffffffc073c6d0 RDI: 0000000000000200
      [   36.123322] RBP: ffffb1f541143ca0 R08: ffff9f1803350a70 R09: 0000000000000002
      [   36.123322] R10: ffff9f1803350a70 R11: 0000000000000000 R12: ffff9f1803350a70
      [   36.123323] R13: ffffffffc077fee0 R14: 0000000000000000 R15: 0000000000000000
      [   36.123323] FS:  00007efdfce8d640(0000) GS:ffff9f187dd80000(0000) knlGS:0000000000000000
      [   36.123324] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   36.123325] CR2: 0000000000000000 CR3: 0000000009b62002 CR4: 0000000000772ee0
      [   36.123327] PKRU: 55555554
      [   36.123328] Kernel panic - not syncing: Fatal exception in interrupt
      [   36.123410] Kernel Offset: 0x1400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
      [   36.135305] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
      
      Fixes: aa3d4803 ("x86: Use return-thunk in asm code")
      Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
      Co-developed-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Josh Poimboeuf <jpoimboe@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Reported-by: default avatarLinux Kernel Functional Testing <lkft@linaro.org>
      Message-Id: <20220713171241.184026-1-cascardo@canonical.com>
      Tested-by: default avatarJack Wang <jinpu.wang@ionos.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      84e7051c
    • Paolo Bonzini's avatar
      Merge tag 'kvm-riscv-fixes-5.19-2' of https://github.com/kvm-riscv/linux into HEAD · d13122ca
      Paolo Bonzini authored
       KVM/riscv fixes for 5.19, take #2
      
      - Fix missing PAGE_PFN_MASK
      
      - Fix SRCU deadlock caused by kvm_riscv_check_vcpu_requests()
      d13122ca
  2. 13 Jul, 2022 3 commits
  3. 12 Jul, 2022 15 commits
  4. 11 Jul, 2022 9 commits
  5. 10 Jul, 2022 11 commits
    • Linus Torvalds's avatar
      Linux 5.19-rc6 · 32346491
      Linus Torvalds authored
      32346491
    • Linus Torvalds's avatar
      Merge branch 'hot-fixes' (fixes for rc6) · 24f4b40e
      Linus Torvalds authored
      This is a collection of three fixes for small annoyances.
      
      Two of these are already pending in other trees, but I really don't want
      to release another -rc with these issues pending, so I picked up the
      patches for these things directly.  We'll end up with duplicate commits
      eventually, I prefer that over having these issues pending.
      
      The third one is just me getting rid of another BUG_ON() just because it
      was reported and I dislike those things so much.
      
      * merge 'hot-fixes' branch:
        ida: don't use BUG_ON() for debugging
        drm/aperture: Run fbdev removal before internal helpers
        ptrace: fix clearing of JOBCTL_TRACED in ptrace_unfreeze_traced()
      24f4b40e
    • Linus Torvalds's avatar
      ida: don't use BUG_ON() for debugging · fc82bbf4
      Linus Torvalds authored
      This is another old BUG_ON() that just shouldn't exist (see also commit
      a382f8fe: "signal handling: don't use BUG_ON() for debugging").
      
      In fact, as Matthew Wilcox points out, this condition shouldn't really
      even result in a warning, since a negative id allocation result is just
      a normal allocation failure:
      
        "I wonder if we should even warn here -- sure, the caller is trying to
         free something that wasn't allocated, but we don't warn for
         kfree(NULL)"
      
      and goes on to point out how that current error check is only causing
      people to unnecessarily do their own index range checking before freeing
      it.
      
      This was noted by Itay Iellin, because the bluetooth HCI socket cookie
      code does *not* do that range checking, and ends up just freeing the
      error case too, triggering the BUG_ON().
      
      The HCI code requires CAP_NET_RAW, and seems to just result in an ugly
      splat, but there really is no reason to BUG_ON() here, and we have
      generally striven for allocation models where it's always ok to just do
      
          free(alloc());
      
      even if the allocation were to fail for some random reason (usually
      obviously that "random" reason being some resource limit).
      
      Fixes: 88eca020 ("ida: simplified functions for id allocation")
      Reported-by: default avatarItay Iellin <ieitayie@gmail.com>
      Suggested-by: default avatarMatthew Wilcox <willy@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fc82bbf4
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine · 952c53cd
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "One core fix for DMA_INTERRUPT and rest driver fixes.
      
        Core:
      
         - Revert verification of DMA_INTERRUPT capability as that was
           incorrect
      
        Bunch of driver fixes for:
      
         - ti: refcount and put_device leak
      
         - qcom_bam: runtime pm overflow
      
         - idxd: force wq context cleanup and call idxd_enable_system_pasid()
           on success
      
         - dw-axi-dmac: RMW on channel suspend register
      
         - imx-sdma: restart cyclic channel when enabled
      
         - at_xdma: error handling for at_xdmac_alloc_desc
      
         - pl330: lockdep warning
      
         - lgm: error handling path in probe
      
         - allwinner: Fix min/max typo in binding"
      
      * tag 'dmaengine-fix-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
        dt-bindings: dma: allwinner,sun50i-a64-dma: Fix min/max typo
        dmaengine: lgm: Fix an error handling path in intel_ldma_probe()
        dmaengine: pl330: Fix lockdep warning about non-static key
        dmaengine: idxd: Only call idxd_enable_system_pasid() if succeeded in enabling SVA feature
        dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly
        dmaengine: imx-sdma: only restart cyclic channel when enabled
        dmaengine: dw-axi-dmac: Fix RMW on channel suspend register
        dmaengine: idxd: force wq context cleanup on device disable path
        dmaengine: qcom: bam_dma: fix runtime PM underflow
        dmaengine: imx-sdma: Allow imx8m for imx7 FW revs
        dmaengine: Revert "dmaengine: add verification of DMA_INTERRUPT capability for dmatest"
        dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate
        dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate
      952c53cd
    • Linus Torvalds's avatar
      Merge tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 5867f3b8
      Linus Torvalds authored
      Pull staging driver fix from Greg KH:
       "Here is a single staging driver fix for a reported problem that showed
        up in 5.19-rc1 in the wlan-ng driver. It has been in linux-next for a
        week with no reported problems"
      
      * tag 'staging-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging/wlan-ng: get the correct struct hfa384x in work callback
      5867f3b8
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · b41362fd
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are four small char/misc driver fixes for 5.19-rc6 to resolve
        some reported issues. They only affect two drivers:
      
         - rtsx_usb: fix for of-reported DMA warning error, the driver was
           handling memory buffers in odd ways, it has now been fixed up to be
           much simpler and correct by Shuah.
      
         - at25 eeprom driver bugfix for reported problem
      
        All of these have been in linux-next for a week with no reported
        problems"
      
      * tag 'char-misc-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        misc: rtsx_usb: set return value in rsp_buf alloc err path
        misc: rtsx_usb: use separate command and response buffers
        misc: rtsx_usb: fix use of dma mapped buffer for usb bulk transfer
        eeprom: at25: Rework buggy read splitting
      b41362fd
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block · d9919d43
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "A single fix for an issue that came up yesterday that we should plug
        for -rc6.
      
        This is a regression introduced in this cycle"
      
      * tag 'io_uring-5.19-2022-07-09' of git://git.kernel.dk/linux-block:
        io_uring: check that we have a file table when allocating update slots
      d9919d43
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.19-3' of... · 2fbd36df
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Adjust gen_compile_commands.py to the format change of *.mod files
      
       - Remove unused macro in scripts/Makefile.modinst
      
      * tag 'kbuild-fixes-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: remove unused cmd_none in scripts/Makefile.modinst
        gen_compile_commands: handle multiple lines per .mod file
      2fbd36df
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2b9b31ce
      Linus Torvalds authored
      Pull irq fixes from Borislav Petkov:
      
       - Gracefully handle failure to request MMIO resources in the GICv3
         driver
      
       - Make a static key static in the Apple AIC driver
      
       - Fix the Xilinx intc driver dependency on OF_ADDRESS
      
      * tag 'irq_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/apple-aic: Make symbol 'use_fast_ipi' static
        irqchip/xilinx: Add explicit dependency on OF_ADDRESS
        irqchip/gicv3: Handle resource request failure consistently
      2b9b31ce
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 74a0032b
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Prepare for and clear .brk early in order to address XenPV guests
         failures where the hypervisor verifies page tables and uninitialized
         data in that range leads to bogus failures in those checks
      
       - Add any potential setup_data entries supplied at boot to the identity
         pagetable mappings to prevent kexec kernel boot failures. Usually,
         this is not a problem for the normal kernel as those mappings are
         part of the initially mapped 2M pages but if kexec gets to allocate
         the second kernel somewhere else, those setup_data entries need to be
         mapped there too.
      
       - Fix objtool not to discard text references from the __tracepoints
         section so that ENDBR validation still works
      
       - Correct the setup_data types limit as it is user-visible, before 5.19
         releases
      
      * tag 'x86_urgent_for_v5.19_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/boot: Fix the setup data types max limit
        x86/ibt, objtool: Don't discard text references from tracepoint section
        x86/compressed/64: Add identity mappings for setup_data entries
        x86: Fix .brk attribute in linker script
        x86: Clear .brk area at early boot
        x86/xen: Use clear_bss() for Xen PV guests
      74a0032b
    • Masahiro Yamada's avatar
      kbuild: remove unused cmd_none in scripts/Makefile.modinst · f5a46185
      Masahiro Yamada authored
      Commit 65ce9c38 ("kbuild: move module strip/compression code into
      scripts/Makefile.modinst") added this unused code.
      
      Perhaps, I thought cmd_none was useful for CONFIG_MODULE_COMPRESS_NONE,
      but I did not use it after all.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      f5a46185