1. 17 Jun, 2022 3 commits
  2. 16 Jun, 2022 1 commit
  3. 14 Jun, 2022 5 commits
  4. 13 Jun, 2022 4 commits
    • Jani Nikula's avatar
      drm/i915/uc: remove accidental static from a local variable · 2636e008
      Jani Nikula authored
      The arrays are static const, but the pointer shouldn't be static.
      
      Fixes: 3d832f37 ("drm/i915/uc: Allow platforms to have GuC but not HuC")
      Cc: John Harrison <John.C.Harrison@Intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220511094619.27889-1-jani.nikula@intel.com
      (cherry picked from commit 5821a0bb)
      2636e008
    • Nirmoy Das's avatar
      drm/i915: Individualize fences before adding to dma_resv obj · 842d9346
      Nirmoy Das authored
      _i915_vma_move_to_active() can receive > 1 fences for
      multiple batch buffers submission. Because dma_resv_add_fence()
      can only accept one fence at a time, change _i915_vma_move_to_active()
      to be aware of multiple fences so that it can add individual
      fences to the dma resv object.
      
      v6: fix multi-line comment.
      v5: remove double fence reservation for batch VMAs.
      v4: Reserve fences for composite_fence on multi-batch contexts and
          also reserve fence slots to composite_fence for each VMAs.
      v3: dma_resv_reserve_fences is not cumulative so pass num_fences.
      v2: make sure to reserve enough fence slots before adding.
      
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5614
      Fixes: 544460c3 ("drm/i915: Multi-BB execbuf")
      Cc: <stable@vger.kernel.org> # v5.16+
      Signed-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
      Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220525095955.15371-1-nirmoy.das@intel.com
      (cherry picked from commit 420a07b8)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      842d9346
    • Ashutosh Dixit's avatar
      drm/i915/gt: Fix memory leaks in per-gt sysfs · 6e3f3c23
      Ashutosh Dixit authored
      All kmalloc'd kobjects need a kobject_put() to free memory. For example in
      previous code, kobj_gt_release() never gets called. The requirement of
      kobject_put() now results in a slightly different code organization.
      
      v2: s/gtn/gt/ (Andi)
      
      Fixes: b770bcfa ("drm/i915/gt: create per-tile sysfs interface")
      Signed-off-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Acked-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/a6f6686517c85fba61a0c45097f5bb4fe7e257fb.1653484574.git.ashutosh.dixit@intel.com
      (cherry picked from commit 69d6bf5c)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      6e3f3c23
    • Alan Previn's avatar
      drm/i915/reset: Fix error_state_read ptr + offset use · c9b576d0
      Alan Previn authored
      Fix our pointer offset usage in error_state_read
      when there is no i915_gpu_coredump but buf offset
      is non-zero.
      
      This fixes a kernel page fault can happen when
      multiple tests are running concurrently in a loop
      and one is producing engine resets and consuming
      the i915 error_state dump while the other is
      forcing full GT resets. (takes a while to trigger).
      
      The dmesg call trace:
      
      [ 5590.803000] BUG: unable to handle page fault for address:
                     ffffffffa0b0e000
      [ 5590.803009] #PF: supervisor read access in kernel mode
      [ 5590.803013] #PF: error_code(0x0000) - not-present page
      [ 5590.803016] PGD 5814067 P4D 5814067 PUD 5815063 PMD 109de4067
                     PTE 0
      [ 5590.803022] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [ 5590.803026] CPU: 5 PID: 13656 Comm: i915_hangman Tainted: G U
                          5.17.0-rc5-ups69-guc-err-capt-rev6+ #136
      [ 5590.803033] Hardware name: Intel Corporation Alder Lake Client
                          Platform/AlderLake-M LP4x RVP, BIOS ADLPFWI1.R00.
                          3031.A02.2201171222	01/17/2022
      [ 5590.803039] RIP: 0010:memcpy_erms+0x6/0x10
      [ 5590.803045] Code: fe ff ff cc eb 1e 0f 1f 00 48 89 f8 48 89 d1
                           48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3
                           66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4
                           c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20
                           72 7e 40 38 fe
      [ 5590.803054] RSP: 0018:ffffc90003a8fdf0 EFLAGS: 00010282
      [ 5590.803057] RAX: ffff888107ee9000 RBX: ffff888108cb1a00
                     RCX: 0000000000000f8f
      [ 5590.803061] RDX: 0000000000001000 RSI: ffffffffa0b0e000
                     RDI: ffff888107ee9071
      [ 5590.803065] RBP: 0000000000000000 R08: 0000000000000001
                     R09: 0000000000000001
      [ 5590.803069] R10: 0000000000000001 R11: 0000000000000002
                     R12: 0000000000000019
      [ 5590.803073] R13: 0000000000174fff R14: 0000000000001000
                     R15: ffff888107ee9000
      [ 5590.803077] FS: 00007f62a99bee80(0000) GS:ffff88849f880000(0000)
                     knlGS:0000000000000000
      [ 5590.803082] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 5590.803085] CR2: ffffffffa0b0e000 CR3: 000000010a1a8004
                     CR4: 0000000000770ee0
      [ 5590.803089] PKRU: 55555554
      [ 5590.803091] Call Trace:
      [ 5590.803093] <TASK>
      [ 5590.803096] error_state_read+0xa1/0xd0 [i915]
      [ 5590.803175] kernfs_fop_read_iter+0xb2/0x1b0
      [ 5590.803180] new_sync_read+0x116/0x1a0
      [ 5590.803185] vfs_read+0x114/0x1b0
      [ 5590.803189] ksys_read+0x63/0xe0
      [ 5590.803193] do_syscall_64+0x38/0xc0
      [ 5590.803197] entry_SYSCALL_64_after_hwframe+0x44/0xae
      [ 5590.803201] RIP: 0033:0x7f62aaea5912
      [ 5590.803204] Code: c0 e9 b2 fe ff ff 50 48 8d 3d 5a b9 0c 00 e8 05
                           19 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25
                           18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff
                           ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24
      [ 5590.803213] RSP: 002b:00007fff5b659ae8 EFLAGS: 00000246
                     ORIG_RAX: 0000000000000000
      [ 5590.803218] RAX: ffffffffffffffda RBX: 0000000000100000
                     RCX: 00007f62aaea5912
      [ 5590.803221] RDX: 000000000008b000 RSI: 00007f62a8c4000f
                     RDI: 0000000000000006
      [ 5590.803225] RBP: 00007f62a8bcb00f R08: 0000000000200010
                     R09: 0000000000101000
      [ 5590.803229] R10: 0000000000000001 R11: 0000000000000246
                     R12: 0000000000000006
      [ 5590.803233] R13: 0000000000075000 R14: 00007f62a8acb010
                     R15: 0000000000200000
      [ 5590.803238] </TASK>
      [ 5590.803240] Modules linked in: i915 ttm drm_buddy drm_dp_helper
                              drm_kms_helper syscopyarea sysfillrect sysimgblt
                              fb_sys_fops prime_numbers nfnetlink br_netfilter
                              overlay mei_pxp mei_hdcp x86_pkg_temp_thermal
                              coretemp kvm_intel snd_hda_codec_hdmi snd_hda_intel
                              snd_intel_dspcfg snd_hda_codec snd_hwdep
                              snd_hda_core snd_pcm mei_me mei fuse ip_tables
                              x_tables crct10dif_pclmul e1000e crc32_pclmul ptp
                              i2c_i801 ghash_clmulni_intel i2c_smbus pps_core
                              [last unloa ded: ttm]
      [ 5590.803277] CR2: ffffffffa0b0e000
      [ 5590.803280] ---[ end trace 0000000000000000 ]---
      
      Fixes: 0e39037b ("drm/i915: Cache the error string")
      Signed-off-by: default avatarAlan Previn <alan.previn.teres.alexis@intel.com>
      Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220311004311.514198-2-alan.previn.teres.alexis@intel.com
      (cherry picked from commit 3304033a)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      c9b576d0
  5. 12 Jun, 2022 10 commits
  6. 11 Jun, 2022 9 commits
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 7a68065e
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
       "A set of fixes. Most address the new warning we emit at build time
        when irq chips are not immutable with some additional tweaks to
        gpio-crystalcove from Andy and a small tweak to gpio-dwapd.
      
         - make irq_chip structs immutable in several Diolan and intel drivers
           to get rid of the new warning we emit when fiddling with irq chips
      
         - don't print error messages on probe deferral in gpio-dwapb"
      
      * tag 'gpio-fixes-for-v5.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: dwapb: Don't print error on -EPROBE_DEFER
        gpio: dln2: make irq_chip immutable
        gpio: sch: make irq_chip immutable
        gpio: merrifield: make irq_chip immutable
        gpio: wcove: make irq_chip immutable
        gpio: crystalcove: Join function declarations and long lines
        gpio: crystalcove: Use specific type and API for IRQ number
        gpio: crystalcove: make irq_chip immutable
      7a68065e
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · cecb3540
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Driver fixes and and one core patch.
      
        Nine of the driver patches are minor fixes and reworks to lpfc and the
        rest are trivial and minor fixes elsewhere"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: pmcraid: Fix missing resource cleanup in error case
        scsi: ipr: Fix missing/incorrect resource cleanup in error case
        scsi: mpt3sas: Fix out-of-bounds compiler warning
        scsi: lpfc: Update lpfc version to 14.2.0.4
        scsi: lpfc: Allow reduced polling rate for nvme_admin_async_event cmd completion
        scsi: lpfc: Add more logging of cmd and cqe information for aborted NVMe cmds
        scsi: lpfc: Fix port stuck in bypassed state after LIP in PT2PT topology
        scsi: lpfc: Resolve NULL ptr dereference after an ELS LOGO is aborted
        scsi: lpfc: Address NULL pointer dereference after starget_to_rport()
        scsi: lpfc: Resolve some cleanup issues following SLI path refactoring
        scsi: lpfc: Resolve some cleanup issues following abort path refactoring
        scsi: lpfc: Correct BDE type for XMIT_SEQ64_WQE in lpfc_ct_reject_event()
        scsi: vmw_pvscsi: Expand vcpuHint to 16 bits
        scsi: sd: Fix interpretation of VPD B9h length
      cecb3540
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · abe71eb3
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "Fixes all over the place, most notably fixes for latent bugs in
        drivers that got exposed by suppressing interrupts before DRIVER_OK,
        which in turn has been done by 8b4ec69d ("virtio: harden vring
        IRQ")"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        um: virt-pci: set device ready in probe()
        vdpa: make get_vq_group and set_group_asid optional
        virtio: Fix all occurences of the "the the" typo
        vduse: Fix NULL pointer dereference on sysfs access
        vringh: Fix loop descriptors check in the indirect cases
        vdpa/mlx5: clean up indenting in handle_ctrl_vlan()
        vdpa/mlx5: fix error code for deleting vlan
        virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
        vdpa/mlx5: Fix syntax errors in comments
        virtio-rng: make device ready before making request
      abe71eb3
    • Linus Torvalds's avatar
      Merge tag 'loongarch-fixes-5.19-1' of... · 0678afa6
      Linus Torvalds authored
      Merge tag 'loongarch-fixes-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch fixes from Huacai Chen.
       "Fix build errors and a stale comment"
      
      * tag 'loongarch-fixes-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        LoongArch: Remove MIPS comment about cycle counter
        LoongArch: Fix copy_thread() build errors
        LoongArch: Fix the !CONFIG_SMP build
      0678afa6
    • Linus Torvalds's avatar
      iov_iter: fix build issue due to possible type mis-match · 1c27f1fc
      Linus Torvalds authored
      Commit 6c776766 ("iov_iter: Fix iter_xarray_get_pages{,_alloc}()")
      introduced a problem on some 32-bit architectures (at least arm, xtensa,
      csky,sparc and mips), that have a 'size_t' that is 'unsigned int'.
      
      The reason is that we now do
      
          min(nr * PAGE_SIZE - offset, maxsize);
      
      where 'nr' and 'offset' and both 'unsigned int', and PAGE_SIZE is
      'unsigned long'.  As a result, the normal C type rules means that the
      first argument to 'min()' ends up being 'unsigned long'.
      
      In contrast, 'maxsize' is of type 'size_t'.
      
      Now, 'size_t' and 'unsigned long' are always the same physical type in
      the kernel, so you'd think this doesn't matter, and from an actual
      arithmetic standpoint it doesn't.
      
      But on 32-bit architectures 'size_t' is commonly 'unsigned int', even if
      it could also be 'unsigned long'.  In that situation, both are unsigned
      32-bit types, but they are not the *same* type.
      
      And as a result 'min()' will complain about the distinct types (ignore
      the "pointer types" part of the error message: that's an artifact of the
      way we have made 'min()' check types for being the same):
      
        lib/iov_iter.c: In function 'iter_xarray_get_pages':
        include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast [-Werror]
           20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
              |                                   ^~
        lib/iov_iter.c:1464:16: note: in expansion of macro 'min'
         1464 |         return min(nr * PAGE_SIZE - offset, maxsize);
              |                ^~~
      
      This was not visible on 64-bit architectures (where we always define
      'size_t' to be 'unsigned long').
      
      Force these cases to use 'min_t(size_t, x, y)' to make the type explicit
      and avoid the issue.
      
      [ Nit-picky note: technically 'size_t' doesn't have to match 'unsigned
        long' arithmetically. We've certainly historically seen environments
        with 16-bit address spaces and 32-bit 'unsigned long'.
      
        Similarly, even in 64-bit modern environments, 'size_t' could be its
        own type distinct from 'unsigned long', even if it were arithmetically
        identical.
      
        So the above type commentary is only really descriptive of the kernel
        environment, not some kind of universal truth for the kinds of wild
        and crazy situations that are allowed by the C standard ]
      Reported-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Link: https://lore.kernel.org/all/YqRyL2sIqQNDfky2@debian/
      Cc: Jeff Layton <jlayton@kernel.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c27f1fc
    • Jason A. Donenfeld's avatar
      wireguard: selftests: use maximum cpu features and allow rng seeding · 17b0128a
      Jason A. Donenfeld authored
      By forcing the maximum CPU that QEMU has available, we expose additional
      capabilities, such as the RNDR instruction, which increases test
      coverage. This then allows the CI to skip the fake seeding step in some
      cases. Also enable STRICT_KERNEL_RWX to catch issues related to early
      jump labels when the RNG is initialized at boot.
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      17b0128a
    • Kuan-Ying Lee's avatar
      scripts/gdb: change kernel config dumping method · 1f7a6cf6
      Kuan-Ying Lee authored
      MAGIC_START("IKCFG_ST") and MAGIC_END("IKCFG_ED") are moved out
      from the kernel_config_data variable.
      
      Thus, we parse kernel_config_data directly instead of considering
      offset of MAGIC_START and MAGIC_END.
      
      Fixes: 13610aa9 ("kernel/configs: use .incbin directive to embed config_data.gz")
      Signed-off-by: default avatarKuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      1f7a6cf6
    • Vincent Whitchurch's avatar
      um: virt-pci: set device ready in probe() · eacea844
      Vincent Whitchurch authored
      Call virtio_device_ready() to make this driver work after commit
      b4ec69d7e09 ("virtio: harden vring IRQ"), since the driver uses the
      virtqueues in the probe function.  (The virtio core sets the device
      ready when probe returns.)
      
      Fixes: 8b4ec69d ("virtio: harden vring IRQ")
      Fixes: 68f5d3f3 ("um: add PCI over virtio emulation driver")
      Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
      Message-Id: <20220610151203.3492541-1-vincent.whitchurch@axis.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Tested-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      eacea844
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 0885eacd
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
       "Notable changes:
      
         - There is now a backup maintainer for NFSD
      
        Notable fixes:
      
         - Prevent array overruns in svc_rdma_build_writes()
      
         - Prevent buffer overruns when encoding NFSv3 READDIR results
      
         - Fix a potential UAF in nfsd_file_put()"
      
      * tag 'nfsd-5.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        SUNRPC: Remove pointer type casts from xdr_get_next_encode_buffer()
        SUNRPC: Clean up xdr_get_next_encode_buffer()
        SUNRPC: Clean up xdr_commit_encode()
        SUNRPC: Optimize xdr_reserve_space()
        SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()
        SUNRPC: Trap RDMA segment overflows
        NFSD: Fix potential use-after-free in nfsd_file_put()
        MAINTAINERS: reciprocal co-maintainership for file locking and nfsd
      0885eacd
  7. 10 Jun, 2022 8 commits