Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.8-rc6-scx1 #14

Merged
merged 825 commits into from
Feb 26, 2024
Merged

v6.8-rc6-scx1 #14

merged 825 commits into from
Feb 26, 2024
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Feb 19, 2024

  1. ata: ahci_ceva: fix error handling for Xilinx GT PHY support

    Platform clock and phy error resources are not cleaned up in Xilinx GT PHY
    error path.
    
    To fix introduce the function ceva_ahci_platform_enable_resources() which
    is a customized version of ahci_platform_enable_resources() and inline with
    SATA IP programming sequence it does:
    
    - Assert SATA reset
    - Program PS GTR phy
    - Bring SATA by de-asserting the reset
    - Wait for GT lane PLL to be locked
    
    ceva_ahci_platform_enable_resources() is also used in the resume path
    as the same SATA programming sequence (as in probe) should be followed.
    Also cleanup the mixed usage of ahci_platform_enable_resources() and custom
    implementation in the probe function as both are not required.
    
    Fixes: 9a9d3ab ("ata: ahci: ceva: Update the driver to support xilinx GT phy")
    Signed-off-by: Radhey Shyam Pandey <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Signed-off-by: Niklas Cassel <[email protected]>
    Radhey Shyam Pandey authored and Niklas Cassel committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    26c8404 View commit details
    Browse the repository at this point in the history
  2. drm/tests/drm_buddy: fix 32b build

    Doesn't seem to compile on 32b, presumably due to u64 mod/division.
    Simplest is to just switch over to u32 here. Also make print modifiers
    consistent with that.
    
    Fixes: a64056b ("drm/tests/drm_buddy: add alloc_contiguous test")
    Reported-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Matthew Auld <[email protected]>
    Cc: Arunpravin Paneer Selvam <[email protected]>
    Cc: Christian König <[email protected]>
    Cc: Maxime Ripard <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Christian König <[email protected]>
    matt-auld authored and ChristianKoenigAMD committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    3351269 View commit details
    Browse the repository at this point in the history
  3. btrfs: defrag: avoid unnecessary defrag caused by incorrect extent size

    [BUG]
    With the following file extent layout, defrag would do unnecessary IO
    and result more on-disk space usage.
    
      # mkfs.btrfs -f $dev
      # mount $dev $mnt
      # xfs_io -f -c "pwrite 0 40m" $mnt/foobar
      # sync
      # xfs_io -f -c "pwrite 40m 16k" $mnt/foobar
      # sync
    
    Above command would lead to the following file extent layout:
    
            item 6 key (257 EXTENT_DATA 0) itemoff 15816 itemsize 53
                    generation 7 type 1 (regular)
                    extent data disk byte 298844160 nr 41943040
                    extent data offset 0 nr 41943040 ram 41943040
                    extent compression 0 (none)
            item 7 key (257 EXTENT_DATA 41943040) itemoff 15763 itemsize 53
                    generation 8 type 1 (regular)
                    extent data disk byte 13631488 nr 16384
                    extent data offset 0 nr 16384 ram 16384
                    extent compression 0 (none)
    
    Which is mostly fine. We can allow the final 16K to be merged with the
    previous 40M, but it's upon the end users' preference.
    
    But if we defrag the file using the default parameters, it would result
    worse file layout:
    
     # btrfs filesystem defrag $mnt/foobar
     # sync
    
            item 6 key (257 EXTENT_DATA 0) itemoff 15816 itemsize 53
                    generation 7 type 1 (regular)
                    extent data disk byte 298844160 nr 41943040
                    extent data offset 0 nr 8650752 ram 41943040
                    extent compression 0 (none)
            item 7 key (257 EXTENT_DATA 8650752) itemoff 15763 itemsize 53
                    generation 9 type 1 (regular)
                    extent data disk byte 340787200 nr 33292288
                    extent data offset 0 nr 33292288 ram 33292288
                    extent compression 0 (none)
            item 8 key (257 EXTENT_DATA 41943040) itemoff 15710 itemsize 53
                    generation 8 type 1 (regular)
                    extent data disk byte 13631488 nr 16384
                    extent data offset 0 nr 16384 ram 16384
                    extent compression 0 (none)
    
    Note the original 40M extent is still there, but a new 32M extent is
    created for no benefit at all.
    
    [CAUSE]
    There is an existing check to make sure we won't defrag a large enough
    extent (the threshold is by default 32M).
    
    But the check is using the length to the end of the extent:
    
    	range_len = em->len - (cur - em->start);
    
    	/* Skip too large extent */
    	if (range_len >= extent_thresh)
    		goto next;
    
    This means, for the first 8MiB of the extent, the range_len is always
    smaller than the default threshold, and would not be defragged.
    But after the first 8MiB, the remaining part would fit the requirement,
    and be defragged.
    
    Such different behavior inside the same extent caused the above problem,
    and we should avoid different defrag decision inside the same extent.
    
    [FIX]
    Instead of using @range_len, just use @em->len, so that we have a
    consistent decision among the same file extent.
    
    Now with this fix, we won't touch the extent, thus not making it any
    worse.
    
    Reported-by: Filipe Manana <[email protected]>
    Fixes: 0cb5950 ("btrfs: fix deadlock when reserving space during defrag")
    CC: [email protected] # 6.1+
    Reviewed-by: Boris Burkov <[email protected]>
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Qu Wenruo <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    adam900710 authored and kdave committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    e42b9d8 View commit details
    Browse the repository at this point in the history
  4. btrfs: fix deadlock with fiemap and extent locking

    While working on the patchset to remove extent locking I got a lockdep
    splat with fiemap and pagefaulting with my new extent lock replacement
    lock.
    
    This deadlock exists with our normal code, we just don't have lockdep
    annotations with the extent locking so we've never noticed it.
    
    Since we're copying the fiemap extent to user space on every iteration
    we have the chance of pagefaulting.  Because we hold the extent lock for
    the entire range we could mkwrite into a range in the file that we have
    mmap'ed.  This would deadlock with the following stack trace
    
    [<0>] lock_extent+0x28d/0x2f0
    [<0>] btrfs_page_mkwrite+0x273/0x8a0
    [<0>] do_page_mkwrite+0x50/0xb0
    [<0>] do_fault+0xc1/0x7b0
    [<0>] __handle_mm_fault+0x2fa/0x460
    [<0>] handle_mm_fault+0xa4/0x330
    [<0>] do_user_addr_fault+0x1f4/0x800
    [<0>] exc_page_fault+0x7c/0x1e0
    [<0>] asm_exc_page_fault+0x26/0x30
    [<0>] rep_movs_alternative+0x33/0x70
    [<0>] _copy_to_user+0x49/0x70
    [<0>] fiemap_fill_next_extent+0xc8/0x120
    [<0>] emit_fiemap_extent+0x4d/0xa0
    [<0>] extent_fiemap+0x7f8/0xad0
    [<0>] btrfs_fiemap+0x49/0x80
    [<0>] __x64_sys_ioctl+0x3e1/0xb50
    [<0>] do_syscall_64+0x94/0x1a0
    [<0>] entry_SYSCALL_64_after_hwframe+0x6e/0x76
    
    I wrote an fstest to reproduce this deadlock without my replacement lock
    and verified that the deadlock exists with our existing locking.
    
    To fix this simply don't take the extent lock for the entire duration of
    the fiemap.  This is safe in general because we keep track of where we
    are when we're searching the tree, so if an ordered extent updates in
    the middle of our fiemap call we'll still emit the correct extents
    because we know what offset we were on before.
    
    The only place we maintain the lock is searching delalloc.  Since the
    delalloc stuff can change during writeback we want to lock the extent
    range so we have a consistent view of delalloc at the time we're
    checking to see if we need to set the delalloc flag.
    
    With this patch applied we no longer deadlock with my testcase.
    
    CC: [email protected] # 6.1+
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Josef Bacik <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    josefbacik authored and kdave committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    b0ad381 View commit details
    Browse the repository at this point in the history
  5. ionic: use pci_is_enabled not open code

    Since there is a utility available for this, use
    the API rather than open code.
    
    Fixes: 13943d6 ("ionic: prevent pci disable of already disabled device")
    Reviewed-by: Brett Creeley <[email protected]>
    Signed-off-by: Shannon Nelson <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    emusln authored and davem330 committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    121e4dc View commit details
    Browse the repository at this point in the history
  6. enic: Avoid false positive under FORTIFY_SOURCE

    FORTIFY_SOURCE has been ignoring 0-sized destinations while the kernel
    code base has been converted to flexible arrays. In order to enforce
    the 0-sized destinations (e.g. with __counted_by), the remaining 0-sized
    destinations need to be handled. Unfortunately, struct vic_provinfo
    resists full conversion, as it contains a flexible array of flexible
    arrays, which is only possible with the 0-sized fake flexible array.
    
    Use unsafe_memcpy() to avoid future false positives under
    CONFIG_FORTIFY_SOURCE.
    
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    kees authored and davem330 committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    40b9385 View commit details
    Browse the repository at this point in the history
  7. bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel

    The following race is possible between bpf_timer_cancel_and_free
    and bpf_timer_cancel. It will lead a UAF on the timer->timer.
    
    bpf_timer_cancel();
    	spin_lock();
    	t = timer->time;
    	spin_unlock();
    
    					bpf_timer_cancel_and_free();
    						spin_lock();
    						t = timer->timer;
    						timer->timer = NULL;
    						spin_unlock();
    						hrtimer_cancel(&t->timer);
    						kfree(t);
    
    	/* UAF on t */
    	hrtimer_cancel(&t->timer);
    
    In bpf_timer_cancel_and_free, this patch frees the timer->timer
    after a rcu grace period. This requires a rcu_head addition
    to the "struct bpf_hrtimer". Another kfree(t) happens in bpf_timer_init,
    this does not need a kfree_rcu because it is still under the
    spin_lock and timer->timer has not been visible by others yet.
    
    In bpf_timer_cancel, rcu_read_lock() is added because this helper
    can be used in a non rcu critical section context (e.g. from
    a sleepable bpf prog). Other timer->timer usages in helpers.c
    have been audited, bpf_timer_cancel() is the only place where
    timer->timer is used outside of the spin_lock.
    
    Another solution considered is to mark a t->flag in bpf_timer_cancel
    and clear it after hrtimer_cancel() is done.  In bpf_timer_cancel_and_free,
    it busy waits for the flag to be cleared before kfree(t). This patch
    goes with a straight forward solution and frees timer->timer after
    a rcu grace period.
    
    Fixes: b00628b ("bpf: Introduce bpf timers.")
    Suggested-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Martin KaFai Lau <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Hou Tao <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Martin KaFai Lau authored and borkmann committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    0281b91 View commit details
    Browse the repository at this point in the history
  8. selftests/bpf: Test racing between bpf_timer_cancel_and_free and bpf_…

    …timer_cancel
    
    This selftest is based on a Alexei's test adopted from an internal
    user to troubleshoot another bug. During this exercise, a separate
    racing bug was discovered between bpf_timer_cancel_and_free
    and bpf_timer_cancel. The details can be found in the previous
    patch.
    
    This patch is to add a selftest that can trigger the bug.
    I can trigger the UAF everytime in my qemu setup with KASAN. The idea
    is to have multiple user space threads running in a tight loop to exercise
    both bpf_map_update_elem (which calls into bpf_timer_cancel_and_free)
    and bpf_timer_cancel.
    
    Signed-off-by: Martin KaFai Lau <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Hou Tao <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Martin KaFai Lau authored and borkmann committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    3f00e4a View commit details
    Browse the repository at this point in the history
  9. bpf: Fix an issue due to uninitialized bpf_iter_task

    Failure to initialize it->pos, coupled with the presence of an invalid
    value in the flags variable, can lead to it->pos referencing an invalid
    task, potentially resulting in a kernel panic. To mitigate this risk, it's
    crucial to ensure proper initialization of it->pos to NULL.
    
    Fixes: ac8148d ("bpf: bpf_iter_task_next: use next_task(kit->task) rather than next_task(kit->pos)")
    Signed-off-by: Yafang Shao <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Acked-by: Yonghong Song <[email protected]>
    Acked-by: Oleg Nesterov <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    laoar authored and borkmann committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    5f2ae60 View commit details
    Browse the repository at this point in the history
  10. selftests/bpf: Add negtive test cases for task iter

    Incorporate a test case to assess the handling of invalid flags or
    task__nullable parameters passed to bpf_iter_task_new(). Prior to the
    preceding commit, this scenario could potentially trigger a kernel panic.
    However, with the previous commit, this test case is expected to function
    correctly.
    
    Signed-off-by: Yafang Shao <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    laoar authored and borkmann committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    5c138a8 View commit details
    Browse the repository at this point in the history
  11. platform/x86: think-lmi: Fix password opcode ordering for workstations

    The Lenovo workstations require the password opcode to be run before
    the attribute value is changed (if Admin password is enabled).
    
    Tested on some Thinkpads to confirm they are OK with this order too.
    
    Signed-off-by: Mark Pearson <[email protected]>
    Fixes: 640a5fa ("platform/x86: think-lmi: Opcode support")
    Reviewed-by: Ilpo Järvinen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    mrhpearson authored and jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    6f7d0f5 View commit details
    Browse the repository at this point in the history
  12. platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq()

    Since commit 7a36b90 ("ACPI: OSL: Use a threaded interrupt handler
    for SCI") the ACPI OSL code passes IRQF_ONESHOT when requesting the SCI.
    
    Since the INT0002 GPIO is typically shared with the ACPI SCI the INT0002
    driver must pass the same flags.
    
    This fixes the INT0002 driver failing to probe due to following error +
    as well as removing the backtrace that follows this error:
    
    "genirq: Flags mismatch irq 9. 00000084 (INT0002) vs. 00002080 (acpi)"
    
    Fixes: 7a36b90 ("ACPI: OSL: Use a threaded interrupt handler for SCI")
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    8f81237 View commit details
    Browse the repository at this point in the history
  13. platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACP…

    …I names
    
    On some devices the ACPI name of the touchscreen is e.g. either
    MSSL1680:00 or MSSL1680:01 depending on the BIOS version.
    
    This happens for example on the "Chuwi Hi8 Air" tablet where the initial
    commit's ts_data uses "MSSL1680:00" but the tablets from the github issue
    and linux-hardware.org probe linked below both use "MSSL1680:01".
    
    Replace the strcmp() match on ts_data->acpi_name with a strstarts()
    check to allow using a partial match on just the ACPI HID of "MSSL1680"
    and change the ts_data->acpi_name for the "Chuwi Hi8 Air" accordingly
    to fix the touchscreen not working on models where it is "MSSL1680:01".
    
    Note this drops the length check for I2C_NAME_SIZE. This never was
    necessary since the ACPI names used are never more then 11 chars and
    I2C_NAME_SIZE is 20 so the replaced strncmp() would always stop long
    before reaching I2C_NAME_SIZE.
    
    Link: https://linux-hardware.org/?computer=AC4301C0542A
    Fixes: bbb97d7 ("platform/x86: touchscreen_dmi: Add info for the Chuwi Hi8 Air tablet")
    Closes: onitake/gsl-firmware#91
    Cc: [email protected]
    Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    dbcbfd6 View commit details
    Browse the repository at this point in the history
  14. platform/x86: touchscreen_dmi: Consolidate Goodix upside-down touchsc…

    …reen data
    
    Now that prefix matches for ACPI names are supported, the ts_dmi_data
    structs for "GDIX1001:00" and "GDIX1001:01" can be consolidated into
    a single match matching on "GDIX1001".
    
    For consistency also change gdix1002_00_upside_down_data to match.
    
    Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    f0ddb8a View commit details
    Browse the repository at this point in the history
  15. platform/x86/amd/pmf: Remove smart_pc_status enum

    Improve code readability by removing smart_pc_status enum, as the same
    can be done with a simple true/false check; Update the code checks
    accordingly.
    
    Also add a missing return on amd_pmf_init_smart_pc() success,
    to skip trying to setup the auto / slider modes which should
    not be used in this case.
    
    Signed-off-by: Shyam Sundar S K <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Shyam Sundar S K authored and jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    3da0139 View commit details
    Browse the repository at this point in the history
  16. platform/x86/amd/pmf: Fix TEE enact command failure after suspend and…

    … resume
    
    TEE enact command failures are seen after each suspend/resume cycle;
    fix this by cancelling the policy builder workqueue before going into
    suspend and reschedule the workqueue after resume.
    
    [  629.516792] ccp 0000:c2:00.2: tee: command 0x5 timed out, disabling PSP
    [  629.516835] amd-pmf AMDI0102:00: TEE enact cmd failed. err: ffff000e, ret:0
    [  630.550464] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_RESPONSE:1
    [  630.550511] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_ARGUMENT:7
    [  630.550548] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_MESSAGE:16
    
    Fixes: ae82cef ("platform/x86/amd/pmf: Add support for PMF-TA interaction")
    Co-developed-by: Patil Rajesh Reddy <[email protected]>
    Signed-off-by: Patil Rajesh Reddy <[email protected]>
    Signed-off-by: Shyam Sundar S K <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Shyam Sundar S K authored and jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    11e298f View commit details
    Browse the repository at this point in the history
  17. platform/x86/amd/pmf: Fix a suspend hang on Framework 13

    The buffer is cleared in the suspend handler but used in
    the delayed work for amd_pmf_get_metrics().
    
    Stop clearing it to fix the hang.
    
    Reported-by: Trolli Schmittlauch <[email protected]>
    Closes: https://lore.kernel.org/regressions/ed2226ff-257b-4cfd-afd6-bf3be9785474@localhost/
    Closes: https://community.frame.work/t/kernel-6-8-rc-system-freezes-after-resuming-from-suspend-reproducers-wanted/45381
    Fixes: 2b3a7f0 ("platform/x86/amd/pmf: Change return type of amd_pmf_set_dram_addr()")
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    superm1 authored and jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    b2b6fa6 View commit details
    Browse the repository at this point in the history
  18. platform/x86/amd/pmf: Add debugging message for missing policy data

    If a machine advertises Smart PC support but is missing policy data
    show a debugging message to help clarify why Smart PC wasn't enabled.
    
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Hans de Goede <[email protected]>
    superm1 authored and jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    20545af View commit details
    Browse the repository at this point in the history
  19. platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()

    amd_pmf_init_smart_pc() calls out to amd_pmf_get_bios_buffer() but
    the error handling flow doesn't clean everything up allocated
    memory.
    
    As amd_pmf_get_bios_buffer() is only called by amd_pmf_init_smart_pc(),
    fold it into the function and add labels to clean up any step that
    can fail along the way. Explicitly set everything allocated to NULL as
    there are other features that may access some of the same variables.
    
    Fixes: 7c45534 ("platform/x86/amd/pmf: Add support for PMF Policy Binary")
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    superm1 authored and jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    e709615 View commit details
    Browse the repository at this point in the history
  20. platform/x86/amd/pmf: Fix a potential race with policy binary sideload

    The debugfs `update_policy` file is created before
    amd_pmf_start_policy_engine() has completed, and thus there could be
    a possible (albeit unlikely) race between sideloading a policy and the
    BIOS policy getting setup.
    
    Move the debugfs file creation after all BIOS policy is setup.
    
    Fixes: 10817f2 ("platform/x86/amd/pmf: Add capability to sideload of policy binary")
    Reported-by: Hans de Goede <[email protected]>
    Closes: https://lore.kernel.org/platform-driver-x86/[email protected]/T/#m2c445f135e5ef9b53184be7fc9df84e15f89d4d9
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    superm1 authored and jwrdegoede committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    76d41fb View commit details
    Browse the repository at this point in the history
  21. irqchip/sifive-plic: Enable interrupt if needed before EOI

    RISC-V PLIC cannot "end-of-interrupt" (EOI) disabled interrupts, as
    explained in the description of Interrupt Completion in the PLIC spec:
    
    "The PLIC signals it has completed executing an interrupt handler by
    writing the interrupt ID it received from the claim to the claim/complete
    register. The PLIC does not check whether the completion ID is the same
    as the last claim ID for that target. If the completion ID does not match
    an interrupt source that *is currently enabled* for the target, the
    completion is silently ignored."
    
    Commit 69ea463 ("irqchip/sifive-plic: Fixup EOI failed when masked")
    ensured that EOI is successful by enabling interrupt first, before EOI.
    
    Commit a1706a1 ("irqchip/sifive-plic: Separate the enable and mask
    operations") removed the interrupt enabling code from the previous
    commit, because it assumes that interrupt should already be enabled at the
    point of EOI.
    
    However, this is incorrect: there is a window after a hart claiming an
    interrupt and before irq_desc->lock getting acquired, interrupt can be
    disabled during this window. Thus, EOI can be invoked while the interrupt
    is disabled, effectively nullify this EOI. This results in the interrupt
    never gets asserted again, and the device who uses this interrupt appears
    frozen.
    
    Make sure that interrupt is really enabled before EOI.
    
    Fixes: a1706a1 ("irqchip/sifive-plic: Separate the enable and mask operations")
    Signed-off-by: Nam Cao <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Cc: Palmer Dabbelt <[email protected]>
    Cc: Paul Walmsley <[email protected]>
    Cc: Samuel Holland <[email protected]>
    Cc: Marc Zyngier <[email protected]>
    Cc: Guo Ren <[email protected]>
    Cc: [email protected]
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    covanam authored and KAGA-KOKO committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    9c92006 View commit details
    Browse the repository at this point in the history
  22. PCI/MSI: Prevent MSI hardware interrupt number truncation

    While calculating the hardware interrupt number for a MSI interrupt, the
    higher bits (i.e. from bit-5 onwards a.k.a domain_nr >= 32) of the PCI
    domain number gets truncated because of the shifted value casting to return
    type of pci_domain_nr() which is 'int'. This for example is resulting in
    same hardware interrupt number for devices 0019:00:00.0 and 0039:00:00.0.
    
    To address this cast the PCI domain number to 'irq_hw_number_t' before left
    shifting it to calculate the hardware interrupt number.
    
    Please note that this fixes the issue only on 64-bit systems and doesn't
    change the behavior for 32-bit systems i.e. the 32-bit systems continue to
    have the issue. Since the issue surfaces only if there are too many PCIe
    controllers in the system which usually is the case in modern server
    systems and they don't tend to run 32-bit kernels.
    
    Fixes: 3878eae ("PCI/MSI: Enhance core to support hierarchy irqdomain")
    Signed-off-by: Vidya Sagar <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Tested-by: Shanker Donthineni <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Vidya Sagar authored and KAGA-KOKO committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    db744dd View commit details
    Browse the repository at this point in the history
  23. parisc: Fix stack unwinder

    Debugging shows a large number of unaligned access traps in the unwinder
    code. Code analysis reveals a number of issues with this code:
    
    - handle_interruption is passed twice through
      dereference_kernel_function_descriptor()
    - ret_from_kernel_thread, syscall_exit, intr_return,
      _switch_to_ret, and _call_on_stack are passed through
      dereference_kernel_function_descriptor() even though they are
      not declared as function pointers.
    
    To fix the problems, drop one of the calls to
    dereference_kernel_function_descriptor() for handle_interruption,
    and compare the other pointers directly.
    
    Fixes: 6414b30 ("parisc: unwind: Avoid missing prototype warning for handle_interruption()")
    Fixes: 8e0ba12 ("parisc/unwind: fix unwinder when CONFIG_64BIT is enabled")
    Cc: Helge Deller <[email protected]>
    Cc: Sven Schnelle <[email protected]>
    Cc: John David Anglin <[email protected]>
    Cc: Charlie Jenkins <[email protected]>
    Cc: David Laight <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    groeck authored and hdeller committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    882a2a7 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. x86/bugs: Add asm helpers for executing VERW

    MDS mitigation requires clearing the CPU buffers before returning to
    user. This needs to be done late in the exit-to-user path. Current
    location of VERW leaves a possibility of kernel data ending up in CPU
    buffers for memory accesses done after VERW such as:
    
      1. Kernel data accessed by an NMI between VERW and return-to-user can
         remain in CPU buffers since NMI returning to kernel does not
         execute VERW to clear CPU buffers.
      2. Alyssa reported that after VERW is executed,
         CONFIG_GCC_PLUGIN_STACKLEAK=y scrubs the stack used by a system
         call. Memory accesses during stack scrubbing can move kernel stack
         contents into CPU buffers.
      3. When caller saved registers are restored after a return from
         function executing VERW, the kernel stack accesses can remain in
         CPU buffers(since they occur after VERW).
    
    To fix this VERW needs to be moved very late in exit-to-user path.
    
    In preparation for moving VERW to entry/exit asm code, create macros
    that can be used in asm. Also make VERW patching depend on a new feature
    flag X86_FEATURE_CLEAR_CPU_BUF.
    
    Reported-by: Alyssa Milburn <[email protected]>
    Suggested-by: Andrew Cooper <[email protected]>
    Suggested-by: Peter Zijlstra <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-1-a6216d83edb7%40linux.intel.com
    pa1gupta authored and hansendc committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    baf8361 View commit details
    Browse the repository at this point in the history
  2. x86/entry_64: Add VERW just before userspace transition

    Mitigation for MDS is to use VERW instruction to clear any secrets in
    CPU Buffers. Any memory accesses after VERW execution can still remain
    in CPU buffers. It is safer to execute VERW late in return to user path
    to minimize the window in which kernel data can end up in CPU buffers.
    There are not many kernel secrets to be had after SWITCH_TO_USER_CR3.
    
    Add support for deploying VERW mitigation after user register state is
    restored. This helps minimize the chances of kernel data ending up into
    CPU buffers after executing VERW.
    
    Note that the mitigation at the new location is not yet enabled.
    
      Corner case not handled
      =======================
      Interrupts returning to kernel don't clear CPUs buffers since the
      exit-to-user path is expected to do that anyways. But, there could be
      a case when an NMI is generated in kernel after the exit-to-user path
      has cleared the buffers. This case is not handled and NMI returning to
      kernel don't clear CPU buffers because:
    
      1. It is rare to get an NMI after VERW, but before returning to userspace.
      2. For an unprivileged user, there is no known way to make that NMI
         less rare or target it.
      3. It would take a large number of these precisely-timed NMIs to mount
         an actual attack.  There's presumably not enough bandwidth.
      4. The NMI in question occurs after a VERW, i.e. when user state is
         restored and most interesting data is already scrubbed. Whats left
         is only the data that NMI touches, and that may or may not be of
         any interest.
    
    Suggested-by: Dave Hansen <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-2-a6216d83edb7%40linux.intel.com
    pa1gupta authored and hansendc committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    3c75017 View commit details
    Browse the repository at this point in the history
  3. x86/entry_32: Add VERW just before userspace transition

    As done for entry_64, add support for executing VERW late in exit to
    user path for 32-bit mode.
    
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-3-a6216d83edb7%40linux.intel.com
    pa1gupta authored and hansendc committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    a0e2dab View commit details
    Browse the repository at this point in the history
  4. x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key

    The VERW mitigation at exit-to-user is enabled via a static branch
    mds_user_clear. This static branch is never toggled after boot, and can
    be safely replaced with an ALTERNATIVE() which is convenient to use in
    asm.
    
    Switch to ALTERNATIVE() to use the VERW mitigation late in exit-to-user
    path. Also remove the now redundant VERW in exc_nmi() and
    arch_exit_to_user_mode().
    
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-4-a6216d83edb7%40linux.intel.com
    pa1gupta authored and hansendc committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    6613d82 View commit details
    Browse the repository at this point in the history
  5. KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH

    Use EFLAGS.CF instead of EFLAGS.ZF to track whether to use VMRESUME versus
    VMLAUNCH.  Freeing up EFLAGS.ZF will allow doing VERW, which clobbers ZF,
    for MDS mitigations as late as possible without needing to duplicate VERW
    for both paths.
    
    Signed-off-by: Sean Christopherson <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Reviewed-by: Nikolay Borisov <[email protected]>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-5-a6216d83edb7%40linux.intel.com
    sean-jc authored and hansendc committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    706a189 View commit details
    Browse the repository at this point in the history
  6. KVM/VMX: Move VERW closer to VMentry for MDS mitigation

    During VMentry VERW is executed to mitigate MDS. After VERW, any memory
    access like register push onto stack may put host data in MDS affected
    CPU buffers. A guest can then use MDS to sample host data.
    
    Although likelihood of secrets surviving in registers at current VERW
    callsite is less, but it can't be ruled out. Harden the MDS mitigation
    by moving the VERW mitigation late in VMentry path.
    
    Note that VERW for MMIO Stale Data mitigation is unchanged because of
    the complexity of per-guest conditional VERW which is not easy to handle
    that late in asm with no GPRs available. If the CPU is also affected by
    MDS, VERW is unconditionally executed late in asm regardless of guest
    having MMIO access.
    
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Acked-by: Sean Christopherson <[email protected]>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-6-a6216d83edb7%40linux.intel.com
    pa1gupta authored and hansendc committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    43fb862 View commit details
    Browse the repository at this point in the history
  7. erofs: fix handling kern_mount() failure

    if you have a variable that holds NULL or  a pointer to live struct mount,
    do not shove ERR_PTR() into it - not if you later treat "not NULL" as
    "holds a pointer to object".
    
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    2c88c16 View commit details
    Browse the repository at this point in the history
  8. usb: typec: tpcm: Fix issues with power being removed during reset

    Since the merge of b717dfb ("Revert "usb: typec: tcpm: fix
    cc role at port reset"") into mainline the LibreTech Renegade
    Elite/Firefly has died during boot, the main symptom observed in testing
    is a sudden stop in console output.  Gábor Stefanik identified in review
    that the patch would cause power to be removed from devices without
    batteries (like this board), observing that while the patch is correct
    according to the spec this appears to be an oversight in the spec.
    
    Given that the change makes previously working systems unusable let's
    revert it, there was some discussion of identifying systems that have
    alternative power and implementing the standards conforming behaviour in
    only that case.
    
    Fixes: b717dfb ("Revert "usb: typec: tcpm: fix cc role at port reset"")
    Cc: stable <[email protected]>
    Cc: Badhri Jagan Sridharan <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Acked-by: Heikki Krogerus <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    broonie authored and gregkh committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    69f8916 View commit details
    Browse the repository at this point in the history
  9. cachefiles: fix memory leak in cachefiles_add_cache()

    The following memory leak was reported after unbinding /dev/cachefiles:
    
    ==================================================================
    unreferenced object 0xffff9b674176e3c0 (size 192):
      comm "cachefilesd2", pid 680, jiffies 4294881224
      hex dump (first 32 bytes):
        01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace (crc ea38a44b):
        [<ffffffff8eb8a1a5>] kmem_cache_alloc+0x2d5/0x370
        [<ffffffff8e917f86>] prepare_creds+0x26/0x2e0
        [<ffffffffc002eeef>] cachefiles_determine_cache_security+0x1f/0x120
        [<ffffffffc00243ec>] cachefiles_add_cache+0x13c/0x3a0
        [<ffffffffc0025216>] cachefiles_daemon_write+0x146/0x1c0
        [<ffffffff8ebc4a3b>] vfs_write+0xcb/0x520
        [<ffffffff8ebc5069>] ksys_write+0x69/0xf0
        [<ffffffff8f6d4662>] do_syscall_64+0x72/0x140
        [<ffffffff8f8000aa>] entry_SYSCALL_64_after_hwframe+0x6e/0x76
    ==================================================================
    
    Put the reference count of cache_cred in cachefiles_daemon_unbind() to
    fix the problem. And also put cache_cred in cachefiles_add_cache() error
    branch to avoid memory leaks.
    
    Fixes: 9ae326a ("CacheFiles: A cache that backs onto a mounted filesystem")
    CC: [email protected]
    Signed-off-by: Baokun Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Acked-by: David Howells <[email protected]>
    Reviewed-by: Jingbo Xu <[email protected]>
    Reviewed-by: Jeff Layton <[email protected]>
    Signed-off-by: Christian Brauner <[email protected]>
    LiBaokun96 authored and brauner committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    e21a2f1 View commit details
    Browse the repository at this point in the history
  10. afs: Fix ignored callbacks over ipv4

    When searching for a matching peer, all addresses need to be searched,
    not just the ipv6 ones in the fs_addresses6 list.
    
    Given that the lists no longer contain addresses, there is little
    reason to splitting things between separate lists, so unify them
    into a single list.
    
    When processing an incoming callback from an ipv4 address, this would
    lead to a failure to set call->server, resulting in the callback being
    ignored and the client seeing stale contents.
    
    Fixes: 72904d7 ("rxrpc, afs: Allow afs to pin rxrpc_peer objects")
    Reported-by: Markus Suvanto <[email protected]>
    Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008035.html
    Signed-off-by: Marc Dionne <[email protected]>
    Signed-off-by: David Howells <[email protected]>
    Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008037.html # v1
    Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008066.html # v2
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christian Brauner <[email protected]>
    Marc Dionne authored and brauner committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    bfacaf7 View commit details
    Browse the repository at this point in the history
  11. afs: Increase buffer size in afs_update_volume_status()

    The max length of volume->vid value is 20 characters.
    So increase idbuf[] size up to 24 to avoid overflow.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    [DH: Actually, it's 20 + NUL, so increase it to 24 and use snprintf()]
    
    Fixes: d2ddc77 ("afs: Overhaul volume and server record caching and fileserver rotation")
    Signed-off-by: Daniil Dulov <[email protected]>
    Signed-off-by: David Howells <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]/ # v1
    Link: https://lore.kernel.org/r/[email protected]/ # v2
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christian Brauner <[email protected]>
    Daniil Dulov authored and brauner committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    6ea38e2 View commit details
    Browse the repository at this point in the history
  12. ipv6: sr: fix possible use-after-free and null-ptr-deref

    The pernet operations structure for the subsystem must be registered
    before registering the generic netlink family.
    
    Fixes: 915d7e5 ("ipv6: sr: add code base for control plane support of SR-IPv6")
    Signed-off-by: Vasiliy Kovalev <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Vasiliy Kovalev authored and Paolo Abeni committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    5559cea View commit details
    Browse the repository at this point in the history
  13. devlink: fix possible use-after-free and memory leaks in devlink_init()

    The pernet operations structure for the subsystem must be registered
    before registering the generic netlink family.
    
    Make an unregister in case of unsuccessful registration.
    
    Fixes: 687125b ("devlink: split out core code")
    Signed-off-by: Vasiliy Kovalev <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Vasiliy Kovalev authored and Paolo Abeni committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    def689f View commit details
    Browse the repository at this point in the history
  14. arp: Prevent overflow in arp_req_get().

    syzkaller reported an overflown write in arp_req_get(). [0]
    
    When ioctl(SIOCGARP) is issued, arp_req_get() looks up an neighbour
    entry and copies neigh->ha to struct arpreq.arp_ha.sa_data.
    
    The arp_ha here is struct sockaddr, not struct sockaddr_storage, so
    the sa_data buffer is just 14 bytes.
    
    In the splat below, 2 bytes are overflown to the next int field,
    arp_flags.  We initialise the field just after the memcpy(), so it's
    not a problem.
    
    However, when dev->addr_len is greater than 22 (e.g. MAX_ADDR_LEN),
    arp_netmask is overwritten, which could be set as htonl(0xFFFFFFFFUL)
    in arp_ioctl() before calling arp_req_get().
    
    To avoid the overflow, let's limit the max length of memcpy().
    
    Note that commit b5f0de6 ("net: dev: Convert sa_data to flexible
    array in struct sockaddr") just silenced syzkaller.
    
    [0]:
    memcpy: detected field-spanning write (size 16) of single field "r->arp_ha.sa_data" at net/ipv4/arp.c:1128 (size 14)
    WARNING: CPU: 0 PID: 144638 at net/ipv4/arp.c:1128 arp_req_get+0x411/0x4a0 net/ipv4/arp.c:1128
    Modules linked in:
    CPU: 0 PID: 144638 Comm: syz-executor.4 Not tainted 6.1.74 #31
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-5 04/01/2014
    RIP: 0010:arp_req_get+0x411/0x4a0 net/ipv4/arp.c:1128
    Code: fd ff ff e8 41 42 de fb b9 0e 00 00 00 4c 89 fe 48 c7 c2 20 6d ab 87 48 c7 c7 80 6d ab 87 c6 05 25 af 72 04 01 e8 5f 8d ad fb <0f> 0b e9 6c fd ff ff e8 13 42 de fb be 03 00 00 00 4c 89 e7 e8 a6
    RSP: 0018:ffffc900050b7998 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: ffff88803a815000 RCX: 0000000000000000
    RDX: 0000000000000000 RSI: ffffffff8641a44a RDI: 0000000000000001
    RBP: ffffc900050b7a98 R08: 0000000000000001 R09: 0000000000000000
    R10: 0000000000000000 R11: 203a7970636d656d R12: ffff888039c54000
    R13: 1ffff92000a16f37 R14: ffff88803a815084 R15: 0000000000000010
    FS:  00007f172bf306c0(0000) GS:ffff88805aa00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f172b3569f0 CR3: 0000000057f12005 CR4: 0000000000770ef0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    PKRU: 55555554
    Call Trace:
     <TASK>
     arp_ioctl+0x33f/0x4b0 net/ipv4/arp.c:1261
     inet_ioctl+0x314/0x3a0 net/ipv4/af_inet.c:981
     sock_do_ioctl+0xdf/0x260 net/socket.c:1204
     sock_ioctl+0x3ef/0x650 net/socket.c:1321
     vfs_ioctl fs/ioctl.c:51 [inline]
     __do_sys_ioctl fs/ioctl.c:870 [inline]
     __se_sys_ioctl fs/ioctl.c:856 [inline]
     __x64_sys_ioctl+0x18e/0x220 fs/ioctl.c:856
     do_syscall_x64 arch/x86/entry/common.c:51 [inline]
     do_syscall_64+0x37/0x90 arch/x86/entry/common.c:81
     entry_SYSCALL_64_after_hwframe+0x64/0xce
    RIP: 0033:0x7f172b262b8d
    Code: 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007f172bf300b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    RAX: ffffffffffffffda RBX: 00007f172b3abf80 RCX: 00007f172b262b8d
    RDX: 0000000020000000 RSI: 0000000000008954 RDI: 0000000000000003
    RBP: 00007f172b2d3493 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    R13: 000000000000000b R14: 00007f172b3abf80 R15: 00007f172bf10000
     </TASK>
    
    Reported-by: syzkaller <[email protected]>
    Reported-by: Bjoern Doebel <[email protected]>
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    q2ven authored and Paolo Abeni committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    a7d6027 View commit details
    Browse the repository at this point in the history
  15. docs: netdev: update the link to the CI repo

    Netronome graciously transferred the original NIPA repo
    to our new netdev umbrella org. Link to that instead of
    my private fork.
    
    Signed-off-by: Jakub Kicinski <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    kuba-moo authored and Paolo Abeni committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    23f9c2c View commit details
    Browse the repository at this point in the history
  16. KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_c…

    …ompat'
    
    Currently, rebooting a pseries nested qemu-kvm guest (L2) results in
    below error as L1 qemu sends PVR value 'arch_compat' == 0 via
    ppc_set_compat ioctl. This triggers a condition failure in
    kvmppc_set_arch_compat() resulting in an EINVAL.
    
    qemu-system-ppc64: Unable to set CPU compatibility mode in KVM: Invalid
    argument
    
    Also, a value of 0 for arch_compat generally refers the default
    compatibility of the host. But, arch_compat, being a Guest Wide Element
    in nested API v2, cannot be set to 0 in GSB as PowerVM (L0) expects a
    non-zero value. A value of 0 triggers a kernel trap during a reboot and
    consequently causes it to fail:
    
    [   22.106360] reboot: Restarting system
    KVM: unknown exit, hardware reason ffffffffffffffea
    NIP 0000000000000100   LR 000000000000fe44 CTR 0000000000000000 XER 0000000020040092 CPU#0
    MSR 0000000000001000 HID0 0000000000000000  HF 6c000000 iidx 3 didx 3
    TB 00000000 00000000 DECR 0
    GPR00 0000000000000000 0000000000000000 c000000002a8c300 000000007fe00000
    GPR04 0000000000000000 0000000000000000 0000000000001002 8000000002803033
    GPR08 000000000a000000 0000000000000000 0000000000000004 000000002fff0000
    GPR12 0000000000000000 c000000002e10000 0000000105639200 0000000000000004
    GPR16 0000000000000000 000000010563a090 0000000000000000 0000000000000000
    GPR20 0000000105639e20 00000001056399c8 00007fffe54abab0 0000000105639288
    GPR24 0000000000000000 0000000000000001 0000000000000001 0000000000000000
    GPR28 0000000000000000 0000000000000000 c000000002b30840 0000000000000000
    CR 00000000  [ -  -  -  -  -  -  -  -  ]     RES 000@ffffffffffffffff
     SRR0 0000000000000000  SRR1 0000000000000000    PVR 0000000000800200 VRSAVE 0000000000000000
    SPRG0 0000000000000000 SPRG1 0000000000000000  SPRG2 0000000000000000  SPRG3 0000000000000000
    SPRG4 0000000000000000 SPRG5 0000000000000000  SPRG6 0000000000000000  SPRG7 0000000000000000
    HSRR0 0000000000000000 HSRR1 0000000000000000
     CFAR 0000000000000000
     LPCR 0000000000020400
     PTCR 0000000000000000   DAR 0000000000000000  DSISR 0000000000000000
    
     kernel:trap=0xffffffea | pc=0x100 | msr=0x1000
    
    This patch updates kvmppc_set_arch_compat() to use the host PVR value if
    'compat_pvr' == 0 indicating that qemu doesn't want to enforce any
    specific PVR compat mode.
    
    The relevant part of the code might need a rework if PowerVM implements
    a support for `arch_compat == 0` in nestedv2 API.
    
    Fixes: 19d31c5 ("KVM: PPC: Add support for nestedv2 guests")
    Reviewed-by: "Aneesh Kumar K.V (IBM)" <[email protected]>
    Reviewed-by: Vaibhav Jain <[email protected]>
    Signed-off-by: Amit Machhiwal <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://msgid.link/[email protected]
    Amit Machhiwal authored and mpe committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    20c8c4d View commit details
    Browse the repository at this point in the history
  17. gpiolib: Handle no pin_ranges in gpiochip_generic_config()

    Similar to gpiochip_generic_request() and gpiochip_generic_free() the
    gpiochip_generic_config() function needs to handle the case where there
    are no pinctrl pins mapped to the GPIOs, usually through the gpio-ranges
    device tree property.
    
    Commit f34fd6e ("gpio: dwapb: Use generic request, free and
    set_config") set the .set_config callback to gpiochip_generic_config()
    in the dwapb GPIO driver so the GPIO API can set pinctrl configuration
    for the corresponding pins. Most boards using the dwapb driver do not
    set the gpio-ranges device tree property though, and in this case
    gpiochip_generic_config() would return -EPROPE_DEFER rather than the
    previous -ENOTSUPP return value. This in turn makes
    gpio_set_config_with_argument_optional() fail and propagate the error to
    any driver requesting GPIOs.
    
    Fixes: 2956b5d ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips")
    Reported-by: Jisheng Zhang <[email protected]>
    Closes: https://lore.kernel.org/linux-gpio/ZdC_g3U4l0CJIWzh@xhacker/
    Tested-by: Jisheng Zhang <[email protected]>
    Signed-off-by: Emil Renner Berthing <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    esmil authored and Bartosz Golaszewski committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    ae366ba View commit details
    Browse the repository at this point in the history
  18. perf: CXL: fix CPMU filter value mask length

    CPMU filter value is described as 4B length in CXL r3.0 8.2.7.2.2.
    However, it is used as 2B length in code and comments.
    
    Reviewed-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Hojin Nam <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    HojinNamm authored and willdeacon committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    802379b View commit details
    Browse the repository at this point in the history
  19. Revert "arm64: jump_label: use constraints "Si" instead of "i""

    This reverts commit f9daab0.
    
    Geert reports that his particular GCC 5.5 vintage toolchain fails to
    build an arm64 defconfig because of this change:
    
     |    arch/arm64/include/asm/jump_label.h:25:2: error: invalid 'asm':
     | invalid operand
     |     asm goto(
          ^
    Aopparently, this is something we claim to support, so let's revert back
    to the old jump label constraint for now while discussions about raising
    the minimum GCC version are ongoing.
    
    Reported-by: Geert Uytterhoeven <[email protected]>
    Link: https://lore.kernel.org/r/CAMuHMdX+6fnAf8Hm6EqYJPAjrrLO9T7c=Gu3S8V_pqjSDowJ6g@mail.gmail.com
    Signed-off-by: Will Deacon <[email protected]>
    willdeacon committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    a6b3eb3 View commit details
    Browse the repository at this point in the history
  20. arm64/sme: Restore SME registers on exit from suspend

    The fields in SMCR_EL1 and SMPRI_EL1 reset to an architecturally UNKNOWN
    value. Since we do not otherwise manage the traps configured in this
    register at runtime we need to reconfigure them after a suspend in case
    nothing else was kind enough to preserve them for us.
    
    The vector length will be restored as part of restoring the SME state for
    the next SME using task.
    
    Fixes: a1f4ccd ("arm64/sme: Provide Kconfig for SME")
    Reported-by: Jackson Cooper-Driver <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    broonie authored and willdeacon committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    9533864 View commit details
    Browse the repository at this point in the history
  21. arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend

    The fields in SMCR_EL1 reset to an architecturally UNKNOWN value. Since we
    do not otherwise manage the traps configured in this register at runtime we
    need to reconfigure them after a suspend in case nothing else was kind
    enough to preserve them for us. Do so for SMCR_EL1.EZT0.
    
    Fixes: d4913ee ("arm64/sme: Add basic enumeration for SME2")
    Reported-by: Jackson Cooper-Driver <[email protected]>
    Signed-off-by: Mark Brown <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    broonie authored and willdeacon committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    d7b77a0 View commit details
    Browse the repository at this point in the history
  22. platform/x86: x86-android-tablets: Fix keyboard touchscreen on Lenovo…

    … Yogabook1 X90
    
    After commit 4014ae2 ("platform/x86: x86-android-tablets: Stop using
    gpiolib private APIs") the touchscreen in the keyboard half of
    the Lenovo Yogabook1 X90 stopped working with the following error:
    
     Goodix-TS i2c-goodix_ts: error -EBUSY: Failed to get irq GPIO
    
    The problem is that when getting the IRQ for instantiated i2c_client-s
    from a GPIO (rather then using an IRQ directly from the IOAPIC),
    x86_acpi_irq_helper_get() now properly requests the GPIO, which disallows
    other drivers from requesting it. Normally this is a good thing, but
    the goodix touchscreen also uses the IRQ as an output during reset
    to select which of its 2 possible I2C addresses should be used.
    
    Add a new free_gpio flag to struct x86_acpi_irq_data to deal with this
    and release the GPIO after getting the IRQ in this special case.
    
    Fixes: 4014ae2 ("platform/x86: x86-android-tablets: Stop using gpiolib private APIs")
    Cc: [email protected]
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    bd8905d View commit details
    Browse the repository at this point in the history
  23. platform/x86: Add new get_serdev_controller() helper

    In some cases UART attached devices which require an in kernel driver,
    e.g. UART attached Bluetooth HCIs are described in the ACPI tables
    by an ACPI device with a broken or missing UartSerialBusV2() resource.
    
    This causes the kernel to create a /dev/ttyS# char-device for the UART
    instead of creating an in kernel serdev-controller + serdev-device pair
    for the in kernel driver.
    
    The quirk handling in acpi_quirk_skip_serdev_enumeration() makes the kernel
    create a serdev-controller device for these UARTs instead of a /dev/ttyS#.
    
    Instantiating the actual serdev-device to bind to is up to pdx86 code,
    so far this was handled by the x86-android-tablets code. But since
    commit b286f4e ("serial: core: Move tty and serdev to be children of
    serial core port device") the serdev-controller device has moved in the
    device hierarchy from (e.g.) /sys/devices/pci0000:00/8086228A:00/serial0 to
    /sys/devices/pci0000:00/8086228A:00/8086228A:00:0/8086228A:00:0.0/serial0 .
    
    This makes this a bit trickier to do and another driver is in the works
    which will also need this functionality.
    
    Add a new helper to get the serdev-controller device, so that the new
    code for this can be shared.
    
    Fixes: b286f4e ("serial: core: Move tty and serdev to be children of serial core port device")
    Cc: Tony Lindgren <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    dc5afd7 View commit details
    Browse the repository at this point in the history
  24. platform/x86: x86-android-tablets: Fix serdev instantiation no longer…

    … working
    
    After commit b286f4e ("serial: core: Move tty and serdev to be
    children of serial core port device") x86_instantiate_serdev() no longer
    works due to the serdev-controller-device moving in the device hierarchy
    from (e.g.) /sys/devices/pci0000:00/8086228A:00/serial0 to
    /sys/devices/pci0000:00/8086228A:00/8086228A:00:0/8086228A:00:0.0/serial0
    
    Use the new get_serdev_controller() helper function to fix this.
    
    Fixes: b286f4e ("serial: core: Move tty and serdev to be children of serial core port device")
    Cc: Tony Lindgren <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    812a79b View commit details
    Browse the repository at this point in the history
  25. platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name

    The Acer B1 750 tablet used a Novatek NVT-ts touchscreen,
    not a Goodix touchscreen.
    
    Rename acer_b1_750_goodix_gpios to acer_b1_750_nvt_ts_gpios
    to correctly reflect this.
    
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    8215ca5 View commit details
    Browse the repository at this point in the history
  26. platform/x86: intel-vbtn: Stop calling "VBDL" from notify_handler

    Commit 14c200b ("platform/x86: intel-vbtn: Fix missing
    tablet-mode-switch events") causes 2 issues on the ThinkPad X1 Tablet Gen2:
    
    1. The ThinkPad will wake up immediately from suspend
    2. When put in tablet mode SW_TABLET_MODE reverts to 0 after about 1 second
    
    Both these issues are caused by the "VBDL" ACPI method call added
    at the end of the notify_handler.
    
    And it never became entirely clear if this call is even necessary to fix
    the issue of missing tablet-mode-switch events on the Dell Inspiron 7352.
    
    Drop the "VBDL" ACPI method call again to fix the 2 issues this is
    causing on the ThinkPad X1 Tablet Gen2.
    
    Fixes: 14c200b ("platform/x86: intel-vbtn: Fix missing tablet-mode-switch events")
    Reported-by: Alexander Kobel <[email protected]>
    Closes: https://lore.kernel.org/platform-driver-x86/[email protected]/
    Cc: [email protected]
    Cc: Arnold Gozum <[email protected]>
    Cc: [email protected]
    Signed-off-by: Hans de Goede <[email protected]>
    Tested-by: Alexander Kobel <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    jwrdegoede committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    84c16d0 View commit details
    Browse the repository at this point in the history
  27. platform/x86: thinkpad_acpi: Only update profile if successfully conv…

    …erted
    
    Randomly a Lenovo Z13 will trigger a kernel warning traceback from this
    condition:
    
    ```
    if (WARN_ON((profile < 0) || (profile >= ARRAY_SIZE(profile_names))))
    ```
    
    This happens because thinkpad-acpi always assumes that
    convert_dytc_to_profile() successfully updated the profile. On the
    contrary a condition can occur that when dytc_profile_refresh() is called
    the profile doesn't get updated as there is a -EOPNOTSUPP branch.
    
    Catch this situation and avoid updating the profile. Also log this into
    dynamic debugging in case any other modes should be added in the future.
    
    Fixes: c3bfcd4 ("platform/x86: thinkpad_acpi: Add platform profile support")
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Hans de Goede <[email protected]>
    Signed-off-by: Hans de Goede <[email protected]>
    superm1 authored and jwrdegoede committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    427c70d View commit details
    Browse the repository at this point in the history
  28. accel/ivpu: Don't enable any tiles by default on VPU40xx

    There is no point in requesting 1 tile on VPU40xx as the FW will
    probably need more tiles to run workloads, so it will have to
    reconfigure PLL anyway. Don't enable any tiles and allow the FW to
    perform initial tile configuration.
    
    This improves NPU boot stability as the tiles are always enabled only
    by the FW from the same initial state.
    
    Fixes: 79cdc56 ("accel/ivpu: Add initial support for VPU 4")
    Cc: [email protected]
    Signed-off-by: Andrzej Kacprowski <[email protected]>
    Signed-off-by: Jacek Lawrynowicz <[email protected]>
    Reviewed-by: Jeffrey Hugo <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    akacprow authored and jlawryno committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    eb0d253 View commit details
    Browse the repository at this point in the history
  29. ARM: ep93xx: Add terminator to gpiod_lookup_table

    Without the terminator, if a con_id is passed to gpio_find() that
    does not exist in the lookup table the function will not stop looping
    correctly, and eventually cause an oops.
    
    Cc: [email protected]
    Fixes: b2e6355 ("i2c: gpio: Convert to use descriptors")
    Reported-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Nikita Shubin <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Acked-by: Alexander Sverdlin <[email protected]>
    Signed-off-by: Alexander Sverdlin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    maquefel authored and arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    fdf87a0 View commit details
    Browse the repository at this point in the history
  30. Merge tag 'imx-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/shawnguo/linux into arm/fixes
    
    i.MX fixes for 6.8:
    
    - A tqma8mpql device tree fix to correct audio codec iov-supply.
    - A couple of USB-C connector DT description revert to fix regression
      on imx8mp-dhcom-pdk3 and imx8mn-var-som-symphony board.
    - Fix valid range check for imx-weim bus driver.
    - Disable UART4 on Data Modul i.MX8M Plus eDM SBC to avoid boot hang
      in case that RDC protection is in place.
    
    * tag 'imx-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
      bus: imx-weim: fix valid range check
      Revert "arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector"
      Revert "arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector"
      arm64: dts: tqma8mpql: fix audio codec iov-supply
      arm64: dts: imx8mp: Disable UART4 by default on Data Modul i.MX8M Plus eDM SBC
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    d0a5994 View commit details
    Browse the repository at this point in the history
  31. sched/membarrier: reduce the ability to hammer on sys_membarrier

    On some systems, sys_membarrier can be very expensive, causing overall
    slowdowns for everything.  So put a lock on the path in order to
    serialize the accesses to prevent the ability for this to be called at
    too high of a frequency and saturate the machine.
    
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Reviewed-and-tested-by: Mathieu Desnoyers <[email protected]>
    Acked-by: Borislav Petkov <[email protected]>
    Fixes: 22e4ebb ("membarrier: Provide expedited private command")
    Fixes: c5f58bd ("membarrier: Provide GLOBAL_EXPEDITED command")
    Signed-off-by: Linus Torvalds <[email protected]>
    Linus Torvalds authored and torvalds committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    944d5fe View commit details
    Browse the repository at this point in the history
  32. dm-integrity: recheck the integrity tag after a failure

    If a userspace process reads (with O_DIRECT) multiple blocks into the same
    buffer, dm-integrity reports an error [1]. The error is reported in a log
    and it may cause RAID leg being kicked out of the array.
    
    This commit fixes dm-integrity, so that if integrity verification fails,
    the data is read again into a kernel buffer (where userspace can't modify
    it) and the integrity tag is rechecked. If the recheck succeeds, the
    content of the kernel buffer is copied into the user buffer; if the
    recheck fails, an integrity error is reported.
    
    [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c
    
    Signed-off-by: Mikulas Patocka <[email protected]>
    Cc: [email protected]
    Signed-off-by: Mike Snitzer <[email protected]>
    Mikulas Patocka authored and Mike Snitzer committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    c88f5e5 View commit details
    Browse the repository at this point in the history
  33. dm-verity: recheck the hash after a failure

    If a userspace process reads (with O_DIRECT) multiple blocks into the same
    buffer, dm-verity reports an error [1].
    
    This commit fixes dm-verity, so that if hash verification fails, the data
    is read again into a kernel buffer (where userspace can't modify it) and
    the hash is rechecked. If the recheck succeeds, the content of the kernel
    buffer is copied into the user buffer; if the recheck fails, an error is
    reported.
    
    [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c
    
    Signed-off-by: Mikulas Patocka <[email protected]>
    Cc: [email protected]
    Signed-off-by: Mike Snitzer <[email protected]>
    Mikulas Patocka authored and Mike Snitzer committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    9177f3c View commit details
    Browse the repository at this point in the history
  34. dm-crypt: don't modify the data when using authenticated encryption

    It was said that authenticated encryption could produce invalid tag when
    the data that is being encrypted is modified [1]. So, fix this problem by
    copying the data into the clone bio first and then encrypt them inside the
    clone bio.
    
    This may reduce performance, but it is needed to prevent the user from
    corrupting the device by writing data with O_DIRECT and modifying them at
    the same time.
    
    [1] https://lore.kernel.org/all/[email protected]/T/
    
    Signed-off-by: Mikulas Patocka <[email protected]>
    Cc: [email protected]
    Signed-off-by: Mike Snitzer <[email protected]>
    Mikulas Patocka authored and Mike Snitzer committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    50c7024 View commit details
    Browse the repository at this point in the history
  35. dm-crypt: recheck the integrity tag after a failure

    If a userspace process reads (with O_DIRECT) multiple blocks into the same
    buffer, dm-crypt reports an authentication error [1]. The error is
    reported in a log and it may cause RAID leg being kicked out of the
    array.
    
    This commit fixes dm-crypt, so that if integrity verification fails, the
    data is read again into a kernel buffer (where userspace can't modify it)
    and the integrity tag is rechecked. If the recheck succeeds, the content
    of the kernel buffer is copied into the user buffer; if the recheck fails,
    an integrity error is reported.
    
    [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c
    
    Signed-off-by: Mikulas Patocka <[email protected]>
    Cc: [email protected]
    Signed-off-by: Mike Snitzer <[email protected]>
    Mikulas Patocka authored and Mike Snitzer committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    42e15d1 View commit details
    Browse the repository at this point in the history
  36. dm-verity, dm-crypt: align "struct bvec_iter" correctly

    "struct bvec_iter" is defined with the __packed attribute, so it is
    aligned on a single byte. On X86 (and on other architectures that support
    unaligned addresses in hardware), "struct bvec_iter" is accessed using the
    8-byte and 4-byte memory instructions, however these instructions are less
    efficient if they operate on unaligned addresses.
    
    (on RISC machines that don't have unaligned access in hardware, GCC
    generates byte-by-byte accesses that are very inefficient - see [1])
    
    This commit reorders the entries in "struct dm_verity_io" and "struct
    convert_context", so that "struct bvec_iter" is aligned on 8 bytes.
    
    [1] https://lore.kernel.org/all/ZcLuWUNRZadJr0tQ@fedora/T/
    
    Signed-off-by: Mikulas Patocka <[email protected]>
    Signed-off-by: Mike Snitzer <[email protected]>
    Mikulas Patocka authored and Mike Snitzer committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    787f1b2 View commit details
    Browse the repository at this point in the history
  37. dm-crypt, dm-integrity, dm-verity: bump target version

    Signed-off-by: Mike Snitzer <[email protected]>
    Mike Snitzer committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    0e0c50e View commit details
    Browse the repository at this point in the history
  38. drm/tests/drm_buddy: fix build failure on 32-bit targets

    Guenter Roeck reports that commit a64056b ("drm/tests/drm_buddy:
    add alloc_contiguous test") causes build failures on 32-bit targets:
    
     "This patch breaks the build on all 32-bit systems since it introduces
      an unhandled direct 64-bit divide operation.
    
      ERROR: modpost: "__umoddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined!
      ERROR: modpost: "__moddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined!"
    
    and the uses of 'u64' are all entirely pointless.  Yes, the arguments to
    drm_buddy_init() and drm_buddy_alloc_blocks() are in fact of type 'u64',
    but none of the values here are remotely relevant, and the compiler will
    happily just do the type expansion.
    
    Of course, in a perfect world the compiler would also have just noticed
    that all the values in question are tiny, and range analysis would have
    shown that doing a 64-bit divide is pointless, but that is admittedly
    expecting a fair amount of the compiler.
    
    IOW, we shouldn't write code that the compiler then has to notice is
    unnecessarily complicated just to avoid extra work.  We do have fairly
    high expectations of compilers, but kernel code should be reasonable to
    begin with.
    
    It turns out that there are also other issues with this code: the KUnit
    assertion messages have incorrect types in the format strings, but
    that's a widely spread issue caused by the KUnit infrastructure not
    having enabled format string verification.  We'll get that sorted out
    separately.
    
    Reported-by: Guenter Roeck <[email protected]>
    Fixes: a64056b ("drm/tests/drm_buddy: add alloc_contiguous test")
    Link: https://lore.kernel.org/all/[email protected]/
    Cc: Matthew Auld <[email protected]>
    Cc: Arunpravin Paneer Selvam <[email protected]>
    Cc: Christian König <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    torvalds committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    fca7526 View commit details
    Browse the repository at this point in the history
  39. Merge tag 'v6.8-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/mmind/linux-rockchip into arm/fixes
    
    Some fixes to make devicetrees conform to bindings better (pwm irqs), dt
    styling fixes (unneeded jaguar status, whitespaces, Cool Pi regulator
    naming) and functionality fixes (px30 spi chipselect number, allowing
    rk3588-evb1 to turn off, pcie lane numbers on CoolPi, wrong gpio-names
    on Indidroid Nova and some CoolPi sdmmc aliases to match what uboot uses).
    
    * tag 'v6.8-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
      arm64: dts: rockchip: Correct Indiedroid Nova GPIO Names
      arm64: dts: rockchip: Drop interrupts property from rk3328 pwm-rockchip node
      arm64: dts: rockchip: set num-cs property for spi on px30
      arm64: dts: rockchip: minor rk3588 whitespace cleanup
      arm64: dts: rockchip: drop unneeded status from rk3588-jaguar gpio-leds
      ARM: dts: rockchip: Drop interrupts property from pwm-rockchip nodes
      arm64: dts: rockchip: Fix the num-lanes of pcie3x4 on Cool Pi CM5 EVB
      arm64: dts: rockchip: rename vcc5v0_usb30_host regulator for Cool Pi CM5 EVB
      arm64: dts: rockchip: aliase sdmmc as mmc1 for Cool Pi CM5 EVB
      arm64: dts: rockchip: aliase sdmmc as mmc1 for Cool Pi 4B
      arm64: dts: rockchip: mark system power controller on rk3588-evb1
    
    Link: https://lore.kernel.org/r/2450634.jE0xQCEvom@phil
    Signed-off-by: Arnd Bergmann <[email protected]>
    arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    0cf54e4 View commit details
    Browse the repository at this point in the history
  40. arm64: dts: freescale: Disable interrupt_map check

    Several Freescale Layerscape platforms extirq binding use a malformed
    interrupt-map property missing parent address cells. These are
    documented in of_irq_imap_abusers list in drivers/of/irq.c. In order to
    enable dtc interrupt_map check tree wide, we need to disable it for
    these platforms which will not be fixed (as that would break
    compatibility).
    
    Signed-off-by: Rob Herring <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    robherring authored and arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    e08f654 View commit details
    Browse the repository at this point in the history
  41. arm: dts: Fix dtc interrupt_provider warnings

    The dtc interrupt_provider warning is off by default. Fix all the warnings
    so it can be enabled.
    
    Signed-off-by: Rob Herring <[email protected]>
    Reviewed-by: Andrew Jeffery <[email protected]>
    Reviewed-by: Alexandre Torgue <[email protected]>
    Acked-by: Florian Fainelli <[email protected]> #Broadcom
    Acked-by: Thierry Reding <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    robherring authored and arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    96fd598 View commit details
    Browse the repository at this point in the history
  42. arm64: dts: Fix dtc interrupt_provider warnings

    The dtc interrupt_provider warning is off by default. Fix all the warnings
    so it can be enabled.
    
    Signed-off-by: Rob Herring <[email protected]>
    Reviewed-By: AngeloGioacchino Del Regno <[email protected]> #
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Geert Uytterhoeven <[email protected]>
    Acked-by: Florian Fainelli <[email protected]> #Broadcom
    Acked-by: Chanho Min <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    robherring authored and arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    91adecf View commit details
    Browse the repository at this point in the history
  43. arm: dts: Fix dtc interrupt_map warnings

    The dtc interrupt_map warning is off because its dependency,
    interrupt_provider, is off by default. Fix all the warnings so it can be
    enabled.
    
    Signed-off-by: Rob Herring <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    robherring authored and arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    f02b0f0 View commit details
    Browse the repository at this point in the history
  44. arm64: dts: qcom: Fix interrupt-map cell sizes

    The PCI node interrupt-map properties have the wrong size as #address-cells
    in the interrupt parent are not accounted for.
    
    The dtc interrupt_map check catches this, but the warning is off because
    its dependency, interrupt_provider, is off by default.
    
    Signed-off-by: Rob Herring <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    robherring authored and arndb committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    704dcce View commit details
    Browse the repository at this point in the history
  45. docs: Instruct LaTeX to cope with deeper nesting

    The addition of the XFS online fsck documentation starting with
    commit a8f6c2e ("xfs: document the motivation for online fsck design")
    added a deeper level of nesting than LaTeX is prepared to deal with.  That
    caused a pdfdocs build failure with the helpful "Too deeply nested" error
    message buried deeply in Documentation/output/filesystems.log.
    
    Increase the "maxlistdepth" parameter to instruct LaTeX that it needs to
    deal with the deeper nesting whether it wants to or not.
    
    Suggested-by: Akira Yokosawa <[email protected]>
    Tested-by: Akira Yokosawa <[email protected]>
    Cc: [email protected] # v6.4+
    Link: https://lore.kernel.org/linux-doc/[email protected]/
    Signed-off-by: Jonathan Corbet <[email protected]>
    Jonathan Corbet committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    0df8669 View commit details
    Browse the repository at this point in the history
  46. mm: zswap: fix missing folio cleanup in writeback race path

    In zswap_writeback_entry(), after we get a folio from
    __read_swap_cache_async(), we grab the tree lock again to check that the
    swap entry was not invalidated and recycled.  If it was, we delete the
    folio we just added to the swap cache and exit.
    
    However, __read_swap_cache_async() returns the folio locked when it is
    newly allocated, which is always true for this path, and the folio is
    ref'd.  Make sure to unlock and put the folio before returning.
    
    This was discovered by code inspection, probably because this path handles
    a race condition that should not happen often, and the bug would not crash
    the system, it will only strand the folio indefinitely.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 04fc781 ("mm: fix zswap writeback race condition")
    Signed-off-by: Yosry Ahmed <[email protected]>
    Reviewed-by: Chengming Zhou <[email protected]>
    Acked-by: Johannes Weiner <[email protected]>
    Reviewed-by: Nhat Pham <[email protected]>
    Cc: Domenico Cerasuolo <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    yosrym93 authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    e3b63e9 View commit details
    Browse the repository at this point in the history
  47. mm/damon/core: check apply interval in damon_do_apply_schemes()

    kdamond_apply_schemes() checks apply intervals of schemes and avoid
    further applying any schemes if no scheme passed its apply interval. 
    However, the following schemes applying function, damon_do_apply_schemes()
    iterates all schemes without the apply interval check.  As a result, the
    shortest apply interval is applied to all schemes.  Fix the problem by
    checking the apply interval in damon_do_apply_schemes().
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 42f994b ("mm/damon/core: implement scheme-specific apply interval")
    Signed-off-by: SeongJae Park <[email protected]>
    Cc: <[email protected]>	[6.7.x]
    Signed-off-by: Andrew Morton <[email protected]>
    sjp38 authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    e9e3db6 View commit details
    Browse the repository at this point in the history
  48. selftests/mm: uffd-unit-test check if huge page size is 0

    If HUGETLBFS is not enabled then the default_huge_page_size function will
    return 0 and cause a divide by 0 error. Add a check to see if the huge page
    size is 0 and skip the hugetlb tests if it is.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 16a45b5 ("selftests/mm: add framework for uffd-unit-test")
    Signed-off-by: Terry Tritton <[email protected]>
    Cc: Peter Griffin <[email protected]>
    Cc: Shuah Khan <[email protected]>
    Cc: Peter Xu <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Terry Tritton authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    7efa6f2 View commit details
    Browse the repository at this point in the history
  49. mm/swap_state: update zswap LRU's protection range with the folio locked

    When a folio is swapped in, the protection size of the corresponding zswap
    LRU is incremented, so that the zswap shrinker is more conservative with
    its reclaiming action.  This field is embedded within the struct lruvec,
    so updating it requires looking up the folio's memcg and lruvec.  However,
    currently this lookup can happen after the folio is unlocked, for instance
    if a new folio is allocated, and swap_read_folio() unlocks the folio
    before returning.  In this scenario, there is no stability guarantee for
    the binding between a folio and its memcg and lruvec:
    
    * A folio's memcg and lruvec can be freed between the lookup and the
      update, leading to a UAF.
    * Folio migration can clear the now-unlocked folio's memcg_data, which
      directs the zswap LRU protection size update towards the root memcg
      instead of the original memcg. This was recently picked up by the
      syzbot thanks to a warning in the inlined folio_lruvec() call.
    
    Move the zswap LRU protection range update above the swap_read_folio()
    call, and only when a new page is allocated, to prevent this.
    
    [[email protected]: add VM_WARN_ON_ONCE() to zswap_folio_swapin()]
      Link: https://lkml.kernel.org/r/[email protected]
    [[email protected]: remove unneeded if (folio) checks]
      Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: b5ba474 ("zswap: shrink zswap pool based on memory pressure")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Nhat Pham <[email protected]>
    Reviewed-by: Chengming Zhou <[email protected]>
    Acked-by: Johannes Weiner <[email protected]>
    Cc: Yosry Ahmed <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    nhatsmrt authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    16e96ba View commit details
    Browse the repository at this point in the history
  50. mm/swap: fix race when skipping swapcache

    When skipping swapcache for SWP_SYNCHRONOUS_IO, if two or more threads
    swapin the same entry at the same time, they get different pages (A, B). 
    Before one thread (T0) finishes the swapin and installs page (A) to the
    PTE, another thread (T1) could finish swapin of page (B), swap_free the
    entry, then swap out the possibly modified page reusing the same entry. 
    It breaks the pte_same check in (T0) because PTE value is unchanged,
    causing ABA problem.  Thread (T0) will install a stalled page (A) into the
    PTE and cause data corruption.
    
    One possible callstack is like this:
    
    CPU0                                 CPU1
    ----                                 ----
    do_swap_page()                       do_swap_page() with same entry
    <direct swapin path>                 <direct swapin path>
    <alloc page A>                       <alloc page B>
    swap_read_folio() <- read to page A  swap_read_folio() <- read to page B
    <slow on later locks or interrupt>   <finished swapin first>
    ...                                  set_pte_at()
                                         swap_free() <- entry is free
                                         <write to page B, now page A stalled>
                                         <swap out page B to same swap entry>
    pte_same() <- Check pass, PTE seems
                  unchanged, but page A
                  is stalled!
    swap_free() <- page B content lost!
    set_pte_at() <- staled page A installed!
    
    And besides, for ZRAM, swap_free() allows the swap device to discard the
    entry content, so even if page (B) is not modified, if swap_read_folio()
    on CPU0 happens later than swap_free() on CPU1, it may also cause data
    loss.
    
    To fix this, reuse swapcache_prepare which will pin the swap entry using
    the cache flag, and allow only one thread to swap it in, also prevent any
    parallel code from putting the entry in the cache.  Release the pin after
    PT unlocked.
    
    Racers just loop and wait since it's a rare and very short event.  A
    schedule_timeout_uninterruptible(1) call is added to avoid repeated page
    faults wasting too much CPU, causing livelock or adding too much noise to
    perf statistics.  A similar livelock issue was described in commit
    029c462 ("mm: swap: get rid of livelock in swapin readahead")
    
    Reproducer:
    
    This race issue can be triggered easily using a well constructed
    reproducer and patched brd (with a delay in read path) [1]:
    
    With latest 6.8 mainline, race caused data loss can be observed easily:
    $ gcc -g -lpthread test-thread-swap-race.c && ./a.out
      Polulating 32MB of memory region...
      Keep swapping out...
      Starting round 0...
      Spawning 65536 workers...
      32746 workers spawned, wait for done...
      Round 0: Error on 0x5aa00, expected 32746, got 32743, 3 data loss!
      Round 0: Error on 0x395200, expected 32746, got 32743, 3 data loss!
      Round 0: Error on 0x3fd000, expected 32746, got 32737, 9 data loss!
      Round 0 Failed, 15 data loss!
    
    This reproducer spawns multiple threads sharing the same memory region
    using a small swap device.  Every two threads updates mapped pages one by
    one in opposite direction trying to create a race, with one dedicated
    thread keep swapping out the data out using madvise.
    
    The reproducer created a reproduce rate of about once every 5 minutes, so
    the race should be totally possible in production.
    
    After this patch, I ran the reproducer for over a few hundred rounds and
    no data loss observed.
    
    Performance overhead is minimal, microbenchmark swapin 10G from 32G
    zram:
    
    Before:     10934698 us
    After:      11157121 us
    Cached:     13155355 us (Dropping SWP_SYNCHRONOUS_IO flag)
    
    [[email protected]: v4]
      Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 0bcac06 ("mm, swap: skip swapcache for swapin of synchronous device")
    Reported-by: "Huang, Ying" <[email protected]>
    Closes: https://lore.kernel.org/lkml/[email protected]/
    Link: https://github.com/ryncsn/emm-test-project/tree/master/swap-stress-race [1]
    Signed-off-by: Kairui Song <[email protected]>
    Reviewed-by: "Huang, Ying" <[email protected]>
    Acked-by: Yu Zhao <[email protected]>
    Acked-by: David Hildenbrand <[email protected]>
    Acked-by: Chris Li <[email protected]>
    Cc: Hugh Dickins <[email protected]>
    Cc: Johannes Weiner <[email protected]>
    Cc: Matthew Wilcox (Oracle) <[email protected]>
    Cc: Michal Hocko <[email protected]>
    Cc: Minchan Kim <[email protected]>
    Cc: Yosry Ahmed <[email protected]>
    Cc: Yu Zhao <[email protected]>
    Cc: Barry Song <[email protected]>
    Cc: SeongJae Park <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    ryncsn authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    13ddaf2 View commit details
    Browse the repository at this point in the history
  51. lib/Kconfig.debug: TEST_IOV_ITER depends on MMU

    Trying to run the iov_iter unit test on a nommu system such as the qemu
    kc705-nommu emulation results in a crash.
    
        KTAP version 1
        # Subtest: iov_iter
        # module: kunit_iov_iter
        1..9
    BUG: failure at mm/nommu.c:318/vmap()!
    Kernel panic - not syncing: BUG!
    
    The test calls vmap() directly, but vmap() is not supported on nommu
    systems, causing the crash.  TEST_IOV_ITER therefore needs to depend on
    MMU.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 2d71340 ("iov_iter: Kunit tests for copying to/from an iterator")
    Signed-off-by: Guenter Roeck <[email protected]>
    Cc: David Howells <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    groeck authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    1eb1e98 View commit details
    Browse the repository at this point in the history
  52. mm/zswap: invalidate duplicate entry when !zswap_enabled

    We have to invalidate any duplicate entry even when !zswap_enabled since
    zswap can be disabled anytime.  If the folio store success before, then
    got dirtied again but zswap disabled, we won't invalidate the old
    duplicate entry in the zswap_store().  So later lru writeback may
    overwrite the new data in swapfile.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 42c06a0 ("mm: kill frontswap")
    Signed-off-by: Chengming Zhou <[email protected]>
    Acked-by: Johannes Weiner <[email protected]>
    Cc: Nhat Pham <[email protected]>
    Cc: Yosry Ahmed <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Chengming Zhou authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    678e54d View commit details
    Browse the repository at this point in the history
  53. mm/memblock: add MEMBLOCK_RSRV_NOINIT into flagname[] array

    The commit 77e6c43 ("memblock: introduce MEMBLOCK_RSRV_NOINIT flag")
    skipped adding this newly introduced memblock flag into flagname[] array,
    thus preventing a correct memblock flags output for applicable memblock
    regions.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 77e6c43 ("memblock: introduce MEMBLOCK_RSRV_NOINIT flag")
    Signed-off-by: Anshuman Khandual <[email protected]>
    Reviewed-by: Mike Rapoport <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Anshuman Khandual authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    4f155af View commit details
    Browse the repository at this point in the history
  54. mm: memcontrol: clarify swapaccount=0 deprecation warning

    The swapaccount deprecation warning is throwing false positives.  Since we
    deprecated the knob and defaulted to enabling, the only reports we've been
    getting are from folks that set swapaccount=1.  While this is a nice
    affirmation that always-enabling was the right choice, we certainly don't
    want to warn when users request the supported mode.
    
    Only warn when disabling is requested, and clarify the warning.
    
    [[email protected]: spelling: "commdandline" -> "commandline"]
      Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: b25806d ("mm: memcontrol: deprecate swapaccounting=0 mode")
    Signed-off-by: Colin Ian King <[email protected]>
    Reported-by: "Jonas Schäfer" <[email protected]>
    Reported-by: Narcis Garcia <[email protected]>
    Suggested-by: Yosry Ahmed <[email protected]>
    Signed-off-by: Johannes Weiner <[email protected]>
    Reviewed-by: Yosry Ahmed <[email protected]>
    Acked-by: Michal Hocko <[email protected]>
    Acked-by: Shakeel Butt <[email protected]>
    Cc: Roman Gushchin <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    hnaz authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    118642d View commit details
    Browse the repository at this point in the history
  55. mm/damon/sysfs-schemes: handle schemes sysfs dir removal before commi…

    …t_schemes_quota_goals
    
    'commit_schemes_quota_goals' command handler,
    damos_sysfs_set_quota_scores() assumes the number of schemes sysfs
    directory will be same to the number of schemes of the DAMON context.  The
    assumption is wrong since users can remove schemes sysfs directories while
    DAMON is running.  In the case, illegal memory accesses can happen.  Fix
    it by checking the case.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: d91beaa ("mm/damon/sysfs-schemes: implement a command for scheme quota goals only commit")
    Signed-off-by: SeongJae Park <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    sjp38 authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    0721a61 View commit details
    Browse the repository at this point in the history
  56. MAINTAINERS: mailmap: update Shakeel's email address

    Moving to linux.dev based email for kernel work.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Shakeel Butt <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    shakeelb authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    379c5aa View commit details
    Browse the repository at this point in the history
  57. mm/damon/reclaim: fix quota stauts loss due to online tunings

    Patch series "mm/damon: fix quota status loss due to online tunings".
    
    DAMON_RECLAIM and DAMON_LRU_SORT is not preserving internal quota status
    when applying new user parameters, and hence could cause temporal quota
    accuracy degradation.  Fix it by preserving the status.
    
    
    This patch (of 2):
    
    For online parameters change, DAMON_RECLAIM creates new scheme based on
    latest values of the parameters and replaces the old scheme with the new
    one.  When creating it, the internal status of the quota of the old
    scheme is not preserved.  As a result, charging of the quota starts from
    zero after the online tuning.  The data that collected to estimate the
    throughput of the scheme's action is also reset, and therefore the
    estimation should start from the scratch again.  Because the throughput
    estimation is being used to convert the time quota to the effective size
    quota, this could result in temporal time quota inaccuracy.  It would be
    recovered over time, though.  In short, the quota accuracy could be
    temporarily degraded after online parameters update.
    
    Fix the problem by checking the case and copying the internal fields for
    the status.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: e035c28 ("mm/damon/reclaim: support online inputs update")
    Signed-off-by: SeongJae Park <[email protected]>
    Cc: <[email protected]>	[5.19+]
    Signed-off-by: Andrew Morton <[email protected]>
    sjp38 authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    1b0ca4e View commit details
    Browse the repository at this point in the history
  58. mm/damon/lru_sort: fix quota status loss due to online tunings

    For online parameters change, DAMON_LRU_SORT creates new schemes based on
    latest values of the parameters and replaces the old schemes with the new
    one.  When creating it, the internal status of the quotas of the old
    schemes is not preserved.  As a result, charging of the quota starts from
    zero after the online tuning.  The data that collected to estimate the
    throughput of the scheme's action is also reset, and therefore the
    estimation should start from the scratch again.  Because the throughput
    estimation is being used to convert the time quota to the effective size
    quota, this could result in temporal time quota inaccuracy.  It would be
    recovered over time, though.  In short, the quota accuracy could be
    temporarily degraded after online parameters update.
    
    Fix the problem by checking the case and copying the internal fields for
    the status.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 40e983c ("mm/damon: introduce DAMON-based LRU-lists Sorting")
    Signed-off-by: SeongJae Park <[email protected]>
    Cc: <[email protected]>	[6.0+]
    Signed-off-by: Andrew Morton <[email protected]>
    sjp38 authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    13d0599 View commit details
    Browse the repository at this point in the history
  59. kasan: guard release_free_meta() shadow access with kasan_arch_is_rea…

    …dy()
    
    release_free_meta() accesses the shadow directly through the path
    
      kasan_slab_free
        __kasan_slab_free
          kasan_release_object_meta
            release_free_meta
              kasan_mem_to_shadow
    
    There are no kasan_arch_is_ready() guards here, allowing an oops when the
    shadow is not initialized.  The oops can be seen on a Power8 KVM guest.
    
    This patch adds the guard to release_free_meta(), as it's the first level
    that specifically requires the shadow.
    
    It is safe to put the guard at the start of this function, before the
    stack put: only kasan_save_free_info() can initialize the saved stack,
    which itself is guarded with kasan_arch_is_ready() by its caller
    poison_slab_object().  If the arch becomes ready before
    release_free_meta() then we will not observe KASAN_SLAB_FREE_META in the
    object's shadow, so we will not put an uninitialized stack either.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 63b85ac ("kasan: stop leaking stack trace handles")
    Signed-off-by: Benjamin Gray <[email protected]>
    Reviewed-by: Andrey Konovalov <[email protected]>
    Cc: Alexander Potapenko <[email protected]>
    Cc: Andrey Ryabinin <[email protected]>
    Cc: Dmitry Vyukov <[email protected]>
    Cc: Michael Ellerman <[email protected]>
    Cc: Vincenzo Frascino <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    BenjaminGrayNp1 authored and akpm00 committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    2597c99 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/rdma/rdma
    
    Pull rdma fixes from Jason Gunthorpe:
     "Mostly irdma and bnxt_re fixes:
    
       - Missing error unwind in hf1
    
       - For bnxt - fix fenching behavior to work on new chips, fail
         unsupported SRQ resize back to userspace, propogate SRQ FW failure
         back to userspace.
    
       - Correctly fail unsupported SRQ resize back to userspace in bnxt
    
       - Adjust a memcpy in mlx5 to not overflow a struct field.
    
       - Prevent userspace from triggering mlx5 fw syndrome logging from
         sysfs
    
       - Use the correct access mode for MLX5_IB_METHOD_DEVX_OBJ_MODIFY to
         avoid a userspace failure on modify
    
       - For irdma - Don't UAF a concurrent tasklet during destroy, prevent
         userspace from issuing invalid QP attrs, fix a possible CQ
         overflow, capture a missing HW async error event
    
       - sendmsg() triggerable memory access crash in hfi1
    
       - Fix the srpt_service_guid parameter to not crash due to missing
         function pointer
    
       - Don't leak objects in error unwind in qedr
    
       - Don't weirdly cast function pointers in srpt"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
      RDMA/srpt: fix function pointer cast warnings
      RDMA/qedr: Fix qedr_create_user_qp error flow
      RDMA/srpt: Support specifying the srpt_service_guid parameter
      IB/hfi1: Fix sdma.h tx->num_descs off-by-one error
      RDMA/irdma: Add AE for too many RNRS
      RDMA/irdma: Set the CQ read threshold for GEN 1
      RDMA/irdma: Validate max_send_wr and max_recv_wr
      RDMA/irdma: Fix KASAN issue with tasklet
      RDMA/mlx5: Relax DEVX access upon modify commands
      IB/mlx5: Don't expose debugfs entries for RRoCE general parameters if not supported
      RDMA/mlx5: Fix fortify source warning while accessing Eth segment
      RDMA/bnxt_re: Add a missing check in bnxt_qplib_query_srq
      RDMA/bnxt_re: Return error for SRQ resize
      RDMA/bnxt_re: Fix unconditional fence for newer adapters
      RDMA/bnxt_re: Remove a redundant check inside bnxt_re_vf_res_config
      RDMA/bnxt_re: Avoid creating fence MR for newer adapters
      IB/hfi1: Fix a memleak in init_credit_return
    torvalds committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    9fc1ccc View commit details
    Browse the repository at this point in the history
  2. acpi/ghes: Remove CXL CPER notifications

    Initial tests with the CXL CPER implementation identified that error
    reports were being duplicated in the log and the trace event [1].  Then
    it was discovered that the notification handler took sleeping locks
    while the GHES event handling runs in spin_lock_irqsave() context [2]
    
    While the duplicate reporting was fixed in v6.8-rc4, the fix for the
    sleeping-lock-vs-atomic collision would enjoy more time to settle and
    gain some test cycles.  Given how late it is in the development cycle,
    remove the CXL hookup for now and try again during the next merge
    window.
    
    Note that end result is that v6.8 does not emit CXL CPER payloads to the
    kernel log, but this is in line with the CXL trend to move error
    reporting to trace events instead of the kernel log.
    
    Cc: Ard Biesheuvel <[email protected]>
    Cc: Rafael J. Wysocki <[email protected]>
    Cc: Jonathan Cameron <[email protected]>
    Reviewed-by: Ira Weiny <[email protected]>
    Link: http://lore.kernel.org/r/[email protected] [1]
    Closes: http://lore.kernel.org/r/[email protected] [2]
    Signed-off-by: Dan Williams <[email protected]>
    djbw committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    f3e6b3a View commit details
    Browse the repository at this point in the history
  3. Merge branch 'for-6.8/cxl-cper' into for-6.8/cxl

    Pick up CXL CPER notification removal for v6.8-rc6, to return in a later
    merge window.
    djbw committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    40de53f View commit details
    Browse the repository at this point in the history
  4. cxl/acpi: Fix load failures due to single window creation failure

    The expectation is that cxl_parse_cfwms() continues in the face the of
    failure as evidenced by code like:
    
        cxlrd = cxl_root_decoder_alloc(root_port, ways, cxl_calc_hb);
        if (IS_ERR(cxlrd))
        	return 0;
    
    There are other error paths in that function which mistakenly follow
    idiomatic expectations and return an error when they should not. Most of
    those mistakes are innocuous checks that hardly ever fail in practice.
    However, a recent change succeed in making the implementation more
    fragile by applying an idiomatic, but still wrong "fix" [1]. In this
    failure case the kernel reports:
    
        cxl root0: Failed to populate active decoder targets
        cxl_acpi ACPI0017:00: Failed to add decode range: [mem 0x00000000-0x7fffffff flags 0x200]
    
    ...which is a real issue with that one window (to be fixed separately),
    but ends up failing the entirety of cxl_acpi_probe().
    
    Undo that recent breakage while also removing the confusion about
    ignoring errors. Update all exits paths to return an error per typical
    expectations and let an outer wrapper function handle dropping the
    error.
    
    Fixes: 91019b5 ("cxl/acpi: Return 'rc' instead of '0' in cxl_parse_cfmws()") [1]
    Cc: <[email protected]>
    Cc: Breno Leitao <[email protected]>
    Cc: Alison Schofield <[email protected]>
    Cc: Vishal Verma <[email protected]>
    Signed-off-by: Dan Williams <[email protected]>
    djbw committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    5c6224b View commit details
    Browse the repository at this point in the history
  5. drm/i915/tv: Fix TV mode

    Commit 1fd4a5a ("drm/connector: Rename legacy TV property") failed
    to update all the users of the struct drm_tv_connector_state mode field,
    which resulted in a build failure in i915.
    
    However, a subsequent commit in the same series reintroduced a mode
    field in that structure, with a different semantic but the same type,
    with the assumption that all previous users were updated.
    
    Since that didn't happen, the i915 driver now compiles, but mixes
    accesses to the legacy_mode field and the newer mode field, but with the
    previous semantics.
    
    This obviously doesn't work very well, so we need to update the accesses
    that weren't in the legacy renaming commit.
    
    Fixes: 1fd4a5a ("drm/connector: Rename legacy TV property")
    Reported-by: Ville Syrjälä <[email protected]>
    Signed-off-by: Maxime Ripard <[email protected]>
    Reviewed-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit bf7626f)
    Signed-off-by: Joonas Lahtinen <[email protected]>
    mripard authored and jlahtine-intel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    fb1e881 View commit details
    Browse the repository at this point in the history
  6. drm/xe/uapi: Remove support for persistent exec_queues

    Persistent exec_queues delays explicit destruction of exec_queues
    until they are done executing, but destruction on process exit
    is still immediate. It turns out no UMD is relying on this
    functionality, so remove it. If there turns out to be a use-case
    in the future, let's re-add.
    
    Persistent exec_queues were never used for LR VMs
    
    v2:
    - Don't add an "UNUSED" define for the missing property
      (Lucas, Rodrigo)
    v3:
    - Remove the remaining struct xe_exec_queue::persistent state
      (Niranjana, Lucas)
    
    Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Cc: Rodrigo Vivi <[email protected]>
    Cc: Matthew Brost <[email protected]>
    Cc: David Airlie <[email protected]>
    Cc: Daniel Vetter <[email protected]>
    Cc: Lucas De Marchi <[email protected]>
    Cc: Francois Dugast <[email protected]>
    Signed-off-by: Thomas Hellström <[email protected]>
    Reviewed-by: Lucas De Marchi <[email protected]>
    Acked-by: José Roberto de Souza <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit f1a9abc)
    Signed-off-by: Thomas Hellström <[email protected]>
    Thomas Hellström committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    77aebae View commit details
    Browse the repository at this point in the history
  7. iommu/vt-d: Track nested domains in parent

    Today the parent domain (s2_domain) is unaware of which DID's are
    used by and which devices are attached to nested domains (s1_domain)
    nested on it. This leads to a problem that some operations (flush
    iotlb/devtlb and enable dirty tracking) on parent domain only apply to
    DID's and devices directly tracked in the parent domain hence are
    incomplete.
    
    This tracks the nested domains in list in parent domain. With this,
    operations on parent domain can loop the nested domains and refer to
    the devices and iommu_array to ensure the operations on parent domain
    take effect on all the affected devices and iommus.
    
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    85ce8e1 View commit details
    Browse the repository at this point in the history
  8. iommu/vt-d: Add __iommu_flush_iotlb_psi()

    Add __iommu_flush_iotlb_psi() to do the psi iotlb flush with a DID input
    rather than calculating it within the helper.
    
    This is useful when flushing cache for parent domain which reuses DIDs of
    its nested domains.
    
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    0455d31 View commit details
    Browse the repository at this point in the history
  9. iommu/vt-d: Add missing iotlb flush for parent domain

    If a domain is used as the parent in nested translation its mappings might
    be cached using DID of the nested domain. But the existing code ignores
    this fact to only invalidate the iotlb entries tagged by the domain's own
    DID.
    
    Loop the s1_domains list, if any, to invalidate all iotlb entries related
    to the target s2 address range. According to VT-d spec there is no need for
    software to explicitly flush the affected s1 cache. It's implicitly done by
    HW when s2 cache is invalidated.
    
    Fixes: b41e38e ("iommu/vt-d: Add nested domain allocation")
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    8219853 View commit details
    Browse the repository at this point in the history
  10. iommu/vt-d: Update iotlb in nested domain attach

    Should call domain_update_iotlb() to update the has_iotlb_device flag
    of the domain after attaching device to nested domain. Without it, this
    flag is not set properly and would result in missing device TLB flush.
    
    Fixes: 9838f2b ("iommu/vt-d: Set the nested domain to a device")
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    29e1048 View commit details
    Browse the repository at this point in the history
  11. iommu/vt-d: Add missing device iotlb flush for parent domain

    ATS-capable devices cache the result of nested translation. This result
    relies on the mappings in s2 domain (a.k.a. parent). When there are
    modifications in the s2 domain, the related nested translation caches on
    the device should be flushed. This includes the devices that are attached
    to the s1 domain. However, the existing code ignores this fact to only
    loops its own devices.
    
    As there is no easy way to identify the exact set of nested translations
    affected by the change of s2 domain. So, this just flushes the entire
    device iotlb on the device.
    
    As above, driver loops the s2 domain's s1_domains list and loops the
    devices list of each s1_domain to flush the entire device iotlb on the
    devices.
    
    Fixes: b41e38e ("iommu/vt-d: Add nested domain allocation")
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    5e54e86 View commit details
    Browse the repository at this point in the history
  12. iommu/vt-d: Remove domain parameter for intel_pasid_setup_dirty_track…

    …ing()
    
    The only usage of input @Domain is to get the domain id (DID) to flush
    cache after setting dirty tracking. However, DID can be obtained from
    the pasid entry. So no need to pass in domain. This can make this helper
    cleaner when adding the missing dirty tracking for the parent domain,
    which needs to use the DID of nested domain.
    
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Joao Martins <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    56ecaf6 View commit details
    Browse the repository at this point in the history
  13. iommu/vt-d: Wrap the dirty tracking loop to be a helper

    Add device_set_dirty_tracking() to loop all the devices and set the dirty
    tracking per the @enable parameter.
    
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Reviewed-by: Joao Martins <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    0c7f249 View commit details
    Browse the repository at this point in the history
  14. iommu/vt-d: Add missing dirty tracking set for parent domain

    Setting dirty tracking for a s2 domain requires to loop all the related
    devices and set the dirty tracking enable bit in the PASID table entry.
    This includes the devices that are attached to the nested domains of a
    s2 domain if this s2 domain is used as parent. However, the existing dirty
    tracking set only loops s2 domain's own devices. It will miss dirty page
    logs in the parent domain.
    
    Now, the parent domain tracks the nested domains, so it can loop the
    nested domains and the devices attached to the nested domains to ensure
    dirty tracking on the parent is set completely.
    
    Fixes: b41e38e ("iommu/vt-d: Add nested domain allocation")
    Signed-off-by: Yi Sun <[email protected]>
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    f1e1610 View commit details
    Browse the repository at this point in the history
  15. iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking

    Should set the SSADE (Second Stage Access/Dirty bit Enable) bit of the
    pasid entry when attaching a device to a nested domain if its parent
    has already enabled dirty tracking.
    
    Fixes: 111bf85 ("iommu/vt-d: Add helper to setup pasid nested translation")
    Signed-off-by: Yi Liu <[email protected]>
    Reviewed-by: Joao Martins <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    yiliu1765 authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    1f0198f View commit details
    Browse the repository at this point in the history
  16. iommu/vt-d: Fix constant-out-of-range warning

    On 32-bit builds, the vt-d driver causes a warning with clang:
    
    drivers/iommu/intel/nested.c:112:13: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
      112 |         if (npages == U64_MAX)
          |             ~~~~~~ ^  ~~~~~~~
    
    Make the variable a 64-bit type, which matches both the caller and the
    use anyway.
    
    Fixes: f6f3721 ("iommu/vt-d: Add iotlb flush for nested domain")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    arndb authored and joergroedel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    4578f98 View commit details
    Browse the repository at this point in the history
  17. drm/xe: Fix xe_vma_set_pte_size

    xe_vma_set_pte_size had a return value and did not set the 4k VMA flag.
    Both of these were incorrect. Fix these.
    
    Fixes: c47794b ("drm/xe: Set max pte size when skipping rebinds")
    Signed-off-by: Matthew Brost <[email protected]>
    Reviewed-by: Thomas Hellström <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 19adacc)
    Signed-off-by: Thomas Hellström <[email protected]>
    mbrost05 authored and Thomas Hellström committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    ecfac05 View commit details
    Browse the repository at this point in the history
  18. drm/xe: Add XE_VMA_PTE_64K VMA flag

    Add XE_VMA_PTE_64K VMA flag to ensure skipping rebinds does not cross
    64k page boundaries.
    
    Fixes: 8f33b4f ("drm/xe: Avoid doing rebinds")
    Fixes: c47794b ("drm/xe: Set max pte size when skipping rebinds")
    Signed-off-by: Matthew Brost <[email protected]>
    Reviewed-by: Thomas Hellström <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 15f0e0c)
    Signed-off-by: Thomas Hellström <[email protected]>
    mbrost05 authored and Thomas Hellström committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    4cf8ffe View commit details
    Browse the repository at this point in the history
  19. drm/xe: Return 2MB page size for compact 64k PTEs

    Compact 64k PTEs are only intended to be used within a single VMA which
    covers the entire 2MB range of the compact 64k PTEs. Add
    XE_VMA_PTE_COMPACT VMA flag to indicate compact 64k PTEs are used and
    update xe_vma_max_pte_size to return at least 2MB if set.
    
    v2: Include missing changes
    
    Fixes: 8f33b4f ("drm/xe: Avoid doing rebinds")
    Fixes: c47794b ("drm/xe: Set max pte size when skipping rebinds")
    Reported-by: Paulo Zanoni <[email protected]>
    Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/758
    Signed-off-by: Matthew Brost <[email protected]>
    Reviewed-by: Thomas Hellström <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 0f688c0)
    Signed-off-by: Thomas Hellström <[email protected]>
    mbrost05 authored and Thomas Hellström committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    5b672ec View commit details
    Browse the repository at this point in the history
  20. drm/xe/xe_gt_idle: Drop redundant newline in name

    Newline in name is redunant and produces an unnecessary empty line during
    'cat name'. Newline is added during sysfs_emit. See '27a1a1e2e47d ("drm/xe:
    stringify the argument to avoid potential vulnerability")'.
    
    v2: Add Fixes tag (Riana)
    
    Fixes: 7b076d1 ("drm/xe/mtl: Add support to get C6 residency/status of MTL")
    Reviewed-by: Riana Tauro <[email protected]>
    Signed-off-by: Ashutosh Dixit <[email protected]>
    (cherry picked from commit e5626eb)
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Thomas Hellström <[email protected]>
    ashutoshx authored and Thomas Hellström committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    e2941a4 View commit details
    Browse the repository at this point in the history
  21. KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()

    vgic_get_irq() may not return a valid descriptor if there is no ITS that
    holds a valid translation for the specified INTID. If that is the case,
    it is safe to silently ignore it and continue processing the LPI pending
    table.
    
    Cc: [email protected]
    Fixes: 33d3bc9 ("KVM: arm64: vgic-its: Read initial LPI pending table")
    Signed-off-by: Oliver Upton <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Marc Zyngier <[email protected]>
    oupton authored and Marc Zyngier committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    8d3a7df View commit details
    Browse the repository at this point in the history
  22. KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler

    It is possible that an LPI mapped in a different ITS gets unmapped while
    handling the MOVALL command. If that is the case, there is no state that
    can be migrated to the destination. Silently ignore it and continue
    migrating other LPIs.
    
    Cc: [email protected]
    Fixes: ff9c114 ("KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE")
    Signed-off-by: Oliver Upton <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Marc Zyngier <[email protected]>
    oupton authored and Marc Zyngier committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    85a71ee View commit details
    Browse the repository at this point in the history
  23. drm/xe: Fix modpost warning on xe_mocs kunit module

    $ make W=1 -j100 M=drivers/gpu/drm/xe
    MODPOST drivers/gpu/drm/xe/Module.symvers
    WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_mocs_test.o
    
    Fix is identical to '1d425066f15f ("drm/xe: Fix modpost warning on kunit
    modules")'.
    
    Fixes: a6a4ea6 ("drm/xe: Add mocs kunit")
    Signed-off-by: Ashutosh Dixit <[email protected]>
    Reviewed-by: Rodrigo Vivi <[email protected]>
    (cherry picked from commit bb619d7)
    Link:  https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Thomas Hellström <[email protected]>
    ashutoshx authored and Thomas Hellström committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    6650d23 View commit details
    Browse the repository at this point in the history
  24. Merge tag 'kvmarm-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/kvmarm/kvmarm into HEAD
    
    KVM/arm64 fixes for 6.8, take #3
    
    - Check for the validity of interrupts handled by a MOVALL
      command
    
    - Check for the validity of interrupts while reading the
      pending state on enabling LPIs.
    bonzini committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    c48617f View commit details
    Browse the repository at this point in the history
  25. octeontx2-af: Consider the action set by PF

    AF reserves MCAM entries for each PF, VF present in the
    system and populates the entry with DMAC and action with
    default RSS so that basic packet I/O works. Since PF/VF is
    not aware of the RSS action installed by AF, AF only fixup
    the actions of the rules installed by PF/VF with corresponding
    default RSS action. This worked well for rules installed by
    PF/VF for features like RX VLAN offload and DMAC filters but
    rules involving action like drop/forward to queue are also
    getting modified by AF. Hence fix it by setting the default
    RSS action only if requested by PF/VF.
    
    Fixes: 967db35 ("octeontx2-af: add support for multicast/promisc packet replication feature")
    Signed-off-by: Subbaraya Sundeep <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Subbaraya Sundeep authored and davem330 committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    3b1ae9b View commit details
    Browse the repository at this point in the history
  26. net: implement lockless setsockopt(SO_PEEK_OFF)

    syzbot reported a lockdep violation [1] involving af_unix
    support of SO_PEEK_OFF.
    
    Since SO_PEEK_OFF is inherently not thread safe (it uses a per-socket
    sk_peek_off field), there is really no point to enforce a pointless
    thread safety in the kernel.
    
    After this patch :
    
    - setsockopt(SO_PEEK_OFF) no longer acquires the socket lock.
    
    - skb_consume_udp() no longer has to acquire the socket lock.
    
    - af_unix no longer needs a special version of sk_set_peek_off(),
      because it does not lock u->iolock anymore.
    
    As a followup, we could replace prot->set_peek_off to be a boolean
    and avoid an indirect call, since we always use sk_set_peek_off().
    
    [1]
    
    WARNING: possible circular locking dependency detected
    6.8.0-rc4-syzkaller-00267-g0f1dd5e91e2b #0 Not tainted
    
    syz-executor.2/30025 is trying to acquire lock:
     ffff8880765e7d80 (&u->iolock){+.+.}-{3:3}, at: unix_set_peek_off+0x26/0xa0 net/unix/af_unix.c:789
    
    but task is already holding lock:
     ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1691 [inline]
     ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sockopt_lock_sock net/core/sock.c:1060 [inline]
     ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sk_setsockopt+0xe52/0x3360 net/core/sock.c:1193
    
    which lock already depends on the new lock.
    
    the existing dependency chain (in reverse order) is:
    
    -> #1 (sk_lock-AF_UNIX){+.+.}-{0:0}:
            lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
            lock_sock_nested+0x48/0x100 net/core/sock.c:3524
            lock_sock include/net/sock.h:1691 [inline]
            __unix_dgram_recvmsg+0x1275/0x12c0 net/unix/af_unix.c:2415
            sock_recvmsg_nosec+0x18e/0x1d0 net/socket.c:1046
            ____sys_recvmsg+0x3c0/0x470 net/socket.c:2801
            ___sys_recvmsg net/socket.c:2845 [inline]
            do_recvmmsg+0x474/0xae0 net/socket.c:2939
            __sys_recvmmsg net/socket.c:3018 [inline]
            __do_sys_recvmmsg net/socket.c:3041 [inline]
            __se_sys_recvmmsg net/socket.c:3034 [inline]
            __x64_sys_recvmmsg+0x199/0x250 net/socket.c:3034
           do_syscall_64+0xf9/0x240
           entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    -> #0 (&u->iolock){+.+.}-{3:3}:
            check_prev_add kernel/locking/lockdep.c:3134 [inline]
            check_prevs_add kernel/locking/lockdep.c:3253 [inline]
            validate_chain+0x18ca/0x58e0 kernel/locking/lockdep.c:3869
            __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137
            lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
            __mutex_lock_common kernel/locking/mutex.c:608 [inline]
            __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
            unix_set_peek_off+0x26/0xa0 net/unix/af_unix.c:789
           sk_setsockopt+0x207e/0x3360
            do_sock_setsockopt+0x2fb/0x720 net/socket.c:2307
            __sys_setsockopt+0x1ad/0x250 net/socket.c:2334
            __do_sys_setsockopt net/socket.c:2343 [inline]
            __se_sys_setsockopt net/socket.c:2340 [inline]
            __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340
           do_syscall_64+0xf9/0x240
           entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    other info that might help us debug this:
    
     Possible unsafe locking scenario:
    
           CPU0                    CPU1
           ----                    ----
      lock(sk_lock-AF_UNIX);
                                   lock(&u->iolock);
                                   lock(sk_lock-AF_UNIX);
      lock(&u->iolock);
    
     *** DEADLOCK ***
    
    1 lock held by syz-executor.2/30025:
      #0: ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1691 [inline]
      #0: ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sockopt_lock_sock net/core/sock.c:1060 [inline]
      #0: ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sk_setsockopt+0xe52/0x3360 net/core/sock.c:1193
    
    stack backtrace:
    CPU: 0 PID: 30025 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00267-g0f1dd5e91e2b #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    Call Trace:
     <TASK>
      __dump_stack lib/dump_stack.c:88 [inline]
      dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106
      check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187
      check_prev_add kernel/locking/lockdep.c:3134 [inline]
      check_prevs_add kernel/locking/lockdep.c:3253 [inline]
      validate_chain+0x18ca/0x58e0 kernel/locking/lockdep.c:3869
      __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137
      lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
      __mutex_lock_common kernel/locking/mutex.c:608 [inline]
      __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
      unix_set_peek_off+0x26/0xa0 net/unix/af_unix.c:789
     sk_setsockopt+0x207e/0x3360
      do_sock_setsockopt+0x2fb/0x720 net/socket.c:2307
      __sys_setsockopt+0x1ad/0x250 net/socket.c:2334
      __do_sys_setsockopt net/socket.c:2343 [inline]
      __se_sys_setsockopt net/socket.c:2340 [inline]
      __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340
     do_syscall_64+0xf9/0x240
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    RIP: 0033:0x7f78a1c7dda9
    Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007f78a0fde0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
    RAX: ffffffffffffffda RBX: 00007f78a1dac050 RCX: 00007f78a1c7dda9
    RDX: 000000000000002a RSI: 0000000000000001 RDI: 0000000000000006
    RBP: 00007f78a1cca47a R08: 0000000000000004 R09: 0000000000000000
    R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000000
    R13: 000000000000006e R14: 00007f78a1dac050 R15: 00007ffe5cd81ae8
    
    Fixes: 859051d ("bpf: Implement cgroup sockaddr hooks for unix sockets")
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Willem de Bruijn <[email protected]>
    Cc: Daan De Meyer <[email protected]>
    Cc: Kuniyuki Iwashima <[email protected]>
    Cc: Martin KaFai Lau <[email protected]>
    Cc: David Ahern <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Reviewed-by: Kuniyuki Iwashima <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Eric Dumazet authored and davem330 committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    56667da View commit details
    Browse the repository at this point in the history
  27. net: ipa: don't overrun IPA suspend interrupt registers

    In newer hardware, IPA supports more than 32 endpoints.  Some
    registers--such as IPA interrupt registers--represent endpoints
    as bits in a 4-byte register, and such registers are repeated as
    needed to represent endpoints beyond the first 32.
    
    In ipa_interrupt_suspend_clear_all(), we clear all pending IPA
    suspend interrupts by reading all status register(s) and writing
    corresponding registers to clear interrupt conditions.
    
    Unfortunately the number of registers to read/write is calculated
    incorrectly, and as a result we access *many* more registers than
    intended.  This bug occurs only when the IPA hardware signals a
    SUSPEND interrupt, which happens when a packet is received for an
    endpoint (or its underlying GSI channel) that is suspended.  This
    situation is difficult to reproduce, but possible.
    
    Fix this by correctly computing the number of interrupt registers to
    read and write.  This is the only place in the code where registers
    that map endpoints or channels this way perform this calculation.
    
    Fixes: f298ba7 ("net: ipa: add a parameter to suspend registers")
    Signed-off-by: Alex Elder <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Alex Elder authored and davem330 committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    d80f8e9 View commit details
    Browse the repository at this point in the history
  28. af_unix: Drop oob_skb ref before purging queue in GC.

    syzbot reported another task hung in __unix_gc().  [0]
    
    The current while loop assumes that all of the left candidates
    have oob_skb and calling kfree_skb(oob_skb) releases the remaining
    candidates.
    
    However, I missed a case that oob_skb has self-referencing fd and
    another fd and the latter sk is placed before the former in the
    candidate list.  Then, the while loop never proceeds, resulting
    the task hung.
    
    __unix_gc() has the same loop just before purging the collected skb,
    so we can call kfree_skb(oob_skb) there and let __skb_queue_purge()
    release all inflight sockets.
    
    [0]:
    Sending NMI from CPU 0 to CPUs 1:
    NMI backtrace for cpu 1
    CPU: 1 PID: 2784 Comm: kworker/u4:8 Not tainted 6.8.0-rc4-syzkaller-01028-g71b605d32017 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    Workqueue: events_unbound __unix_gc
    RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x70 kernel/kcov.c:200
    Code: 89 fb e8 23 00 00 00 48 8b 3d 84 f5 1a 0c 48 89 de 5b e9 43 26 57 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <f3> 0f 1e fa 48 8b 04 24 65 48 8b 0d 90 52 70 7e 65 8b 15 91 52 70
    RSP: 0018:ffffc9000a17fa78 EFLAGS: 00000287
    RAX: ffffffff8a0a6108 RBX: ffff88802b6c2640 RCX: ffff88802c0b3b80
    RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
    RBP: ffffc9000a17fbf0 R08: ffffffff89383f1d R09: 1ffff1100ee5ff84
    R10: dffffc0000000000 R11: ffffed100ee5ff85 R12: 1ffff110056d84ee
    R13: ffffc9000a17fae0 R14: 0000000000000000 R15: ffffffff8f47b840
    FS:  0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007ffef5687ff8 CR3: 0000000029b34000 CR4: 00000000003506f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <NMI>
     </NMI>
     <TASK>
     __unix_gc+0xe69/0xf40 net/unix/garbage.c:343
     process_one_work kernel/workqueue.c:2633 [inline]
     process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
     worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
     kthread+0x2ef/0x390 kernel/kthread.c:388
     ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
     ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
     </TASK>
    
    Reported-and-tested-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=ecab4d36f920c3574bf9
    Fixes: 25236c9 ("af_unix: Fix task hung while purging oob_skb in GC.")
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    q2ven authored and davem330 committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    aa82ac5 View commit details
    Browse the repository at this point in the history
  29. MAINTAINERS: Add framer headers to NETWORKING [GENERAL]

    The cited commit [1] added framer support under drivers/net/wan,
    which is covered by NETWORKING [GENERAL]. And it is implied
    that framer-provider.h and framer.h, which were also added
    buy the same patch, are also maintained as part of NETWORKING [GENERAL].
    
    Make this explicit by adding these files to the corresponding
    section in MAINTAINERS.
    
    [1] 82c944d ("net: wan: Add framer framework support")
    
    Signed-off-by: Simon Horman <[email protected]>
    Reviewed-by: Herve Codina <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    horms authored and davem330 committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    14dec56 View commit details
    Browse the repository at this point in the history
  30. sparc: Fix undefined reference to fb_is_primary_device

    Commit 55bffc8 ("fbdev: Split frame buffer support in FB and FB_CORE
    symbols") added a new FB_CORE Kconfig symbol, that can be enabled to only
    have fbcon/VT and DRM fbdev emulation, but without support for any legacy
    fbdev driver.
    
    Unfortunately, it missed to change the CONFIG_FB in arch/sparc makefiles,
    which leads to the following linking error in some sparc64 configurations:
    
       sparc64-linux-ld: drivers/video/fbdev/core/fbcon.o: in function `fbcon_fb_registered':
    >> fbcon.c:(.text+0x4f60): undefined reference to `fb_is_primary_device'
    
    Fixes: 55bffc8 ("fbdev: Split frame buffer support in FB and FB_CORE symbols")
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]/
    Signed-off-by: Javier Martinez Canillas <[email protected]>
    Reviewed-by: Thomas Zimmermann <[email protected]>
    Acked-by: Arnd Bergmann <[email protected]>
    Cc: <[email protected]> # v6.6+
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    martinezjavier authored and Thomas Zimmermann committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    ed683b9 View commit details
    Browse the repository at this point in the history
  31. iommufd: Reject non-zero data_type if no data_len is provided

    Since the current design doesn't forward the data_type to the driver to
    check unless there is a data_len/uptr for a driver specific struct we
    should check and ensure that data_type is 0 if data_len is 0. Otherwise
    any value is permitted.
    
    Fixes: bd529db ("iommufd: Add a nested HW pagetable object")
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Kevin Tian <[email protected]>
    Signed-off-by: Jason Gunthorpe <[email protected]>
    jgunthorpe committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    7adc0c1 View commit details
    Browse the repository at this point in the history
  32. s390: use the correct count for __iowrite64_copy()

    The signature for __iowrite64_copy() requires the number of 64 bit
    quantities, not bytes. Multiple by 8 to get to a byte length before
    invoking zpci_memcpy_toio()
    
    Fixes: 87bc359 ("s390/pci: speed up __iowrite64_copy by using pci store block insn")
    Acked-by: Niklas Schnelle <[email protected]>
    Signed-off-by: Jason Gunthorpe <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Heiko Carstens <[email protected]>
    jgunthorpe authored and hcahca committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    723a2cc View commit details
    Browse the repository at this point in the history
  33. ring-buffer: Do not let subbuf be bigger than write mask

    The data on the subbuffer is measured by a write variable that also
    contains status flags. The counter is just 20 bits in length. If the
    subbuffer is bigger than then counter, it will fail.
    
    Make sure that the subbuffer can not be set to greater than the counter
    that keeps track of the data on the subbuffer.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Fixes: 2808e31 ("ring-buffer: Add interface for configuring trace sub buffer size")
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    rostedt committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    e78fb4e View commit details
    Browse the repository at this point in the history
  34. fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio

    If kiocb_set_cancel_fn() is called for I/O submitted via io_uring, the
    following kernel warning appears:
    
    WARNING: CPU: 3 PID: 368 at fs/aio.c:598 kiocb_set_cancel_fn+0x9c/0xa8
    Call trace:
     kiocb_set_cancel_fn+0x9c/0xa8
     ffs_epfile_read_iter+0x144/0x1d0
     io_read+0x19c/0x498
     io_issue_sqe+0x118/0x27c
     io_submit_sqes+0x25c/0x5fc
     __arm64_sys_io_uring_enter+0x104/0xab0
     invoke_syscall+0x58/0x11c
     el0_svc_common+0xb4/0xf4
     do_el0_svc+0x2c/0xb0
     el0_svc+0x2c/0xa4
     el0t_64_sync_handler+0x68/0xb4
     el0t_64_sync+0x1a4/0x1a8
    
    Fix this by setting the IOCB_AIO_RW flag for read and write I/O that is
    submitted by libaio.
    
    Suggested-by: Jens Axboe <[email protected]>
    Cc: Christoph Hellwig <[email protected]>
    Cc: Avi Kivity <[email protected]>
    Cc: Sandeep Dhavale <[email protected]>
    Cc: Jens Axboe <[email protected]>
    Cc: Greg Kroah-Hartman <[email protected]>
    Cc: Kent Overstreet <[email protected]>
    Cc: [email protected]
    Signed-off-by: Bart Van Assche <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christian Brauner <[email protected]>
    bvanassche authored and brauner committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    b820de7 View commit details
    Browse the repository at this point in the history
  35. bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_r…

    …eady()
    
    syzbot reported the following NULL pointer dereference issue [1]:
    
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      [...]
      RIP: 0010:0x0
      [...]
      Call Trace:
       <TASK>
       sk_psock_verdict_data_ready+0x232/0x340 net/core/skmsg.c:1230
       unix_stream_sendmsg+0x9b4/0x1230 net/unix/af_unix.c:2293
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg+0x221/0x270 net/socket.c:745
       ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
       ___sys_sendmsg net/socket.c:2638 [inline]
       __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
       do_syscall_64+0xf9/0x240
       entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    If sk_psock_verdict_data_ready() and sk_psock_stop_verdict() are called
    concurrently, psock->saved_data_ready can be NULL, causing the above issue.
    
    This patch fixes this issue by calling the appropriate data ready function
    using the sk_psock_data_ready() helper and protecting it from concurrency
    with sk->sk_callback_lock.
    
    Fixes: 6df7f76 ("bpf, sockmap: Wake up polling after data copy")
    Reported-by: [email protected]
    Signed-off-by: Shigeru Yoshida <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Tested-by: [email protected]
    Acked-by: John Fastabend <[email protected]>
    Closes: https://syzkaller.appspot.com/bug?extid=fd7b34375c1c8ce29c93 [1]
    Link: https://lore.kernel.org/bpf/[email protected]
    Shigeru Yoshida authored and borkmann committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    4cd12c6 View commit details
    Browse the repository at this point in the history
  36. cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_c…

    …ache_wback()
    
    Align the end size to cache boundary size in ax45mp_dma_cache_wback()
    callback likewise done in ax45mp_dma_cache_inv() callback.
    
    Additionally return early in case of start == end.
    
    Fixes: d34599b ("cache: Add L2 cache management for Andes AX45MP RISC-V core")
    Reported-by: Pavel Machek <[email protected]>
    Link: https://lore.kernel.org/cip-dev/[email protected]/
    Signed-off-by: Lad Prabhakar <[email protected]>
    Signed-off-by: Conor Dooley <[email protected]>
    prabhakarlad authored and ConchuOD committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    9bd405c View commit details
    Browse the repository at this point in the history
  37. Merge tag 'v6.8-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/…

    …herbert/crypto-2.6
    
    Pull crypto fix from Herbert Xu:
     "Fix a stack overflow in virtio"
    
    * tag 'v6.8-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
      crypto: virtio/akcipher - Fix stack overflow on memcpy
    torvalds committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    d8be5a5 View commit details
    Browse the repository at this point in the history
  38. Merge tag 'for-6.8-rc5-tag' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/kdave/linux
    
    Pull btrfs fixes from David Sterba:
    
     - Fix a deadlock in fiemap.
    
       There was a big lock around the whole operation that can interfere
       with a page fault and mkwrite.
    
       Reducing the lock scope can also speed up fiemap
    
     - Fix range condition for extent defragmentation which could lead to
       worse layout in some cases
    
    * tag 'for-6.8-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
      btrfs: fix deadlock with fiemap and extent locking
      btrfs: defrag: avoid unnecessary defrag caused by incorrect extent size
    torvalds committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    8da8d88 View commit details
    Browse the repository at this point in the history
  39. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull kvm fixes from Paolo Bonzini:
     "Two fixes for ARM ITS emulation. Unmapped interrupts were used instead
      of ignored, causing NULL pointer dereferences"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
      KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler
      KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
    torvalds committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    3913335 View commit details
    Browse the repository at this point in the history
  40. irqchip/mbigen: Don't use bus_get_dev_root() to find the parent

    bus_get_dev_root() returns sp->dev_root which is set in subsys_register(),
    but subsys_register() is not called by platform_bus_init().
    
    Therefor for the platform_bus_type, bus_get_dev_root() always returns NULL.
    This makes mbigen_of_create_domain() always return -ENODEV.
    
    Don't try to retrieve the parent via bus_get_dev_root() and
    unconditionally hand a NULL pointer to of_platform_device_create() to
    fix this.
    
    Fixes: fea087f ("irqchip/mbigen: move to use bus_get_dev_root()")
    Signed-off-by: Chen Jun <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Chen Jun authored and KAGA-KOKO committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    fb33a46 View commit details
    Browse the repository at this point in the history
  41. ata: libata-core: Do not call ata_dev_power_set_standby() twice

    For regular system shutdown, ata_dev_power_set_standby() will be
    executed twice: once the scsi device is removed and another when
    ata_pci_shutdown_one() executes and EH completes unloading the devices.
    
    Make the second call to ata_dev_power_set_standby() do nothing by using
    ata_dev_power_is_active() and return if the device is already in
    standby.
    
    Fixes: 2da4c5e ("ata: libata-core: Improve ata_dev_power_set_active()")
    Cc: [email protected]
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Niklas Cassel <[email protected]>
    damien-lemoal authored and Niklas Cassel committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    9cec467 View commit details
    Browse the repository at this point in the history
  42. irqchip/gic-v3-its: Do not assume vPE tables are preallocated

    The GIC/ITS code is designed to ensure to pick up any preallocated LPI
    tables on the redistributors, as enabling LPIs is a one-way switch. There
    is no such restriction for vLPIs, and for GICv4.1 it is expected to
    allocate a new vPE table at boot.
    
    This works as intended when initializing an ITS, however when setting up a
    redistributor in cpu_init_lpis() the early return for preallocated RD
    tables skips straight past the GICv4 setup. This all comes to a head when
    trying to kexec() into a new kernel, as the new kernel silently fails to
    set up GICv4, leading to a complete loss of SGIs and LPIs for KVM VMs.
    
    Slap a band-aid on the problem by ensuring its_cpu_init_lpis() always
    initializes GICv4 on the way out, even if the other RD tables were
    preallocated.
    
    Fixes: 6479450 ("irqchip/gic-v4: Fix occasional VLPI drop")
    Reported-by: George Cherian <[email protected]>
    Co-developed-by: Marc Zyngier <[email protected]>
    Signed-off-by: Marc Zyngier <[email protected]>
    Signed-off-by: Oliver Upton <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    oupton authored and KAGA-KOKO committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    ec4308e View commit details
    Browse the repository at this point in the history
  43. docs: translations: use attribute to store current language

    Akira Yokosawa reported [1] that the "translations" extension we added in
    commit 7418ec5 ("docs: translations: add translations links when they
    exist") broke the build on Sphinx versions v6.1.3 through 7.1.2 (possibly
    others) with the following error:
    
        Exception occurred:
          File "/usr/lib/python3.12/site-packages/sphinx/util/nodes.py", line 624, in _copy_except__document
            newnode = self.__class__(rawsource=self.rawsource, **self.attributes)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        TypeError: LanguagesNode.__init__() missing 1 required positional argument: 'current_language'
        The full traceback has been saved in /tmp/sphinx-err-7xmwytuu.log, if you want to report the issue to the developers.
    
    Solve this problem by making 'current_language' a true element attribute
    of the LanguagesNode element, which is probably the more correct way to do
    it anyway.
    
    Tested on Sphinx 2.x, 3.x, 6.x, and 7.x.
    
    [1]: https://lore.kernel.org/all/[email protected]/
    
    Fixes: 7418ec5 ("docs: translations: add translations links when they exist")
    Reported-by: Akira Yokosawa <[email protected]>
    Signed-off-by: Vegard Nossum <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Tested-by: Akira Yokosawa <[email protected]>  # Sphinx 4.3.2, 5.3.0 and 6.2.1
    Signed-off-by: Jonathan Corbet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    vegard authored and Jonathan Corbet committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    b7b2ffc View commit details
    Browse the repository at this point in the history
  44. hwmon: (nct6775) Fix access to temperature configuration registers

    The number of temperature configuration registers does
    not always match the total number of temperature registers.
    This can result in access errors reported if KASAN is enabled.
    
    BUG: KASAN: global-out-of-bounds in nct6775_probe+0x5654/0x6fe9 nct6775_core
    
    Reported-by: Erhard Furtner <[email protected]>
    Closes: https://lore.kernel.org/linux-hwmon/[email protected]/
    Fixes: b7f1f7b ("hwmon: (nct6775) Additional TEMP registers for nct6799")
    Cc: Ahmad Khalifa <[email protected]>
    Tested-by: Ahmad Khalifa <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    groeck committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    d56e460 View commit details
    Browse the repository at this point in the history
  45. gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()

    The gtp_net_ops pernet operations structure for the subsystem must be
    registered before registering the generic netlink family.
    
    Syzkaller hit 'general protection fault in gtp_genl_dump_pdp' bug:
    
    general protection fault, probably for non-canonical address
    0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN NOPTI
    KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
    CPU: 1 PID: 5826 Comm: gtp Not tainted 6.8.0-rc3-std-def-alt1 #1
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-alt1 04/01/2014
    RIP: 0010:gtp_genl_dump_pdp+0x1be/0x800 [gtp]
    Code: c6 89 c6 e8 64 e9 86 df 58 45 85 f6 0f 85 4e 04 00 00 e8 c5 ee 86
          df 48 8b 54 24 18 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80>
          3c 02 00 0f 85 de 05 00 00 48 8b 44 24 18 4c 8b 30 4c 39 f0 74
    RSP: 0018:ffff888014107220 EFLAGS: 00010202
    RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000
    RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
    R13: ffff88800fcda588 R14: 0000000000000001 R15: 0000000000000000
    FS:  00007f1be4eb05c0(0000) GS:ffff88806ce80000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f1be4e766cf CR3: 000000000c33e000 CR4: 0000000000750ef0
    PKRU: 55555554
    Call Trace:
     <TASK>
     ? show_regs+0x90/0xa0
     ? die_addr+0x50/0xd0
     ? exc_general_protection+0x148/0x220
     ? asm_exc_general_protection+0x22/0x30
     ? gtp_genl_dump_pdp+0x1be/0x800 [gtp]
     ? __alloc_skb+0x1dd/0x350
     ? __pfx___alloc_skb+0x10/0x10
     genl_dumpit+0x11d/0x230
     netlink_dump+0x5b9/0xce0
     ? lockdep_hardirqs_on_prepare+0x253/0x430
     ? __pfx_netlink_dump+0x10/0x10
     ? kasan_save_track+0x10/0x40
     ? __kasan_kmalloc+0x9b/0xa0
     ? genl_start+0x675/0x970
     __netlink_dump_start+0x6fc/0x9f0
     genl_family_rcv_msg_dumpit+0x1bb/0x2d0
     ? __pfx_genl_family_rcv_msg_dumpit+0x10/0x10
     ? genl_op_from_small+0x2a/0x440
     ? cap_capable+0x1d0/0x240
     ? __pfx_genl_start+0x10/0x10
     ? __pfx_genl_dumpit+0x10/0x10
     ? __pfx_genl_done+0x10/0x10
     ? security_capable+0x9d/0xe0
    
    Cc: [email protected]
    Signed-off-by: Vasiliy Kovalev <[email protected]>
    Fixes: 459aa66 ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Vasiliy Kovalev authored and kuba-moo committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    136cfac View commit details
    Browse the repository at this point in the history
  46. tls: break out of main loop when PEEK gets a non-data record

    PEEK needs to leave decrypted records on the rx_list so that we can
    receive them later on, so it jumps back into the async code that
    queues the skb. Unfortunately that makes us skip the
    TLS_RECORD_TYPE_DATA check at the bottom of the main loop, so if two
    records of the same (non-DATA) type are queued, we end up merging
    them.
    
    Add the same record type check, and make it unlikely to not penalize
    the async fastpath. Async decrypt only applies to data record, so this
    check is only needed for PEEK.
    
    process_rx_list also has similar issues.
    
    Fixes: 692d7b5 ("tls: Fix recvmsg() to be able to peek across multiple records")
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Link: https://lore.kernel.org/r/3df2eef4fdae720c55e69472b5bea668772b45a2.1708007371.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    qsn authored and kuba-moo committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    10f41d0 View commit details
    Browse the repository at this point in the history
  47. tls: stop recv() if initial process_rx_list gave us non-DATA

    If we have a non-DATA record on the rx_list and another record of the
    same type still on the queue, we will end up merging them:
     - process_rx_list copies the non-DATA record
     - we start the loop and process the first available record since it's
       of the same type
     - we break out of the loop since the record was not DATA
    
    Just check the record type and jump to the end in case process_rx_list
    did some work.
    
    Fixes: 692d7b5 ("tls: Fix recvmsg() to be able to peek across multiple records")
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Link: https://lore.kernel.org/r/bd31449e43bd4b6ff546f5c51cf958c31c511deb.1708007371.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    qsn authored and kuba-moo committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    fdfbaec View commit details
    Browse the repository at this point in the history
  48. tls: don't skip over different type records from the rx_list

    If we queue 3 records:
     - record 1, type DATA
     - record 2, some other type
     - record 3, type DATA
    and do a recv(PEEK), the rx_list will contain the first two records.
    
    The next large recv will walk through the rx_list and copy data from
    record 1, then stop because record 2 is a different type. Since we
    haven't filled up our buffer, we will process the next available
    record. It's also DATA, so we can merge it with the current read.
    
    We shouldn't do that, since there was a record in between that we
    ignored.
    
    Add a flag to let process_rx_list inform tls_sw_recvmsg that it had
    more data available.
    
    Fixes: 692d7b5 ("tls: Fix recvmsg() to be able to peek across multiple records")
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Link: https://lore.kernel.org/r/f00c0c0afa080c60f016df1471158c1caf983c34.1708007371.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    qsn authored and kuba-moo committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    ec823bf View commit details
    Browse the repository at this point in the history
  49. selftests: tls: add test for merging of same-type control messages

    Two consecutive control messages of the same type should never be
    merged into one large received blob of data.
    
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Link: https://lore.kernel.org/r/018f1633d5471684c65def5fe390de3b15c3d683.1708007371.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    qsn authored and kuba-moo committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    7b2a4c2 View commit details
    Browse the repository at this point in the history
  50. selftests: tls: add test for peeking past a record of a different type

    If we queue 3 records:
     - record 1, type DATA
     - record 2, some other type
     - record 3, type DATA
    the current code can look past the 2nd record and merge the 2 data
    records.
    
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Link: https://lore.kernel.org/r/4623550f8617c239581030c13402d3262f2bd14f.1708007371.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    qsn authored and kuba-moo committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    2bf6172 View commit details
    Browse the repository at this point in the history
  51. Merge branch 'tls-fixes-for-record-type-handling-with-peek'

    Sabrina Dubroca says:
    
    ====================
    tls: fixes for record type handling with PEEK
    
    There are multiple bugs in tls_sw_recvmsg's handling of record types
    when MSG_PEEK flag is used, which can lead to incorrectly merging two
    records:
     - consecutive non-DATA records shouldn't be merged, even if they're
       the same type (partly handled by the test at the end of the main
       loop)
     - records of the same type (even DATA) shouldn't be merged if one
       record of a different type comes in between
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    f76d5f6 View commit details
    Browse the repository at this point in the history
  52. netfilter: nf_tables: set dormant flag on hook register failure

    We need to set the dormant flag again if we fail to register
    the hooks.
    
    During memory pressure hook registration can fail and we end up
    with a table marked as active but no registered hooks.
    
    On table/base chain deletion, nf_tables will attempt to unregister
    the hook again which yields a warn splat from the nftables core.
    
    Reported-and-tested-by: [email protected]
    Fixes: 179d9ba ("netfilter: nf_tables: fix table flag updates")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Florian Westphal authored and ummakynes committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    bccebf6 View commit details
    Browse the repository at this point in the history
  53. netfilter: nft_flow_offload: reset dst in route object after setting …

    …up flow
    
    dst is transferred to the flow object, route object does not own it
    anymore.  Reset dst in route object, otherwise if flow_offload_add()
    fails, error path releases dst twice, leading to a refcount underflow.
    
    Fixes: a3c90f7 ("netfilter: nf_tables: flow offload expression")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    9e0f043 View commit details
    Browse the repository at this point in the history
  54. netfilter: nft_flow_offload: release dst in case direct xmit path is …

    …used
    
    Direct xmit does not use it since it calls dev_queue_xmit() to send
    packets, hence it calls dst_release().
    
    kmemleak reports:
    
    unreferenced object 0xffff88814f440900 (size 184):
      comm "softirq", pid 0, jiffies 4294951896
      hex dump (first 32 bytes):
        00 60 5b 04 81 88 ff ff 00 e6 e8 82 ff ff ff ff  .`[.............
        21 0b 50 82 ff ff ff ff 00 00 00 00 00 00 00 00  !.P.............
      backtrace (crc cb2bf5d6):
        [<000000003ee17107>] kmem_cache_alloc+0x286/0x340
        [<0000000021a5de2c>] dst_alloc+0x43/0xb0
        [<00000000f0671159>] rt_dst_alloc+0x2e/0x190
        [<00000000fe5092c9>] __mkroute_output+0x244/0x980
        [<000000005fb96fb0>] ip_route_output_flow+0xc0/0x160
        [<0000000045367433>] nf_ip_route+0xf/0x30
        [<0000000085da1d8e>] nf_route+0x2d/0x60
        [<00000000d1ecd1cb>] nft_flow_route+0x171/0x6a0 [nft_flow_offload]
        [<00000000d9b2fb60>] nft_flow_offload_eval+0x4e8/0x700 [nft_flow_offload]
        [<000000009f447dbb>] expr_call_ops_eval+0x53/0x330 [nf_tables]
        [<00000000072e1be6>] nft_do_chain+0x17c/0x840 [nf_tables]
        [<00000000d0551029>] nft_do_chain_inet+0xa1/0x210 [nf_tables]
        [<0000000097c9d5c6>] nf_hook_slow+0x5b/0x160
        [<0000000005eccab1>] ip_forward+0x8b6/0x9b0
        [<00000000553a269b>] ip_rcv+0x221/0x230
        [<00000000412872e5>] __netif_receive_skb_one_core+0xfe/0x110
    
    Fixes: fa502c8 ("netfilter: flowtable: simplify route logic")
    Reported-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    8762785 View commit details
    Browse the repository at this point in the history
  55. netfilter: nf_tables: register hooks last when adding new chain/flowt…

    …able
    
    Register hooks last when adding chain/flowtable to ensure that packets do
    not walk over datastructure that is being released in the error path
    without waiting for the rcu grace period.
    
    Fixes: 91c7b38 ("netfilter: nf_tables: use new transaction infrastructure to handle chain")
    Fixes: 3b49e2e ("netfilter: nf_tables: add flow table netlink frontend")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    ummakynes committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    d472e98 View commit details
    Browse the repository at this point in the history
  56. netfilter: nf_tables: use kzalloc for hook allocation

    KMSAN reports unitialized variable when registering the hook,
       reg->hook_ops_type == NF_HOOK_OP_BPF)
            ~~~~~~~~~~~ undefined
    
    This is a small structure, just use kzalloc to make sure this
    won't happen again when new fields get added to nf_hook_ops.
    
    Fixes: 7b4b2fa ("netfilter: annotate nf_tables base hook ops")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Florian Westphal authored and ummakynes committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    195e5f8 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. net: mctp: put sock on tag allocation failure

    We may hold an extra reference on a socket if a tag allocation fails: we
    optimistically allocate the sk_key, and take a ref there, but do not
    drop if we end up not using the allocated key.
    
    Ensure we're dropping the sock on this failure by doing a proper unref
    rather than directly kfree()ing.
    
    Fixes: de8a6b1 ("net: mctp: add an explicit reference from a mctp_sk_key to sock")
    Signed-off-by: Jeremy Kerr <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/ce9b61e44d1cdae7797be0c5e3141baf582d23a0.1707983487.git.jk@codeconstruct.com.au
    Signed-off-by: Jakub Kicinski <[email protected]>
    jk-ozlabs authored and kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    9990889 View commit details
    Browse the repository at this point in the history
  2. tools: ynl: make sure we always pass yarg to mnl_cb_run

    There is one common error handler in ynl - ynl_cb_error().
    It expects priv to be a pointer to struct ynl_parse_arg AKA yarg.
    To avoid potential crashes if we encounter a stray NLMSG_ERROR
    always pass yarg as priv (or a struct which has it as the first
    member).
    
    ynl_cb_null() has a similar problem directly - it expects yarg
    but priv passed by the caller is ys.
    
    Found by code inspection.
    
    Fixes: 86878f1 ("tools: ynl: user space helpers")
    Acked-by: Nicolas Dichtel <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    e4fe082 View commit details
    Browse the repository at this point in the history
  3. tools: ynl: don't leak mcast_groups on init error

    Make sure to free the already-parsed mcast_groups if
    we don't get an ack from the kernel when reading family info.
    This is part of the ynl_sock_create() error path, so we won't
    get a call to ynl_sock_destroy() to free them later.
    
    Fixes: 86878f1 ("tools: ynl: user space helpers")
    Acked-by: Nicolas Dichtel <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    5d78b73 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'tools-ynl-fix-impossible-errors'

    Jakub Kicinski says:
    
    ====================
    tools: ynl: fix impossible errors
    
    Fix bugs discovered while I was hacking in low level stuff in YNL
    and kept breaking the socket, exercising the "impossible" error paths.
    
    v1: https://lore.kernel.org/all/[email protected]/
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    1e07900 View commit details
    Browse the repository at this point in the history
  5. net: stmmac: Fix EST offset for dwmac 5.10

    Fix EST offset for dwmac 5.10.
    
    Currently configuring Qbv doesn't work as expected. The schedule is
    configured, but never confirmed:
    
    |[  128.250219] imx-dwmac 428a0000.ethernet eth1: configured EST
    
    The reason seems to be the refactoring of the EST code which set the wrong
    EST offset for the dwmac 5.10. After fixing this it works as before:
    
    |[  106.359577] imx-dwmac 428a0000.ethernet eth1: configured EST
    |[  128.430715] imx-dwmac 428a0000.ethernet eth1: EST: SWOL has been switched
    
    Tested on imx93.
    
    Fixes: c3f3b97 ("net: stmmac: Refactor EST implementation")
    Signed-off-by: Kurt Kanzenbach <[email protected]>
    Reviewed-by: Serge Semin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    shifty91 authored and kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    90d07e3 View commit details
    Browse the repository at this point in the history
  6. devlink: fix port dump cmd type

    Unlike other commands, due to a c&p error, port dump fills-up cmd with
    wrong value, different from port-get request cmd, port-get doit reply
    and port notification.
    
    Fix it by filling cmd with value DEVLINK_CMD_PORT_NEW.
    
    Skimmed through devlink userspace implementations, none of them cares
    about this cmd value. Only ynl, for which, this is actually a fix, as it
    expects doit and dumpit ops rsp_value to be the same.
    
    Omit the fixes tag, even thought this is fix, better to target this for
    next release.
    
    Fixes: bfcd3a4 ("Introduce devlink infrastructure")
    Signed-off-by: Jiri Pirko <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Reviewed-by: Jakub Kicinski <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Jiri Pirko authored and kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    61c4378 View commit details
    Browse the repository at this point in the history
  7. net/sched: flower: Add lock protection when remove filter handle

    As IDR can't protect itself from the concurrent modification, place
    idr_remove() under the protection of tp->lock.
    
    Fixes: 08a0063 ("net/sched: flower: Move filter handle initialization earlier")
    Signed-off-by: Jianbo Liu <[email protected]>
    Reviewed-by: Cosmin Ratiu <[email protected]>
    Reviewed-by: Gal Pressman <[email protected]>
    Reviewed-by: Jiri Pirko <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Jianbo Liu authored and kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    1fde0ca View commit details
    Browse the repository at this point in the history
  8. net: sparx5: Add spinlock for frame transmission from CPU

    Both registers used when doing manual injection or fdma injection are
    shared between all the net devices of the switch. It was noticed that
    when having two process which each of them trying to inject frames on
    different ethernet ports, that the HW started to behave strange, by
    sending out more frames then expected. When doing fdma injection it is
    required to set the frame in the DCB and then make sure that the next
    pointer of the last DCB is invalid. But because there is no locks for
    this, then easily this pointer between the DCB can be broken and then it
    would create a loop of DCBs. And that means that the HW will
    continuously transmit these frames in a loop. Until the SW will break
    this loop.
    Therefore to fix this issue, add a spin lock for when accessing the
    registers for manual or fdma injection.
    
    Signed-off-by: Horatiu Vultur <[email protected]>
    Reviewed-by: Daniel Machon <[email protected]>
    Fixes: f3cad26 ("net: sparx5: add hostmode with phylink support")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    HoratiuVultur authored and kuba-moo committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    603ead9 View commit details
    Browse the repository at this point in the history
  9. erofs: fix refcount on the metabuf used for inode lookup

    In erofs_find_target_block() when erofs_dirnamecmp() returns 0,
    we do not assign the target metabuf. This causes the caller
    erofs_namei()'s erofs_put_metabuf() at the end to be not effective
    leaving the refcount on the page.
    As the page from metabuf (buf->page) is never put, such page cannot be
    migrated or reclaimed. Fix it now by putting the metabuf from
    previous loop and assigning the current metabuf to target before
    returning so caller erofs_namei() can do the final put as it was
    intended.
    
    Fixes: 500edd0 ("erofs: use meta buffers for inode lookup")
    Cc: <[email protected]> # 5.18+
    Signed-off-by: Sandeep Dhavale <[email protected]>
    Reviewed-by: Gao Xiang <[email protected]>
    Reviewed-by: Jingbo Xu <[email protected]>
    Reviewed-by: Chao Yu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Gao Xiang <[email protected]>
    Sandeep Dhavale authored and hsiangkao committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    56ee7db View commit details
    Browse the repository at this point in the history
  10. phonet: take correct lock to peek at the RX queue

    The receive queue is protected by its embedded spin-lock, not the
    socket lock, so we need the former lock here (and only that one).
    
    Fixes: 107d0d9 ("Phonet: Phonet datagram transport protocol")
    Reported-by: Luosili <[email protected]>
    Signed-off-by: Rémi Denis-Courmont <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Rémi Denis-Courmont authored and Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    3b2d9bc View commit details
    Browse the repository at this point in the history
  11. phonet/pep: fix racy skb_queue_empty() use

    The receive queues are protected by their respective spin-lock, not
    the socket lock. This could lead to skb_peek() unexpectedly
    returning NULL or a pointer to an already dequeued socket buffer.
    
    Fixes: 9641458 ("Phonet: Pipe End Point for Phonet Pipes protocol")
    Signed-off-by: Rémi Denis-Courmont <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Rémi Denis-Courmont authored and Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    7d2a894 View commit details
    Browse the repository at this point in the history
  12. Fix write to cloned skb in ipv6_hop_ioam()

    ioam6_fill_trace_data() writes inside the skb payload without ensuring
    it's writeable (e.g., not cloned). This function is called both from the
    input and output path. The output path (ioam6_iptunnel) already does the
    check. This commit provides a fix for the input path, inside
    ipv6_hop_ioam(). It also updates ip6_parse_tlv() to refresh the network
    header pointer ("nh") when returning from ipv6_hop_ioam().
    
    Fixes: 9ee11f0 ("ipv6: ioam: Data plane support for Pre-allocated Trace")
    Reported-by: Paolo Abeni <[email protected]>
    Signed-off-by: Justin Iurman <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    IurmanJ authored and Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    f198d93 View commit details
    Browse the repository at this point in the history
  13. selftests: ioam: refactoring to align with the fix

    ioam6_parser uses a packet socket. After the fix to prevent writing to
    cloned skb's, the receiver does not see its IOAM data anymore, which
    makes input/forward ioam-selftests to fail. As a workaround,
    ioam6_parser now uses an IPv6 raw socket and leverages ancillary data to
    get hop-by-hop options. As a consequence, the hook is "after" the IOAM
    data insertion by the receiver and all tests are working again.
    
    Signed-off-by: Justin Iurman <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    IurmanJ authored and Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    187bbb6 View commit details
    Browse the repository at this point in the history
  14. Merge branch 'ioam6-fix-write-to-cloned-skb-s'

    Justin Iurman says:
    
    ====================
    ioam6: fix write to cloned skb's
    
    Make sure the IOAM data insertion is not applied on cloned skb's. As a
    consequence, ioam selftests needed a refactoring.
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    39a4cd5 View commit details
    Browse the repository at this point in the history
  15. net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-C…

    …G PHY
    
    Commit bb726b7 ("net: phy: realtek: add support for
    RTL8211F(D)(I)-VD-CG") extended support of the driver from the existing
    support for RTL8211F(D)(I)-CG PHY to the newer RTL8211F(D)(I)-VD-CG PHY.
    
    While that commit indicated that the RTL8211F_PHYCR2 register is not
    supported by the "VD-CG" PHY model and therefore updated the corresponding
    section in rtl8211f_config_init() to be invoked conditionally, the call to
    "genphy_soft_reset()" was left as-is, when it should have also been invoked
    conditionally. This is because the call to "genphy_soft_reset()" was first
    introduced by the commit 0a4355c ("net: phy: realtek: add dt property
    to disable CLKOUT clock") since the RTL8211F guide indicates that a PHY
    reset should be issued after setting bits in the PHYCR2 register.
    
    As the PHYCR2 register is not applicable to the "VD-CG" PHY model, fix the
    rtl8211f_config_init() function by invoking "genphy_soft_reset()"
    conditionally based on the presence of the "PHYCR2" register.
    
    Fixes: bb726b7 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG")
    Signed-off-by: Siddharth Vadapalli <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Siddharth-Vadapalli-at-TI authored and Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    3489182 View commit details
    Browse the repository at this point in the history
  16. Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel…

    …/git/bpf/bpf
    
    Daniel Borkmann says:
    
    ====================
    pull-request: bpf 2024-02-22
    
    The following pull-request contains BPF updates for your *net* tree.
    
    We've added 11 non-merge commits during the last 24 day(s) which contain
    a total of 15 files changed, 217 insertions(+), 17 deletions(-).
    
    The main changes are:
    
    1) Fix a syzkaller-triggered oops when attempting to read the vsyscall
       page through bpf_probe_read_kernel and friends, from Hou Tao.
    
    2) Fix a kernel panic due to uninitialized iter position pointer in
       bpf_iter_task, from Yafang Shao.
    
    3) Fix a race between bpf_timer_cancel_and_free and bpf_timer_cancel,
       from Martin KaFai Lau.
    
    4) Fix a xsk warning in skb_add_rx_frag() (under CONFIG_DEBUG_NET)
       due to incorrect truesize accounting, from Sebastian Andrzej Siewior.
    
    5) Fix a NULL pointer dereference in sk_psock_verdict_data_ready,
       from Shigeru Yoshida.
    
    6) Fix a resolve_btfids warning when bpf_cpumask symbol cannot be
       resolved, from Hari Bathini.
    
    bpf-for-netdev
    
    * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
      bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()
      selftests/bpf: Add negtive test cases for task iter
      bpf: Fix an issue due to uninitialized bpf_iter_task
      selftests/bpf: Test racing between bpf_timer_cancel_and_free and bpf_timer_cancel
      bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel
      selftest/bpf: Test the read of vsyscall page under x86-64
      x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault()
      x86/mm: Move is_vsyscall_vaddr() into asm/vsyscall.h
      bpf, scripts: Correct GPL license name
      xsk: Add truesize to skb_add_rx_frag().
      bpf: Fix warning for bpf_cpumask in verifier
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    fdcd446 View commit details
    Browse the repository at this point in the history
  17. Merge tag 'nf-24-02-22' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/netfilter/nf
    
    Pablo Neira Ayuso says:
    
    ====================
    Netfilter fixes for net
    
    The following patchset contains Netfilter fixes for net:
    
    1) If user requests to wake up a table and hook fails, restore the
       dormant flag from the error path, from Florian Westphal.
    
    2) Reset dst after transferring it to the flow object, otherwise dst
       gets released twice from the error path.
    
    3) Release dst in case the flowtable selects a direct xmit path, eg.
       transmission to bridge port. Otherwise, dst is memleaked.
    
    4) Register basechain and flowtable hooks at the end of the command.
       Error path releases these datastructure without waiting for the
       rcu grace period.
    
    5) Use kzalloc() to initialize struct nft_hook to fix a KMSAN report
       on access to hook type, also from Florian Westphal.
    
    netfilter pull request 24-02-22
    
    * tag 'nf-24-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
      netfilter: nf_tables: use kzalloc for hook allocation
      netfilter: nf_tables: register hooks last when adding new chain/flowtable
      netfilter: nft_flow_offload: release dst in case direct xmit path is used
      netfilter: nft_flow_offload: reset dst in route object after setting up flow
      netfilter: nf_tables: set dormant flag on hook register failure
    ====================
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    9ff2794 View commit details
    Browse the repository at this point in the history
  18. l2tp: pass correct message length to ip6_append_data

    l2tp_ip6_sendmsg needs to avoid accounting for the transport header
    twice when splicing more data into an already partially-occupied skbuff.
    
    To manage this, we check whether the skbuff contains data using
    skb_queue_empty when deciding how much data to append using
    ip6_append_data.
    
    However, the code which performed the calculation was incorrect:
    
         ulen = len + skb_queue_empty(&sk->sk_write_queue) ? transhdrlen : 0;
    
    ...due to C operator precedence, this ends up setting ulen to
    transhdrlen for messages with a non-zero length, which results in
    corrupted packets on the wire.
    
    Add parentheses to correct the calculation in line with the original
    intent.
    
    Fixes: 9d4c758 ("ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data()")
    Cc: David Howells <[email protected]>
    Cc: [email protected]
    Signed-off-by: Tom Parkin <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    tomparkin authored and Paolo Abeni committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    359e54a View commit details
    Browse the repository at this point in the history
  19. ARM: dts: renesas: rcar-gen2: Add missing #interrupt-cells to DA9063 …

    …nodes
    
    make dtbs_check W=2:
    
        arch/arm/boot/dts/renesas/r8a7790-lager.dts:444.11-458.5: Warning (interrupt_provider): /i2c-mux4/pmic@58: Missing '#interrupt-cells' in interrupt provider
        ...
    
    Fix this by adding the missing #interrupt-cells properties.
    
    Reported-by: Rob Herring <[email protected]>
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Reviewed-by: Rob Herring <[email protected]>
    Link: https://lore.kernel.org/r/a351e503ea97fb1af68395843f513925ff1bdf26.1707922460.git.geert+renesas@glider.be
    geertu committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    8c98769 View commit details
    Browse the repository at this point in the history
  20. drm/ttm: Fix an invalid freeing on already freed page in error path

    If caching mode change fails due to, for example, OOM we
    free the allocated pages in a two-step process. First the pages
    for which the caching change has already succeeded. Secondly
    the pages for which a caching change did not succeed.
    
    However the second step was incorrectly freeing the pages already
    freed in the first step.
    
    Fix.
    
    Signed-off-by: Thomas Hellström <[email protected]>
    Fixes: 379989e ("drm/ttm/pool: Fix ttm_pool_alloc error path")
    Cc: Christian König <[email protected]>
    Cc: Dave Airlie <[email protected]>
    Cc: Christian Koenig <[email protected]>
    Cc: Huang Rui <[email protected]>
    Cc: [email protected]
    Cc: <[email protected]> # v6.4+
    Reviewed-by: Matthew Auld <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Thomas Hellström committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    40510a9 View commit details
    Browse the repository at this point in the history
  21. drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag…

    … is set
    
    When waiting for a syncobj timeline point whose fence has not yet been
    submitted with the WAIT_FOR_SUBMIT flag, a callback is registered using
    drm_syncobj_fence_add_wait and the thread is put to sleep until the
    timeout expires. If the fence is submitted before then,
    drm_syncobj_add_point will wake up the sleeping thread immediately which
    will proceed to wait for the fence to be signaled.
    
    However, if the WAIT_AVAILABLE flag is used instead,
    drm_syncobj_fence_add_wait won't get called, meaning the waiting thread
    will always sleep for the full timeout duration, even if the fence gets
    submitted earlier. If it turns out that the fence *has* been submitted
    by the time it eventually wakes up, it will still indicate to userspace
    that the wait completed successfully (it won't return -ETIME), but it
    will have taken much longer than it should have.
    
    To fix this, we must call drm_syncobj_fence_add_wait if *either* the
    WAIT_FOR_SUBMIT flag or the WAIT_AVAILABLE flag is set. The only
    difference being that with WAIT_FOR_SUBMIT we will also wait for the
    fence to be signaled after it has been submitted while with
    WAIT_AVAILABLE we will return immediately.
    
    IGT test patch: https://lists.freedesktop.org/archives/igt-dev/2024-January/067537.html
    
    v1 -> v2: adjust lockdep_assert_none_held_once condition
    
    (cherry picked from commit 8c44ea8)
    
    Fixes: 01d6c35 ("drm/syncobj: add support for timeline point wait v8")
    Signed-off-by: Erik Kurzinger <[email protected]>
    Signed-off-by: Simon Ser <[email protected]>
    Reviewed-by: Daniel Vetter <[email protected]>
    Reviewed-by: Simon Ser <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Erik Kurzinger authored and emersion committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    3c43177 View commit details
    Browse the repository at this point in the history
  22. iommu/arm-smmu-v3: Do not use GFP_KERNEL under as spinlock

    If the SMMU is configured to use a two level CD table then
    arm_smmu_write_ctx_desc() allocates a CD table leaf internally using
    GFP_KERNEL. Due to recent changes this is being done under a spinlock to
    iterate over the device list - thus it will trigger a sleeping while
    atomic warning:
    
      arm_smmu_sva_set_dev_pasid()
        mutex_lock(&sva_lock);
        __arm_smmu_sva_bind()
         arm_smmu_mmu_notifier_get()
          spin_lock_irqsave()
          arm_smmu_write_ctx_desc()
    	arm_smmu_get_cd_ptr()
             arm_smmu_alloc_cd_leaf_table()
    	  dmam_alloc_coherent(GFP_KERNEL)
    
    This is a 64K high order allocation and really should not be done
    atomically.
    
    At the moment the rework of the SVA to follow the new API is half
    finished. Recently the CD table memory was moved from the domain to the
    master, however we have the confusing situation where the SVA code is
    wrongly using the RID domains device's list to track which CD tables the
    SVA is installed in.
    
    Remove the logic to replicate the CD across all the domain's masters
    during attach. We know which master and which CD table the PASID should be
    installed in.
    
    Right now SVA only works when dma-iommu.c is in control of the RID
    translation, which means we have a single iommu_domain shared across the
    entire group and that iommu_domain is not shared outside the group.
    
    Critically this means that the iommu_group->devices list and RID's
    smmu_domain->devices list describe the same set of masters.
    
    For PCI cases the core code also insists on singleton groups so there is
    only one entry in the smmu_domain->devices list that is equal to the
    master being passed in to arm_smmu_sva_set_dev_pasid().
    
    Only non-PCI cases may have multi-device groups. However, the core code
    will repeat the calls to arm_smmu_sva_set_dev_pasid() across the entire
    iommu_group->devices list.
    
    Instead of having arm_smmu_mmu_notifier_get() indirectly loop over all the
    devices in the group via the RID's smmu_domain, rely on
    __arm_smmu_sva_bind() to be called for each device in the group and
    install the repeated CD entry that way.
    
    This avoids taking the spinlock to access the devices list and permits the
    arm_smmu_write_ctx_desc() to use a sleeping allocation. Leave the
    arm_smmu_mm_release() as a confusing situation, this requires tracking
    attached masters inside the SVA domain.
    
    Removing the loop allows arm_smmu_write_ctx_desc() to be called outside
    the spinlock and thus is safe to use GFP_KERNEL.
    
    Move the clearing of the CD into arm_smmu_sva_remove_dev_pasid() so that
    arm_smmu_mmu_notifier_get/put() remain paired functions.
    
    Fixes: 2450314 ("iommu/arm-smmu-v3: Refactor write_ctx_desc")
    Reported-by: Dan Carpenter <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Michael Shavit <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Will Deacon <[email protected]>
    jgunthorpe authored and willdeacon committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    b5bf777 View commit details
    Browse the repository at this point in the history
  23. drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func

    During syncobj_eventfd_entry_func, dma_fence_chain_find_seqno may set
    the fence to NULL if the given seqno is signaled and a later seqno has
    already been submitted. In that case, the eventfd should be signaled
    immediately which currently does not happen.
    
    This is a similar issue to the one addressed by commit b19926d
    ("drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence.").
    
    As a fix, if the return value of dma_fence_chain_find_seqno indicates
    success but it sets the fence to NULL, we will assign a stub fence to
    ensure the following code still signals the eventfd.
    
    v1 -> v2: assign a stub fence instead of signaling the eventfd
    
    Signed-off-by: Erik Kurzinger <[email protected]>
    Fixes: c7a4722 ("drm/syncobj: add IOCTL to register an eventfd")
    Signed-off-by: Simon Ser <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Erik Kurzinger authored and emersion committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    2aa6f5b View commit details
    Browse the repository at this point in the history
  24. selftests/iommu: fix the config fragment

    The config fragment doesn't follow the correct format to enable those
    config options which make the config options getting missed while
    merging with other configs.
    
    ➜ merge_config.sh -m .config tools/testing/selftests/iommu/config
    Using .config as base
    Merging tools/testing/selftests/iommu/config
    ➜ make olddefconfig
    .config:5295:warning: unexpected data: CONFIG_IOMMUFD
    .config:5296:warning: unexpected data: CONFIG_IOMMUFD_TEST
    
    While at it, add CONFIG_FAULT_INJECTION as well which is needed for
    CONFIG_IOMMUFD_TEST. If CONFIG_FAULT_INJECTION isn't present in base
    config (such as x86 defconfig), CONFIG_IOMMUFD_TEST doesn't get enabled.
    
    Fixes: 57f0988 ("iommufd: Add a selftest")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Muhammad Usama Anjum <[email protected]>
    Signed-off-by: Jason Gunthorpe <[email protected]>
    musamaanjum authored and jgunthorpe committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    510325e View commit details
    Browse the repository at this point in the history
  25. s390/cio: fix invalid -EBUSY on ccw_device_start

    The s390 common I/O layer (CIO) returns an unexpected -EBUSY return code
    when drivers try to start I/O while a path-verification (PV) process is
    pending. This can lead to failed device initialization attempts with
    symptoms like broken network connectivity after boot.
    
    Fix this by replacing the -EBUSY return code with a deferred condition
    code 1 reply to make path-verification handling consistent from a
    driver's point of view.
    
    The problem can be reproduced semi-regularly using the following process,
    while repeating steps 2-3 as necessary (example assumes an OSA device
    with bus-IDs 0.0.a000-0.0.a002 on CHPID 0.02):
    
    1. echo 0.0.a000,0.0.a001,0.0.a002 >/sys/bus/ccwgroup/drivers/qeth/group
    2. echo 0 > /sys/bus/ccwgroup/devices/0.0.a000/online
    3. echo 1 > /sys/bus/ccwgroup/devices/0.0.a000/online ; \
       echo on > /sys/devices/css0/chp0.02/status
    
    Background information:
    
    The common I/O layer starts path-verification I/Os when it receives
    indications about changes in a device path's availability. This occurs
    for example when hardware events indicate a change in channel-path
    status, or when a manual operation such as a CHPID vary or configure
    operation is performed.
    
    If a driver attempts to start I/O while a PV is running, CIO reports a
    successful I/O start (ccw_device_start() return code 0). Then, after
    completion of PV, CIO synthesizes an interrupt response that indicates
    an asynchronous status condition that prevented the start of the I/O
    (deferred condition code 1).
    
    If a PV indication arrives while a device is busy with driver-owned I/O,
    PV is delayed until after I/O completion was reported to the driver's
    interrupt handler. To ensure that PV can be started eventually, CIO
    reports a device busy condition (ccw_device_start() return code -EBUSY)
    if a driver tries to start another I/O while PV is pending.
    
    In some cases this -EBUSY return code causes device drivers to consider
    a device not operational, resulting in failed device initialization.
    
    Note: The code that introduced the problem was added in 2003. Symptoms
    started appearing with the following CIO commit that causes a PV
    indication when a device is removed from the cio_ignore list after the
    associated parent subchannel device was probed, but before online
    processing of the CCW device has started:
    
    2297791 ("s390/cio: dont unregister subchannel from child-drivers")
    
    During boot, the cio_ignore list is modified by the cio_ignore dracut
    module [1] as well as Linux vendor-specific systemd service scripts[2].
    When combined, this commit and boot scripts cause a frequent occurrence
    of the problem during boot.
    
    [1] https://github.com/dracutdevs/dracut/tree/master/modules.d/81cio_ignore
    [2] https://github.com/SUSE/s390-tools/blob/master/cio_ignore.service
    
    Cc: [email protected] # v5.15+
    Fixes: 2297791 ("s390/cio: dont unregister subchannel from child-drivers")
    Tested-By: Thorsten Winkler <[email protected]>
    Reviewed-by: Thorsten Winkler <[email protected]>
    Signed-off-by: Peter Oberparleiter <[email protected]>
    Signed-off-by: Heiko Carstens <[email protected]>
    oberpar authored and hcahca committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    5ef1dc4 View commit details
    Browse the repository at this point in the history
  26. drm/amd/display: adjust few initialization order in dm

    [Why]
    Observe error message "Can't retrieve aconnector in hpd_rx_irq_offload_work"
    when boot up with a mst tbt4 dock connected. After analyzing, there are few
    parts needed to be adjusted:
    
    1. hpd_rx_offload_wq[].aconnector is not initialzed before the dmub outbox
    hpd_irq handler get registered which causes the error message.
    
    2. registeration of hpd and hpd_rx_irq event for usb4 dp tunneling is not
    aligned with legacy interface sequence
    
    [How]
    Put DMUB_NOTIFICATION_HPD and DMUB_NOTIFICATION_HPD_IRQ handler
    registration into register_hpd_handlers() to align other interfaces and
    get hpd_rx_offload_wq[].aconnector initialized earlier than that.
    
    Leave DMUB_NOTIFICATION_AUX_REPLY registered as it was since we need that
    while calling dc_link_detect(). USB4 connection status will be proactively
    detected by dc_link_detect_connection_type() in amdgpu_dm_initialize_drm_device()
    
    Cc: Stable <[email protected]>
    Reviewed-by: Aurabindo Pillai <[email protected]>
    Acked-by: Rodrigo Siqueira <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Wayne Lin <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Wayne Lin authored and alexdeucher committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    22e1dc4 View commit details
    Browse the repository at this point in the history
  27. drm/amd/display: Only allow dig mapping to pwrseq in new asic

    [Why]
    The old asic only have 1 pwrseq hw.
    We don't need to map the diginst to pwrseq inst in old asic.
    
    [How]
    1. Only mapping dig to pwrseq for new asic.
    2. Move mapping function into dcn specific panel control component
    
    Cc: Stable <[email protected]> # v6.6+
    Cc: Mario Limonciello <[email protected]>
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3122
    Reviewed-by: Anthony Koo <[email protected]>
    Acked-by: Rodrigo Siqueira <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Lewis Huang <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Lewis Huang authored and alexdeucher committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    4e73826 View commit details
    Browse the repository at this point in the history
  28. Merge tag 'trace-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/trace/linux-trace
    
    Pull tracing fix from Steven Rostedt:
    
     - While working on the ring buffer I noticed that the counter used for
       knowing where the end of the data is on a sub-buffer was not a full
       "int" but just 20 bits. It was masked out to 0xfffff.
    
       With the new code that allows the user to change the size of the
       sub-buffer, it is theoretically possible to ask for a size bigger
       than 2^20. If that happens, unexpected results may occur as there's
       no code checking if the counter overflowed the 20 bits of the write
       mask. There are other checks to make sure events fit in the
       sub-buffer, but if the sub-buffer itself is too big, that is not
       checked.
    
       Add a check in the resize of the sub-buffer to make sure that it
       never goes beyond the size of the counter that holds how much data is
       on it.
    
    * tag 'trace-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
      ring-buffer: Do not let subbuf be bigger than write mask
    torvalds committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    efa80dc View commit details
    Browse the repository at this point in the history
  29. drm/amd/display: Fix potential null pointer dereference in dc_dmub_srv

    Fixes potential null pointer dereference warnings in the
    dc_dmub_srv_cmd_list_queue_execute() and dc_dmub_srv_is_hw_pwr_up()
    functions.
    
    In both functions, the 'dc_dmub_srv' variable was being dereferenced
    before it was checked for null. This could lead to a null pointer
    dereference if 'dc_dmub_srv' is null. The fix is to check if
    'dc_dmub_srv' is null before dereferencing it.
    
    Thus moving the null checks for 'dc_dmub_srv' to the beginning of the
    functions to ensure that 'dc_dmub_srv' is not null when it is
    dereferenced.
    
    Found by smatch & thus fixing the below:
    drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:133 dc_dmub_srv_cmd_list_queue_execute() warn: variable dereferenced before check 'dc_dmub_srv' (see line 128)
    drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:1167 dc_dmub_srv_is_hw_pwr_up() warn: variable dereferenced before check 'dc_dmub_srv' (see line 1164)
    
    Fixes: 028bac5 ("drm/amd/display: decouple dmcub execution to reduce lock granularity")
    Fixes: 65138eb ("drm/amd/display: Add DCN35 DMUB")
    Cc: JinZe.Xu <[email protected]>
    Cc: Hersen Wu <[email protected]>
    Cc: Josip Pavic <[email protected]>
    Cc: Roman Li <[email protected]>
    Cc: Qingqing Zhuo <[email protected]>
    Cc: Harry Wentland <[email protected]>
    Cc: Rodrigo Siqueira <[email protected]>
    Cc: Aurabindo Pillai <[email protected]>
    Cc: Tom Chung <[email protected]>
    Signed-off-by: Srinivasan Shanmugam <[email protected]>
    Reviewed-by: Tom Chung <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    srishanm authored and alexdeucher committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    d2b48f3 View commit details
    Browse the repository at this point in the history
  30. drm/amd/display: fix input states translation error for dcn35 & dcn351

    [Why]
    Currently there is an error while translating input clock sates into
    output clock states. The highest fclk setting from output sates is
    being dropped because of this error.
    
    [How]
    For dcn35 and dcn351, make output_states equal to input states.
    
    Reviewed-by: Charlene Liu <[email protected]>
    Acked-by: Rodrigo Siqueira <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Swapnil Patel <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Swapnil Patel authored and alexdeucher committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    27a6c49 View commit details
    Browse the repository at this point in the history
  31. drm/amd/display: Fix memory leak in dm_sw_fini()

    After destroying dmub_srv, the memory associated with it is
    not freed, causing a memory leak:
    
    unreferenced object 0xffff896302b45800 (size 1024):
      comm "(udev-worker)", pid 222, jiffies 4294894636
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace (crc 6265fd77):
        [<ffffffff993495ed>] kmalloc_trace+0x29d/0x340
        [<ffffffffc0ea4a94>] dm_dmub_sw_init+0xb4/0x450 [amdgpu]
        [<ffffffffc0ea4e55>] dm_sw_init+0x15/0x2b0 [amdgpu]
        [<ffffffffc0ba8557>] amdgpu_device_init+0x1417/0x24e0 [amdgpu]
        [<ffffffffc0bab285>] amdgpu_driver_load_kms+0x15/0x190 [amdgpu]
        [<ffffffffc0ba09c7>] amdgpu_pci_probe+0x187/0x4e0 [amdgpu]
        [<ffffffff9968fd1e>] local_pci_probe+0x3e/0x90
        [<ffffffff996918a3>] pci_device_probe+0xc3/0x230
        [<ffffffff99805872>] really_probe+0xe2/0x480
        [<ffffffff99805c98>] __driver_probe_device+0x78/0x160
        [<ffffffff99805daf>] driver_probe_device+0x1f/0x90
        [<ffffffff9980601e>] __driver_attach+0xce/0x1c0
        [<ffffffff99803170>] bus_for_each_dev+0x70/0xc0
        [<ffffffff99804822>] bus_add_driver+0x112/0x210
        [<ffffffff99807245>] driver_register+0x55/0x100
        [<ffffffff990012d1>] do_one_initcall+0x41/0x300
    
    Fix this by freeing dmub_srv after destroying it.
    
    Fixes: 743b978 ("drm/amd/display: Hook up the DMUB service in DM")
    Signed-off-by: Armin Wolf <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Wer-Wolf authored and alexdeucher committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    bae6789 View commit details
    Browse the repository at this point in the history
  32. drm/amd/display: fix null-pointer dereference on edid reading

    Use i2c adapter when there isn't aux_mode in dc_link to fix a
    null-pointer derefence that happens when running
    igt@kms_force_connector_basic in a system with DCN2.1 and HDMI connector
    detected as below:
    
    [  +0.178146] BUG: kernel NULL pointer dereference, address: 00000000000004c0
    [  +0.000010] #PF: supervisor read access in kernel mode
    [  +0.000005] #PF: error_code(0x0000) - not-present page
    [  +0.000004] PGD 0 P4D 0
    [  +0.000006] Oops: 0000 [#1] PREEMPT SMP NOPTI
    [  +0.000006] CPU: 15 PID: 2368 Comm: kms_force_conne Not tainted 6.5.0-asdn+ #152
    [  +0.000005] Hardware name: HP HP ENVY x360 Convertible 13-ay1xxx/8929, BIOS F.01 07/14/2021
    [  +0.000004] RIP: 0010:i2c_transfer+0xd/0x100
    [  +0.000011] Code: ea fc ff ff 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 41 54 55 53 <48> 8b 47 10 48 89 fb 48 83 38 00 0f 84 b3 00 00 00 83 3d 2f 80 16
    [  +0.000004] RSP: 0018:ffff9c4f89c0fad0 EFLAGS: 00010246
    [  +0.000005] RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000000080
    [  +0.000003] RDX: 0000000000000002 RSI: ffff9c4f89c0fb20 RDI: 00000000000004b0
    [  +0.000003] RBP: ffff9c4f89c0fb80 R08: 0000000000000080 R09: ffff8d8e0b15b980
    [  +0.000003] R10: 00000000000380e0 R11: 0000000000000000 R12: 0000000000000080
    [  +0.000002] R13: 0000000000000002 R14: ffff9c4f89c0fb0e R15: ffff9c4f89c0fb0f
    [  +0.000004] FS:  00007f9ad2176c40(0000) GS:ffff8d90fe9c0000(0000) knlGS:0000000000000000
    [  +0.000003] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  +0.000004] CR2: 00000000000004c0 CR3: 0000000121bc4000 CR4: 0000000000750ee0
    [  +0.000003] PKRU: 55555554
    [  +0.000003] Call Trace:
    [  +0.000006]  <TASK>
    [  +0.000006]  ? __die+0x23/0x70
    [  +0.000011]  ? page_fault_oops+0x17d/0x4c0
    [  +0.000008]  ? preempt_count_add+0x6e/0xa0
    [  +0.000008]  ? srso_alias_return_thunk+0x5/0x7f
    [  +0.000011]  ? exc_page_fault+0x7f/0x180
    [  +0.000009]  ? asm_exc_page_fault+0x26/0x30
    [  +0.000013]  ? i2c_transfer+0xd/0x100
    [  +0.000010]  drm_do_probe_ddc_edid+0xc2/0x140 [drm]
    [  +0.000067]  ? srso_alias_return_thunk+0x5/0x7f
    [  +0.000006]  ? _drm_do_get_edid+0x97/0x3c0 [drm]
    [  +0.000043]  ? __pfx_drm_do_probe_ddc_edid+0x10/0x10 [drm]
    [  +0.000042]  edid_block_read+0x3b/0xd0 [drm]
    [  +0.000043]  _drm_do_get_edid+0xb6/0x3c0 [drm]
    [  +0.000041]  ? __pfx_drm_do_probe_ddc_edid+0x10/0x10 [drm]
    [  +0.000043]  drm_edid_read_custom+0x37/0xd0 [drm]
    [  +0.000044]  amdgpu_dm_connector_mode_valid+0x129/0x1d0 [amdgpu]
    [  +0.000153]  drm_connector_mode_valid+0x3b/0x60 [drm_kms_helper]
    [  +0.000000]  __drm_helper_update_and_validate+0xfe/0x3c0 [drm_kms_helper]
    [  +0.000000]  ? amdgpu_dm_connector_get_modes+0xb6/0x520 [amdgpu]
    [  +0.000000]  ? srso_alias_return_thunk+0x5/0x7f
    [  +0.000000]  drm_helper_probe_single_connector_modes+0x2ab/0x540 [drm_kms_helper]
    [  +0.000000]  status_store+0xb2/0x1f0 [drm]
    [  +0.000000]  kernfs_fop_write_iter+0x136/0x1d0
    [  +0.000000]  vfs_write+0x24d/0x440
    [  +0.000000]  ksys_write+0x6f/0xf0
    [  +0.000000]  do_syscall_64+0x60/0xc0
    [  +0.000000]  ? srso_alias_return_thunk+0x5/0x7f
    [  +0.000000]  ? syscall_exit_to_user_mode+0x2b/0x40
    [  +0.000000]  ? srso_alias_return_thunk+0x5/0x7f
    [  +0.000000]  ? do_syscall_64+0x6c/0xc0
    [  +0.000000]  ? do_syscall_64+0x6c/0xc0
    [  +0.000000]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    [  +0.000000] RIP: 0033:0x7f9ad46b4b00
    [  +0.000000] Code: 40 00 48 8b 15 19 b3 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 80 3d e1 3a 0e 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89
    [  +0.000000] RSP: 002b:00007ffcbd3bd6d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
    [  +0.000000] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9ad46b4b00
    [  +0.000000] RDX: 0000000000000002 RSI: 00007f9ad48a7417 RDI: 0000000000000009
    [  +0.000000] RBP: 0000000000000002 R08: 0000000000000064 R09: 0000000000000000
    [  +0.000000] R10: 0000000000000000 R11: 0000000000000202 R12: 00007f9ad48a7417
    [  +0.000000] R13: 0000000000000009 R14: 00007ffcbd3bd760 R15: 0000000000000001
    [  +0.000000]  </TASK>
    [  +0.000000] Modules linked in: ctr ccm rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel btmtk bluetooth uvcvideo videobuf2_vmalloc sha3_generic videobuf2_memops uvc jitterentropy_rng videobuf2_v4l2 videodev drbg videobuf2_common ansi_cprng mc ecdh_generic ecc qrtr binfmt_misc hid_sensor_accel_3d hid_sensor_magn_3d hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf industrialio snd_ctl_led joydev hid_sensor_iio_common rtw89_8852ae rtw89_8852a rtw89_pci snd_hda_codec_realtek rtw89_core snd_hda_codec_generic intel_rapl_msr ledtrig_audio intel_rapl_common snd_hda_codec_hdmi mac80211 snd_hda_intel snd_intel_dspcfg kvm_amd snd_hda_codec snd_soc_dmic snd_acp3x_rn snd_acp3x_pdm_dma libarc4 snd_hwdep snd_soc_core kvm snd_hda_core cfg80211 snd_pci_acp6x snd_pcm nls_ascii snd_timer hp_wmi snd_pci_acp5x nls_cp437 snd_rn_pci_acp3x ucsi_acpi sparse_keymap ccp snd platform_profile snd_acp_config typec_ucsi irqbypass vfat sp5100_tco
    [  +0.000000]  snd_soc_acpi fat rapl pcspkr wmi_bmof roles rfkill rng_core snd_pci_acp3x soundcore k10temp watchdog typec battery ac amd_pmc acpi_tad button hid_sensor_hub hid_multitouch evdev serio_raw msr parport_pc ppdev lp parport fuse loop efi_pstore configfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 btrfs blake2b_generic dm_crypt dm_mod efivarfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx libcrc32c crc32c_generic xor raid6_pq raid1 raid0 multipath linear md_mod amdgpu amdxcp i2c_algo_bit drm_ttm_helper ttm crc32_pclmul crc32c_intel drm_exec gpu_sched drm_suballoc_helper nvme ghash_clmulni_intel drm_buddy drm_display_helper sha512_ssse3 nvme_core ahci xhci_pci sha512_generic hid_generic xhci_hcd libahci rtsx_pci_sdmmc t10_pi i2c_hid_acpi drm_kms_helper i2c_hid mmc_core libata aesni_intel crc64_rocksoft_generic crypto_simd amd_sfh crc64_rocksoft scsi_mod usbcore cryptd crc_t10dif cec drm crct10dif_generic hid rtsx_pci crct10dif_pclmul scsi_common rc_core crc64 i2c_piix4
    [  +0.000000]  usb_common crct10dif_common video wmi
    [  +0.000000] CR2: 00000000000004c0
    [  +0.000000] ---[ end trace 0000000000000000 ]---
    
    Fixes: 0e859fa ("drm/amd/display: Remove unwanted drm edid references")
    Signed-off-by: Melissa Wen <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    melissawen authored and alexdeucher committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    9671761 View commit details
    Browse the repository at this point in the history
  33. drm/amdgpu: Fix the runtime resume failure issue

    Don't set power state flag when system enter runtime suspend,
    or it may cause runtime resume failure issue.
    
    Fixes: 3a9626c ("drm/amd: Stop evicting resources on APUs in suspend")
    Signed-off-by: Ma Jun <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Ma Jun authored and alexdeucher committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    bbfaf2a View commit details
    Browse the repository at this point in the history
  34. Merge tag 'net-6.8.0-rc6' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/netdev/net
    
    Pull networking fixes from Paolo Abeni:
     "Including fixes from bpf and netfilter.
    
      Current release - regressions:
    
       - af_unix: fix another unix GC hangup
    
      Previous releases - regressions:
    
       - core: fix a possible AF_UNIX deadlock
    
       - bpf: fix NULL pointer dereference in sk_psock_verdict_data_ready()
    
       - netfilter: nft_flow_offload: release dst in case direct xmit path
         is used
    
       - bridge: switchdev: ensure MDB events are delivered exactly once
    
       - l2tp: pass correct message length to ip6_append_data
    
       - dccp/tcp: unhash sk from ehash for tb2 alloc failure after
         check_estalblished()
    
       - tls: fixes for record type handling with PEEK
    
       - devlink: fix possible use-after-free and memory leaks in
         devlink_init()
    
      Previous releases - always broken:
    
       - bpf: fix an oops when attempting to read the vsyscall page through
         bpf_probe_read_kernel
    
       - sched: act_mirred: use the backlog for mirred ingress
    
       - netfilter: nft_flow_offload: fix dst refcount underflow
    
       - ipv6: sr: fix possible use-after-free and null-ptr-deref
    
       - mptcp: fix several data races
    
       - phonet: take correct lock to peek at the RX queue
    
      Misc:
    
       - handful of fixes and reliability improvements for selftests"
    
    * tag 'net-6.8.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (72 commits)
      l2tp: pass correct message length to ip6_append_data
      net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY
      selftests: ioam: refactoring to align with the fix
      Fix write to cloned skb in ipv6_hop_ioam()
      phonet/pep: fix racy skb_queue_empty() use
      phonet: take correct lock to peek at the RX queue
      net: sparx5: Add spinlock for frame transmission from CPU
      net/sched: flower: Add lock protection when remove filter handle
      devlink: fix port dump cmd type
      net: stmmac: Fix EST offset for dwmac 5.10
      tools: ynl: don't leak mcast_groups on init error
      tools: ynl: make sure we always pass yarg to mnl_cb_run
      net: mctp: put sock on tag allocation failure
      netfilter: nf_tables: use kzalloc for hook allocation
      netfilter: nf_tables: register hooks last when adding new chain/flowtable
      netfilter: nft_flow_offload: release dst in case direct xmit path is used
      netfilter: nft_flow_offload: reset dst in route object after setting up flow
      netfilter: nf_tables: set dormant flag on hook register failure
      selftests: tls: add test for peeking past a record of a different type
      selftests: tls: add test for merging of same-type control messages
      ...
    torvalds committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    6714ebb View commit details
    Browse the repository at this point in the history
  35. Merge tag 'vfs-6.8-rc6.fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/vfs/vfs
    
    Pull vfs fixes from Christian Brauner:
    
     - Fix a memory leak in cachefiles
    
     - Restrict aio cancellations to I/O submitted through the aio
       interfaces as this is otherwise causing issues for I/O submitted
       via io_uring
    
     - Increase buffer for afs volume status to avoid overflow
    
     - Fix a missing zero-length check in unbuffered writes in the
       netfs library. If generic_write_checks() returns zero make
       netfs_unbuffered_write_iter() return right away
    
     - Prevent a leak in i_dio_count caused by netfs_begin_read() operating
       past i_size. It will return early and leave i_dio_count incremented
    
     - Account for ipv4 addresses as well as ipv6 addresses when processing
       incoming callbacks in afs
    
    * tag 'vfs-6.8-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
      fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio
      afs: Increase buffer size in afs_update_volume_status()
      afs: Fix ignored callbacks over ipv4
      cachefiles: fix memory leak in cachefiles_add_cache()
      netfs: Fix missing zero-length check in unbuffered write
      netfs: Fix i_dio_count leak on DIO read past i_size
    torvalds committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    1c892cd View commit details
    Browse the repository at this point in the history
  36. Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/clk/linux
    
    Pull clk fixes from Stephen Boyd:
     "Here are some Samsung clk driver fixes I've been sitting on for far
      too long.
    
      They fix the bindings and clk driver for the Google GS101 SoC"
    
    * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
      clk: samsung: clk-gs101: comply with the new dt cmu_misc clock names
      dt-bindings: clock: gs101: rename cmu_misc clock-names
    torvalds committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    8895376 View commit details
    Browse the repository at this point in the history
  37. Merge tag 'platform-drivers-x86-v6.8-3' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/pdx86/platform-drivers-x86
    
    Pull x86 platform driver fixes from Hans de Goede:
     "Regression fixes:
    
       - Fix INT0002 vGPIO events no longer working after 6.8 ACPI SCI
         changes
    
       - AMD-PMF: Fix laptops (e.g. Framework 13 AMD) hanging on suspend
    
       - x86-android-tablets: Fix touchscreen no longer working on Lenovo
         Yogabook
    
       - x86-android-tablets: Fix serdev instantiation regression
    
       - intel-vbtn: Fix ThinkPad X1 Tablet Gen2 no longer suspending
    
      Bug fixes:
    
       - think-lmi: Fix changing BIOS settings on Lenovo workstations
    
       - touchscreen_dmi: Fix Hi8 Air touchscreen data sometimes missing
    
       - AMD-PMF: Fix Smart PC support not working after suspend/resume
    
      Other misc small fixes"
    
    * tag 'platform-drivers-x86-v6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
      platform/x86: thinkpad_acpi: Only update profile if successfully converted
      platform/x86: intel-vbtn: Stop calling "VBDL" from notify_handler
      platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name
      platform/x86: x86-android-tablets: Fix serdev instantiation no longer working
      platform/x86: Add new get_serdev_controller() helper
      platform/x86: x86-android-tablets: Fix keyboard touchscreen on Lenovo Yogabook1 X90
      platform/x86/amd/pmf: Fix a potential race with policy binary sideload
      platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()
      platform/x86/amd/pmf: Add debugging message for missing policy data
      platform/x86/amd/pmf: Fix a suspend hang on Framework 13
      platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume
      platform/x86/amd/pmf: Remove smart_pc_status enum
      platform/x86: touchscreen_dmi: Consolidate Goodix upside-down touchscreen data
      platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names
      platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq()
      platform/x86: think-lmi: Fix password opcode ordering for workstations
    torvalds committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    c7138f7 View commit details
    Browse the repository at this point in the history
  38. Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/jgg/iommufd
    
    Pull iommufd fixes from Jason Gunthorpe:
    
     - Fix dirty tracking bitmap collection when using reporting bitmaps
       that are not neatly aligned to u64's or match the IO page table radix
       tree layout.
    
     - Add self tests to cover the cases that were found to be broken.
    
     - Add missing enforcement of invalidation type in the uapi.
    
     - Fix selftest config generation
    
    * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd:
      selftests/iommu: fix the config fragment
      iommufd: Reject non-zero data_type if no data_len is provided
      iommufd/iova_bitmap: Consider page offset for the pages to be pinned
      iommufd/selftest: Add mock IO hugepages tests
      iommufd/selftest: Hugepage mock domain support
      iommufd/selftest: Refactor mock_domain_read_and_clear_dirty()
      iommufd/selftest: Refactor dirty bitmap tests
      iommufd/iova_bitmap: Handle recording beyond the mapped pages
      iommufd/selftest: Test u64 unaligned bitmaps
      iommufd/iova_bitmap: Switch iova_bitmap::bitmap to an u8 array
      iommufd/iova_bitmap: Bounds check mapped::pages access
    torvalds committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    4c36fbb View commit details
    Browse the repository at this point in the history
  39. Merge tag 'block-6.8-2024-02-22' of git://git.kernel.dk/linux

    Pull block fixes from Jens Axboe:
     "Mostly just fixlets for md, but also a sed-opal parsing fix"
    
    * tag 'block-6.8-2024-02-22' of git://git.kernel.dk/linux:
      block: sed-opal: handle empty atoms when parsing response
      md: Don't suspend the array for interrupted reshape
      md: Don't register sync_thread for reshape directly
      md: Make sure md_do_sync() will set MD_RECOVERY_DONE
      md: Don't ignore read-only array in md_check_recovery()
      md: Don't ignore suspended array in md_check_recovery()
      md: Fix missing release of 'active_io' for flush
    torvalds committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    ffd2cb6 View commit details
    Browse the repository at this point in the history
  40. Merge tag 'drm-misc-fixes-2024-02-22' of git://anongit.freedesktop.or…

    …g/drm/drm-misc into drm-fixes
    
    A list handling fix and 64bit division on 32bit platform fix for the
    drm/buddy allocator, a cast warning and an initialization fix for
    nouveau, a bridge handling fix for meson, an initialisation fix for
    ivpu, a SPARC build fix for fbdev, a double-free fix for ttm, and two
    fence handling fixes for syncobj.
    
    Signed-off-by: Dave Airlie <[email protected]>
    
    From: Maxime Ripard <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/gl2antuifidtzn3dfm426p7xwh5fxj23behagwh26owfnosh2w@gqoa7vj5prnh
    airlied committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    f581dbb View commit details
    Browse the repository at this point in the history
  41. Merge tag 'drm-intel-fixes-2024-02-22' of git://anongit.freedesktop.o…

    …rg/drm/drm-intel into drm-fixes
    
    - Fixup for TV mode
    
    Signed-off-by: Dave Airlie <[email protected]>
    From: Joonas Lahtinen <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    airlied committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    741922e View commit details
    Browse the repository at this point in the history
  42. Merge tag 'amd-drm-fixes-6.8-2024-02-22' of https://gitlab.freedeskto…

    …p.org/agd5f/linux into drm-fixes
    
    amd-drm-fixes-6.8-2024-02-22:
    
    amdgpu:
    - Suspend/resume fixes
    - Backlight error fix
    - DCN 3.5 fixes
    - Misc fixes
    
    Signed-off-by: Dave Airlie <[email protected]>
    
    From: Alex Deucher <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    airlied committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    bfc7746 View commit details
    Browse the repository at this point in the history
  43. Merge tag 'drm-xe-fixes-2024-02-22' of https://gitlab.freedesktop.org…

    …/drm/xe/kernel into drm-fixes
    
    UAPI Changes:
    - Remove support for persistent exec_queues
    - Drop a reduntant sysfs newline printout
    
    Cross-subsystem Changes:
    
    Core Changes:
    
    Driver Changes:
    - A three-patch fix for a VM_BIND rebind optimization path
    - Fix a modpost warning on an xe KUNIT module
    
    Signed-off-by: Dave Airlie <[email protected]>
    
    From: Thomas Hellstrom <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/ZdcsNrxdWMMM417v@fedora
    airlied committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    7c54886 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. nouveau/gsp: add kconfig option to enable GSP paths by default

    Turing and Ampere will continue to use the old paths by default,
    but we should allow distros to decide what the policy is.
    
    Signed-off-by: Dave Airlie <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    airlied committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    1d49294 View commit details
    Browse the repository at this point in the history
  2. nouveau: add an ioctl to return vram bar size.

    This returns the BAR resources size so userspace can make
    decisions based on rebar support.
    
    userspace using this has been proposed for nvk, but
    it's a rather trivial uapi addition.
    
    Reviewed-by: Faith Ekstrand <[email protected]>
    Signed-off-by: Dave Airlie <[email protected]>
    airlied committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    3f4d8aa View commit details
    Browse the repository at this point in the history
  3. nouveau: add an ioctl to report vram usage

    This reports the currently used vram allocations.
    
    userspace using this has been proposed for nvk, but
    it's a rather trivial uapi addition.
    
    Reviewed-by: Faith Ekstrand <[email protected]>
    Signed-off-by: Dave Airlie <[email protected]>
    airlied committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    72fa02f View commit details
    Browse the repository at this point in the history
  4. LoongArch: Disable IRQ before init_fn() for nonboot CPUs

    Disable IRQ before init_fn() for nonboot CPUs when hotplug, in order to
    silence such warnings (and also avoid potential errors due to unexpected
    interrupts):
    
    WARNING: CPU: 1 PID: 0 at kernel/rcu/tree.c:4503 rcu_cpu_starting+0x214/0x280
    CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.17+ #1198
    pc 90000000048e3334 ra 90000000047bd56c tp 900000010039c000 sp 900000010039fdd0
    a0 0000000000000001 a1 0000000000000006 a2 900000000802c040 a3 0000000000000000
    a4 0000000000000001 a5 0000000000000004 a6 0000000000000000 a7 90000000048e3f4c
    t0 0000000000000001 t1 9000000005c70968 t2 0000000004000000 t3 000000000005e56e
    t4 00000000000002e4 t5 0000000000001000 t6 ffffffff80000000 t7 0000000000040000
    t8 9000000007931638 u0 0000000000000006 s9 0000000000000004 s0 0000000000000001
    s1 9000000006356ac0 s2 9000000007244000 s3 0000000000000001 s4 0000000000000001
    s5 900000000636f000 s6 7fffffffffffffff s7 9000000002123940 s8 9000000001ca55f8
       ra: 90000000047bd56c tlb_init+0x24c/0x528
      ERA: 90000000048e3334 rcu_cpu_starting+0x214/0x280
     CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
     PRMD: 00000000 (PPLV0 -PIE -PWE)
     EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
     ECFG: 00071000 (LIE=12 VS=7)
    ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0)
     PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
    CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.17+ #1198
    Stack : 0000000000000000 9000000006375000 9000000005b61878 900000010039c000
            900000010039fa30 0000000000000000 900000010039fa38 900000000619a140
            9000000006456888 9000000006456880 900000010039f950 0000000000000001
            0000000000000001 cb0cb028ec7e52e1 0000000002b90000 9000000100348700
            0000000000000000 0000000000000001 ffffffff916d12f1 0000000000000003
            0000000000040000 9000000007930370 0000000002b90000 0000000000000004
            9000000006366000 900000000619a140 0000000000000000 0000000000000004
            0000000000000000 0000000000000009 ffffffffffc681f2 9000000002123940
            9000000001ca55f8 9000000006366000 90000000047a4828 00007ffff057ded8
            00000000000000b0 0000000000000000 0000000000000000 0000000000071000
            ...
    Call Trace:
    [<90000000047a4828>] show_stack+0x48/0x1a0
    [<9000000005b61874>] dump_stack_lvl+0x84/0xcc
    [<90000000047f60ac>] __warn+0x8c/0x1e0
    [<9000000005b0ab34>] report_bug+0x1b4/0x280
    [<9000000005b63110>] do_bp+0x2d0/0x480
    [<90000000047a2e20>] handle_bp+0x120/0x1c0
    [<90000000048e3334>] rcu_cpu_starting+0x214/0x280
    [<90000000047bd568>] tlb_init+0x248/0x528
    [<90000000047a4c44>] per_cpu_trap_init+0x124/0x160
    [<90000000047a19f4>] cpu_probe+0x494/0xa00
    [<90000000047b551c>] start_secondary+0x3c/0xc0
    [<9000000005b66134>] smpboot_entry+0x50/0x58
    
    Cc: [email protected]
    Signed-off-by: Huacai Chen <[email protected]>
    chenhuacai committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    1001db6 View commit details
    Browse the repository at this point in the history
  5. LoongArch: Update cpu_sibling_map when disabling nonboot CPUs

    Update cpu_sibling_map when disabling nonboot CPUs by defining & calling
    clear_cpu_sibling_map(), otherwise we get such errors on SMT systems:
    
    jump label: negative count!
    WARNING: CPU: 6 PID: 45 at kernel/jump_label.c:263 __static_key_slow_dec_cpuslocked+0xec/0x100
    CPU: 6 PID: 45 Comm: cpuhp/6 Not tainted 6.8.0-rc5+ #1340
    pc 90000000004c302c ra 90000000004c302c tp 90000001005bc000 sp 90000001005bfd20
    a0 000000000000001b a1 900000000224c278 a2 90000001005bfb58 a3 900000000224c280
    a4 900000000224c278 a5 90000001005bfb50 a6 0000000000000001 a7 0000000000000001
    t0 ce87a4763eb5234a t1 ce87a4763eb5234a t2 0000000000000000 t3 0000000000000000
    t4 0000000000000006 t5 0000000000000000 t6 0000000000000064 t7 0000000000001964
    t8 000000000009ebf6 u0 9000000001f2a068 s9 0000000000000000 s0 900000000246a2d8
    s1 ffffffffffffffff s2 ffffffffffffffff s3 90000000021518c0 s4 0000000000000040
    s5 9000000002151058 s6 9000000009828e40 s7 00000000000000b4 s8 0000000000000006
       ra: 90000000004c302c __static_key_slow_dec_cpuslocked+0xec/0x100
      ERA: 90000000004c302c __static_key_slow_dec_cpuslocked+0xec/0x100
     CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
     PRMD: 00000004 (PPLV0 +PIE -PWE)
     EUEN: 00000000 (-FPE -SXE -ASXE -BTE)
     ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
    ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0)
     PRID: 0014d000 (Loongson-64bit, Loongson-3A6000-HV)
    CPU: 6 PID: 45 Comm: cpuhp/6 Not tainted 6.8.0-rc5+ #1340
    Stack : 0000000000000000 900000000203f258 900000000179afc8 90000001005bc000
            90000001005bf980 0000000000000000 90000001005bf988 9000000001fe0be0
            900000000224c280 900000000224c278 90000001005bf8c0 0000000000000001
            0000000000000001 ce87a4763eb5234a 0000000007f38000 90000001003f8cc0
            0000000000000000 0000000000000006 0000000000000000 4c206e6f73676e6f
            6f4c203a656d616e 000000000009ec99 0000000007f38000 0000000000000000
            900000000214b000 9000000001fe0be0 0000000000000004 0000000000000000
            0000000000000107 0000000000000009 ffffffffffafdabe 00000000000000b4
            0000000000000006 90000000004c302c 9000000000224528 00005555939a0c7c
            00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c
            ...
    Call Trace:
    [<9000000000224528>] show_stack+0x48/0x1a0
    [<900000000179afc8>] dump_stack_lvl+0x78/0xa0
    [<9000000000263ed0>] __warn+0x90/0x1a0
    [<90000000017419b8>] report_bug+0x1b8/0x280
    [<900000000179c564>] do_bp+0x264/0x420
    [<90000000004c302c>] __static_key_slow_dec_cpuslocked+0xec/0x100
    [<90000000002b4d7c>] sched_cpu_deactivate+0x2fc/0x300
    [<9000000000266498>] cpuhp_invoke_callback+0x178/0x8a0
    [<9000000000267f70>] cpuhp_thread_fun+0xf0/0x240
    [<90000000002a117c>] smpboot_thread_fn+0x1dc/0x2e0
    [<900000000029a720>] kthread+0x140/0x160
    [<9000000000222288>] ret_from_kernel_thread+0xc/0xa4
    
    Cc: [email protected]
    Signed-off-by: Huacai Chen <[email protected]>
    chenhuacai committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    752cd08 View commit details
    Browse the repository at this point in the history
  6. LoongArch: Call early_init_fdt_scan_reserved_mem() earlier

    The unflatten_and_copy_device_tree() function contains a call to
    memblock_alloc(). This means that memblock is allocating memory before
    any of the reserved memory regions are set aside in the arch_mem_init()
    function which calls early_init_fdt_scan_reserved_mem(). Therefore,
    there is a possibility for memblock to allocate from any of the
    reserved memory regions.
    
    Hence, move the call to early_init_fdt_scan_reserved_mem() to be earlier
    in the init sequence, so that the reserved memory regions are set aside
    before any allocations are done using memblock.
    
    Cc: [email protected]
    Fixes: 88d4d95 ("LoongArch: Add FDT booting support from efi system table")
    Signed-off-by: Oreoluwa Babatunde <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    chenhuacai committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    9fa304b View commit details
    Browse the repository at this point in the history
  7. LoongArch: dts: Minor whitespace cleanup

    The DTS code coding style expects exactly one space before '{'
    character.
    
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    krzk authored and chenhuacai committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    f661ca4 View commit details
    Browse the repository at this point in the history
  8. LoongArch: KVM: Fix input validation of _kvm_get_cpucfg() & kvm_check…

    …_cpucfg()
    
    The range check for the CPUCFG ID is wrong (should have been a ||
    instead of &&) and useless in effect, so fix the obvious mistake.
    
    Furthermore, the juggling of the temp return value is unnecessary,
    because it is semantically equivalent and more readable to just
    return at every switch case's end. This is done too to avoid potential
    bugs in the future related to the unwanted complexity.
    
    Also, the return value of _kvm_get_cpucfg is meant to be checked, but
    this was not done, so bad CPUCFG IDs wrongly fall back to the default
    case and 0 is incorrectly returned; check the return value to fix the
    UAPI behavior.
    
    While at it, also remove the redundant range check in kvm_check_cpucfg,
    because out-of-range CPUCFG IDs are already rejected by the -EINVAL
    as returned by _kvm_get_cpucfg().
    
    Fixes: db1ecca ("LoongArch: KVM: Add LSX (128bit SIMD) support")
    Fixes: 118e10c ("LoongArch: KVM: Add LASX (256bit SIMD) support")
    Reviewed-by: Bibo Mao <[email protected]>
    Signed-off-by: WANG Xuerui <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    xen0n authored and chenhuacai committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    179af57 View commit details
    Browse the repository at this point in the history
  9. LoongArch: KVM: Rename _kvm_get_cpucfg() to _kvm_get_cpucfg_mask()

    The function is not actually a getter of guest CPUCFG, but rather
    validation of the input CPUCFG ID plus information about the supported
    bit flags of that CPUCFG leaf. So rename it to avoid confusion.
    
    Reviewed-by: Bibo Mao <[email protected]>
    Signed-off-by: WANG Xuerui <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    xen0n authored and chenhuacai committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    ec83f39 View commit details
    Browse the repository at this point in the history
  10. LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments

    All the checks currently done in kvm_check_cpucfg can be realized with
    early returns, so just do that to avoid extra cognitive burden related
    to the return value handling.
    
    While at it, clean up comments of _kvm_get_cpucfg_mask() and
    kvm_check_cpucfg(), by removing comments that are merely restatement of
    the code nearby, and paraphrasing the rest so they read more natural for
    English speakers (that likely are not familiar with the actual Chinese-
    influenced grammar).
    
    No functional changes intended.
    
    Reviewed-by: Bibo Mao <[email protected]>
    Signed-off-by: WANG Xuerui <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    xen0n authored and chenhuacai committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    f0f5c48 View commit details
    Browse the repository at this point in the history
  11. Merge tag 'riscv-cache-fixes-for-v6.8-rc6' of https://git.kernel.org/…

    …pub/scm/linux/kernel/git/conor/linux into arm/fixes
    
    RISC-V Cache driver fixes for v6.8-rc6
    
    A single fix for an inconsistency reported during CIP review by Pavel in
    the newly added ax45mp cache driver.
    
    Signed-off-by: Conor Dooley <[email protected]>
    
    * tag 'riscv-cache-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
      cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()
    
    Link: https://lore.kernel.org/r/20240221-keenness-handheld-b930aaa77708@spud
    Signed-off-by: Arnd Bergmann <[email protected]>
    arndb committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    bcb323b View commit details
    Browse the repository at this point in the history
  12. Merge tag 'riscv-firmware-fixes-for-v6.8-rc6' of https://git.kernel.o…

    …rg/pub/scm/linux/kernel/git/conor/linux into arm/fixes
    
    Microchip firmware driver fixes for v6.8-rc6
    
    A single fix for me incorrectly using sizeof().
    
    Signed-off-by: Conor Dooley <[email protected]>
    
    * tag 'riscv-firmware-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
      firmware: microchip: fix wrong sizeof argument
    
    Link: https://lore.kernel.org/r/20240221-recognize-dust-4bb575f4e67b@spud
    Signed-off-by: Arnd Bergmann <[email protected]>
    arndb committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    4d934f9 View commit details
    Browse the repository at this point in the history
  13. Merge tag 'riscv-soc-drivers-fixes-for-v6.8-rc6' of https://git.kerne…

    …l.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes
    
    RISC-V SoC driver fixes for v6.8-rc6
    
    A fix for a kconfig symbol whose help text has been unhelpful since its
    introduction.
    
    Signed-off-by: Conor Dooley <[email protected]>
    
    * tag 'riscv-soc-drivers-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
      soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt
    
    Link: https://lore.kernel.org/r/20240221-irate-outrage-cf7f96f83074@spud
    Signed-off-by: Arnd Bergmann <[email protected]>
    arndb committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    fe514e1 View commit details
    Browse the repository at this point in the history
  14. Merge tag 'riscv-dt-fixes-for-v6.8-rc6' of https://git.kernel.org/pub…

    …/scm/linux/kernel/git/conor/linux into arm/fixes
    
    RISC-V Devicetree fixes for v6.8-rc6
    
    Two fixes for W=2 issues in devicetrees, which should constitute fixes
    for all reasonable-to-fix W=2 problems on RISC-V. The others are caused
    by standard USB and MMC property names containing underscores that are
    not likely to ever change.
    
    Signed-off-by: Conor Dooley <[email protected]>
    
    * tag 'riscv-dt-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
      riscv: dts: sifive: add missing #interrupt-cells to pmic
      riscv: dts: starfive: replace underscores in node names
    
    Link: https://lore.kernel.org/r/20240221-foil-glade-09dbf1aa3fe2@spud
    Signed-off-by: Arnd Bergmann <[email protected]>
    arndb committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    4bd5b4c View commit details
    Browse the repository at this point in the history
  15. Merge tag 'renesas-fixes-for-v6.8-tag1' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/geert/renesas-devel into arm/fixes
    
    Renesas fixes for v6.8
    
      - Add missing #interrupt-cells to DA9063 nodes.
    
    * tag 'renesas-fixes-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
      ARM: dts: renesas: rcar-gen2: Add missing #interrupt-cells to DA9063 nodes
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    arndb committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    dcb8e53 View commit details
    Browse the repository at this point in the history
  16. Merge tag 'arm-smmu-fixes' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/will/linux into iommu/fixes
    
    Arm SMMU fixes for 6.8
    
    - Fix CD allocation from atomic context when using SVA with SMMUv3
    
    - Revert the conversion of SMMUv2 to domain_alloc_paging(), as it
      breaks the boot for Qualcomm MSM8996 devices
    joergroedel committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    16b1b39 View commit details
    Browse the repository at this point in the history
  17. iommu/sva: Restore SVA handle sharing

    Prior to commit 092edad ("iommu: Support mm PASID 1:n with sva
    domains") the code allowed a SVA handle to be bound multiple times to the
    same (mm, device) pair. This was alluded to in the kdoc comment, but we
    had understood this to be more a remark about allowing multiple devices,
    not a literal same-driver re-opening the same SVA.
    
    It turns out uacce and idxd were both relying on the core code to handle
    reference counting for same-device same-mm scenarios. As this looks hard
    to resolve in the drivers bring it back to the core code.
    
    The new design has changed the meaning of the domain->users refcount to
    refer to the number of devices that are sharing that domain for the same
    mm. This is part of the design to lift the SVA domain de-duplication out
    of the drivers.
    
    Return the old behavior by explicitly de-duplicating the struct iommu_sva
    handle. The same (mm, device) will return the same handle pointer and the
    core code will handle tracking this. The last unbind of the handle will
    destroy it.
    
    Fixes: 092edad ("iommu: Support mm PASID 1:n with sva domains")
    Reported-by: Zhangfei Gao <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Tested-by: Zhangfei Gao <[email protected]>
    Signed-off-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Lu Baolu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Joerg Roedel <[email protected]>
    jgunthorpe authored and joergroedel committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    65d4418 View commit details
    Browse the repository at this point in the history
  18. Merge tag 'hwmon-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/groeck/linux-staging
    
    Pull hwmon fix from Guenter Roeck:
     "Fix a global-out-of-bounds bug in nct6775 driver"
    
    * tag 'hwmon-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
      hwmon: (nct6775) Fix access to temperature configuration registers
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    76d885a View commit details
    Browse the repository at this point in the history
  19. Merge tag 'gpio-fixes-for-v6.8-rc6' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/brgl/linux
    
    Pull gpio fix from Bartosz Golaszewski:
    
     - fix a use-case where no pins are mapped to GPIOs in
       gpiochip_generic_config()
    
    * tag 'gpio-fixes-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
      gpiolib: Handle no pin_ranges in gpiochip_generic_config()
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    9cd42be View commit details
    Browse the repository at this point in the history
  20. Merge tag 'ata-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/libata/linux
    
    Pull ata fixes from Niklas Cassel:
    
     - Do not try to set a sleeping device to standby. Sleep is a deeper
       sleep state than standby, and needs a reset to wake up the drive. A
       system resume will reset the port. Sending a command other than reset
       to a sleeping device is not wise, as the command will timeout (Damien
       Le Moal)
    
     - Do not try to put a device to standby twice during system shutdown.
       ata_dev_power_set_standby() is currently called twice during
       shutdown, once after the scsi device is removed, and another when
       ata_pci_shutdown_one() executes. Modify ata_dev_power_set_standby()
       to do nothing if the device is already in standby (Damien Le Moal)
    
     - Add a quirk for ASM1064 to fixup the number of implemented ports. We
       probe all ports that the hardware reports to be implemented. Probing
       ports that are not implemented causes significantly increased boot
       time (Andrey Jr. Melnikov)
    
     - Fix error handling for the ahci_ceva driver. Ensure that the
       ahci_ceva driver does a proper cleanup of its resources in the error
       path (Radhey Shyam Pandey)
    
    * tag 'ata-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
      ata: libata-core: Do not call ata_dev_power_set_standby() twice
      ata: ahci_ceva: fix error handling for Xilinx GT PHY support
      ahci: asm1064: correct count of reported ports
      ata: libata-core: Do not try to set sleeping devices to standby
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    b6d6928 View commit details
    Browse the repository at this point in the history
  21. Merge tag 'drm-fixes-2024-02-23' of git://anongit.freedesktop.org/drm…

    …/drm
    
    Pull drm fixes from Dave Airlie:
     "This is the weekly drm fixes. Non-drivers there is a fbdev/sparc fix,
      syncobj, ttm and buddy fixes.
    
      On the driver side, ivpu, meson, i915 have a small fix each. Then
      amdgpu and xe have a bunch. Nouveau has some minor uapi additions to
      give userspace some useful info along with a Kconfig change to allow
      the new GSP firmware paths to be used by default on the GPUs it
      supports.
    
      Seems about the usual amount for this time of release cycle.
    
      fbdev:
       - fix sparc undefined reference
    
      syncobj:
       - fix sync obj fence waiting
       - handle NULL fence in syncobj eventfd code
    
      ttm:
       - fix invalid free
    
      buddy:
       - fix list handling
       - fix 32-bit build
    
      meson:
       - don't remove bridges from other drivers
    
      nouveau:
       - fix build warnings
       - add two minor info parameters
       - add a Kconfig to allow GSP by default on some GPUs
    
      ivpu:
       - allow fw to do initial tile config
    
      i915:
       - fix TV mode
    
      amdgpu:
       - Suspend/resume fixes
       - Backlight error fix
       - DCN 3.5 fixes
       - Misc fixes
    
      xe:
       - Remove support for persistent exec_queues
       - Drop a reduntant sysfs newline printout
       - A three-patch fix for a VM_BIND rebind optimization path
       - Fix a modpost warning on an xe KUNIT module"
    
    * tag 'drm-fixes-2024-02-23' of git://anongit.freedesktop.org/drm/drm: (27 commits)
      nouveau: add an ioctl to report vram usage
      nouveau: add an ioctl to return vram bar size.
      nouveau/gsp: add kconfig option to enable GSP paths by default
      drm/amdgpu: Fix the runtime resume failure issue
      drm/amd/display: fix null-pointer dereference on edid reading
      drm/amd/display: Fix memory leak in dm_sw_fini()
      drm/amd/display: fix input states translation error for dcn35 & dcn351
      drm/amd/display: Fix potential null pointer dereference in dc_dmub_srv
      drm/amd/display: Only allow dig mapping to pwrseq in new asic
      drm/amd/display: adjust few initialization order in dm
      drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func
      drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set
      drm/ttm: Fix an invalid freeing on already freed page in error path
      sparc: Fix undefined reference to fb_is_primary_device
      drm/xe: Fix modpost warning on xe_mocs kunit module
      drm/xe/xe_gt_idle: Drop redundant newline in name
      drm/xe: Return 2MB page size for compact 64k PTEs
      drm/xe: Add XE_VMA_PTE_64K VMA flag
      drm/xe: Fix xe_vma_set_pte_size
      drm/xe/uapi: Remove support for persistent exec_queues
      ...
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    06b7ef7 View commit details
    Browse the repository at this point in the history
  22. Merge tag 'for-6.8/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/device-mapper/linux-dm
    
    Pull device mapper fixes from Mike Snitzer:
    
     - Stable fixes for 3 DM targets (integrity, verity and crypt) to
       address systemic failure that can occur if user provided pages map to
       the same block.
    
     - Fix DM crypt to not allow modifying data that being encrypted for
       authenticated encryption.
    
     - Fix DM crypt and verity targets to align their respective bvec_iter
       struct members to avoid the need for byte level access (due to
       __packed attribute) that is costly on some arches (like RISC).
    
    * tag 'for-6.8/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
      dm-crypt, dm-integrity, dm-verity: bump target version
      dm-verity, dm-crypt: align "struct bvec_iter" correctly
      dm-crypt: recheck the integrity tag after a failure
      dm-crypt: don't modify the data when using authenticated encryption
      dm-verity: recheck the hash after a failure
      dm-integrity: recheck the integrity tag after a failure
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    e7768e6 View commit details
    Browse the repository at this point in the history
  23. Merge tag 'mm-hotfixes-stable-2024-02-22-15-02' of git://git.kernel.o…

    …rg/pub/scm/linux/kernel/git/akpm/mm
    
    Pull misc fixes from Andrew Morton:
     "A batch of MM (and one non-MM) hotfixes.
    
      Ten are cc:stable and the remainder address post-6.7 issues or aren't
      considered appropriate for backporting"
    
    * tag 'mm-hotfixes-stable-2024-02-22-15-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
      kasan: guard release_free_meta() shadow access with kasan_arch_is_ready()
      mm/damon/lru_sort: fix quota status loss due to online tunings
      mm/damon/reclaim: fix quota stauts loss due to online tunings
      MAINTAINERS: mailmap: update Shakeel's email address
      mm/damon/sysfs-schemes: handle schemes sysfs dir removal before commit_schemes_quota_goals
      mm: memcontrol: clarify swapaccount=0 deprecation warning
      mm/memblock: add MEMBLOCK_RSRV_NOINIT into flagname[] array
      mm/zswap: invalidate duplicate entry when !zswap_enabled
      lib/Kconfig.debug: TEST_IOV_ITER depends on MMU
      mm/swap: fix race when skipping swapcache
      mm/swap_state: update zswap LRU's protection range with the folio locked
      selftests/mm: uffd-unit-test check if huge page size is 0
      mm/damon/core: check apply interval in damon_do_apply_schemes()
      mm: zswap: fix missing folio cleanup in writeback race path
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    95e73fb View commit details
    Browse the repository at this point in the history
  24. Merge tag 's390-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/s390/linux
    
    Pull s390 fixes from Heiko Carstens:
    
     - Fix invalid -EBUSY on ccw_device_start() which can lead to failing
       device initialization
    
     - Add missing multiplication by 8 in __iowrite64_copy() to get the
       correct byte length before calling zpci_memcpy_toio()
    
     - Various config updates
    
    * tag 's390-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
      s390/cio: fix invalid -EBUSY on ccw_device_start
      s390: use the correct count for __iowrite64_copy()
      s390/configs: update default configurations
      s390/configs: enable INIT_STACK_ALL_ZERO in all configurations
      s390/configs: provide compat topic configuration target
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    5efa18e View commit details
    Browse the repository at this point in the history
  25. Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/arm64/linux
    
    Pull arm64 fixes from Will Deacon:
     "A simple fix to a definition in the CXL PMU driver, a couple of
      patches to restore SME control registers on the resume path (since
      Arm's fast model now clears them) and a revert for our jump label asm
      constraints after Geert noticed they broke the build with GCC 5.5.
    
      There was then the ensuing discussion about raising the minimum GCC
      (and corresponding binutils) versions at [1], but for now we'll keep
      things working as they were until that goes ahead.
    
       - Revert fix to jump label asm constraints, as it regresses the build
         with some GCC 5.5 toolchains.
    
       - Restore SME control registers when resuming from suspend
    
       - Fix incorrect filter definition in CXL PMU driver"
    
    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
      arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend
      arm64/sme: Restore SME registers on exit from suspend
      Revert "arm64: jump_label: use constraints "Si" instead of "i""
      perf: CXL: fix CPMU filter value mask length
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    86f0160 View commit details
    Browse the repository at this point in the history
  26. Merge tag 'arm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/soc/soc
    
    Pull arm and RISC-V SoC fixes from Arnd Bergmann:
     "The Rockchip and IMX8 platforms get a number of fixes for dts files in
      order to address some misconfigurations, including a regression for
      USB-C support on some boards.
    
      The other dts fixes are part of a series by Rob Herring to clean up
      another class of dtc compiler warnings across all platforms, with a
      few others helping out as well. With this, we can enable the warning
      for the coming merge window without introducing regressions.
    
      Conor Dooley has collected fixes for RISC-V platforms, both for the
      dts files and for platofrm specific drivers.
    
      The ep93xx platform gets a regression for for its gpio descriptors"
    
    * tag 'arm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (28 commits)
      ARM: dts: renesas: rcar-gen2: Add missing #interrupt-cells to DA9063 nodes
      cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback()
      arm64: dts: qcom: Fix interrupt-map cell sizes
      arm: dts: Fix dtc interrupt_map warnings
      arm64: dts: Fix dtc interrupt_provider warnings
      arm: dts: Fix dtc interrupt_provider warnings
      arm64: dts: freescale: Disable interrupt_map check
      ARM: ep93xx: Add terminator to gpiod_lookup_table
      riscv: dts: sifive: add missing #interrupt-cells to pmic
      arm64: dts: rockchip: Correct Indiedroid Nova GPIO Names
      arm64: dts: rockchip: Drop interrupts property from rk3328 pwm-rockchip node
      arm64: dts: rockchip: set num-cs property for spi on px30
      arm64: dts: rockchip: minor rk3588 whitespace cleanup
      riscv: dts: starfive: replace underscores in node names
      bus: imx-weim: fix valid range check
      Revert "arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector"
      Revert "arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector"
      arm64: dts: tqma8mpql: fix audio codec iov-supply
      arm64: dts: rockchip: drop unneeded status from rk3588-jaguar gpio-leds
      ARM: dts: rockchip: Drop interrupts property from pwm-rockchip nodes
      ...
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    e44baca View commit details
    Browse the repository at this point in the history
  27. Merge tag 'parisc-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/deller/parisc-linux
    
    Pull parisc architecture fixes from Helge Deller:
     "Fixes CPU hotplug, the parisc stack unwinder and two possible build
      errors in kprobes and ftrace area:
    
       - Fix CPU hotplug
    
       - Fix unaligned accesses and faults in stack unwinder
    
       - Fix potential build errors by always including asm-generic/kprobes.h
    
       - Fix build bug by add missing CONFIG_DYNAMIC_FTRACE check"
    
    * tag 'parisc-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
      parisc: Fix stack unwinder
      parisc/kprobes: always include asm-generic/kprobes.h
      parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check
      Revert "parisc: Only list existing CPUs in cpu_possible_mask"
    torvalds committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    603c04e View commit details
    Browse the repository at this point in the history
  28. i2c: imx: when being a target, mark the last read as processed

    When being a target, NAK from the controller means that all bytes have
    been transferred. So, the last byte needs also to be marked as
    'processed'. Otherwise index registers of backends may not increase.
    
    Fixes: f7414cd ("i2c: imx: support slave mode for imx I2C driver")
    Signed-off-by: Corey Minyard <[email protected]>
    Tested-by: Andrew Manley <[email protected]>
    Reviewed-by: Andrew Manley <[email protected]>
    Reviewed-by: Oleksij Rempel <[email protected]>
    [wsa: fixed comment and commit message to properly describe the case]
    Signed-off-by: Wolfram Sang <[email protected]>
    Signed-off-by: Andi Shyti <[email protected]>
    cminyard authored and Wolfram Sang committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    87aec49 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2024

  1. dm-integrity, dm-verity: reduce stack usage for recheck

    The newly added integrity_recheck() function has another larger stack
    allocation, just like its caller integrity_metadata(). When it gets
    inlined, the combination of the two exceeds the warning limit for 32-bit
    architectures and possibly risks an overflow when this is called from
    a deep call chain through a file system:
    
    drivers/md/dm-integrity.c:1767:13: error: stack frame size (1048) exceeds limit (1024) in 'integrity_metadata' [-Werror,-Wframe-larger-than]
     1767 | static void integrity_metadata(struct work_struct *w)
    
    Since the caller at this point is done using its checksum buffer,
    just reuse the same buffer in the new function to avoid the double
    allocation.
    
    [Mikulas: add "noinline" to integrity_recheck and verity_recheck.
    These functions are only called on error, so they shouldn't bloat the
    stack frame or code size of the caller.]
    
    Fixes: c88f5e5 ("dm-integrity: recheck the integrity tag after a failure")
    Fixes: 9177f3c ("dm-verity: recheck the hash after a failure")
    Cc: [email protected]
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Mikulas Patocka <[email protected]>
    Signed-off-by: Mike Snitzer <[email protected]>
    arndb authored and Mike Snitzer committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    66ad2fb View commit details
    Browse the repository at this point in the history
  2. Merge tag 'loongarch-fixes-6.8-3' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/chenhuacai/linux-loongson
    
    Pull LoongArch fixes from Huacai Chen:
     "Fix two cpu-hotplug issues, fix the init sequence about FDT system,
      fix the coding style of dts, and fix the wrong CPUCFG ID handling of
      KVM"
    
    * tag 'loongarch-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
      LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments
      LoongArch: KVM: Rename _kvm_get_cpucfg() to _kvm_get_cpucfg_mask()
      LoongArch: KVM: Fix input validation of _kvm_get_cpucfg() & kvm_check_cpucfg()
      LoongArch: dts: Minor whitespace cleanup
      LoongArch: Call early_init_fdt_scan_reserved_mem() earlier
      LoongArch: Update cpu_sibling_map when disabling nonboot CPUs
      LoongArch: Disable IRQ before init_fn() for nonboot CPUs
    torvalds committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    c6a597f View commit details
    Browse the repository at this point in the history
  3. Merge tag 'i2c-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/wsa/linux
    
    Pull i2c fix from Wolfram Sang:
     "A bugfix for host drivers"
    
    * tag 'i2c-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
      i2c: imx: when being a target, mark the last read as processed
    torvalds committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    fef8526 View commit details
    Browse the repository at this point in the history
  4. Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/jejb/scsi
    
    Pull SCSI fixes from James Bottomley:
     "Six fixes: the four driver ones are pretty trivial.
    
      The larger two core changes are to try to fix various USB attached
      devices which have somewhat eccentric ways of handling the VPD and
      other mode pages which necessitate multiple revalidates (that were
      removed in the interests of efficiency) and updating the heuristic for
      supported VPD pages"
    
    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
      scsi: jazz_esp: Only build if SCSI core is builtin
      scsi: smartpqi: Fix disable_managed_interrupts
      scsi: ufs: Uninitialized variable in ufshcd_devfreq_target()
      scsi: target: pscsi: Fix bio_put() for error case
      scsi: core: Consult supported VPD page list prior to fetching page
      scsi: sd: usb_storage: uas: Access media prior to querying device properties
    torvalds committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    6d20acb View commit details
    Browse the repository at this point in the history
  5. Merge tag 'for-6.8/dm-fix-3' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/device-mapper/linux-dm
    
    Pull device mapper fix from Mike Snitzer:
    
     - Fix DM integrity and verity targets to not use excessive stack when
       they recheck in the error path.
    
    * tag 'for-6.8/dm-fix-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
      dm-integrity, dm-verity: reduce stack usage for recheck
    torvalds committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    f2e367d View commit details
    Browse the repository at this point in the history
  6. Merge tag 'cxl-fixes-6.8-rc6' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/cxl/cxl
    
    Pull cxl fixes from Dan Williams:
     "A collection of significant fixes for the CXL subsystem.
    
      The largest change in this set, that bordered on "new development", is
      the fix for the fact that the location of the new qos_class attribute
      did not match the Documentation. The fix ends up deleting more code
      than it added, and it has a new unit test to backstop basic errors in
      this interface going forward. So the "red-diff" and unit test saved
      the "rip it out and try again" response.
    
      In contrast, the new notification path for firmware reported CXL
      errors (CXL CPER notifications) has a locking context bug that can not
      be fixed with a red-diff. Given where the release cycle stands, it is
      not comfortable to squeeze in that fix in these waning days. So, that
      receives the "back it out and try again later" treatment.
    
      There is a regression fix in the code that establishes memory NUMA
      nodes for platform CXL regions. That has an ack from x86 folks. There
      are a couple more fixups for Linux to understand (reassemble) CXL
      regions instantiated by platform firmware. The policy around platforms
      that do not match host-physical-address with system-physical-address
      (i.e. systems that have an address translation mechanism between the
      address range reported in the ACPI CEDT.CFMWS and endpoint decoders)
      has been softened to abort driver load rather than teardown the memory
      range (can cause system hangs). Lastly, there is a robustness /
      regression fix for cases where the driver would previously continue in
      the face of error, and a fixup for PCI error notification handling.
    
      Summary:
    
       - Fix NUMA initialization from ACPI CEDT.CFMWS
    
       - Fix region assembly failures due to async init order
    
       - Fix / simplify export of qos_class information
    
       - Fix cxl_acpi initialization vs single-window-init failures
    
       - Fix handling of repeated 'pci_channel_io_frozen' notifications
    
       - Workaround platforms that violate host-physical-address ==
         system-physical address assumptions
    
       - Defer CXL CPER notification handling to v6.9"
    
    * tag 'cxl-fixes-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
      cxl/acpi: Fix load failures due to single window creation failure
      acpi/ghes: Remove CXL CPER notifications
      cxl/pci: Fix disabling memory if DVSEC CXL Range does not match a CFMWS window
      cxl/test: Add support for qos_class checking
      cxl: Fix sysfs export of qos_class for memdev
      cxl: Remove unnecessary type cast in cxl_qos_class_verify()
      cxl: Change 'struct cxl_memdev_state' *_perf_list to single 'struct cxl_dpa_perf'
      cxl/region: Allow out of order assembly of autodiscovered regions
      cxl/region: Handle endpoint decoders in cxl_region_find_decoder()
      x86/numa: Fix the sort compare func used in numa_fill_memblks()
      x86/numa: Fix the address overlap check in numa_fill_memblks()
      cxl/pci: Skip to handle RAS errors if CXL.mem device is detached
    torvalds committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    ac389bc View commit details
    Browse the repository at this point in the history
  7. Merge tag 'iommu-fixes-v6.8-rc5' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/joro/iommu
    
    Pull iommu fixes from Joerg Roedel:
    
     - Intel VT-d fixes for nested domain handling:
    
          - Cache invalidation for changes in a parent domain
    
          - Dirty tracking setting for parent and nested domains
    
          - Fix a constant-out-of-range warning
    
     - ARM SMMU fixes:
    
          - Fix CD allocation from atomic context when using SVA with SMMUv3
    
          - Revert the conversion of SMMUv2 to domain_alloc_paging(), as it
            breaks the boot for Qualcomm MSM8996 devices
    
     - Restore SVA handle sharing in core code as it turned out there are
       still drivers relying on it
    
    * tag 'iommu-fixes-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
      iommu/sva: Restore SVA handle sharing
      iommu/arm-smmu-v3: Do not use GFP_KERNEL under as spinlock
      iommu/vt-d: Fix constant-out-of-range warning
      iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking
      iommu/vt-d: Add missing dirty tracking set for parent domain
      iommu/vt-d: Wrap the dirty tracking loop to be a helper
      iommu/vt-d: Remove domain parameter for intel_pasid_setup_dirty_tracking()
      iommu/vt-d: Add missing device iotlb flush for parent domain
      iommu/vt-d: Update iotlb in nested domain attach
      iommu/vt-d: Add missing iotlb flush for parent domain
      iommu/vt-d: Add __iommu_flush_iotlb_psi()
      iommu/vt-d: Track nested domains in parent
      Revert "iommu/arm-smmu: Convert to domain_alloc_paging()"
    torvalds committed Feb 24, 2024
    Configuration menu
    Copy the full SHA
    91403d5 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2024

  1. Merge tag 'powerpc-6.8-4' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/powerpc/linux
    
    Pull powerpc fixes from Michael Ellerman:
    
     - Fix a crash when hot adding a PCI device to an LPAR since
       recent changes
    
     - Fix nested KVM level-2 guest reboot failure due to empty
       'arch_compat'
    
    Thanks to Amit Machhiwal, Aneesh Kumar K.V (IBM), Brian King, Gaurav
    Batra, and Vaibhav Jain.
    
    * tag 'powerpc-6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
      KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat'
      powerpc/pseries/iommu: DLPAR add doesn't completely initialize pci_controller
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    ab0a97c View commit details
    Browse the repository at this point in the history
  2. bcachefs: fix backpointer_to_text() when dev does not exist

    Fixes:
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    1f62622 View commit details
    Browse the repository at this point in the history
  3. bcachefs: Kill __GFP_NOFAIL in buffered read path

    Recently, we fixed our __GFP_NOFAIL usage in the readahead path, but the
    easy one in read_single_folio() (where wa can return an error) was
    missed - oops.
    
    Fixes:
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    04fee68 View commit details
    Browse the repository at this point in the history
  4. bcachefs: Fix BTREE_ITER_FILTER_SNAPSHOTS on inodes btree

    If we're in FILTER_SNAPSHOTS mode and we start scanning a range of the
    keyspace where no keys are visible in the current snapshot, we have a
    problem - we'll scan for a very long time before scanning terminates.
    
    Awhile back, this was fixed for most cases with peek_upto() (and
    assertions that enforce that it's being used).
    
    But the fix missed the fact that the inodes btree is different - every
    key offset is in a different snapshot tree, not just the inode field.
    
    Fixes:
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    204f451 View commit details
    Browse the repository at this point in the history
  5. bcachefs: fix iov_iter count underflow on sub-block dio read

    bch2_direct_IO_read() checks the request offset and size for sector
    alignment and then falls through to a couple calculations to shrink
    the size of the request based on the inode size. The problem is that
    these checks round up to the fs block size, which runs the risk of
    underflowing iter->count if the block size happens to be large
    enough. This is triggered by fstest generic/361 with a 4k block
    size, which subsequently leads to a crash. To avoid this crash,
    check that the shorten length doesn't exceed the overall length of
    the iter.
    
    Fixes:
    Signed-off-by: Brian Foster <[email protected]>
    Reviewed-by: Su Yue <[email protected]>
    Signed-off-by: Kent Overstreet <[email protected]>
    Brian Foster authored and Kent Overstreet committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    b58b1b8 View commit details
    Browse the repository at this point in the history
  6. bcachefs: Fix bch2_journal_flush_device_pins()

    If a journal write errored, the list of devices it was written to could
    be empty - we're not supposed to mark an empty replicas list.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    097471f View commit details
    Browse the repository at this point in the history
  7. bcachefs: Fix check_snapshot() memcpy

    check_snapshot() copies the bch_snapshot to a temporary to easily handle
    older versions that don't have all the fields of the current version,
    but it lacked a min() to correctly handle keys newer and larger than the
    current version.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    c4333eb View commit details
    Browse the repository at this point in the history
  8. fs/super.c: don't drop ->s_user_ns until we free struct super_block i…

    …tself
    
    Avoids fun races in RCU pathwalk...  Same goes for freeing LSM shite
    hanging off super_block's arse.
    
    Reviewed-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    583340d View commit details
    Browse the repository at this point in the history
  9. rcu pathwalk: prevent bogus hard errors from may_lookup()

    If lazy call of ->permission() returns a hard error, check that
    try_to_unlazy() succeeds before returning it.  That both makes
    life easier for ->permission() instances and closes the race
    in ENOTDIR handling - it is possible that positive d_can_lookup()
    seen in link_path_walk() applies to the state *after* unlink() +
    mkdir(), while nd->inode matches the state prior to that.
    
    Normally seeing e.g. EACCES from permission check in rcu pathwalk
    means that with some timings non-rcu pathwalk would've run into
    the same; however, running into a non-executable regular file
    in the middle of a pathname would not get to permission check -
    it would fail with ENOTDIR instead.
    
    Reviewed-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    cdb67fd View commit details
    Browse the repository at this point in the history
  10. affs: free affs_sb_info with kfree_rcu()

    one of the flags in it is used by ->d_hash()/->d_compare()
    
    Reviewed-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    529f89a View commit details
    Browse the repository at this point in the history
  11. exfat: move freeing sbi, upcase table and dropping nls into rcu-delay…

    …ed helper
    
    That stuff can be accessed by ->d_hash()/->d_compare(); as it is, we have
    a hard-to-hit UAF if rcu pathwalk manages to get into ->d_hash() on a filesystem
    that is in process of getting shut down.
    
    Besides, having nls and upcase table cleanup moved from ->put_super() towards
    the place where sbi is freed makes for simpler failure exits.
    
    Acked-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    a13d1a4 View commit details
    Browse the repository at this point in the history
  12. hfsplus: switch to rcu-delayed unloading of nls and freeing ->s_fs_info

    ->d_hash() and ->d_compare() use those, so we need to delay freeing
    them.
    
    Reviewed-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    af072cf View commit details
    Browse the repository at this point in the history
  13. afs: fix __afs_break_callback() / afs_drop_open_mmap() race

    In __afs_break_callback() we might check ->cb_nr_mmap and if it's non-zero
    do queue_work(&vnode->cb_work).  In afs_drop_open_mmap() we decrement
    ->cb_nr_mmap and do flush_work(&vnode->cb_work) if it reaches zero.
    
    The trouble is, there's nothing to prevent __afs_break_callback() from
    seeing ->cb_nr_mmap before the decrement and do queue_work() after both
    the decrement and flush_work().  If that happens, we might be in trouble -
    vnode might get freed before the queued work runs.
    
    __afs_break_callback() is always done under ->cb_lock, so let's make
    sure that ->cb_nr_mmap can change from non-zero to zero while holding
    ->cb_lock (the spinlock component of it - it's a seqlock and we don't
    need to mess with the counter).
    
    Acked-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    275655d View commit details
    Browse the repository at this point in the history
  14. nfs: make nfs_set_verifier() safe for use in RCU pathwalk

    nfs_set_verifier() relies upon dentry being pinned; if that's
    the case, grabbing ->d_lock stabilizes ->d_parent and guarantees
    that ->d_parent points to a positive dentry.  For something
    we'd run into in RCU mode that is *not* true - dentry might've
    been through dentry_kill() just as we grabbed ->d_lock, with
    its parent going through the same just as we get to into
    nfs_set_verifier_locked().  It might get to detaching inode
    (and zeroing ->d_inode) before nfs_set_verifier_locked() gets
    to fetching that; we get an oops as the result.
    
    That can happen in nfs{,4} ->d_revalidate(); the call chain in
    question is nfs_set_verifier_locked() <- nfs_set_verifier() <-
    nfs_lookup_revalidate_delegated() <- nfs{,4}_do_lookup_revalidate().
    We have checked that the parent had been positive, but that's
    done before we get to nfs_set_verifier() and it's possible for
    memory pressure to pick our dentry as eviction candidate by that
    time.  If that happens, back-to-back attempts to kill dentry and
    its parent are quite normal.  Sure, in case of eviction we'll
    fail the ->d_seq check in the caller, but we need to survive
    until we return there...
    
    Acked-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    10a973f View commit details
    Browse the repository at this point in the history
  15. nfs: fix UAF on pathwalk running into umount

    NFS ->d_revalidate(), ->permission() and ->get_link() need to access
    some parts of nfs_server when called in RCU mode:
    	server->flags
    	server->caps
    	*(server->io_stats)
    and, worst of all, call
    	server->nfs_client->rpc_ops->have_delegation
    (the last one - as NFS_PROTO(inode)->have_delegation()).  We really
    don't want to RCU-delay the entire nfs_free_server() (it would have
    to be done with schedule_work() from RCU callback, since it can't
    be made to run from interrupt context), but actual freeing of
    nfs_server and ->io_stats can be done via call_rcu() just fine.
    nfs_client part is handled simply by making nfs_free_client() use
    kfree_rcu().
    
    Acked-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    c1b967d View commit details
    Browse the repository at this point in the history
  16. procfs: move dropping pde and pid from ->evict_inode() to ->free_inode()

    that keeps both around until struct inode is freed, making access
    to them safe from rcu-pathwalk
    
    Acked-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    4745880 View commit details
    Browse the repository at this point in the history
  17. procfs: make freeing proc_fs_info rcu-delayed

    makes proc_pid_ns() safe from rcu pathwalk (put_pid_ns()
    is still synchronous, but that's not a problem - it does
    rcu-delay everything that needs to be)
    
    Reviewed-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    e31f0a5 View commit details
    Browse the repository at this point in the history
  18. fuse: fix UAF in rcu pathwalks

    ->permission(), ->get_link() and ->inode_get_acl() might dereference
    ->s_fs_info (and, in case of ->permission(), ->s_fs_info->fc->user_ns
    as well) when called from rcu pathwalk.
    
    Freeing ->s_fs_info->fc is rcu-delayed; we need to make freeing ->s_fs_info
    and dropping ->user_ns rcu-delayed too.
    
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    053fc4f View commit details
    Browse the repository at this point in the history
  19. cifs_get_link(): bail out in unsafe case

    ->d_revalidate() bails out there, anyway.  It's not enough
    to prevent getting into ->get_link() in RCU mode, but that
    could happen only in a very contrieved setup.  Not worth
    trying to do anything fancy here unless ->d_revalidate()
    stops kicking out of RCU mode at least in some cases.
    
    Reviewed-by: Christian Brauner <[email protected]>
    Acked-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    0511fdb View commit details
    Browse the repository at this point in the history
  20. ext4_get_link(): fix breakage in RCU mode

    1) errors from ext4_getblk() should not be propagated to caller
    unless we are really sure that we would've gotten the same error
    in non-RCU pathwalk.
    2) we leak buffer_heads if ext4_getblk() is successful, but bh is
    not uptodate.
    
    Signed-off-by: Al Viro <[email protected]>
    Al Viro committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    9fa8e28 View commit details
    Browse the repository at this point in the history
  21. Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…

    …it/viro/vfs
    
    Pull vfs fixes from Al Viro:
     "A couple of fixes - revert of regression from this cycle and a fix for
      erofs failure exit breakage (had been there since way back)"
    
    * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      erofs: fix handling kern_mount() failure
      Revert "get rid of DCACHE_GENOCIDE"
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    9b24349 View commit details
    Browse the repository at this point in the history
  22. Merge tag 'pull-fixes.pathwalk-rcu-2' of git://git.kernel.org/pub/scm…

    …/linux/kernel/git/viro/vfs
    
    Pull RCU pathwalk fixes from Al Viro:
     "We still have some races in filesystem methods when exposed to RCU
      pathwalk. This series is a result of code audit (the second round of
      it) and it should deal with most of that stuff.
    
      Still pending: ntfs3 ->d_hash()/->d_compare() and ceph_d_revalidate().
      Up to maintainers (a note for NTFS folks - when documentation says
      that a method may not block, it *does* imply that blocking allocations
      are to be avoided. Really)"
    
    [ More explanations for people who aren't familiar with the vagaries of
      RCU path walking: most of it is hidden from filesystems, but if a
      filesystem actively participates in the low-level path walking it
      needs to make sure the fields involved in that walk are RCU-safe.
    
      That "actively participate in low-level path walking" includes things
      like having its own ->d_hash()/->d_compare() routines, or by having
      its own directory permission function that doesn't just use the common
      helpers.  Having a ->d_revalidate() function will also have this issue.
    
      Note that instead of making everything RCU safe you can also choose to
      abort the RCU pathwalk if your operation cannot be done safely under
      RCU, but that obviously comes with a performance penalty. One common
      pattern is to allow the simple cases under RCU, and abort only if you
      need to do something more complicated.
    
      So not everything needs to be RCU-safe, and things like the inode etc
      that the VFS itself maintains obviously already are. But these fixes
      tend to be about properly RCU-delaying things like ->s_fs_info that
      are maintained by the filesystem and that got potentially released too
      early.   - Linus ]
    
    * tag 'pull-fixes.pathwalk-rcu-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
      ext4_get_link(): fix breakage in RCU mode
      cifs_get_link(): bail out in unsafe case
      fuse: fix UAF in rcu pathwalks
      procfs: make freeing proc_fs_info rcu-delayed
      procfs: move dropping pde and pid from ->evict_inode() to ->free_inode()
      nfs: fix UAF on pathwalk running into umount
      nfs: make nfs_set_verifier() safe for use in RCU pathwalk
      afs: fix __afs_break_callback() / afs_drop_open_mmap() race
      hfsplus: switch to rcu-delayed unloading of nls and freeing ->s_fs_info
      exfat: move freeing sbi, upcase table and dropping nls into rcu-delayed helper
      affs: free affs_sb_info with kfree_rcu()
      rcu pathwalk: prevent bogus hard errors from may_lookup()
      fs/super.c: don't drop ->s_user_ns until we free struct super_block itself
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    66a97c2 View commit details
    Browse the repository at this point in the history
  23. Merge tag 'erofs-for-6.8-rc6-fixes' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/xiang/erofs
    
    Pull erofs fix from Gao Xiang:
    
     - Fix page refcount leak when looking up specific inodes
       introduced by metabuf reworking
    
    * tag 'erofs-for-6.8-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
      erofs: fix refcount on the metabuf used for inode lookup
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    4ca0d98 View commit details
    Browse the repository at this point in the history
  24. Merge tag 'irq_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/tip/tip
    
    Pull irq fixes from Borislav Petkov:
    
     - Make sure GICv4 always gets initialized to prevent a kexec-ed kernel
       from silently failing to set it up
    
     - Do not call bus_get_dev_root() for the mbigen irqchip as it always
       returns NULL - use NULL directly
    
     - Fix hardware interrupt number truncation when assigning MSI
       interrupts
    
     - Correct sending end-of-interrupt messages to disabled interrupts
       lines on RISC-V PLIC
    
    * tag 'irq_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      irqchip/gic-v3-its: Do not assume vPE tables are preallocated
      irqchip/mbigen: Don't use bus_get_dev_root() to find the parent
      PCI/MSI: Prevent MSI hardware interrupt number truncation
      irqchip/sifive-plic: Enable interrupt if needed before EOI
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    8c46ed3 View commit details
    Browse the repository at this point in the history
  25. Merge tag 'x86_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/l…

    …inux/kernel/git/tip/tip
    
    Pull x86 fixes from Borislav Petkov:
    
     - Make sure clearing CPU buffers using VERW happens at the latest
       possible point in the return-to-userspace path, otherwise memory
       accesses after the VERW execution could cause data to land in CPU
       buffers again
    
    * tag 'x86_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
      KVM/VMX: Move VERW closer to VMentry for MDS mitigation
      KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH
      x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key
      x86/entry_32: Add VERW just before userspace transition
      x86/entry_64: Add VERW just before userspace transition
      x86/bugs: Add asm helpers for executing VERW
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    1eee4ef View commit details
    Browse the repository at this point in the history
  26. Merge tag 'tty-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/gregkh/tty
    
    Pull tty/serial driver fixes from Greg KH:
     "Here are three small serial/tty driver fixes for 6.8-rc6 that resolve
      the following reported errors:
    
       - riscv hvc console driver fix that was reported by many
    
       - amba-pl011 serial driver fix for RS485 mode
    
       - stm32 serial driver fix for RS485 mode
    
      All of these have been in linux-next all week with no reported
      problems"
    
    * tag 'tty-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
      serial: amba-pl011: Fix DMA transmission in RS485 mode
      serial: stm32: do not always set SER_RS485_RX_DURING_TX if RS485 is enabled
      tty: hvc: Don't enable the RISC-V SBI console by default
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    1e592e9 View commit details
    Browse the repository at this point in the history
  27. Merge tag 'usb-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/gregkh/usb
    
    Pull USB fixes from Greg KH:
     "Here are some small USB fixes for 6.8-rc6 to resolve some reported
      problems. These include:
    
       - regression fixes with typec tpcm code as reported by many
    
       - cdnsp and cdns3 driver fixes
    
       - usb role setting code bugfixes
    
       - build fix for uhci driver
    
       - ncm gadget driver bugfix
    
       - MAINTAINERS entry update
    
      All of these have been in linux-next all week with no reported issues
      and there is at least one fix in here that is in Thorsten's regression
      list that is being tracked"
    
    * tag 'usb-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
      usb: typec: tpcm: Fix issues with power being removed during reset
      MAINTAINERS: Drop myself as maintainer of TYPEC port controller drivers
      usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs
      Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role"
      usb: gadget: omap_udc: fix USB gadget regression on Palm TE
      usb: dwc3: gadget: Don't disconnect if not started
      usb: cdns3: fix memory double free when handle zero packet
      usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable()
      usb: roles: don't get/set_role() when usb_role_switch is unregistered
      usb: roles: fix NULL pointer issue when put module's reference
      usb: cdnsp: fixed issue with incorrect detecting CDNSP family controllers
      usb: cdnsp: blocked some cdns3 specific code
      usb: uhci-grlib: Explicitly include linux/platform_device.h
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    c46ac50 View commit details
    Browse the repository at this point in the history
  28. Merge tag 'docs-6.8-fixes3' of git://git.lwn.net/linux

    Pull two documentation build fixes from Jonathan Corbet:
    
     - The XFS online fsck documentation uses incredibly deeply nested
       subsection and list nesting; that broke the PDF docs build. Tweak a
       parameter to tell LaTeX to allow the deeper nesting.
    
     - Fix a 6.8 PDF-build regression
    
    * tag 'docs-6.8-fixes3' of git://git.lwn.net/linux:
      docs: translations: use attribute to store current language
      docs: Instruct LaTeX to cope with deeper nesting
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    70ff1fe View commit details
    Browse the repository at this point in the history
  29. bcachefs: fix bch2_save_backtrace()

    Missed a call in the previous fix.
    
    Signed-off-by: Kent Overstreet <[email protected]>
    Kent Overstreet committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    5197728 View commit details
    Browse the repository at this point in the history
  30. Merge tag 'bcachefs-2024-02-25' of https://evilpiepirate.org/git/bcac…

    …hefs
    
    Pull bcachefs fixes from Kent Overstreet:
     "Some more mostly boring fixes, but some not
    
      User reported ones:
    
       - the BTREE_ITER_FILTER_SNAPSHOTS one fixes a really nasty
         performance bug; user reported an untar initially taking two
         seconds and then ~2 minutes
    
       - kill a __GFP_NOFAIL in the buffered read path; this was a leftover
         from the trickier fix to kill __GFP_NOFAIL in readahead, where we
         can't return errors (and have to silently truncate the read
         ourselves).
    
         bcachefs can't use GFP_NOFAIL for folio state unlike iomap based
         filesystems because our folio state is just barely too big, 2MB
         hugepages cause us to exceed the 2 page threshhold for GFP_NOFAIL.
    
         additionally, the flags argument was just buggy, we weren't
         supplying GFP_KERNEL previously (!)"
    
    * tag 'bcachefs-2024-02-25' of https://evilpiepirate.org/git/bcachefs:
      bcachefs: fix bch2_save_backtrace()
      bcachefs: Fix check_snapshot() memcpy
      bcachefs: Fix bch2_journal_flush_device_pins()
      bcachefs: fix iov_iter count underflow on sub-block dio read
      bcachefs: Fix BTREE_ITER_FILTER_SNAPSHOTS on inodes btree
      bcachefs: Kill __GFP_NOFAIL in buffered read path
      bcachefs: fix backpointer_to_text() when dev does not exist
    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    e231dbd View commit details
    Browse the repository at this point in the history
  31. Linux 6.8-rc6

    torvalds committed Feb 25, 2024
    Configuration menu
    Copy the full SHA
    d206a76 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2024

  1. Merge tag 'v6.8-rc6' into backup

    Linux 6.8-rc6
    Byte-Lab committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    f661691 View commit details
    Browse the repository at this point in the history
  2. scx: Fix spurious ops verification failure due to missing jiffies con…

    …version
    
    ops->timeout_ms wasn't being converted to jiffies before testing against
    SCX_WATHCDOG_MATX_TIMEOUT which led to spurious verification failures when
    with lower HZ kernels. Fix it.
    
    Link: sched-ext/scx#151
    (cherry picked from commit 90b8f6e)
    htejun authored and Byte-Lab committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    41c5808 View commit details
    Browse the repository at this point in the history
  3. v6.8-rc6-scx1

    Signed-off-by: David Vernet <[email protected]>
    Byte-Lab committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    304998f View commit details
    Browse the repository at this point in the history