1. 12 Jun, 2024 11 commits
  2. 11 Jun, 2024 1 commit
    • Ofir Gal's avatar
      md/md-bitmap: fix writing non bitmap pages · ab99a875
      Ofir Gal authored
      __write_sb_page() rounds up the io size to the optimal io size if it
      doesn't exceed the data offset, but it doesn't check the final size
      exceeds the bitmap length.
      
      For example:
      page count      - 1
      page size       - 4K
      data offset     - 1M
      optimal io size - 256K
      
      The final io size would be 256K (64 pages) but md_bitmap_storage_alloc()
      allocated 1 page, the IO would write 1 valid page and 63 pages that
      happens to be allocated afterwards. This leaks memory to the raid device
      superblock.
      
      This issue caused a data transfer failure in nvme-tcp. The network
      drivers checks the first page of an IO with sendpage_ok(), it returns
      true if the page isn't a slabpage and refcount >= 1. If the page
      !sendpage_ok() the network driver disables MSG_SPLICE_PAGES.
      
      As of now the network layer assumes all the pages of the IO are
      sendpage_ok() when MSG_SPLICE_PAGES is on.
      
      The bitmap pages aren't slab pages, the first page of the IO is
      sendpage_ok(), but the additional pages that happens to be allocated
      after the bitmap pages might be !sendpage_ok(). That cause
      skb_splice_from_iter() to stop the data transfer, in the case below it
      hangs 'mdadm --create'.
      
      The bug is reproducible, in order to reproduce we need nvme-over-tcp
      controllers with optimal IO size bigger than PAGE_SIZE. Creating a raid
      with bitmap over those devices reproduces the bug.
      
      In order to simulate large optimal IO size you can use dm-stripe with a
      single device.
      Script to reproduce the issue on top of brd devices using dm-stripe is
      attached below (will be added to blktest).
      
      I have added some logs to test the theory:
      ...
      md: created bitmap (1 pages) for device md127
      __write_sb_page before md_super_write offset: 16, size: 262144. pfn: 0x53ee
      === __write_sb_page before md_super_write. logging pages ===
      pfn: 0x53ee, slab: 0 <-- the only page that allocated for the bitmap
      pfn: 0x53ef, slab: 1
      pfn: 0x53f0, slab: 0
      pfn: 0x53f1, slab: 0
      pfn: 0x53f2, slab: 0
      pfn: 0x53f3, slab: 1
      ...
      nvme_tcp: sendpage_ok - pfn: 0x53ee, len: 262144, offset: 0
      skbuff: before sendpage_ok() - pfn: 0x53ee
      skbuff: before sendpage_ok() - pfn: 0x53ef
      WARNING at net/core/skbuff.c:6848 skb_splice_from_iter+0x142/0x450
      skbuff: !sendpage_ok - pfn: 0x53ef. is_slab: 1, page_count: 1
      ...
      
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarOfir Gal <ofir.gal@volumez.com>
      Signed-off-by: default avatarSong Liu <song@kernel.org>
      Link: https://lore.kernel.org/r/20240607072748.3182199-1-ofir.gal@volumez.com
      ab99a875
  3. 10 Jun, 2024 6 commits
  4. 09 Jun, 2024 5 commits
    • Linus Torvalds's avatar
      Linux 6.10-rc3 · 83a7eefe
      Linus Torvalds authored
      83a7eefe
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of... · b8481381
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Update copies of kernel headers, which resulted in support for the
         new 'mseal' syscall, SUBVOL statx return mask bit, RISC-V and PPC
         prctls, fcntl's DUPFD_QUERY, POSTED_MSI_NOTIFICATION IRQ vector,
         'map_shadow_stack' syscall for x86-32.
      
       - Revert perf.data record memory allocation optimization that ended up
         causing a regression, work is being done to re-introduce it in the
         next merge window.
      
       - Fix handling of minimal vmlinux.h file used with BPF's CO-RE when
         interrupting the build.
      
      * tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
        perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build
        Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event"
        tools headers arm64: Sync arm64's cputype.h with the kernel sources
        tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_SUBVOL
        tools headers UAPI: Update i915_drm.h with the kernel sources
        tools headers UAPI: Sync kvm headers with the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        tools headers: Update the syscall tables and unistd.h, mostly to support the new 'mseal' syscall
        perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources to pick POSTED_MSI_NOTIFICATION
        perf beauty: Update copy of linux/socket.h with the kernel sources
        tools headers UAPI: Sync fcntl.h with the kernel sources to pick F_DUPFD_QUERY
        tools headers UAPI: Sync linux/prctl.h with the kernel sources
        tools include UAPI: Sync linux/stat.h with the kernel sources
      b8481381
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 637c2dfc
      Linus Torvalds authored
      Pull EDAC fixes from Borislav Petkov:
      
       - Convert PCI core error codes to proper error numbers since latter get
         propagated all the way up to the module loading functions
      
      * tag 'edac_urgent_for_v6.10_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/igen6: Convert PCIBIOS_* return codes to errnos
        EDAC/amd64: Convert PCIBIOS_* return codes to errnos
      637c2dfc
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · 771ed661
      Linus Torvalds authored
      Pull clk fix from Stephen Boyd:
       "One fix for the SiFive PRCI clocks so that the device boots again.
      
        This driver was registering clkdev lookups that were always going to
        be useless. This wasn't a problem until clkdev started returning an
        error in these cases, causing this driver to fail probe, and thus boot
        to fail because clks are essential for most drivers. The fix is
        simple, don't use clkdev because this is a DT based system where
        clkdev isn't used"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: sifive: Do not register clkdevs for PRCI clocks
      771ed661
    • Linus Torvalds's avatar
      Merge tag '6.10-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · c5dbc2ed
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
       "Two small smb3 client fixes:
      
         - fix deadlock in umount
      
         - minor cleanup due to netfs change"
      
      * tag '6.10-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Don't advance the I/O iterator before terminating subrequest
        smb: client: fix deadlock in smb2_find_smb_tcon()
      c5dbc2ed
  5. 08 Jun, 2024 8 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2024060801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · 061d1af7
      Linus Torvalds authored
      Pull HID fixes from Benjamin Tissoires:
      
       - fix potential read out of bounds in hid-asus (Andrew Ballance)
      
       - fix endian-conversion on little endian systems in intel-ish-hid (Arnd
         Bergmann)
      
       - A couple of new input event codes (Aseda Aboagye)
      
       - errors handling fixes in hid-nvidia-shield (Chen Ni), hid-nintendo
         (Christophe JAILLET), hid-logitech-dj (José Expósito)
      
       - current leakage fix while the device is in suspend on a i2c-hid
         laptop (Johan Hovold)
      
       - other assorted smaller fixes and device ID / quirk entry additions
      
      * tag 'for-linus-2024060801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: Ignore battery for ELAN touchscreens 2F2C and 4116
        HID: i2c-hid: elan: fix reset suspend current leakage
        dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property
        dt-bindings: HID: i2c-hid: elan: add Elan eKTH5015M
        dt-bindings: HID: i2c-hid: add dedicated Ilitek ILI2901 schema
        input: Add support for "Do Not Disturb"
        input: Add event code for accessibility key
        hid: asus: asus_report_fixup: fix potential read out of bounds
        HID: logitech-hidpp: add missing MODULE_DESCRIPTION() macro
        HID: intel-ish-hid: fix endian-conversion
        HID: nintendo: Fix an error handling path in nintendo_hid_probe()
        HID: logitech-dj: Fix memory leak in logi_dj_recv_switch_to_dj_mode()
        HID: core: remove unnecessary WARN_ON() in implement()
        HID: nvidia-shield: Add missing check for input_ff_create_memless
        HID: intel-ish-hid: Fix build error for COMPILE_TEST
      061d1af7
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.10-2' of... · 329f70c5
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix the initial state of the save button in 'make gconfig'
      
       - Improve the Kconfig documentation
      
       - Fix a Kconfig bug regarding property visibility
      
       - Fix build breakage for systems where 'sed' is not installed in /bin
      
       - Fix a false warning about missing MODULE_DESCRIPTION()
      
      * tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o
        kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
        kconfig: remove wrong expr_trans_bool()
        kconfig: doc: document behavior of 'select' and 'imply' followed by 'if'
        kconfig: doc: fix a typo in the note about 'imply'
        kconfig: gconf: give a proper initial state to the Save button
        kconfig: remove unneeded code for user-supplied values being out of range
      329f70c5
    • Linus Torvalds's avatar
      Merge tag 'media/v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 1e7ccdd3
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - fixes for the new ipu6 driver (and related fixes to mei csi driver)
      
       - fix a double debugfs remove logic at mgb4 driver
      
       - a documentation fix
      
      * tag 'media/v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: intel/ipu6: add csi2 port sanity check in notifier bound
        media: intel/ipu6: update the maximum supported csi2 port number to 6
        media: mei: csi: Warn less verbosely of a missing device fwnode
        media: mei: csi: Put the IPU device reference
        media: intel/ipu6: fix the buffer flags caused by wrong parentheses
        media: intel/ipu6: Fix an error handling path in isys_probe()
        media: intel/ipu6: Move isys_remove() close to isys_probe()
        media: intel/ipu6: Fix some redundant resources freeing in ipu6_pci_remove()
        media: Documentation: v4l: Fix ACTIVE route flag
        media: mgb4: Fix double debugfs remove
      1e7ccdd3
    • Linus Torvalds's avatar
      Merge tag 'irq-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 36714d69
      Linus Torvalds authored
      Pull irq fixes from Ingo Molnar:
      
       - Fix possible memory leak the riscv-intc irqchip driver load failures
      
       - Fix boot crash in the sifive-plic irqchip driver caused by recently
         changed boot initialization order
      
       - Fix race condition in the gic-v3-its irqchip driver
      
      * tag 'irq-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
        irqchip/sifive-plic: Chain to parent IRQ after handlers are ready
        irqchip/riscv-intc: Prevent memory leak when riscv_intc_init_common() fails
      36714d69
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7cedb020
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Miscellaneous fixes:
      
         - Fix kexec() crash if call depth tracking is enabled
      
         - Fix SMN reads on inaccessible registers on certain AMD systems"
      
      * tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/amd_nb: Check for invalid SMN reads
        x86/kexec: Fix bug with call depth tracking
      7cedb020
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7cec2e16
      Linus Torvalds authored
      Pull perf event fix from Ingo Molnar:
       "Fix race between perf_event_free_task() and perf_event_release_kernel()
        that can result in missed wakeups and hung tasks"
      
      * tag 'perf-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Fix missing wakeup when waiting for context reference
      7cec2e16
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bbc5332b
      Linus Torvalds authored
      Pull locking doc fix from Ingo Molnar:
       "Fix typos in the kerneldoc of some of the atomic APIs"
      
      * tag 'locking-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/atomic: scripts: fix ${atomic}_sub_and_test() kerneldoc
      bbc5332b
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of... · dc772f82
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "14 hotfixes, 6 of which are cc:stable.
      
        All except the nilfs2 fix affect MM and all are singletons - see the
        chagelogs for details"
      
      * tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors
        mm: fix xyz_noprof functions calling profiled functions
        codetag: avoid race at alloc_slab_obj_exts
        mm/hugetlb: do not call vma_add_reservation upon ENOMEM
        mm/ksm: fix ksm_zero_pages accounting
        mm/ksm: fix ksm_pages_scanned accounting
        kmsan: do not wipe out origin when doing partial unpoisoning
        vmalloc: check CONFIG_EXECMEM in is_vmalloc_or_module_addr()
        mm: page_alloc: fix highatomic typing in multi-block buddies
        nilfs2: fix potential kernel bug due to lack of writeback flag waiting
        memcg: remove the lockdep assert from __mod_objcg_mlstate()
        mm: arm64: fix the out-of-bounds issue in contpte_clear_young_dirty_ptes
        mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n
        mm: drop the 'anon_' prefix for swap-out mTHP counters
      dc772f82
  6. 07 Jun, 2024 9 commits