1. 10 Jan, 2024 11 commits
  2. 27 Dec, 2023 4 commits
  3. 25 Dec, 2023 1 commit
  4. 04 Dec, 2023 2 commits
    • Stefan Hajnoczi's avatar
      virtio_blk: fix snprintf truncation compiler warning · b8e07924
      Stefan Hajnoczi authored
      Commit 4e040052 ("virtio-blk: support polling I/O") triggers the
      following gcc 13 W=1 warnings:
      
      drivers/block/virtio_blk.c: In function ‘init_vq’:
      drivers/block/virtio_blk.c:1077:68: warning: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 7 [-Wformat-truncation=]
       1077 |                 snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%d", i);
            |                                                                    ^~
      drivers/block/virtio_blk.c:1077:58: note: directive argument in the range [-2147483648, 65534]
       1077 |                 snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%d", i);
            |                                                          ^~~~~~~~~~~~~
      drivers/block/virtio_blk.c:1077:17: note: ‘snprintf’ output between 11 and 21 bytes into a destination of size 16
       1077 |                 snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%d", i);
            |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      This is a false positive because the lower bound -2147483648 is
      incorrect. The true range of i is [0, num_vqs - 1] where 0 < num_vqs <
      65536.
      
      The code mixes int, unsigned short, and unsigned int types in addition
      to using "%d" for an unsigned value. Use unsigned short and "%u"
      consistently to solve the compiler warning.
      
      Cc: Suwan Kim <suwan.kim027@gmail.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202312041509.DIyvEt9h-lkp@intel.com/Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-Id: <20231204140743.1487843-1-stefanha@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b8e07924
    • Xuan Zhuo's avatar
      virtio_ring: fix syncs DMA memory with different direction · 1f475cd5
      Xuan Zhuo authored
      Now the APIs virtqueue_dma_sync_single_range_for_{cpu,device} ignore
      the parameter 'dir', that is a mistake.
      
      [    6.101666] ------------[ cut here ]------------
      [    6.102079] DMA-API: virtio-pci 0000:00:04.0: device driver syncs DMA memory with different direction [device address=0x00000000ae010000] [size=32752 bytes] [mapped with DMA_FROM_DEVICE] [synced with DMA_BIDIRECTIONAL]
      [    6.103630] WARNING: CPU: 6 PID: 0 at kernel/dma/debug.c:1125 check_sync+0x53e/0x6c0
      [    6.107420] CPU: 6 PID: 0 Comm: swapper/6 Tainted: G            E      6.6.0+ #290
      [    6.108030] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
      [    6.108936] RIP: 0010:check_sync+0x53e/0x6c0
      [    6.109289] Code: 24 10 e8 f5 d9 74 00 4c 8b 4c 24 10 4c 8b 44 24 18 48 8b 4c 24 20 48 89 c6 41 56 4c 89 ea 48 c7 c7 b0 f1 50 82 e8 32 fc f3 ff <0f> 0b 48 c7 c7 48 4b 4a 82 e8 74 d9 fc ff 8b 73 4c 48 8d 7b 50 31
      [    6.110750] RSP: 0018:ffffc90000180cd8 EFLAGS: 00010092
      [    6.111178] RAX: 00000000000000ce RBX: ffff888100aa5900 RCX: 0000000000000000
      [    6.111744] RDX: 0000000000000104 RSI: ffffffff824c3208 RDI: 00000000ffffffff
      [    6.112316] RBP: ffffc90000180d40 R08: 0000000000000000 R09: 00000000fffeffff
      [    6.112893] R10: ffffc90000180b98 R11: ffffffff82f63308 R12: ffffffff83d5af00
      [    6.113460] R13: ffff888100998200 R14: ffffffff824a4b5f R15: 0000000000000286
      [    6.114027] FS:  0000000000000000(0000) GS:ffff88842fd80000(0000) knlGS:0000000000000000
      [    6.114665] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [    6.115128] CR2: 00007f10f1e03030 CR3: 0000000108272004 CR4: 0000000000770ee0
      [    6.115701] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [    6.116272] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [    6.116842] PKRU: 55555554
      [    6.117069] Call Trace:
      [    6.117275]  <IRQ>
      [    6.117452]  ? __warn+0x84/0x140
      [    6.117727]  ? check_sync+0x53e/0x6c0
      [    6.118034]  ? __report_bug+0xea/0x100
      [    6.118353]  ? check_sync+0x53e/0x6c0
      [    6.118653]  ? report_bug+0x41/0xc0
      [    6.118944]  ? handle_bug+0x3c/0x70
      [    6.119237]  ? exc_invalid_op+0x18/0x70
      [    6.119551]  ? asm_exc_invalid_op+0x1a/0x20
      [    6.119900]  ? check_sync+0x53e/0x6c0
      [    6.120199]  ? check_sync+0x53e/0x6c0
      [    6.120499]  debug_dma_sync_single_for_cpu+0x5c/0x70
      [    6.120906]  ? dma_sync_single_for_cpu+0xb7/0x100
      [    6.121291]  virtnet_rq_unmap+0x158/0x170 [virtio_net]
      [    6.121716]  virtnet_receive+0x196/0x220 [virtio_net]
      [    6.122135]  virtnet_poll+0x48/0x1b0 [virtio_net]
      [    6.122524]  __napi_poll+0x29/0x1b0
      [    6.123083]  net_rx_action+0x282/0x360
      [    6.123612]  __do_softirq+0xf3/0x2fb
      [    6.124138]  __irq_exit_rcu+0x8e/0xf0
      [    6.124663]  common_interrupt+0xbc/0xe0
      [    6.125202]  </IRQ>
      
      We need to enable CONFIG_DMA_API_DEBUG and work with need sync mode(such
      as swiotlb) to reproduce this warn.
      
      Fixes: 8bd2f710 ("virtio_ring: introduce dma sync api for virtqueue")
      Reported-by: default avatar"Ning, Hongyu" <hongyu.ning@linux.intel.com>
      Closes: https://lore.kernel.org/all/f37cb55a-6fc8-4e21-8789-46d468325eea@linux.intel.com/Suggested-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
      Message-Id: <20231201033303.25141-1-xuanzhuo@linux.alibaba.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarParav Pandit <parav@nvidia.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Tested-by: default avatarHongyu Ning <hongyu.ning@linux.intel.com>
      1f475cd5
  5. 01 Dec, 2023 4 commits
  6. 27 Nov, 2023 2 commits
    • Linus Torvalds's avatar
      Linux 6.7-rc3 · 2cc14f52
      Linus Torvalds authored
      2cc14f52
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 5b2b1173
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt::
       "Eventfs fixes:
      
         - With the usage of simple_recursive_remove() recommended by Al Viro,
           the code should not be calling "d_invalidate()" itself. Doing so is
           causing crashes. The code was calling d_invalidate() on the race of
           trying to look up a file while the parent was being deleted. This
           was detected, and the added dentry was having d_invalidate() called
           on it, but the deletion of the directory was also calling
           d_invalidate() on that same dentry.
      
         - A fix to not free the eventfs_inode (ei) until the last dput() was
           called on its ei->dentry made the ei->dentry exist even after it
           was marked for free by setting the ei->is_freed. But code elsewhere
           still was checking if ei->dentry was NULL if ei->is_freed is set
           and would trigger WARN_ON if that was the case. That's no longer
           true and there should not be any warnings when it is true.
      
         - Use GFP_NOFS for allocations done under eventfs_mutex. The
           eventfs_mutex can be taken on file system reclaim, make sure that
           allocations done under that mutex do not trigger file system
           reclaim.
      
         - Clean up code by moving the taking of inode_lock out of the helper
           functions and into where they are needed, and not use the parameter
           to know to take it or not. It must always be held but some callers
           of the helper function have it taken when they were called.
      
         - Warn if the inode_lock is not held in the helper functions.
      
         - Warn if eventfs_start_creating() is called without a parent. As
           eventfs is underneath tracefs, all files created will have a parent
           (the top one will have a tracefs parent).
      
        Tracing update:
      
         - Add Mathieu Desnoyers as an official reviewer of the tracing subsystem"
      
      * tag 'trace-v6.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        MAINTAINERS: TRACING: Add Mathieu Desnoyers as Reviewer
        eventfs: Make sure that parent->d_inode is locked in creating files/dirs
        eventfs: Do not allow NULL parent to eventfs_start_creating()
        eventfs: Move taking of inode_lock into dcache_dir_open_wrapper()
        eventfs: Use GFP_NOFS for allocation when eventfs_mutex is held
        eventfs: Do not invalidate dentry in create_file/dir_dentry()
        eventfs: Remove expectation that ei->is_freed means ei->dentry == NULL
      5b2b1173
  7. 26 Nov, 2023 6 commits
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · d2da77f4
      Linus Torvalds authored
      Pull parisc architecture fixes from Helge Deller:
       "This patchset fixes and enforces correct section alignments for the
        ex_table, altinstructions, parisc_unwind, jump_table and bug_table
        which are created by inline assembly.
      
        Due to not being correctly aligned at link & load time they can
        trigger unnecessarily the kernel unaligned exception handler at
        runtime. While at it, I switched the bug table to use relative
        addresses which reduces the size of the table by half on 64-bit.
      
        We still had the ENOSYM and EREMOTERELEASE errno symbols as left-overs
        from HP-UX, which now trigger build-issues with glibc. We can simply
        remove them.
      
        Most of the patches are tagged for stable kernel series.
      
        Summary:
      
         - Drop HP-UX ENOSYM and EREMOTERELEASE return codes to avoid glibc
           build issues
      
         - Fix section alignments for ex_table, altinstructions, parisc unwind
           table, jump_table and bug_table
      
         - Reduce size of bug_table on 64-bit kernel by using relative
           pointers"
      
      * tag 'parisc-for-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Reduce size of the bug_table on 64-bit kernel by half
        parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes
        parisc: Use natural CPU alignment for bug_table
        parisc: Ensure 32-bit alignment on parisc unwind section
        parisc: Mark lock_aligned variables 16-byte aligned on SMP
        parisc: Mark jump_table naturally aligned
        parisc: Mark altinstructions read-only and 32-bit aligned
        parisc: Mark ex_table entries 32-bit aligned in uaccess.h
        parisc: Mark ex_table entries 32-bit aligned in assembly.h
      d2da77f4
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4892711a
      Linus Torvalds authored
      Pull x86 microcode fixes from Ingo Molnar:
       "Fix/enhance x86 microcode version reporting: fix the bootup log spam,
        and remove the driver version announcement to avoid version confusion
        when distros backport fixes"
      
      * tag 'x86-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/microcode: Rework early revisions reporting
        x86/microcode: Remove the driver announcement and version
      4892711a
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e81fe505
      Linus Torvalds authored
      Pull x86 perf event fix from Ingo Molnar:
       "Fix a bug in the Intel hybrid CPUs hardware-capabilities enumeration
        code resulting in non-working events on those platforms"
      
      * tag 'perf-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/intel: Correct incorrect 'or' operation for PMU capabilities
      e81fe505
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1d0dbc3d
      Linus Torvalds authored
      Pull locking fix from Ingo Molnar:
       "Fix lockdep block chain corruption resulting in KASAN warnings"
      
      * tag 'locking-urgent-2023-11-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        lockdep: Fix block chain corruption
      1d0dbc3d
    • Linus Torvalds's avatar
      Merge tag '6.7-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 4515866d
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - use after free fix in releasing multichannel interfaces
      
       - fixes for special file types (report char, block, FIFOs properly when
         created e.g. by NFS to Windows)
      
       - fixes for reporting various special file types and symlinks properly
         when using SMB1
      
      * tag '6.7-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        smb: client: introduce cifs_sfu_make_node()
        smb: client: set correct file type from NFS reparse points
        smb: client: introduce ->parse_reparse_point()
        smb: client: implement ->query_reparse_point() for SMB1
        cifs: fix use after free for iface while disabling secondary channels
      4515866d
    • Linus Torvalds's avatar
      Merge tag 'usb-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 090472ed
      Linus Torvalds authored
      Pull USB / PHY / Thunderbolt fixes from Greg KH:
       "Here are a number of reverts, fixes, and new device ids for 6.7-rc3
        for the USB, PHY, and Thunderbolt driver subsystems. Include in here
        are:
      
         - reverts of some PHY drivers that went into 6.7-rc1 that shouldn't
           have been merged yet, the author is reworking them based on review
           comments as they were using older apis that shouldn't be used
           anymore for newer drivers
      
         - small thunderbolt driver fixes for reported issues
      
         - USB driver fixes for a variety of small issues in dwc3, typec,
           xhci, and other smaller drivers.
      
         - new device ids for usb-serial and onboard_usb_hub drivers.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-6.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits)
        USB: serial: option: add Luat Air72*U series products
        USB: dwc3: qcom: fix ACPI platform device leak
        USB: dwc3: qcom: fix software node leak on probe errors
        USB: dwc3: qcom: fix resource leaks on probe deferral
        USB: dwc3: qcom: simplify wakeup interrupt setup
        USB: dwc3: qcom: fix wakeup after probe deferral
        dt-bindings: usb: qcom,dwc3: fix example wakeup interrupt types
        usb: misc: onboard-hub: add support for Microchip USB5744
        dt-bindings: usb: microchip,usb5744: Add second supply
        usb: misc: ljca: Fix enumeration error on Dell Latitude 9420
        USB: serial: option: add Fibocom L7xx modules
        USB: xhci-plat: fix legacy PHY double init
        usb: typec: tipd: Supply also I2C driver data
        usb: xhci-mtk: fix in-ep's start-split check failure
        usb: dwc3: set the dma max_seg_size
        usb: config: fix iteration issue in 'usb_get_bos_descriptor()'
        usb: dwc3: add missing of_node_put and platform_device_put
        USB: dwc2: write HCINT with INTMASK applied
        usb: misc: ljca: Drop _ADR support to get ljca children devices
        usb: cdnsp: Fix deadlock issue during using NCM gadget
        ...
      090472ed
  8. 25 Nov, 2023 10 commits