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

Linux 6.6.8 #292

Closed
wants to merge 437 commits into from
Closed

Linux 6.6.8 #292

wants to merge 437 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Dec 13, 2023

  1. arm64: dts: mediatek: mt8186: Change gpu speedbin nvmem cell name

    commit 59fa1e5 upstream.
    
    MT8186's GPU speedbin value must be interpreted, or the value will not
    be meaningful.
    Use the correct "gpu-speedbin" nvmem cell name for the GPU speedbin to
    allow triggering the cell info fixup handler, hence feeding the right
    speedbin number to the users.
    
    Cc: [email protected]
    Fixes: 263d2fd ("arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells")
    Reviewed-by: Chen-Yu Tsai <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    AngeloGioacchino Del Regno authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    b9cc170 View commit details
    Browse the repository at this point in the history
  2. coresight: etm4x: Remove bogous __exit annotation for some functions

    [ Upstream commit 348ddab ]
    
    etm4_platform_driver (which lives in ".data" contains a reference to
    etm4_remove_platform_dev(). So the latter must not be marked with __exit
    which results in the function being discarded for a build with
    CONFIG_CORESIGHT_SOURCE_ETM4X=y which in turn makes the remove pointer
    contain invalid data.
    
    etm4x_amba_driver referencing etm4_remove_amba() has the same issue.
    
    Drop the __exit annotations for the two affected functions and a third
    one that is called by the other two.
    
    For reasons I don't understand this isn't catched by building with
    CONFIG_DEBUG_SECTION_MISMATCH=y.
    
    Fixes: c23bc38 ("coresight: etm4x: Refactor probing routine")
    Fixes: 5214b56 ("coresight: etm4x: Add support for sysreg only devices")
    Signed-off-by: Uwe Kleine-König <[email protected]>
    Reviewed-by: James Clark <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]/
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Suzuki K Poulose <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Uwe Kleine-König authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    1b5d156 View commit details
    Browse the repository at this point in the history
  3. coresight: Fix crash when Perf and sysfs modes are used concurrently

    [ Upstream commit 287e82c ]
    
    Partially revert the change in commit 6148652 ("coresight: Enable
    and disable helper devices adjacent to the path") which changed the bare
    call from source_ops(csdev)->enable() to coresight_enable_source() for
    Perf sessions. It was missed that coresight_enable_source() is
    specifically for the sysfs interface, rather than being a generic call.
    This interferes with the sysfs reference counting to cause the following
    crash:
    
      $ perf record -e cs_etm/@tmc_etr0/ -C 0 &
      $ echo 1 > /sys/bus/coresight/devices/tmc_etr0/enable_sink
      $ echo 1 > /sys/bus/coresight/devices/etm0/enable_source
      $ echo 0 > /sys/bus/coresight/devices/etm0/enable_source
    
      Unable to handle kernel NULL pointer dereference at virtual
      address 00000000000001d0
      Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
      ...
      Call trace:
       etm4_disable+0x54/0x150 [coresight_etm4x]
       coresight_disable_source+0x6c/0x98 [coresight]
       coresight_disable+0x74/0x1c0 [coresight]
       enable_source_store+0x88/0xa0 [coresight]
       dev_attr_store+0x20/0x40
       sysfs_kf_write+0x4c/0x68
       kernfs_fop_write_iter+0x120/0x1b8
       vfs_write+0x2dc/0x3b0
       ksys_write+0x70/0x108
       __arm64_sys_write+0x24/0x38
       invoke_syscall+0x50/0x128
       el0_svc_common.constprop.0+0x104/0x130
       do_el0_svc+0x40/0xb8
       el0_svc+0x2c/0xb8
       el0t_64_sync_handler+0xc0/0xc8
       el0t_64_sync+0x1a4/0x1a8
      Code: d53cd042 91002000 b9402a81 b8626800 (f940ead5)
      ---[ end trace 0000000000000000 ]---
    
    This commit linked below also fixes the issue, but has unlocked updates
    to the mode which could potentially race. So until we come up with a
    more complete solution that takes all locking and interaction between
    both modes into account, just revert back to the old behavior for Perf.
    
    Reported-by: Junhao He <[email protected]>
    Closes: https://lore.kernel.org/linux-arm-kernel/[email protected]/
    Fixes: 6148652 ("coresight: Enable and disable helper devices adjacent to the path")
    Tested-by: Junhao He <[email protected]>
    Signed-off-by: James Clark <[email protected]>
    Signed-off-by: Suzuki K Poulose <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    James-A-Clark authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    2f6b152 View commit details
    Browse the repository at this point in the history
  4. hwtracing: hisi_ptt: Add dummy callback pmu::read()

    [ Upstream commit 55e0a2f ]
    
    When start trace with perf option "-C $cpu" and immediately stop it
    with SIGTERM or others, the perf core will invoke pmu::read() while
    the driver doesn't implement it. Add a dummy pmu::read() to avoid
    any issues.
    
    Fixes: ff0de06 ("hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device")
    Signed-off-by: Junhao He <[email protected]>
    Signed-off-by: Yicong Yang <[email protected]>
    Acked-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Suzuki K Poulose <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Junhao He authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    359d3fb View commit details
    Browse the repository at this point in the history
  5. coresight: ultrasoc-smb: Fix sleep while close preempt in enable_smb

    [ Upstream commit b841128 ]
    
    When we to enable the SMB by perf, the perf sched will call perf_ctx_lock()
    to close system preempt in event_function_call(). But SMB::enable_smb() use
    mutex to lock the critical section, which may sleep.
    
     BUG: sleeping function called from invalid context at kernel/locking/mutex.c:580
     in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 153023, name: perf
     preempt_count: 2, expected: 0
     RCU nest depth: 0, expected: 0
     INFO: lockdep is turned off.
     irq event stamp: 0
     hardirqs last  enabled at (0): [<0000000000000000>] 0x0
     hardirqs last disabled at (0): [<ffffa2983f5c5f40>] copy_process+0xae8/0x2b48
     softirqs last  enabled at (0): [<ffffa2983f5c5f40>] copy_process+0xae8/0x2b48
     softirqs last disabled at (0): [<0000000000000000>] 0x0
     CPU: 2 PID: 153023 Comm: perf Kdump: loaded Tainted: G   W  O   6.5.0-rc4+ #1
    
     Call trace:
     ...
      __mutex_lock+0xbc/0xa70
      mutex_lock_nested+0x34/0x48
      smb_update_buffer+0x58/0x360 [ultrasoc_smb]
      etm_event_stop+0x204/0x2d8 [coresight]
      etm_event_del+0x1c/0x30 [coresight]
      event_sched_out+0x17c/0x3b8
      group_sched_out.part.0+0x5c/0x208
      __perf_event_disable+0x15c/0x210
      event_function+0xe0/0x230
      remote_function+0xb4/0xe8
      generic_exec_single+0x160/0x268
      smp_call_function_single+0x20c/0x2a0
      event_function_call+0x20c/0x220
      _perf_event_disable+0x5c/0x90
      perf_event_for_each_child+0x58/0xc0
      _perf_ioctl+0x34c/0x1250
      perf_ioctl+0x64/0x98
     ...
    
    Use spinlock to replace mutex to control driver data access to one at a
    time. The function copy_to_user() may sleep, it cannot be in a spinlock
    context, so we can't simply replace it in smb_read(). But we can ensure
    that only one user gets the SMB device fd by smb_open(), so remove the
    locks from smb_read() and buffer synchronization is guaranteed by the user.
    
    Fixes: 06f5c29 ("drivers/coresight: Add UltraSoc System Memory Buffer driver")
    Signed-off-by: Junhao He <[email protected]>
    Reviewed-by: James Clark <[email protected]>
    Signed-off-by: Suzuki K Poulose <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Junhao He authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    ace850b View commit details
    Browse the repository at this point in the history
  6. coresight: ultrasoc-smb: Config SMB buffer before register sink

    [ Upstream commit 830a7f5 ]
    
    The SMB dirver register the enable/disable sysfs interface in function
    smb_register_sink(), however the buffer depends on the following
    configuration to work well. So it'll be possible for user to access an
    unreset one.
    
    Move the config buffer operation to before register_sink().
    Ignore the return value, if smb_config_inport() fails. That will
    cause the hardwares disable trace path to fail, should not affect
    SMB driver remove. So we make smb_remove() return success,
    
    Fixes: 06f5c29 ("drivers/coresight: Add UltraSoc System Memory Buffer driver")
    Signed-off-by: Junhao He <[email protected]>
    Reviewed-by: James Clark <[email protected]>
    Signed-off-by: Suzuki K Poulose <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Junhao He authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    ab5091e View commit details
    Browse the repository at this point in the history
  7. coresight: ultrasoc-smb: Fix uninitialized before use buf_hw_base

    [ Upstream commit 862c135 ]
    
    In smb_reset_buffer, the sdb->buf_hw_base variable is uninitialized
    before use, which initializes it in smb_init_data_buffer. And the SMB
    regiester are set in smb_config_inport.
    So move the call after smb_config_inport.
    
    Fixes: 06f5c29 ("drivers/coresight: Add UltraSoc System Memory Buffer driver")
    Signed-off-by: Junhao He <[email protected]>
    Reviewed-by: James Clark <[email protected]>
    Signed-off-by: Suzuki K Poulose <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Junhao He authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    c541d0e View commit details
    Browse the repository at this point in the history
  8. misc: mei: client.c: return negative error code in mei_cl_write

    [ Upstream commit 8f06aee ]
    
    mei_msg_hdr_init() return negative error code, rets should be
    'PTR_ERR(mei_hdr)' rather than '-PTR_ERR(mei_hdr)'.
    
    Fixes: 0cd7c01 ("mei: add support for mei extended header.")
    Signed-off-by: Su Hui <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Su Hui authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    e2365ea View commit details
    Browse the repository at this point in the history
  9. misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write

    [ Upstream commit ee62360 ]
    
    Clang static analyzer complains that value stored to 'rets' is never
    read.Let 'buf_len = -EOVERFLOW' to make sure we can return '-EOVERFLOW'.
    
    Fixes: 8c8d964 ("mei: move hbuf_depth from the mei device to the hw modules")
    Signed-off-by: Su Hui <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Su Hui authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    f78fff4 View commit details
    Browse the repository at this point in the history
  10. perf vendor events arm64: AmpereOne: Add missing DefaultMetricgroupNa…

    …me fields
    
    [ Upstream commit 90fe70d ]
    
    AmpereOne metrics were missing DefaultMetricgroupName from metrics with
    "Default" in group name resulting perf to segfault. Add the missing
    field to address the issue.
    
    Fixes: 59faeaf ("perf vendor events arm64: Fix for AmpereOne metrics")
    Signed-off-by: Ilkka Koskinen <[email protected]>
    Reviewed-by: Ian Rogers <[email protected]>
    Cc: James Clark <[email protected]>
    Cc: Will Deacon <[email protected]>
    Cc: Leo Yan <[email protected]>
    Cc: Mike Leach <[email protected]>
    Cc: John Garry <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Namhyung Kim <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ilkka-koskinen authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    0fdd1b8 View commit details
    Browse the repository at this point in the history
  11. LoongArch: BPF: Don't sign extend memory load operand

    [ Upstream commit fe57575 ]
    
    The `cgrp_local_storage` test triggers a kernel panic like:
    
      # ./test_progs -t cgrp_local_storage
      Can't find bpf_testmod.ko kernel module: -2
      WARNING! Selftests relying on bpf_testmod.ko will be skipped.
      [  550.930632] CPU 1 Unable to handle kernel paging request at virtual address 0000000000000080, era == ffff80000200be34, ra == ffff80000200be00
      [  550.931781] Oops[#1]:
      [  550.931966] CPU: 1 PID: 1303 Comm: test_progs Not tainted 6.7.0-rc2-loong-devel-g2f56bb0d2327 #35 a896aca3f4164f09cc346f89f2e09832e07be5f6
      [  550.932215] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
      [  550.932403] pc ffff80000200be34 ra ffff80000200be00 tp 9000000108350000 sp 9000000108353dc0
      [  550.932545] a0 0000000000000000 a1 0000000000000517 a2 0000000000000118 a3 00007ffffbb15558
      [  550.932682] a4 00007ffffbb15620 a5 90000001004e7700 a6 0000000000000021 a7 0000000000000118
      [  550.932824] t0 ffff80000200bdc0 t1 0000000000000517 t2 0000000000000517 t3 00007ffff1c06ee0
      [  550.932961] t4 0000555578ae04d0 t5 fffffffffffffff8 t6 0000000000000004 t7 0000000000000020
      [  550.933097] t8 0000000000000040 u0 00000000000007b8 s9 9000000108353e00 s0 90000001004e7700
      [  550.933241] s1 9000000004005000 s2 0000000000000001 s3 0000000000000000 s4 0000555555eb2ec8
      [  550.933379] s5 00007ffffbb15bb8 s6 00007ffff1dafd60 s7 000055555663f610 s8 00007ffff1db0050
      [  550.933520]    ra: ffff80000200be00 bpf_prog_98f1b9e767be2a84_on_enter+0x40/0x200
      [  550.933911]   ERA: ffff80000200be34 bpf_prog_98f1b9e767be2a84_on_enter+0x74/0x200
      [  550.934105]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
      [  550.934596]  PRMD: 00000004 (PPLV0 +PIE -PWE)
      [  550.934712]  EUEN: 00000003 (+FPE +SXE -ASXE -BTE)
      [  550.934836]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
      [  550.934976] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
      [  550.935097]  BADV: 0000000000000080
      [  550.935181]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
      [  550.935291] Modules linked in:
      [  550.935391] Process test_progs (pid: 1303, threadinfo=000000006c3b1c41, task=0000000061f84a55)
      [  550.935643] Stack : 00007ffffbb15bb8 0000555555eb2ec8 0000000000000000 0000000000000001
      [  550.935844]         9000000004005000 ffff80001b864000 00007ffffbb15450 90000000029aa034
      [  550.935990]         0000000000000000 9000000108353ec0 0000000000000118 d07d9dfb09721a09
      [  550.936175]         0000000000000001 0000000000000000 9000000108353ec0 0000000000000118
      [  550.936314]         9000000101d46ad0 900000000290abf0 000055555663f610 0000000000000000
      [  550.936479]         0000000000000003 9000000108353ec0 00007ffffbb15450 90000000029d7288
      [  550.936635]         00007ffff1dafd60 000055555663f610 0000000000000000 0000000000000003
      [  550.936779]         9000000108353ec0 90000000035dd1f0 00007ffff1dafd58 9000000002841c5c
      [  550.936939]         0000000000000119 0000555555eea5a8 00007ffff1d78780 00007ffffbb153e0
      [  550.937083]         ffffffffffffffda 00007ffffbb15518 0000000000000040 00007ffffbb15558
      [  550.937224]         ...
      [  550.937299] Call Trace:
      [  550.937521] [<ffff80000200be34>] bpf_prog_98f1b9e767be2a84_on_enter+0x74/0x200
      [  550.937910] [<90000000029aa034>] bpf_trace_run2+0x90/0x154
      [  550.938105] [<900000000290abf0>] syscall_trace_enter.isra.0+0x1cc/0x200
      [  550.938224] [<90000000035dd1f0>] do_syscall+0x48/0x94
      [  550.938319] [<9000000002841c5c>] handle_syscall+0xbc/0x158
      [  550.938477]
      [  550.938607] Code: 580009ae  50016000  262402e4 <28c20085> 14092084  03a00084  16000024  03240084  00150006
      [  550.938851]
      [  550.939021] ---[ end trace 0000000000000000 ]---
    
    Further investigation shows that this panic is triggered by memory
    load operations:
    
      ptr = bpf_cgrp_storage_get(&map_a, task->cgroups->dfl_cgrp, 0,
                                 BPF_LOCAL_STORAGE_GET_F_CREATE);
    
    The expression `task->cgroups->dfl_cgrp` involves two memory load.
    Since the field offset fits in imm12 or imm14, we use ldd or ldptrd
    instructions. But both instructions have the side effect that it will
    signed-extended the imm operand. Finally, we got the wrong addresses
    and panics is inevitable.
    
    Use a generic ldxd instruction to avoid this kind of issues.
    
    With this change, we have:
    
      # ./test_progs -t cgrp_local_storage
      Can't find bpf_testmod.ko kernel module: -2
      WARNING! Selftests relying on bpf_testmod.ko will be skipped.
      test_cgrp_local_storage:PASS:join_cgroup /cgrp_local_storage 0 nsec
      #48/1    cgrp_local_storage/tp_btf:OK
      test_attach_cgroup:PASS:skel_open 0 nsec
      test_attach_cgroup:PASS:prog_attach 0 nsec
      test_attach_cgroup:PASS:prog_attach 0 nsec
      libbpf: prog 'update_cookie_tracing': failed to attach: ERROR: strerror_r(-524)=22
      test_attach_cgroup:FAIL:prog_attach unexpected error: -524
      #48/2    cgrp_local_storage/attach_cgroup:FAIL
      test_recursion:PASS:skel_open_and_load 0 nsec
      libbpf: prog 'on_lookup': failed to attach: ERROR: strerror_r(-524)=22
      libbpf: prog 'on_lookup': failed to auto-attach: -524
      test_recursion:FAIL:skel_attach unexpected error: -524 (errno 524)
      #48/3    cgrp_local_storage/recursion:FAIL
      #48/4    cgrp_local_storage/negative:OK
      #48/5    cgrp_local_storage/cgroup_iter_sleepable:OK
      test_yes_rcu_lock:PASS:skel_open 0 nsec
      test_yes_rcu_lock:PASS:skel_load 0 nsec
      libbpf: prog 'yes_rcu_lock': failed to attach: ERROR: strerror_r(-524)=22
      libbpf: prog 'yes_rcu_lock': failed to auto-attach: -524
      test_yes_rcu_lock:FAIL:skel_attach unexpected error: -524 (errno 524)
      #48/6    cgrp_local_storage/yes_rcu_lock:FAIL
      #48/7    cgrp_local_storage/no_rcu_lock:OK
      #48      cgrp_local_storage:FAIL
    
      All error logs:
      test_cgrp_local_storage:PASS:join_cgroup /cgrp_local_storage 0 nsec
      test_attach_cgroup:PASS:skel_open 0 nsec
      test_attach_cgroup:PASS:prog_attach 0 nsec
      test_attach_cgroup:PASS:prog_attach 0 nsec
      libbpf: prog 'update_cookie_tracing': failed to attach: ERROR: strerror_r(-524)=22
      test_attach_cgroup:FAIL:prog_attach unexpected error: -524
      #48/2    cgrp_local_storage/attach_cgroup:FAIL
      test_recursion:PASS:skel_open_and_load 0 nsec
      libbpf: prog 'on_lookup': failed to attach: ERROR: strerror_r(-524)=22
      libbpf: prog 'on_lookup': failed to auto-attach: -524
      test_recursion:FAIL:skel_attach unexpected error: -524 (errno 524)
      #48/3    cgrp_local_storage/recursion:FAIL
      test_yes_rcu_lock:PASS:skel_open 0 nsec
      test_yes_rcu_lock:PASS:skel_load 0 nsec
      libbpf: prog 'yes_rcu_lock': failed to attach: ERROR: strerror_r(-524)=22
      libbpf: prog 'yes_rcu_lock': failed to auto-attach: -524
      test_yes_rcu_lock:FAIL:skel_attach unexpected error: -524 (errno 524)
      #48/6    cgrp_local_storage/yes_rcu_lock:FAIL
      #48      cgrp_local_storage:FAIL
      Summary: 0/4 PASSED, 0 SKIPPED, 1 FAILED
    
    No panics any more (The test still failed because lack of BPF trampoline
    which I am actively working on).
    
    Fixes: 5dc6155 ("LoongArch: Add BPF JIT support")
    Signed-off-by: Hengqi Chen <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chenhengqi authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    3275410 View commit details
    Browse the repository at this point in the history
  12. LoongArch: BPF: Don't sign extend function return value

    [ Upstream commit 5d47ec2 ]
    
    The `cls_redirect` test triggers a kernel panic like:
    
      # ./test_progs -t cls_redirect
      Can't find bpf_testmod.ko kernel module: -2
      WARNING! Selftests relying on bpf_testmod.ko will be skipped.
      [   30.938489] CPU 3 Unable to handle kernel paging request at virtual address fffffffffd814de0, era == ffff800002009fb8, ra == ffff800002009f9c
      [   30.939331] Oops[#1]:
      [   30.939513] CPU: 3 PID: 1260 Comm: test_progs Not tainted 6.7.0-rc2-loong-devel-g2f56bb0d2327 #35 a896aca3f4164f09cc346f89f2e09832e07be5f6
      [   30.939732] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022
      [   30.939901] pc ffff800002009fb8 ra ffff800002009f9c tp 9000000104da4000 sp 9000000104da7ab0
      [   30.940038] a0 fffffffffd814de0 a1 9000000104da7a68 a2 0000000000000000 a3 9000000104da7c10
      [   30.940183] a4 9000000104da7c14 a5 0000000000000002 a6 0000000000000021 a7 00005555904d7f90
      [   30.940321] t0 0000000000000110 t1 0000000000000000 t2 fffffffffd814de0 t3 0004c4b400000000
      [   30.940456] t4 ffffffffffffffff t5 00000000c3f63600 t6 0000000000000000 t7 0000000000000000
      [   30.940590] t8 000000000006d803 u0 0000000000000020 s9 9000000104da7b10 s0 900000010504c200
      [   30.940727] s1 fffffffffd814de0 s2 900000010504c200 s3 9000000104da7c10 s4 9000000104da7ad0
      [   30.940866] s5 0000000000000000 s6 90000000030e65bc s7 9000000104da7b44 s8 90000000044f6fc0
      [   30.941015]    ra: ffff800002009f9c bpf_prog_846803e5ae81417f_cls_redirect+0xa0/0x590
      [   30.941535]   ERA: ffff800002009fb8 bpf_prog_846803e5ae81417f_cls_redirect+0xbc/0x590
      [   30.941696]  CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE)
      [   30.942224]  PRMD: 00000004 (PPLV0 +PIE -PWE)
      [   30.942330]  EUEN: 00000003 (+FPE +SXE -ASXE -BTE)
      [   30.942453]  ECFG: 00071c1c (LIE=2-4,10-12 VS=7)
      [   30.942612] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0)
      [   30.942764]  BADV: fffffffffd814de0
      [   30.942854]  PRID: 0014c010 (Loongson-64bit, Loongson-3A5000)
      [   30.942974] Modules linked in:
      [   30.943078] Process test_progs (pid: 1260, threadinfo=00000000ce303226, task=000000007d10bb76)
      [   30.943306] Stack : 900000010a064000 90000000044f6fc0 9000000104da7b48 0000000000000000
      [   30.943495]         0000000000000000 9000000104da7c14 9000000104da7c10 900000010504c200
      [   30.943626]         0000000000000001 ffff80001b88c000 9000000104da7b70 90000000030e6668
      [   30.943785]         0000000000000000 9000000104da7b58 ffff80001b88c048 9000000003d05000
      [   30.943936]         900000000303ac88 0000000000000000 0000000000000000 9000000104da7b70
      [   30.944091]         0000000000000000 0000000000000001 0000000731eeab00 0000000000000000
      [   30.944245]         ffff80001b88c000 0000000000000000 0000000000000000 54b99959429f83b8
      [   30.944402]         ffff80001b88c000 90000000044f6fc0 9000000101d70000 ffff80001b88c000
      [   30.944538]         000000000000005a 900000010504c200 900000010a064000 900000010a067000
      [   30.944697]         9000000104da7d88 0000000000000000 9000000003d05000 90000000030e794c
      [   30.944852]         ...
      [   30.944924] Call Trace:
      [   30.945120] [<ffff800002009fb8>] bpf_prog_846803e5ae81417f_cls_redirect+0xbc/0x590
      [   30.945650] [<90000000030e6668>] bpf_test_run+0x1ec/0x2f8
      [   30.945958] [<90000000030e794c>] bpf_prog_test_run_skb+0x31c/0x684
      [   30.946065] [<90000000026d4f68>] __sys_bpf+0x678/0x2724
      [   30.946159] [<90000000026d7288>] sys_bpf+0x20/0x2c
      [   30.946253] [<90000000032dd224>] do_syscall+0x7c/0x94
      [   30.946343] [<9000000002541c5c>] handle_syscall+0xbc/0x158
      [   30.946492]
      [   30.946549] Code: 0015030e  5c0009c0  5001d000 <28c00304> 02c00484  29c00304  00150009  2a42d2e4  0280200d
      [   30.946793]
      [   30.946971] ---[ end trace 0000000000000000 ]---
      [   32.093225] Kernel panic - not syncing: Fatal exception in interrupt
      [   32.093526] Kernel relocated by 0x2320000
      [   32.093630]  .text @ 0x9000000002520000
      [   32.093725]  .data @ 0x9000000003400000
      [   32.093792]  .bss  @ 0x9000000004413200
      [   34.971998] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
    
    This is because we signed-extend function return values. When subprog
    mode is enabled, we have:
    
      cls_redirect()
        -> get_global_metrics() returns pcpu ptr 0xfffffefffc00b480
    
    The pointer returned is later signed-extended to 0xfffffffffc00b480 at
    `BPF_JMP | BPF_EXIT`. During BPF prog run, this triggers unhandled page
    fault and a kernel panic.
    
    Drop the unnecessary signed-extension on return values like other
    architectures do.
    
    With this change, we have:
    
      # ./test_progs -t cls_redirect
      Can't find bpf_testmod.ko kernel module: -2
      WARNING! Selftests relying on bpf_testmod.ko will be skipped.
      #51/1    cls_redirect/cls_redirect_inlined:OK
      #51/2    cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
      #51/3    cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
      #51/4    cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
      #51/5    cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
      #51/6    cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
      #51/7    cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
      #51/8    cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
      #51/9    cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
      #51/10   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
      #51/11   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
      #51/12   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
      #51/13   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
      #51/14   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
      #51/15   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
      #51/16   cls_redirect/cls_redirect_subprogs:OK
      #51/17   cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
      #51/18   cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
      #51/19   cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
      #51/20   cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
      #51/21   cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
      #51/22   cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
      #51/23   cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
      #51/24   cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
      #51/25   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
      #51/26   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
      #51/27   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
      #51/28   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
      #51/29   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
      #51/30   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
      #51/31   cls_redirect/cls_redirect_dynptr:OK
      #51/32   cls_redirect/IPv4 TCP accept unknown (no hops, flags: SYN):OK
      #51/33   cls_redirect/IPv6 TCP accept unknown (no hops, flags: SYN):OK
      #51/34   cls_redirect/IPv4 TCP accept unknown (no hops, flags: ACK):OK
      #51/35   cls_redirect/IPv6 TCP accept unknown (no hops, flags: ACK):OK
      #51/36   cls_redirect/IPv4 TCP forward unknown (one hop, flags: ACK):OK
      #51/37   cls_redirect/IPv6 TCP forward unknown (one hop, flags: ACK):OK
      #51/38   cls_redirect/IPv4 TCP accept known (one hop, flags: ACK):OK
      #51/39   cls_redirect/IPv6 TCP accept known (one hop, flags: ACK):OK
      #51/40   cls_redirect/IPv4 UDP accept unknown (no hops, flags: none):OK
      #51/41   cls_redirect/IPv6 UDP accept unknown (no hops, flags: none):OK
      #51/42   cls_redirect/IPv4 UDP forward unknown (one hop, flags: none):OK
      #51/43   cls_redirect/IPv6 UDP forward unknown (one hop, flags: none):OK
      #51/44   cls_redirect/IPv4 UDP accept known (one hop, flags: none):OK
      #51/45   cls_redirect/IPv6 UDP accept known (one hop, flags: none):OK
      #51      cls_redirect:OK
      Summary: 1/45 PASSED, 0 SKIPPED, 0 FAILED
    
    Fixes: 5dc6155 ("LoongArch: Add BPF JIT support")
    Signed-off-by: Hengqi Chen <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chenhengqi authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    4b11737 View commit details
    Browse the repository at this point in the history
  13. parisc: Reduce size of the bug_table on 64-bit kernel by half

    [ Upstream commit 4326683 ]
    
    Enable GENERIC_BUG_RELATIVE_POINTERS which will store 32-bit relative
    offsets to the bug address and the source file name instead of 64-bit
    absolute addresses. This effectively reduces the size of the
    bug_table[] array by half on 64-bit kernels.
    
    Signed-off-by: Helge Deller <[email protected]>
    Stable-dep-of: 4876357 ("parisc: Fix asm operand number out of range build error in bug table")
    Signed-off-by: Sasha Levin <[email protected]>
    hdeller authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    1649606 View commit details
    Browse the repository at this point in the history
  14. parisc: Fix asm operand number out of range build error in bug table

    [ Upstream commit 4876357 ]
    
    Build is broken if CONFIG_DEBUG_BUGVERBOSE=n.
    Fix it be using the correct asm operand number.
    
    Signed-off-by: Helge Deller <[email protected]>
    Reported-by: Linux Kernel Functional Testing <[email protected]>
    Fixes: fe76a13 ("parisc: Use natural CPU alignment for bug_table")
    Cc: [email protected]   # v6.0+
    Signed-off-by: Sasha Levin <[email protected]>
    hdeller authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    5bdd0ce View commit details
    Browse the repository at this point in the history
  15. arm64: dts: mediatek: add missing space before {

    [ Upstream commit a9c740c ]
    
    Add missing whitespace between node name/label and opening {.
    
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Stable-dep-of: 8980c30 ("arm64: dts: mt8183: kukui: Fix underscores in node names")
    Signed-off-by: Sasha Levin <[email protected]>
    krzk authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    b6c47d9 View commit details
    Browse the repository at this point in the history
  16. arm64: dts: mt8183: kukui: Fix underscores in node names

    [ Upstream commit 8980c30 ]
    
    Replace underscores with hyphens in pinctrl node names both for consistency
    and to adhere to the bindings.
    
    Cc: [email protected]
    Fixes: cd894e2 ("arm64: dts: mt8183: Add krane-sku176 board")
    Fixes: 1652dbf ("arm64: dts: mt8183: add scp node")
    Fixes: 27eaf34 ("arm64: dts: mt8183: config dsi node")
    Signed-off-by: Hsin-Yi Wang <[email protected]>
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hsinyi527 authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    3798c66 View commit details
    Browse the repository at this point in the history
  17. drm/amdgpu: disable MCBP by default

    [ Upstream commit d6a5758 ]
    
    Disable MCBP(mid command buffer preemption) by default as old Mesa
    hangs with it. We shall not enable the feature that breaks old usermode
    driver.
    
    Fixes: 50a7c87 ("drm/amdgpu: enable mcbp by default on gfx9")
    Signed-off-by: Jiadong Zhu <[email protected]>
    Acked-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Jiadong Zhu authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    c66c479 View commit details
    Browse the repository at this point in the history
  18. perf: Fix perf_event_validate_size()

    [ Upstream commit 382c27f ]
    
    Budimir noted that perf_event_validate_size() only checks the size of
    the newly added event, even though the sizes of all existing events
    can also change due to not all events having the same read_format.
    
    When we attach the new event, perf_group_attach(), we do re-compute
    the size for all events.
    
    Fixes: a723968 ("perf: Fix u16 overflows")
    Reported-by: Budimir Markovic <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Peter Zijlstra authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    cfe9295 View commit details
    Browse the repository at this point in the history
  19. x86/sev: Fix kernel crash due to late update to read-only ghcb_version

    [ Upstream commit 27d2534 ]
    
    A write-access violation page fault kernel crash was observed while running
    cpuhotplug LTP testcases on SEV-ES enabled systems. The crash was
    observed during hotplug, after the CPU was offlined and the process
    was migrated to different CPU. setup_ghcb() is called again which
    tries to update ghcb_version in sev_es_negotiate_protocol(). Ideally this
    is a read_only variable which is initialised during booting.
    
    Trying to write it results in a pagefault:
    
      BUG: unable to handle page fault for address: ffffffffba556e70
      #PF: supervisor write access in kernel mode
      #PF: error_code(0x0003) - permissions violation
      [ ...]
      Call Trace:
       <TASK>
       ? __die_body.cold+0x1a/0x1f
       ? __die+0x2a/0x35
       ? page_fault_oops+0x10c/0x270
       ? setup_ghcb+0x71/0x100
       ? __x86_return_thunk+0x5/0x6
       ? search_exception_tables+0x60/0x70
       ? __x86_return_thunk+0x5/0x6
       ? fixup_exception+0x27/0x320
       ? kernelmode_fixup_or_oops+0xa2/0x120
       ? __bad_area_nosemaphore+0x16a/0x1b0
       ? kernel_exc_vmm_communication+0x60/0xb0
       ? bad_area_nosemaphore+0x16/0x20
       ? do_kern_addr_fault+0x7a/0x90
       ? exc_page_fault+0xbd/0x160
       ? asm_exc_page_fault+0x27/0x30
       ? setup_ghcb+0x71/0x100
       ? setup_ghcb+0xe/0x100
       cpu_init_exception_handling+0x1b9/0x1f0
    
    The fix is to call sev_es_negotiate_protocol() only in the BSP boot phase,
    and it only needs to be done once in any case.
    
    [ mingo: Refined the changelog. ]
    
    Fixes: 95d33bf ("x86/sev: Register GHCB memory when SEV-SNP is active")
    Suggested-by: Tom Lendacky <[email protected]>
    Co-developed-by: Bo Gan <[email protected]>
    Signed-off-by: Bo Gan <[email protected]>
    Signed-off-by: Ashwin Dayanand Kamat <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Acked-by: Tom Lendacky <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Ashwin Dayanand Kamat authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    73bbca1 View commit details
    Browse the repository at this point in the history
  20. gpiolib: sysfs: Fix error handling on failed export

    [ Upstream commit 95dd1e3 ]
    
    If gpio_set_transitory() fails, we should free the GPIO again. Most
    notably, the flag FLAG_REQUESTED has previously been set in
    gpiod_request_commit(), and should be reset on failure.
    
    To my knowledge, this does not affect any current users, since the
    gpio_set_transitory() mainly returns 0 and -ENOTSUPP, which is converted
    to 0. However the gpio_set_transitory() function calles the .set_config()
    function of the corresponding GPIO chip and there are some GPIO drivers in
    which some (unlikely) branches return other values like -EPROBE_DEFER,
    and -EINVAL. In these cases, the above mentioned FLAG_REQUESTED would not
    be reset, which results in the pin being blocked until the next reboot.
    
    Fixes: e10f72b ("gpio: gpiolib: Generalise state persistence beyond sleep")
    Signed-off-by: Boerge Struempfel <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    BoergeSt authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    6df51c5 View commit details
    Browse the repository at this point in the history
  21. ASoC: ops: add correct range check for limiting volume

    commit fb9ad24 upstream.
    
    Volume can have ranges that start with negative values, ex: -84dB to
    +40dB. Apply correct range check in snd_soc_limit_volume before setting
    the platform_max. Without this patch, for example setting a 0dB limit on
    a volume range of -84dB to +40dB would fail.
    
    Signed-off-by: Srinivas Kandagatla <[email protected]>
    Tested-by: Johan Hovold <[email protected]>
    Reviewed-by: Johan Hovold <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Srinivas-Kandagatla authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    395e52b View commit details
    Browse the repository at this point in the history
  22. kprobes: consistent rcu api usage for kretprobe holder

    commit d839a65 upstream.
    
    It seems that the pointer-to-kretprobe "rp" within the kretprobe_holder is
    RCU-managed, based on the (non-rethook) implementation of get_kretprobe().
    The thought behind this patch is to make use of the RCU API where possible
    when accessing this pointer so that the needed barriers are always in place
    and to self-document the code.
    
    The __rcu annotation to "rp" allows for sparse RCU checking. Plain writes
    done to the "rp" pointer are changed to make use of the RCU macro for
    assignment. For the single read, the implementation of get_kretprobe()
    is simplified by making use of an RCU macro which accomplishes the same,
    but note that the log warning text will be more generic.
    
    I did find that there is a difference in assembly generated between the
    usage of the RCU macros vs without. For example, on arm64, when using
    rcu_assign_pointer(), the corresponding store instruction is a
    store-release (STLR) which has an implicit barrier. When normal assignment
    is done, a regular store (STR) is found. In the macro case, this seems to
    be a result of rcu_assign_pointer() using smp_store_release() when the
    value to write is not NULL.
    
    Link: https://lore.kernel.org/all/[email protected]/
    
    Fixes: d741bf4 ("kprobes: Remove kretprobe hash")
    Cc: [email protected]
    Signed-off-by: JP Kobryn <[email protected]>
    Acked-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    inwardvessel authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    95a4c95 View commit details
    Browse the repository at this point in the history
  23. usb: gadget: f_hid: fix report descriptor allocation

    commit 61890dc upstream.
    
    The commit 89ff3df ("usb: gadget: f_hid: fix f_hidg lifetime vs
    cdev") has introduced a bug that leads to hid device corruption after
    the replug operation.
    Reverse device managed memory allocation for the report descriptor
    to fix the issue.
    
    Tested:
    This change was tested on the AMD EthanolX CRB server with the BMC
    based on the OpenBMC distribution. The BMC provides KVM functionality
    via the USB gadget device:
    - before: KVM page refresh results in a broken USB device,
    - after: KVM page refresh works without any issues.
    
    Fixes: 89ff3df ("usb: gadget: f_hid: fix f_hidg lifetime vs cdev")
    Cc: [email protected]
    Signed-off-by: Konstantin Aladyshev <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Kostr authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    d982896 View commit details
    Browse the repository at this point in the history
  24. nvmem: Do not expect fixed layouts to grab a layout driver

    commit b7c1e53 upstream.
    
    Two series lived in parallel for some time, which led to this situation:
    - The nvmem-layout container is used for dynamic layouts
    - We now expect fixed layouts to also use the nvmem-layout container but
    this does not require any additional driver, the support is built-in the
    nvmem core.
    
    Ensure we don't refuse to probe for wrong reasons.
    
    Fixes: 27f699e ("nvmem: core: add support for fixed cells *layout*")
    Cc: [email protected]
    Reported-by: Luca Ceresoli <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Tested-by: Rafał Miłecki <[email protected]>
    Tested-by: Luca Ceresoli <[email protected]>
    Reviewed-by: Luca Ceresoli <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    miquelraynal authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    a05c646 View commit details
    Browse the repository at this point in the history
  25. serial: 8250_dw: Add ACPI ID for Granite Rapids-D UART

    commit e92fad0 upstream.
    
    Granite Rapids-D has an additional UART that is enumerated via ACPI.
    Add ACPI ID for it.
    
    Signed-off-by: Andy Shevchenko <[email protected]>
    Cc: stable <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    andy-shev authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    977a60f View commit details
    Browse the repository at this point in the history
  26. serial: ma35d1: Validate console index before assignment

    commit f0b9d97 upstream.
    
    The console is immediately assigned to the ma35d1 port without
    checking its index. This oversight can lead to out-of-bounds
    errors when the index falls outside the valid '0' to
    MA35_UART_NR range. Such scenario trigges ran error like the
    following:
    
     UBSAN: array-index-out-of-bounds in drivers/tty/serial/ma35d1_serial.c:555:51
     index -1 is out of range for type 'uart_ma35d1_port [17]
    
    Check the index before using it and bail out with a warning.
    
    Fixes: 930cbf9 ("tty: serial: Add Nuvoton ma35d1 serial driver support")
    Signed-off-by: Andi Shyti <[email protected]>
    Cc: Jacky Huang <[email protected]>
    Cc: <[email protected]> # v6.5+
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Andi Shyti authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    c88a91c View commit details
    Browse the repository at this point in the history
  27. parport: Add support for Brainboxes IX/UC/PX parallel cards

    commit 1a031f6 upstream.
    
    Adds support for Intashield IX-500/IX-550, UC-146/UC-157, PX-146/PX-157,
    PX-203 and PX-475 (LPT port)
    
    Cc: [email protected]
    Signed-off-by: Cameron Williams <[email protected]>
    Acked-by: Sudip Mukherjee <[email protected]>
    Link: https://lore.kernel.org/r/AS4PR02MB790389C130410BD864C8DCC9C4A6A@AS4PR02MB7903.eurprd02.prod.outlook.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    geekygamer01 authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    67f45db View commit details
    Browse the repository at this point in the history
  28. cifs: Fix non-availability of dedup breaking generic/304

    commit 691a41d upstream.
    
    Deduplication isn't supported on cifs, but cifs doesn't reject it, instead
    treating it as extent duplication/cloning.  This can cause generic/304 to go
    silly and run for hours on end.
    
    Fix cifs to indicate EOPNOTSUPP if REMAP_FILE_DEDUP is set in
    ->remap_file_range().
    
    Note that it's unclear whether or not commit b073a08 is meant to cause
    cifs to return an error if REMAP_FILE_DEDUP.
    
    Fixes: b073a08 ("cifs: fix that return -EINVAL when do dedupe operation")
    Cc: [email protected]
    Suggested-by: Dave Chinner <[email protected]>
    cc: Xiaoli Feng <[email protected]>
    cc: Shyam Prasad N <[email protected]>
    cc: Rohith Surabattula <[email protected]>
    cc: Jeff Layton <[email protected]>
    cc: Darrick Wong <[email protected]>
    cc: [email protected]
    cc: [email protected]
    cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]/
    Signed-off-by: David Howells <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dhowells authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    1bcb08e View commit details
    Browse the repository at this point in the history
  29. Revert "xhci: Loosen RPM as default policy to cover for AMD xHC 1.1"

    commit 24be0b3 upstream.
    
    This reverts commit 4baf121.
    
    Enabling runtime pm as default for all AMD xHC 1.1 controllers caused
    regression. An initial attempt to fix those was done in commit a5d6264
    ("xhci: Enable RPM on controllers that support low-power states") but new
    issues are still seen.
    
    Revert this to get those AMD xHC 1.1 systems working
    
    This patch went to stable an needs to be reverted from there as well.
    
    Fixes: 4baf121 ("xhci: Loosen RPM as default policy to cover for AMD xHC 1.1")
    Link: https://lore.kernel.org/linux-usb/[email protected]
    Cc: Mario Limonciello <[email protected]>
    Cc: Basavaraj Natikar <[email protected]>
    Cc: [email protected]
    Signed-off-by: Mathias Nyman <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    matnyman authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    05668be View commit details
    Browse the repository at this point in the history
  30. smb: client: fix potential NULL deref in parse_dfs_referrals()

    commit 9241433 upstream.
    
    If server returned no data for FSCTL_DFS_GET_REFERRALS, @dfs_rsp will
    remain NULL and then parse_dfs_referrals() will dereference it.
    
    Fix this by returning -EIO when no output data is returned.
    
    Besides, we can't fix it in SMB2_ioctl() as some FSCTLs are allowed to
    return no data as per MS-SMB2 2.2.32.
    
    Fixes: 9d49640 ("CIFS: implement get_dfs_refer for SMB2+")
    Cc: [email protected]
    Reported-by: Robert Morris <[email protected]>
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    5ac34ba View commit details
    Browse the repository at this point in the history
  31. usb: typec: class: fix typec_altmode_put_partner to put plugs

    commit b17b7fe upstream.
    
    When typec_altmode_put_partner is called by a plug altmode upon release,
    the port altmode the plug belongs to will not remove its reference to the
    plug. The check to see if the altmode being released evaluates against the
    released altmode's partner instead of the calling altmode itself, so change
    adev in typec_altmode_put_partner to properly refer to the altmode being
    released.
    
    typec_altmode_set_partner is not run for port altmodes, so also add a check
    in typec_altmode_release to prevent typec_altmode_put_partner() calls on
    port altmode release.
    
    Fixes: 8a37d87 ("usb: typec: Bus type for alternate modes")
    Cc: [email protected]
    Signed-off-by: RD Babiera <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    RD Babiera authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    2214c3f View commit details
    Browse the repository at this point in the history
  32. ARM: PL011: Fix DMA support

    commit 58ac1b3 upstream.
    
    Since there is no guarantee that the memory returned by
    dma_alloc_coherent() is associated with a 'struct page', using the
    architecture specific phys_to_page() is wrong, but using
    virt_to_page() would be as well.
    
    Stop using sg lists altogether and just use the *_single() functions
    instead. This also simplifies the code a bit since the scatterlists in
    this driver always have only one entry anyway.
    
    https://lore.kernel.org/lkml/[email protected]/
        Use consistent names for dma buffers
    
    gc: Add a commit log from the initial thread:
    https://lore.kernel.org/lkml/[email protected]/
        Use consistent names for dma buffers
    
    Fixes: cb06ff1 ("ARM: PL011: Add support for Rx DMA buffer polling.")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Tested-by: Gregory CLEMENT <[email protected]>
    Signed-off-by: Gregory CLEMENT <[email protected]>
    Cc: stable <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    arndb authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    c865b77 View commit details
    Browse the repository at this point in the history
  33. serial: sc16is7xx: address RX timeout interrupt errata

    commit 08ce9a1 upstream.
    
    This device has a silicon bug that makes it report a timeout interrupt
    but no data in the FIFO.
    
    The datasheet states the following in the errata section 18.1.4:
    
      "If the host reads the receive FIFO at the same time as a
      time-out interrupt condition happens, the host might read 0xCC
      (time-out) in the Interrupt Indication Register (IIR), but bit 0
      of the Line Status Register (LSR) is not set (means there is no
      data in the receive FIFO)."
    
    The errata description seems to indicate it concerns only polled mode of
    operation when reading bit 0 of the LSR register. However, tests have
    shown and NXP has confirmed that the RXLVL register also yields 0 when
    the bug is triggered, and hence the IRQ driven implementation in this
    driver is equally affected.
    
    This bug has hit us on production units and when it does, sc16is7xx_irq()
    would spin forever because sc16is7xx_port_irq() keeps seeing an
    interrupt in the IIR register that is not cleared because the driver
    does not call into sc16is7xx_handle_rx() unless the RXLVL register
    reports at least one byte in the FIFO.
    
    Fix this by always reading one byte from the FIFO when this condition
    is detected in order to clear the interrupt. This approach was
    confirmed to be correct by NXP through their support channels.
    
    Tested by: Hugo Villeneuve <[email protected]>
    
    Signed-off-by: Daniel Mack <[email protected]>
    Co-Developed-by: Maxim Popov <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    zonque authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    98b0ca9 View commit details
    Browse the repository at this point in the history
  34. serial: 8250: 8250_omap: Clear UART_HAS_RHR_IT_DIS bit

    commit 8973ab7 upstream.
    
    This fixes commit 439c718 ("serial: 8250: 8250_omap: Disable RX
    interrupt after DMA enable") which unfortunately set the
    UART_HAS_RHR_IT_DIS bit in the UART_OMAP_IER2 register and never
    cleared it.
    
    Cc: [email protected]
    Fixes: 439c718 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable")
    Signed-off-by: Ronald Wahl <[email protected]>
    Reviewed-by: Vignesh Raghavendra <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tanstafel authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    70dc9a4 View commit details
    Browse the repository at this point in the history
  35. serial: 8250: 8250_omap: Do not start RX DMA on THRI interrupt

    commit c6bb057 upstream.
    
    Starting RX DMA on THRI interrupt is too early because TX may not have
    finished yet.
    
    This change is inspired by commit 90b8596 ("serial: 8250: Prevent
    starting up DMA Rx on THRI interrupt") and fixes DMA issues I had with
    an AM62 SoC that is using the 8250 OMAP variant.
    
    Cc: [email protected]
    Fixes: c26389f ("serial: 8250: 8250_omap: Add DMA support for UARTs on K3 SoCs")
    Signed-off-by: Ronald Wahl <[email protected]>
    Reviewed-by: Vignesh Raghavendra <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tanstafel authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    a2c0b05 View commit details
    Browse the repository at this point in the history
  36. serial: 8250_omap: Add earlycon support for the AM654 UART controller

    commit 8e42c30 upstream.
    
    Currently there is no support for earlycon on the AM654 UART
    controller. This commit adds it.
    
    Signed-off-by: Ronald Wahl <[email protected]>
    Reviewed-by: Vignesh Raghavendra <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: stable <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tanstafel authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    22fdcaa View commit details
    Browse the repository at this point in the history
  37. devcoredump: Send uevent once devcd is ready

    commit af54d77 upstream.
    
    dev_coredumpm() creates a devcoredump device and adds it
    to the core kernel framework which eventually end up
    sending uevent to the user space and later creates a
    symbolic link to the failed device. An application
    running in userspace may be interested in this symbolic
    link to get the name of the failed device.
    
    In a issue scenario, once uevent sent to the user space
    it start reading '/sys/class/devcoredump/devcdX/failing_device'
    to get the actual name of the device which might not been
    created and it is in its path of creation.
    
    To fix this, suppress sending uevent till the failing device
    symbolic link gets created and send uevent once symbolic
    link is created successfully.
    
    Fixes: 833c954 ("device coredump: add new device coredump class")
    Signed-off-by: Mukesh Ojha <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Mukesh Ojha authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    7d831c6 View commit details
    Browse the repository at this point in the history
  38. x86/CPU/AMD: Check vendor in the AMD microcode callback

    commit 9b8493d upstream.
    
    Commit in Fixes added an AMD-specific microcode callback. However, it
    didn't check the CPU vendor the kernel runs on explicitly.
    
    The only reason the Zenbleed check in it didn't run on other x86 vendors
    hardware was pure coincidental luck:
    
      if (!cpu_has_amd_erratum(c, amd_zenbleed))
    	  return;
    
    gives true on other vendors because they don't have those families and
    models.
    
    However, with the removal of the cpu_has_amd_erratum() in
    
      05f5f73 ("x86/CPU/AMD: Drop now unused CPU erratum checking function")
    
    that coincidental condition is gone, leading to the zenbleed check
    getting executed on other vendors too.
    
    Add the explicit vendor check for the whole callback as it should've
    been done in the first place.
    
    Fixes: 522b1d6 ("x86/cpu/amd: Add a Zenbleed fix")
    Cc: <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bp3tk0v authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    903a1a1 View commit details
    Browse the repository at this point in the history
  39. powerpc/ftrace: Fix stack teardown in ftrace_no_trace

    commit 4b3338a upstream.
    
    Commit 41a506e ("powerpc/ftrace: Create a dummy stackframe to fix
    stack unwind") added use of a new stack frame on ftrace entry to fix
    stack unwind. However, the commit missed updating the offset used while
    tearing down the ftrace stack when ftrace is disabled. Fix the same.
    
    In addition, the commit missed saving the correct stack pointer in
    pt_regs. Update the same.
    
    Fixes: 41a506e ("powerpc/ftrace: Create a dummy stackframe to fix stack unwind")
    Cc: [email protected] # v6.5+
    Signed-off-by: Naveen N Rao <[email protected]>
    Signed-off-by: Michael Ellerman <[email protected]>
    Link: https://msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rnav authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    fd72844 View commit details
    Browse the repository at this point in the history
  40. USB: gadget: core: adjust uevent timing on gadget unbind

    commit 73ea73a upstream.
    
    The KOBJ_CHANGE uevent is sent before gadget unbind is actually
    executed, resulting in inaccurate uevent emitted at incorrect timing
    (the uevent would have USB_UDC_DRIVER variable set while it would
    soon be removed).
    Move the KOBJ_CHANGE uevent to the end of the unbind function so that
    uevent is sent only after the change has been made.
    
    Fixes: 2ccea03 ("usb: gadget: introduce UDC Class")
    Cc: [email protected]
    Signed-off-by: Roy Luo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Roy Luo authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    9a3e020 View commit details
    Browse the repository at this point in the history
  41. cifs: Fix flushing, invalidation and file size with copy_file_range()

    commit 7b2404a upstream.
    
    Fix a number of issues in the cifs filesystem implementation of the
    copy_file_range() syscall in cifs_file_copychunk_range().
    
    Firstly, the invalidation of the destination range is handled incorrectly:
    We shouldn't just invalidate the whole file as dirty data in the file may
    get lost and we can't just call truncate_inode_pages_range() to invalidate
    the destination range as that will erase parts of a partial folio at each
    end whilst invalidating and discarding all the folios in the middle.  We
    need to force all the folios covering the range to be reloaded, but we
    mustn't lose dirty data in them that's not in the destination range.
    
    Further, we shouldn't simply round out the range to PAGE_SIZE at each end
    as cifs should move to support multipage folios.
    
    Secondly, there's an issue whereby a write may have extended the file
    locally, but not have been written back yet.  This can leaves the local
    idea of the EOF at a later point than the server's EOF.  If a copy request
    is issued, this will fail on the server with STATUS_INVALID_VIEW_SIZE
    (which gets translated to -EIO locally) if the copy source extends past the
    server's EOF.
    
    Fix this by:
    
     (0) Flush the source region (already done).  The flush does nothing and
         the EOF isn't moved if the source region has no dirty data.
    
     (1) Move the EOF to the end of the source region if it isn't already at
         least at this point.  If we can't do this, for instance if the server
         doesn't support it, just flush the entire source file.
    
     (2) Find the folio (if present) at each end of the range, flushing it and
         increasing the region-to-be-invalidated to cover those in their
         entirety.
    
     (3) Fully discard all the folios covering the range as we want them to be
         reloaded.
    
     (4) Then perform the copy.
    
    Thirdly, set i_size after doing the copychunk_range operation as this value
    may be used by various things internally.  stat() hides the issue because
    setting ->time to 0 causes cifs_getatr() to revalidate the attributes.
    
    These were causing the generic/075 xfstest to fail.
    
    Fixes: 620d874 ("Introduce cifs_copy_file_range()")
    Cc: [email protected]
    Signed-off-by: David Howells <[email protected]>
    cc: Paulo Alcantara <[email protected]>
    cc: Shyam Prasad N <[email protected]>
    cc: Rohith Surabattula <[email protected]>
    cc: Matthew Wilcox <[email protected]>
    cc: Jeff Layton <[email protected]>
    cc: [email protected]
    cc: [email protected]
    Signed-off-by: David Howells <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dhowells authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    63c80f5 View commit details
    Browse the repository at this point in the history
  42. cifs: Fix flushing, invalidation and file size with FICLONE

    commit c54fc3a upstream.
    
    Fix a number of issues in the cifs filesystem implementation of the FICLONE
    ioctl in cifs_remap_file_range().  This is analogous to the previously
    fixed bug in cifs_file_copychunk_range() and can share the helper
    functions.
    
    Firstly, the invalidation of the destination range is handled incorrectly:
    We shouldn't just invalidate the whole file as dirty data in the file may
    get lost and we can't just call truncate_inode_pages_range() to invalidate
    the destination range as that will erase parts of a partial folio at each
    end whilst invalidating and discarding all the folios in the middle.  We
    need to force all the folios covering the range to be reloaded, but we
    mustn't lose dirty data in them that's not in the destination range.
    
    Further, we shouldn't simply round out the range to PAGE_SIZE at each end
    as cifs should move to support multipage folios.
    
    Secondly, there's an issue whereby a write may have extended the file
    locally, but not have been written back yet.  This can leaves the local
    idea of the EOF at a later point than the server's EOF.  If a clone request
    is issued, this will fail on the server with STATUS_INVALID_VIEW_SIZE
    (which gets translated to -EIO locally) if the clone source extends past
    the server's EOF.
    
    Fix this by:
    
     (0) Flush the source region (already done).  The flush does nothing and
         the EOF isn't moved if the source region has no dirty data.
    
     (1) Move the EOF to the end of the source region if it isn't already at
         least at this point.  If we can't do this, for instance if the server
         doesn't support it, just flush the entire source file.
    
     (2) Find the folio (if present) at each end of the range, flushing it and
         increasing the region-to-be-invalidated to cover those in their
         entirety.
    
     (3) Fully discard all the folios covering the range as we want them to be
         reloaded.
    
     (4) Then perform the extent duplication.
    
    Thirdly, set i_size after doing the duplicate_extents operation as this
    value may be used by various things internally.  stat() hides the issue
    because setting ->time to 0 causes cifs_getatr() to revalidate the
    attributes.
    
    These were causing the cifs/001 xfstest to fail.
    
    Fixes: 04b38d6 ("vfs: pull btrfs clone API to vfs layer")
    Signed-off-by: David Howells <[email protected]>
    Cc: [email protected]
    cc: Christoph Hellwig <[email protected]>
    cc: Paulo Alcantara <[email protected]>
    cc: Shyam Prasad N <[email protected]>
    cc: Rohith Surabattula <[email protected]>
    cc: Matthew Wilcox <[email protected]>
    cc: Jeff Layton <[email protected]>
    cc: [email protected]
    cc: [email protected]
    Signed-off-by: David Howells <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    dhowells authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    4380135 View commit details
    Browse the repository at this point in the history
  43. MIPS: kernel: Clear FPU states when setting up kernel threads

    commit a58a173 upstream.
    
    io_uring sets up the io worker kernel thread via a syscall out of an
    user space prrocess. This process might have used FPU and since
    copy_thread() didn't clear FPU states for kernel threads a BUG()
    is triggered for using FPU inside kernel. Move code around
    to always clear FPU state for user and kernel threads.
    
    Cc: [email protected]
    Reported-by: Aurelien Jarno <[email protected]>
    Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055021
    Suggested-by: Jiaxun Yang <[email protected]>
    Reviewed-by: Jiaxun Yang <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tsbogend authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    6d9cbae View commit details
    Browse the repository at this point in the history
  44. KVM: s390/mm: Properly reset no-dat

    commit 27072b8 upstream.
    
    When the CMMA state needs to be reset, the no-dat bit also needs to be
    reset. Failure to do so could cause issues in the guest, since the
    guest expects the bit to be cleared after a reset.
    
    Cc: <[email protected]>
    Reviewed-by: Nico Boehr <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Claudio Imbrenda <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Claudio Imbrenda authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    bb356cc View commit details
    Browse the repository at this point in the history
  45. KVM: SVM: Update EFER software model on CR0 trap for SEV-ES

    commit 4cdf351 upstream.
    
    In general, activating long mode involves setting the EFER_LME bit in
    the EFER register and then enabling the X86_CR0_PG bit in the CR0
    register. At this point, the EFER_LMA bit will be set automatically by
    hardware.
    
    In the case of SVM/SEV guests where writes to CR0 are intercepted, it's
    necessary for the host to set EFER_LMA on behalf of the guest since
    hardware does not see the actual CR0 write.
    
    In the case of SEV-ES guests where writes to CR0 are trapped instead of
    intercepted, the hardware *does* see/record the write to CR0 before
    exiting and passing the value on to the host, so as part of enabling
    SEV-ES support commit f1c6366 ("KVM: SVM: Add required changes to
    support intercepts under SEV-ES") dropped special handling of the
    EFER_LMA bit with the understanding that it would be set automatically.
    
    However, since the guest never explicitly sets the EFER_LMA bit, the
    host never becomes aware that it has been set. This becomes problematic
    when userspace tries to get/set the EFER values via
    KVM_GET_SREGS/KVM_SET_SREGS, since the EFER contents tracked by the host
    will be missing the EFER_LMA bit, and when userspace attempts to pass
    the EFER value back via KVM_SET_SREGS it will fail a sanity check that
    asserts that EFER_LMA should always be set when X86_CR0_PG and EFER_LME
    are set.
    
    Fix this by always inferring the value of EFER_LMA based on X86_CR0_PG
    and EFER_LME, regardless of whether or not SEV-ES is enabled.
    
    Fixes: f1c6366 ("KVM: SVM: Add required changes to support intercepts under SEV-ES")
    Reported-by: Peter Gonda <[email protected]>
    Cc: [email protected]
    Signed-off-by: Sean Christopherson <[email protected]>
    Message-Id: <[email protected]>
    [A two year old patch that was revived after we noticed the failure in
     KVM_SET_SREGS and a similar patch was posted by Michael Roth.  This is
     Sean's patch, but with Michael's more complete commit message. - Paolo]
    Signed-off-by: Paolo Bonzini <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sean-jc authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    dea8cfe View commit details
    Browse the repository at this point in the history
  46. perf list: Fix JSON segfault by setting the used skip_duplicate_pmus …

    …callback
    
    commit b169374 upstream.
    
    Json output didn't set the skip_duplicate_pmus callback yielding a
    segfault.
    
    Fixes: cd4e1ef ("perf pmus: Skip duplicate PMUs and don't print list suffix by default")
    Signed-off-by: Ian Rogers <[email protected]>
    Cc: James Clark <[email protected]>
    Cc: Kan Liang <[email protected]>
    Cc: Athira Rajeev <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    [namhyung: updated subject line according to Arnaldo]
    Signed-off-by: Namhyung Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    captain5050 authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    1f4d4d2 View commit details
    Browse the repository at this point in the history
  47. perf metrics: Avoid segv if default metricgroup isn't set

    commit e2b005d upstream.
    
    A metric is default by having "Default" within its groups. The default
    metricgroup name needn't be set and this can result in segv in
    default_metricgroup_cmp and perf_stat__print_shadow_stats_metricgroup
    that assume it has a value when there is a Default metric group. To
    avoid the segv initialize the value to "".
    
    Fixes: 1c0e479 ("perf metrics: Sort the Default metricgroup")
    Signed-off-by: Ian Rogers <[email protected]>
    Reviewed-and-tested-by: Ilkka Koskinen <[email protected]>
    Cc: James Clark <[email protected]>
    Cc: Will Deacon <[email protected]>
    Cc: Leo Yan <[email protected]>
    Cc: Mike Leach <[email protected]>
    Cc: Kajol Jain <[email protected]>
    Cc: Kan Liang <[email protected]>
    Cc: John Garry <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Namhyung Kim <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    captain5050 authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    114d0e5 View commit details
    Browse the repository at this point in the history
  48. MIPS: Loongson64: Reserve vgabios memory on boot

    commit 8f7aa77 upstream.
    
    vgabios is passed from firmware to kernel on Loongson64 systems.
    Sane firmware will keep this pointer in reserved memory space
    passed from the firmware but insane firmware keeps it in low
    memory before kernel entry that is not reserved.
    
    Previously kernel won't try to allocate memory from low memory
    before kernel entry on boot, but after converting to memblock
    it will do that.
    
    Fix by resversing those memory on early boot.
    
    Cc: [email protected]
    Fixes: a94e4f2 ("MIPS: init: Drop boot_mem_map")
    Signed-off-by: Jiaxun Yang <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    FlyGoat authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    ae07e7d View commit details
    Browse the repository at this point in the history
  49. MIPS: Loongson64: Handle more memory types passed from firmware

    commit c7206e7 upstream.
    
    There are many types of revsered memory passed from firmware
    that should be reserved in memblock, and UMA memory passed
    from firmware that should be added to system memory for system
    to use.
    
    Also for memblock there is no need to align those space into page,
    which actually cause problems.
    
    Handle them properly to prevent memory corruption on some systems.
    
    Cc: [email protected]
    Signed-off-by: Jiaxun Yang <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    FlyGoat authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    264927e View commit details
    Browse the repository at this point in the history
  50. MIPS: Loongson64: Enable DMA noncoherent support

    commit edc0378 upstream.
    
    There are some Loongson64 systems come with broken coherent DMA
    support, firmware will set a bit in boot_param and pass nocoherentio
    in cmdline.
    
    However nonconherent support was missed out when spin off Loongson-2EF
    form Loongson64, and that boot_param change never made itself into
    upstream.
    
    Support DMA noncoherent properly to get those systems working.
    
    Cc: [email protected]
    Fixes: 71e2f4d ("MIPS: Fork loongson2ef from loongson64")
    Signed-off-by: Jiaxun Yang <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    FlyGoat authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    1eed445 View commit details
    Browse the repository at this point in the history
  51. netfilter: nft_set_pipapo: skip inactive elements during set walk

    commit 317eb96 upstream.
    
    Otherwise set elements can be deactivated twice which will cause a crash.
    
    Reported-by: Xingyuan Mo <[email protected]>
    Fixes: 3c4287f ("nf_tables: Add set type for arbitrary concatenation of ranges")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Florian Westphal authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    c66d39f View commit details
    Browse the repository at this point in the history
  52. ASoC: qcom: sc8280xp: Limit speaker digital volumes

    commit 716d4e5 upstream.
    
    Limit the speaker digital gains to 0dB so that the users will not damage them.
    Currently there is a limit in UCM, but this does not stop the user form
    changing the digital gains from command line. So limit this in driver
    which makes the speakers more safer without active speaker protection in
    place.
    
    Signed-off-by: Srinivas Kandagatla <[email protected]>
    Reviewed-by: Johan Hovold <[email protected]>
    Tested-by: Johan Hovold <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    [ johan: backport to 6.6; rename snd_soc_rtd_to_cpu() ]
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Srinivas-Kandagatla authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    ba6e4b9 View commit details
    Browse the repository at this point in the history
  53. gcc-plugins: randstruct: Update code comment in relayout_struct()

    commit d71f223 upstream.
    
    Update code comment to clarify that the only element whose layout is
    not randomized is a proper C99 flexible-array member. This update is
    complementary to commit 1ee6035 ("gcc-plugins: randstruct: Only
    warn about true flexible arrays")
    
    Signed-off-by: "Gustavo A. R. Silva" <[email protected]>
    Link: https://lore.kernel.org/r/ZWJr2MWDjXLHE8ap@work
    Fixes: 1ee6035 ("gcc-plugins: randstruct: Only warn about true flexible arrays")
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    GustavoARSilva authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    b79210f View commit details
    Browse the repository at this point in the history
  54. riscv: Kconfig: Add select ARM_AMBA to SOC_STARFIVE

    commit 78a03b9 upstream.
    
    Selects ARM_AMBA platform support for StarFive SoCs required by spi and
    crypto dma engine.
    
    Signed-off-by: Jia Jie Ho <[email protected]>
    Acked-by: Palmer Dabbelt <[email protected]>
    Signed-off-by: Conor Dooley <[email protected]>
    Cc: Nam Cao <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jiajieho authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    48411bc View commit details
    Browse the repository at this point in the history
  55. drm/amdgpu: Fix refclk reporting for SMU v13.0.6

    [ Upstream commit 6b7d211 ]
    
    SMU v13.0.6 SOCs have 100MHz reference clock.
    
    Signed-off-by: Lijo Lazar <[email protected]>
    Reviewed-by: Hawking Zhang <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Stable-dep-of: 6fce23a ("drm/amdgpu: Restrict extended wait to PSP v13.0.6")
    Signed-off-by: Sasha Levin <[email protected]>
    Lijo Lazar authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    bebe0c0 View commit details
    Browse the repository at this point in the history
  56. drm/amdgpu: update retry times for psp BL wait

    [ Upstream commit d8c1925 ]
    
    Increase retry time for PSP BL wait, to compensate
    for longer time to set c2pmsg 35 ready bit during
    mode1 with RAS
    
    Signed-off-by: Asad Kamal <[email protected]>
    Reviewed-by: Hawking Zhang <[email protected]>
    Reviewed-by: Lijo Lazar <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Stable-dep-of: 6fce23a ("drm/amdgpu: Restrict extended wait to PSP v13.0.6")
    Signed-off-by: Sasha Levin <[email protected]>
    Asad Kamal authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    9f29fe9 View commit details
    Browse the repository at this point in the history
  57. drm/amdgpu: Restrict extended wait to PSP v13.0.6

    [ Upstream commit 6fce23a ]
    
    Only PSPv13.0.6 SOCs take a longer time to reach steady state. Other
    PSPv13 based SOCs don't need extended wait. Also, reduce PSPv13.0.6 wait
    time.
    
    Cc: [email protected]
    Fixes: fc59889 ("drm/amdgpu: update retry times for psp vmbx wait")
    Fixes: d8c1925 ("drm/amdgpu: update retry times for psp BL wait")
    Link: https://lore.kernel.org/amd-gfx/[email protected]/
    Signed-off-by: Lijo Lazar <[email protected]>
    Reviewed-by: Asad Kamal <[email protected]>
    Reviewed-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Lijo Lazar authored and gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    71a1ffe View commit details
    Browse the repository at this point in the history
  58. Linux 6.6.7

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Ronald Warsow <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Kelsey Steele <[email protected]>
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Conor Dooley <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Tested-by: Justin M. Forbes <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Ricardo B. Marliere <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    ac25535 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2023

  1. r8152: add vendor/device ID pair for ASUS USB-C2500

    [ Upstream commit 7037d95 ]
    
    The ASUS USB-C2500 is an RTL8156 based 2.5G Ethernet controller.
    
    Add the vendor and product ID values to the driver. This makes Ethernet
    work with the adapter.
    
    Signed-off-by: Kelly Kane <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    h110hawk authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    da94fb0 View commit details
    Browse the repository at this point in the history
  2. ext4: fix warning in ext4_dio_write_end_io()

    [ Upstream commit 619f75d ]
    
    The syzbot has reported that it can hit the warning in
    ext4_dio_write_end_io() because i_size < i_disksize. Indeed the
    reproducer creates a race between DIO IO completion and truncate
    expanding the file and thus ext4_dio_write_end_io() sees an inconsistent
    inode state where i_disksize is already updated but i_size is not
    updated yet. Since we are careful when setting up DIO write and consider
    it extending (and thus performing the IO synchronously with i_rwsem held
    exclusively) whenever it goes past either of i_size or i_disksize, we
    can use the same test during IO completion without risking entering
    ext4_handle_inode_extension() without i_rwsem held. This way we make it
    obvious both i_size and i_disksize are large enough when we report DIO
    completion without relying on unreliable WARN_ON.
    
    Reported-by:  <[email protected]>
    Fixes: 9156289 ("ext4: properly sync file size update after O_SYNC direct IO")
    Signed-off-by: Jan Kara <[email protected]>
    Reviewed-by: Ritesh Harjani (IBM) <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jankara authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    73dddf9 View commit details
    Browse the repository at this point in the history
  3. ksmbd: fix memory leak in smb2_lock()

    [ Upstream commit 8f17527 ]
    
    In smb2_lock(), if setup_async_work() executes successfully,
    work->cancel_argv will bind the argv that generated by kmalloc(). And
    release_async_work() is called in ksmbd_conn_try_dequeue_request() or
    smb2_lock() to release argv.
    However, when setup_async_work function fails, work->cancel_argv has not
    been bound to the argv, resulting in the previously allocated argv not
    being released. Call kfree() to fix it.
    
    Fixes: e2f3448 ("cifsd: add server-side procedures for SMB3")
    Signed-off-by: Zizhi Wo <[email protected]>
    Acked-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Zizhi Wo authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    809d50d View commit details
    Browse the repository at this point in the history
  4. efi/x86: Avoid physical KASLR on older Dell systems

    [ Upstream commit 50d7cdf ]
    
    River reports boot hangs with v6.6 and v6.7, and the bisect points to
    commit
    
      a1b87d5 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
    
    which moves the memory allocation and kernel decompression from the
    legacy decompressor (which executes *after* ExitBootServices()) to the
    EFI stub, using boot services for allocating the memory. The memory
    allocation succeeds but the subsequent call to decompress_kernel() never
    returns, resulting in a failed boot and a hanging system.
    
    As it turns out, this issue only occurs when physical address
    randomization (KASLR) is enabled, and given that this is a feature we
    can live without (virtual KASLR is much more important), let's disable
    the physical part of KASLR when booting on AMI UEFI firmware claiming to
    implement revision v2.0 of the specification (which was released in
    2006), as this is the version these systems advertise.
    
    Fixes: a1b87d5 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218173
    Signed-off-by: Ard Biesheuvel <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ardbiesheuvel authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    800f84d View commit details
    Browse the repository at this point in the history
  5. afs: Fix refcount underflow from error handling race

    [ Upstream commit 52bf9f6 ]
    
    If an AFS cell that has an unreachable (eg. ENETUNREACH) server listed (VL
    server or fileserver), an asynchronous probe to one of its addresses may
    fail immediately because sendmsg() returns an error.  When this happens, a
    refcount underflow can happen if certain events hit a very small window.
    
    The way this occurs is:
    
     (1) There are two levels of "call" object, the afs_call and the
         rxrpc_call.  Each of them can be transitioned to a "completed" state
         in the event of success or failure.
    
     (2) Asynchronous afs_calls are self-referential whilst they are active to
         prevent them from evaporating when they're not being processed.  This
         reference is disposed of when the afs_call is completed.
    
         Note that an afs_call may only be completed once; once completed
         completing it again will do nothing.
    
     (3) When a call transmission is made, the app-side rxrpc code queues a Tx
         buffer for the rxrpc I/O thread to transmit.  The I/O thread invokes
         sendmsg() to transmit it - and in the case of failure, it transitions
         the rxrpc_call to the completed state.
    
     (4) When an rxrpc_call is completed, the app layer is notified.  In this
         case, the app is kafs and it schedules a work item to process events
         pertaining to an afs_call.
    
     (5) When the afs_call event processor is run, it goes down through the
         RPC-specific handler to afs_extract_data() to retrieve data from rxrpc
         - and, in this case, it picks up the error from the rxrpc_call and
         returns it.
    
         The error is then propagated to the afs_call and that is completed
         too.  At this point the self-reference is released.
    
     (6) If the rxrpc I/O thread manages to complete the rxrpc_call within the
         window between rxrpc_send_data() queuing the request packet and
         checking for call completion on the way out, then
         rxrpc_kernel_send_data() will return the error from sendmsg() to the
         app.
    
     (7) Then afs_make_call() will see an error and will jump to the error
         handling path which will attempt to clean up the afs_call.
    
     (8) The problem comes when the error handling path in afs_make_call()
         tries to unconditionally drop an async afs_call's self-reference.
         This self-reference, however, may already have been dropped by
         afs_extract_data() completing the afs_call
    
     (9) The refcount underflows when we return to afs_do_probe_vlserver() and
         that tries to drop its reference on the afs_call.
    
    Fix this by making afs_make_call() attempt to complete the afs_call rather
    than unconditionally putting it.  That way, if afs_extract_data() manages
    to complete the call first, afs_make_call() won't do anything.
    
    The bug can be forced by making do_udp_sendmsg() return -ENETUNREACH and
    sticking an msleep() in rxrpc_send_data() after the 'success:' label to
    widen the race window.
    
    The error message looks something like:
    
        refcount_t: underflow; use-after-free.
        WARNING: CPU: 3 PID: 720 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110
        ...
        RIP: 0010:refcount_warn_saturate+0xba/0x110
        ...
        afs_put_call+0x1dc/0x1f0 [kafs]
        afs_fs_get_capabilities+0x8b/0xe0 [kafs]
        afs_fs_probe_fileserver+0x188/0x1e0 [kafs]
        afs_lookup_server+0x3bf/0x3f0 [kafs]
        afs_alloc_server_list+0x130/0x2e0 [kafs]
        afs_create_volume+0x162/0x400 [kafs]
        afs_get_tree+0x266/0x410 [kafs]
        vfs_get_tree+0x25/0xc0
        fc_mount+0xe/0x40
        afs_d_automount+0x1b3/0x390 [kafs]
        __traverse_mounts+0x8f/0x210
        step_into+0x340/0x760
        path_openat+0x13a/0x1260
        do_filp_open+0xaf/0x160
        do_sys_openat2+0xaf/0x170
    
    or something like:
    
        refcount_t: underflow; use-after-free.
        ...
        RIP: 0010:refcount_warn_saturate+0x99/0xda
        ...
        afs_put_call+0x4a/0x175
        afs_send_vl_probes+0x108/0x172
        afs_select_vlserver+0xd6/0x311
        afs_do_cell_detect_alias+0x5e/0x1e9
        afs_cell_detect_alias+0x44/0x92
        afs_validate_fc+0x9d/0x134
        afs_get_tree+0x20/0x2e6
        vfs_get_tree+0x1d/0xc9
        fc_mount+0xe/0x33
        afs_d_automount+0x48/0x9d
        __traverse_mounts+0xe0/0x166
        step_into+0x140/0x274
        open_last_lookups+0x1c1/0x1df
        path_openat+0x138/0x1c3
        do_filp_open+0x55/0xb4
        do_sys_openat2+0x6c/0xb6
    
    Fixes: 34fa476 ("afs: Fix race in async call refcounting")
    Reported-by: Bill MacAllister <[email protected]>
    Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052304
    Suggested-by: Jeffrey E Altman <[email protected]>
    Signed-off-by: David Howells <[email protected]>
    Reviewed-by: Jeffrey Altman <[email protected]>
    cc: Marc Dionne <[email protected]>
    cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]/ # v1
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dhowells authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    8715fe2 View commit details
    Browse the repository at this point in the history
  6. HID: lenovo: Restrict detection of patched firmware only to USB cptkbd

    [ Upstream commit 43527a0 ]
    
    Commit 46a0a2c ("HID: lenovo: Detect quirk-free fw on cptkbd and
    stop applying workaround") introduced a regression for ThinkPad
    TrackPoint Keyboard II which has similar quirks to cptkbd (so it uses
    the same workarounds) but slightly different so that there are
    false-positives during detecting well-behaving firmware. This commit
    restricts detecting well-behaving firmware to the only model which
    known to have one and have stable enough quirks to not cause
    false-positives.
    
    Fixes: 46a0a2c ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround")
    Link: https://lore.kernel.org/linux-input/ZXRiiPsBKNasioqH@jekhomev/
    Link: https://bbs.archlinux.org/viewtopic.php?pid=2135468#p2135468
    Signed-off-by: Mikhail Khvainitski <[email protected]>
    Tested-by: Yauhen Kharuzhy <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    m-khvoinitsky authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b89b7c7 View commit details
    Browse the repository at this point in the history
  7. net/mlx5e: Honor user choice of IPsec replay window size

    [ Upstream commit a5e400a ]
    
    Users can configure IPsec replay window size, but mlx5 driver didn't
    honor their choice and set always 32bits. Fix assignment logic to
    configure right size from the beginning.
    
    Fixes: 7db21ef ("net/mlx5e: Set IPsec replay sequence numbers")
    Reviewed-by: Patrisious Haddad <[email protected]>
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rleon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    17e600e View commit details
    Browse the repository at this point in the history
  8. net/mlx5e: Ensure that IPsec sequence packet number starts from 1

    [ Upstream commit 3d42c8c ]
    
    According to RFC4303, section "3.3.3. Sequence Number Generation",
    the first packet sent using a given SA will contain a sequence
    number of 1.
    
    However if user didn't set seq/oseq, the HW used zero as first sequence
    packet number. Such misconfiguration causes to drop of first packet
    if replay window protection was enabled in SA.
    
    To fix it, set sequence number to be at least 1.
    
    Fixes: 7db21ef ("net/mlx5e: Set IPsec replay sequence numbers")
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rleon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    80299a1 View commit details
    Browse the repository at this point in the history
  9. net/mlx5e: Unify esw and normal IPsec status table creation/destruction

    [ Upstream commit 94af50c ]
    
    Change normal IPsec flow to use the same creation/destruction functions
    for status flow table as that of ESW, which first of all refines the
    code to have less code duplication.
    
    And more importantly, the ESW status table handles IPsec syndrome
    checks at steering by HW, which is more efficient than the previous
    behaviour we had where it was copied to WQE meta data and checked
    by the driver.
    
    Fixes: 1762f13 ("net/mlx5e: Support IPsec packet offload for RX in switchdev mode")
    Signed-off-by: Patrisious Haddad <[email protected]>
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    PatrisiousHaddad authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    20af7af View commit details
    Browse the repository at this point in the history
  10. net/mlx5e: Tidy up IPsec NAT-T SA discovery

    [ Upstream commit c2bf84f ]
    
    IPsec NAT-T packets are UDP encapsulated packets over ESP normal ones.
    In case they arrive to RX, the SPI and ESP are located in inner header,
    while the check was performed on outer header instead.
    
    That wrong check caused to the situation where received rekeying request
    was missed and caused to rekey timeout, which "compensated" this failure
    by completing rekeying.
    
    Fixes: d659549 ("net/mlx5e: Support IPsec NAT-T functionality")
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rleon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    1a0d0e9 View commit details
    Browse the repository at this point in the history
  11. net/mlx5e: Reduce eswitch mode_lock protection context

    [ Upstream commit baac835 ]
    
    Currently eswitch mode_lock is so heavy, for example, it's locked
    during the whole process of the mode change, which may need to hold
    other locks. As the mode_lock is also used by IPSec to block mode and
    encap change now, it is easy to cause lock dependency.
    
    Since some of protections are also done by devlink lock, the eswitch
    mode_lock is not needed at those places, and thus the possibility of
    lockdep issue is reduced.
    
    Fixes: c8e350e ("net/mlx5e: Make TC and IPsec offloads mutually exclusive on a netdev")
    Signed-off-by: Jianbo Liu <[email protected]>
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jianbo Liu authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    594a306 View commit details
    Browse the repository at this point in the history
  12. net/mlx5e: Check the number of elements before walk TC rhashtable

    [ Upstream commit 4e25b66 ]
    
    After IPSec TX tables are destroyed, the flow rules in TC rhashtable,
    which have the destination to IPSec, are restored to the original
    one, the uplink.
    
    However, when the device is in switchdev mode and unload driver with
    IPSec rules configured, TC rhashtable cleanup is done before IPSec
    cleanup, which means tc_ht->tbl is already freed when walking TC
    rhashtable, in order to restore the destination. So add the checking
    before walking to avoid unexpected behavior.
    
    Fixes: d156953 ("net/mlx5e: Modify and restore TC rules for IPSec TX rules")
    Signed-off-by: Jianbo Liu <[email protected]>
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jianbo Liu authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4a95f41 View commit details
    Browse the repository at this point in the history
  13. RDMA/mlx5: Send events from IB driver about device affiliation state

    [ Upstream commit 0d29371 ]
    
    Send blocking events from IB driver whenever the device is done being
    affiliated or if it is removed from an affiliation.
    
    This is useful since now the EN driver can register to those event and
    know when a device is affiliated or not.
    
    Signed-off-by: Patrisious Haddad <[email protected]>
    Reviewed-by: Mark Bloch <[email protected]>
    Link: https://lore.kernel.org/r/a7491c3e483cfd8d962f5f75b9a25f253043384a.1695296682.git.leon@kernel.org
    Signed-off-by: Leon Romanovsky <[email protected]>
    Stable-dep-of: 762a55a ("net/mlx5e: Disable IPsec offload support if not FW steering")
    Signed-off-by: Sasha Levin <[email protected]>
    PatrisiousHaddad authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    fdd350f View commit details
    Browse the repository at this point in the history
  14. net/mlx5e: Disable IPsec offload support if not FW steering

    [ Upstream commit 762a55a ]
    
    IPsec FDB offload can only work with FW steering as of now,
    disable the cap upon non FW steering.
    
    And since the IPSec cap is dynamic now based on steering mode.
    Cleanup the resources if they exist instead of checking the
    IPsec cap again.
    
    Fixes: edd8b29 ("Merge branch 'mlx5-ipsec-packet-offload-support-in-eswitch-mode'")
    Signed-off-by: Chris Mi <[email protected]>
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Chris Mi authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    7e46db5 View commit details
    Browse the repository at this point in the history
  15. net/mlx5e: Fix possible deadlock on mlx5e_tx_timeout_work

    [ Upstream commit eab0da3 ]
    
    Due to the cited patch, devlink health commands take devlink lock and
    this may result in deadlock for mlx5e_tx_reporter as it takes local
    state_lock before calling devlink health report and on the other hand
    devlink health commands such as diagnose for same reporter take local
    state_lock after taking devlink lock (see kernel log below).
    
    To fix it, remove local state_lock from mlx5e_tx_timeout_work() before
    calling devlink_health_report() and take care to cancel the work before
    any call to close channels, which may free the SQs that should be
    handled by the work. Before cancel_work_sync(), use current_work() to
    check we are not calling it from within the work, as
    mlx5e_tx_timeout_work() itself may close the channels and reopen as part
    of recovery flow.
    
    While removing state_lock from mlx5e_tx_timeout_work() keep rtnl_lock to
    ensure no change in netdev->real_num_tx_queues, but use rtnl_trylock()
    and a flag to avoid deadlock by calling cancel_work_sync() before
    closing the channels while holding rtnl_lock too.
    
    Kernel log:
    ======================================================
    WARNING: possible circular locking dependency detected
    6.0.0-rc3_for_upstream_debug_2022_08_30_13_10 #1 Not tainted
    ------------------------------------------------------
    kworker/u16:2/65 is trying to acquire lock:
    ffff888122f6c2f8 (&devlink->lock_key#2){+.+.}-{3:3}, at: devlink_health_report+0x2f1/0x7e0
    
    but task is already holding lock:
    ffff888121d20be0 (&priv->state_lock){+.+.}-{3:3}, at: mlx5e_tx_timeout_work+0x70/0x280 [mlx5_core]
    
    which lock already depends on the new lock.
    
    the existing dependency chain (in reverse order) is:
    
    -> #1 (&priv->state_lock){+.+.}-{3:3}:
           __mutex_lock+0x12c/0x14b0
           mlx5e_rx_reporter_diagnose+0x71/0x700 [mlx5_core]
           devlink_nl_cmd_health_reporter_diagnose_doit+0x212/0xa50
           genl_family_rcv_msg_doit+0x1e9/0x2f0
           genl_rcv_msg+0x2e9/0x530
           netlink_rcv_skb+0x11d/0x340
           genl_rcv+0x24/0x40
           netlink_unicast+0x438/0x710
           netlink_sendmsg+0x788/0xc40
           sock_sendmsg+0xb0/0xe0
           __sys_sendto+0x1c1/0x290
           __x64_sys_sendto+0xdd/0x1b0
           do_syscall_64+0x3d/0x90
           entry_SYSCALL_64_after_hwframe+0x46/0xb0
    
    -> #0 (&devlink->lock_key#2){+.+.}-{3:3}:
           __lock_acquire+0x2c8a/0x6200
           lock_acquire+0x1c1/0x550
           __mutex_lock+0x12c/0x14b0
           devlink_health_report+0x2f1/0x7e0
           mlx5e_health_report+0xc9/0xd7 [mlx5_core]
           mlx5e_reporter_tx_timeout+0x2ab/0x3d0 [mlx5_core]
           mlx5e_tx_timeout_work+0x1c1/0x280 [mlx5_core]
           process_one_work+0x7c2/0x1340
           worker_thread+0x59d/0xec0
           kthread+0x28f/0x330
           ret_from_fork+0x1f/0x30
    
    other info that might help us debug this:
    
     Possible unsafe locking scenario:
    
           CPU0                    CPU1
           ----                    ----
      lock(&priv->state_lock);
                                   lock(&devlink->lock_key#2);
                                   lock(&priv->state_lock);
      lock(&devlink->lock_key#2);
    
     *** DEADLOCK ***
    
    4 locks held by kworker/u16:2/65:
     #0: ffff88811a55b138 ((wq_completion)mlx5e#2){+.+.}-{0:0}, at: process_one_work+0x6e2/0x1340
     #1: ffff888101de7db8 ((work_completion)(&priv->tx_timeout_work)){+.+.}-{0:0}, at: process_one_work+0x70f/0x1340
     #2: ffffffff84ce8328 (rtnl_mutex){+.+.}-{3:3}, at: mlx5e_tx_timeout_work+0x53/0x280 [mlx5_core]
     #3: ffff888121d20be0 (&priv->state_lock){+.+.}-{3:3}, at: mlx5e_tx_timeout_work+0x70/0x280 [mlx5_core]
    
    stack backtrace:
    CPU: 1 PID: 65 Comm: kworker/u16:2 Not tainted 6.0.0-rc3_for_upstream_debug_2022_08_30_13_10 #1
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    Workqueue: mlx5e mlx5e_tx_timeout_work [mlx5_core]
    Call Trace:
     <TASK>
     dump_stack_lvl+0x57/0x7d
     check_noncircular+0x278/0x300
     ? print_circular_bug+0x460/0x460
     ? find_held_lock+0x2d/0x110
     ? __stack_depot_save+0x24c/0x520
     ? alloc_chain_hlocks+0x228/0x700
     __lock_acquire+0x2c8a/0x6200
     ? register_lock_class+0x1860/0x1860
     ? kasan_save_stack+0x1e/0x40
     ? kasan_set_free_info+0x20/0x30
     ? ____kasan_slab_free+0x11d/0x1b0
     ? kfree+0x1ba/0x520
     ? devlink_health_do_dump.part.0+0x171/0x3a0
     ? devlink_health_report+0x3d5/0x7e0
     lock_acquire+0x1c1/0x550
     ? devlink_health_report+0x2f1/0x7e0
     ? lockdep_hardirqs_on_prepare+0x400/0x400
     ? find_held_lock+0x2d/0x110
     __mutex_lock+0x12c/0x14b0
     ? devlink_health_report+0x2f1/0x7e0
     ? devlink_health_report+0x2f1/0x7e0
     ? mutex_lock_io_nested+0x1320/0x1320
     ? trace_hardirqs_on+0x2d/0x100
     ? bit_wait_io_timeout+0x170/0x170
     ? devlink_health_do_dump.part.0+0x171/0x3a0
     ? kfree+0x1ba/0x520
     ? devlink_health_do_dump.part.0+0x171/0x3a0
     devlink_health_report+0x2f1/0x7e0
     mlx5e_health_report+0xc9/0xd7 [mlx5_core]
     mlx5e_reporter_tx_timeout+0x2ab/0x3d0 [mlx5_core]
     ? lockdep_hardirqs_on_prepare+0x400/0x400
     ? mlx5e_reporter_tx_err_cqe+0x1b0/0x1b0 [mlx5_core]
     ? mlx5e_tx_reporter_timeout_dump+0x70/0x70 [mlx5_core]
     ? mlx5e_tx_reporter_dump_sq+0x320/0x320 [mlx5_core]
     ? mlx5e_tx_timeout_work+0x70/0x280 [mlx5_core]
     ? mutex_lock_io_nested+0x1320/0x1320
     ? process_one_work+0x70f/0x1340
     ? lockdep_hardirqs_on_prepare+0x400/0x400
     ? lock_downgrade+0x6e0/0x6e0
     mlx5e_tx_timeout_work+0x1c1/0x280 [mlx5_core]
     process_one_work+0x7c2/0x1340
     ? lockdep_hardirqs_on_prepare+0x400/0x400
     ? pwq_dec_nr_in_flight+0x230/0x230
     ? rwlock_bug.part.0+0x90/0x90
     worker_thread+0x59d/0xec0
     ? process_one_work+0x1340/0x1340
     kthread+0x28f/0x330
     ? kthread_complete_and_exit+0x20/0x20
     ret_from_fork+0x1f/0x30
     </TASK>
    
    Fixes: c90005b ("devlink: Hold the instance lock in health callbacks")
    Signed-off-by: Moshe Shemesh <[email protected]>
    Reviewed-by: Tariq Toukan <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mosheshemesh2 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    8ce3d96 View commit details
    Browse the repository at this point in the history
  16. net/mlx5e: TC, Don't offload post action rule if not supported

    [ Upstream commit ccbe330 ]
    
    If post action is not supported, eg. ignore_flow_level is not
    supported, don't offload post action rule. Otherwise, will hit
    panic [1].
    
    Fix it by checking if post action table is valid or not.
    
    [1]
    [445537.863880] BUG: unable to handle page fault for address: ffffffffffffffb1
    [445537.864617] #PF: supervisor read access in kernel mode
    [445537.865244] #PF: error_code(0x0000) - not-present page
    [445537.865860] PGD 70683a067 P4D 70683a067 PUD 70683c067 PMD 0
    [445537.866497] Oops: 0000 [#1] PREEMPT SMP NOPTI
    [445537.867077] CPU: 19 PID: 248742 Comm: tc Kdump: loaded Tainted: G           O       6.5.0+ #1
    [445537.867888] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
    [445537.868834] RIP: 0010:mlx5e_tc_post_act_add+0x51/0x130 [mlx5_core]
    [445537.869635] Code: c0 0d 00 00 e8 20 96 c6 d3 48 85 c0 0f 84 e5 00 00 00 c7 83 b0 01 00 00 00 00 00 00 49 89 c5 31 c0 31 d2 66 89 83 b4 01 00 00 <49> 8b 44 24 10 83 23 df 83 8b d8 01 00 00 04 48 89 83 c0 01 00 00
    [445537.871318] RSP: 0018:ffffb98741cef428 EFLAGS: 00010246
    [445537.871962] RAX: 0000000000000000 RBX: ffff8df341167000 RCX: 0000000000000001
    [445537.872704] RDX: 0000000000000000 RSI: ffffffff954844e1 RDI: ffffffff9546e9cb
    [445537.873430] RBP: ffffb98741cef448 R08: 0000000000000020 R09: 0000000000000246
    [445537.874160] R10: 0000000000000000 R11: ffffffff943f73ff R12: ffffffffffffffa1
    [445537.874893] R13: ffff8df36d336c20 R14: ffffffffffffffa1 R15: ffff8df341167000
    [445537.875628] FS:  00007fcd6564f800(0000) GS:ffff8dfa9ea00000(0000) knlGS:0000000000000000
    [445537.876425] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [445537.877090] CR2: ffffffffffffffb1 CR3: 00000003b5884001 CR4: 0000000000770ee0
    [445537.877832] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [445537.878564] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [445537.879300] PKRU: 55555554
    [445537.879797] Call Trace:
    [445537.880263]  <TASK>
    [445537.880713]  ? show_regs+0x6e/0x80
    [445537.881232]  ? __die+0x29/0x70
    [445537.881731]  ? page_fault_oops+0x85/0x160
    [445537.882276]  ? search_exception_tables+0x65/0x70
    [445537.882852]  ? kernelmode_fixup_or_oops+0xa2/0x120
    [445537.883432]  ? __bad_area_nosemaphore+0x18b/0x250
    [445537.884019]  ? bad_area_nosemaphore+0x16/0x20
    [445537.884566]  ? do_kern_addr_fault+0x8b/0xa0
    [445537.885105]  ? exc_page_fault+0xf5/0x1c0
    [445537.885623]  ? asm_exc_page_fault+0x2b/0x30
    [445537.886149]  ? __kmem_cache_alloc_node+0x1df/0x2a0
    [445537.886717]  ? mlx5e_tc_post_act_add+0x51/0x130 [mlx5_core]
    [445537.887431]  ? mlx5e_tc_post_act_add+0x30/0x130 [mlx5_core]
    [445537.888172]  alloc_flow_post_acts+0xfb/0x1c0 [mlx5_core]
    [445537.888849]  parse_tc_actions+0x582/0x5c0 [mlx5_core]
    [445537.889505]  parse_tc_fdb_actions+0xd7/0x1f0 [mlx5_core]
    [445537.890175]  __mlx5e_add_fdb_flow+0x1ab/0x2b0 [mlx5_core]
    [445537.890843]  mlx5e_add_fdb_flow+0x56/0x120 [mlx5_core]
    [445537.891491]  ? debug_smp_processor_id+0x1b/0x30
    [445537.892037]  mlx5e_tc_add_flow+0x79/0x90 [mlx5_core]
    [445537.892676]  mlx5e_configure_flower+0x305/0x450 [mlx5_core]
    [445537.893341]  mlx5e_rep_setup_tc_cls_flower+0x3d/0x80 [mlx5_core]
    [445537.894037]  mlx5e_rep_setup_tc_cb+0x5c/0xa0 [mlx5_core]
    [445537.894693]  tc_setup_cb_add+0xdc/0x220
    [445537.895177]  fl_hw_replace_filter+0x15f/0x220 [cls_flower]
    [445537.895767]  fl_change+0xe87/0x1190 [cls_flower]
    [445537.896302]  tc_new_tfilter+0x484/0xa50
    
    Fixes: f0da4da ("net/mlx5e: Refactor ct to use post action infrastructure")
    Signed-off-by: Chris Mi <[email protected]>
    Reviewed-by: Jianbo Liu <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Reviewed-by: Automatic Verification <[email protected]>
    Reviewed-by: Maher Sanalla <[email protected]>
    Reviewed-by: Shay Drory <[email protected]>
    Reviewed-by: Moshe Shemesh <[email protected]>
    Reviewed-by: Shachar Kagan <[email protected]>
    Reviewed-by: Tariq Toukan <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Chris Mi authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b766f8b View commit details
    Browse the repository at this point in the history
  17. net/mlx5: Nack sync reset request when HotPlug is enabled

    [ Upstream commit 3d7a3f2 ]
    
    Current sync reset flow is not supported when PCIe bridge connected
    directly to mlx5 device has HotPlug interrupt enabled and can be
    triggered on link state change event. Return nack on reset request in
    such case.
    
    Fixes: 92501fa ("net/mlx5: Ack on sync_reset_request only if PF can do reset_now")
    Signed-off-by: Moshe Shemesh <[email protected]>
    Reviewed-by: Shay Drory <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mosheshemesh2 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    a483977 View commit details
    Browse the repository at this point in the history
  18. net/mlx5e: Check netdev pointer before checking its net ns

    [ Upstream commit 7aaf975 ]
    
    Previously, when comparing the net namespaces, the case where the netdev
    doesn't exist wasn't taken into account, and therefore can cause a crash.
    In such a case, the comparing function should return false, as there is no
    netdev->net to compare the devlink->net to.
    
    Furthermore, this will result in an attempt to enter switchdev mode
    without a netdev to fail, and which is the desired result as there is no
    meaning in switchdev mode without a net device.
    
    Fixes: 662404b ("net/mlx5e: Block entering switchdev mode with ns inconsistency")
    Signed-off-by: Gavin Li <[email protected]>
    Reviewed-by: Gavi Teitz <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    GavinLi-NV authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ef3b2d5 View commit details
    Browse the repository at this point in the history
  19. net/mlx5: Fix a NULL vs IS_ERR() check

    [ Upstream commit ca4ef28 ]
    
    The mlx5_esw_offloads_devlink_port() function returns error pointers, not
    NULL.
    
    Fixes: 7bef147 ("net/mlx5: Don't skip vport check")
    Signed-off-by: Dan Carpenter <[email protected]>
    Reviewed-by: Wojciech Drewek <[email protected]>
    Signed-off-by: Saeed Mahameed <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dan Carpenter authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6cb39c7 View commit details
    Browse the repository at this point in the history
  20. net: ipv6: support reporting otherwise unknown prefix flags in RTM_NE…

    …WPREFIX
    
    [ Upstream commit bd4a816 ]
    
    Lorenzo points out that we effectively clear all unknown
    flags from PIO when copying them to userspace in the netlink
    RTM_NEWPREFIX notification.
    
    We could fix this one at a time as new flags are defined,
    or in one fell swoop - I choose the latter.
    
    We could either define 6 new reserved flags (reserved1..6) and handle
    them individually (and rename them as new flags are defined), or we
    could simply copy the entire unmodified byte over - I choose the latter.
    
    This unfortunately requires some anonymous union/struct magic,
    so we add a static assert on the struct size for a little extra safety.
    
    Cc: David Ahern <[email protected]>
    Cc: Lorenzo Colitti <[email protected]>
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Maciej Żenczykowski <[email protected]>
    Reviewed-by: David Ahern <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    zenczykowski authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    92d813f View commit details
    Browse the repository at this point in the history
  21. qca_debug: Prevent crash on TX ring changes

    [ Upstream commit f4e6064 ]
    
    The qca_spi driver stop and restart the SPI kernel thread
    (via ndo_stop & ndo_open) in case of TX ring changes. This is
    a big issue because it allows userspace to prevent restart of
    the SPI kernel thread (via signals). A subsequent change of
    TX ring wrongly assume a valid spi_thread pointer which result
    in a crash.
    
    So prevent this by stopping the network traffic handling and
    temporary park the SPI thread.
    
    Fixes: 291ab06 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
    Signed-off-by: Stefan Wahren <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lategoodbye authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    21b9dc8 View commit details
    Browse the repository at this point in the history
  22. qca_debug: Fix ethtool -G iface tx behavior

    [ Upstream commit 96a7e86 ]
    
    After calling ethtool -g it was not possible to adjust the TX ring
    size again:
    
      # ethtool -g eth1
      Ring parameters for eth1:
      Pre-set maximums:
      RX:		4
      RX Mini:	n/a
      RX Jumbo:	n/a
      TX:		10
      Current hardware settings:
      RX:		4
      RX Mini:	n/a
      RX Jumbo:	n/a
      TX:		10
      # ethtool -G eth1 tx 8
      netlink error: Invalid argument
    
    The reason for this is that the readonly setting rx_pending get
    initialized and after that the range check in qcaspi_set_ringparam()
    fails regardless of the provided parameter. So fix this by accepting
    the exposed RX defaults. Instead of adding another magic number
    better use a new define here.
    
    Fixes: 291ab06 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
    Suggested-by: Paolo Abeni <[email protected]>
    Signed-off-by: Stefan Wahren <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lategoodbye authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    02296b1 View commit details
    Browse the repository at this point in the history
  23. qca_spi: Fix reset behavior

    [ Upstream commit 1057812 ]
    
    In case of a reset triggered by the QCA7000 itself, the behavior of the
    qca_spi driver was not quite correct:
    - in case of a pending RX frame decoding the drop counter must be
      incremented and decoding state machine reseted
    - also the reset counter must always be incremented regardless of sync
      state
    
    Fixes: 291ab06 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
    Signed-off-by: Stefan Wahren <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    lategoodbye authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f7dac96 View commit details
    Browse the repository at this point in the history
  24. bnxt_en: Clear resource reservation during resume

    [ Upstream commit 9ef7c58 ]
    
    We are issuing HWRM_FUNC_RESET cmd to reset the device including
    all reserved resources, but not clearing the reservations
    within the driver struct. As a result, when the driver re-initializes
    as part of resume, it believes that there is no need to do any
    resource reservation and goes ahead and tries to allocate rings
    which will eventually fail beyond a certain number pre-reserved by
    the firmware.
    
    Fixes: 674f50a ("bnxt_en: Implement new method to reserve rings.")
    Reviewed-by: Kalesh AP <[email protected]>
    Reviewed-by: Ajit Khaparde <[email protected]>
    Reviewed-by: Andy Gospodarek <[email protected]>
    Signed-off-by: Somnath Kotur <[email protected]>
    Signed-off-by: Michael Chan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    skotur-brcm authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    bf9ceb1 View commit details
    Browse the repository at this point in the history
  25. bnxt_en: Fix skb recycling logic in bnxt_deliver_skb()

    [ Upstream commit aded5d1 ]
    
    Receive SKBs can go through the VF-rep path or the normal path.
    skb_mark_for_recycle() is only called for the normal path.  Fix it
    to do it for both paths to fix possible stalled page pool shutdown
    errors.
    
    Fixes: 86b0550 ("bnxt_en: Use the unified RX page pool buffers for XDP and non-XDP")
    Reviewed-by: Somnath Kotur <[email protected]>
    Reviewed-by: Andy Gospodarek <[email protected]>
    Reviewed-by: Vikas Gupta <[email protected]>
    Signed-off-by: Sreekanth Reddy <[email protected]>
    Signed-off-by: Michael Chan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    sreekanthbrcm authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d8ea6b0 View commit details
    Browse the repository at this point in the history
  26. bnxt_en: Fix wrong return value check in bnxt_close_nic()

    [ Upstream commit bd6781c ]
    
    The wait_event_interruptible_timeout() function returns 0
    if the timeout elapsed, -ERESTARTSYS if it was interrupted
    by a signal, and the remaining jiffies otherwise if the
    condition evaluated to true before the timeout elapsed.
    
    Driver should have checked for zero return value instead of
    a positive value.
    
    MChan: Print a warning for -ERESTARTSYS.  The close operation
    will proceed anyway when wait_event_interruptible_timeout()
    returns for any reason.  Since we do the close no matter what,
    we should not return this error code to the caller.  Change
    bnxt_close_nic() to a void function and remove all error
    handling from some of the callers.
    
    Fixes: c0c050c ("bnxt_en: New Broadcom ethernet driver.")
    Reviewed-by: Andy Gospodarek <[email protected]>
    Reviewed-by: Vikas Gupta <[email protected]>
    Reviewed-by: Somnath Kotur <[email protected]>
    Signed-off-by: Kalesh AP <[email protected]>
    Signed-off-by: Michael Chan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Kalesh AP authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    909f5a4 View commit details
    Browse the repository at this point in the history
  27. bnxt_en: Fix HWTSTAMP_FILTER_ALL packet timestamp logic

    [ Upstream commit c13e268 ]
    
    When the chip is configured to timestamp all receive packets, the
    timestamp in the RX completion is only valid if the metadata
    present flag is not set for packets received on the wire.  In
    addition, internal loopback packets will never have a valid timestamp
    and the timestamp field will always be zero.  We must exclude
    any 0 value in the timestamp field because there is no way to
    determine if it is a loopback packet or not.
    
    Add a new function bnxt_rx_ts_valid() to check for all timestamp
    valid conditions.
    
    Fixes: 66ed81d ("bnxt_en: Enable packet timestamping for all RX packets")
    Reviewed-by: Andy Gospodarek <[email protected]>
    Reviewed-by: Pavan Chebbi <[email protected]>
    Signed-off-by: Michael Chan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Michael Chan authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9542105 View commit details
    Browse the repository at this point in the history
  28. atm: solos-pci: Fix potential deadlock on &cli_queue_lock

    [ Upstream commit d5dba32 ]
    
    As &card->cli_queue_lock is acquired under softirq context along the
    following call chain from solos_bh(), other acquisition of the same
    lock inside process context should disable at least bh to avoid double
    lock.
    
    <deadlock #1>
    console_show()
    --> spin_lock(&card->cli_queue_lock)
    <interrupt>
       --> solos_bh()
       --> spin_lock(&card->cli_queue_lock)
    
    This flaw was found by an experimental static analysis tool I am
    developing for irq-related deadlock.
    
    To prevent the potential deadlock, the patch uses spin_lock_bh()
    on the card->cli_queue_lock under process context code consistently
    to prevent the possible deadlock scenario.
    
    Fixes: 9c54004 ("atm: Driver for Solos PCI ADSL2+ card.")
    Signed-off-by: Chengfeng Ye <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ychame authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4faf39c View commit details
    Browse the repository at this point in the history
  29. atm: solos-pci: Fix potential deadlock on &tx_queue_lock

    [ Upstream commit 15319a4 ]
    
    As &card->tx_queue_lock is acquired under softirq context along the
    following call chain from solos_bh(), other acquisition of the same
    lock inside process context should disable at least bh to avoid double
    lock.
    
    <deadlock #2>
    pclose()
    --> spin_lock(&card->tx_queue_lock)
    <interrupt>
       --> solos_bh()
       --> fpga_tx()
       --> spin_lock(&card->tx_queue_lock)
    
    This flaw was found by an experimental static analysis tool I am
    developing for irq-related deadlock.
    
    To prevent the potential deadlock, the patch uses spin_lock_bh()
    on &card->tx_queue_lock under process context code consistently to
    prevent the possible deadlock scenario.
    
    Fixes: 213e85d ("solos-pci: clean up pclose() function")
    Signed-off-by: Chengfeng Ye <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ychame authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    8210250 View commit details
    Browse the repository at this point in the history
  30. net: fec: correct queue selection

    [ Upstream commit 9fc95fe ]
    
    The old implementation extracted VLAN TCI info from the payload
    before the VLAN tag has been pushed in the payload.
    
    Another problem was that the VLAN TCI was extracted even if the
    packet did not have VLAN protocol header.
    
    This resulted in invalid VLAN TCI and as a consequence a random
    queue was computed.
    
    This patch fixes the above issues and use the VLAN TCI from the
    skb if it is present or VLAN TCI from payload if present. If no
    VLAN header is present queue 0 is selected.
    
    Fixes: 52c4a1a ("net: fec: add ndo_select_queue to fix TX bandwidth fluctuations")
    Signed-off-by: Radu Bulie <[email protected]>
    Signed-off-by: Wei Fang <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Radu Bulie authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4317fba View commit details
    Browse the repository at this point in the history
  31. octeontx2-af: fix a use-after-free in rvu_nix_register_reporters

    [ Upstream commit 28a7cb0 ]
    
    The rvu_dl will be freed in rvu_nix_health_reporters_destroy(rvu_dl)
    after the create_workqueue fails, and after that free, the rvu_dl will
    be translate back through the following call chain:
    
    rvu_nix_health_reporters_destroy
      |-> rvu_nix_health_reporters_create
           |-> rvu_health_reporters_create
                 |-> rvu_register_dl (label err_dl_health)
    
    Finally. in the err_dl_health label, rvu_dl being freed again in
    rvu_health_reporters_destroy(rvu) by rvu_nix_health_reporters_destroy.
    In the second calls of rvu_nix_health_reporters_destroy, however,
    it uses rvu_dl->rvu_nix_health_reporter, which is already freed at
    the end of rvu_nix_health_reporters_destroy in the first call.
    
    So this patch prevents the first destroy by instantly returning -ENONMEN
    when create_workqueue fails. In addition, since the failure of
    create_workqueue is the only entrence of label err, it has been
    integrated into the error-handling path of create_workqueue.
    
    Fixes: 5ed6630 ("octeontx2-af: Add devlink health reporters for NIX")
    Signed-off-by: Zhipeng Lu <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    AlexiousLu authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    dd75adf View commit details
    Browse the repository at this point in the history
  32. net/sched: act_ct: Take per-cb reference to tcf_ct_flow_table

    [ Upstream commit 125f1c7 ]
    
    The referenced change added custom cleanup code to act_ct to delete any
    callbacks registered on the parent block when deleting the
    tcf_ct_flow_table instance. However, the underlying issue is that the
    drivers don't obtain the reference to the tcf_ct_flow_table instance when
    registering callbacks which means that not only driver callbacks may still
    be on the table when deleting it but also that the driver can still have
    pointers to its internal nf_flowtable and can use it concurrently which
    results either warning in netfilter[0] or use-after-free.
    
    Fix the issue by taking a reference to the underlying struct
    tcf_ct_flow_table instance when registering the callback and release the
    reference when unregistering. Expose new API required for such reference
    counting by adding two new callbacks to nf_flowtable_type and implementing
    them for act_ct flowtable_ct type. This fixes the issue by extending the
    lifetime of nf_flowtable until all users have unregistered.
    
    [0]:
    [106170.938634] ------------[ cut here ]------------
    [106170.939111] WARNING: CPU: 21 PID: 3688 at include/net/netfilter/nf_flow_table.h:262 mlx5_tc_ct_del_ft_cb+0x267/0x2b0 [mlx5_core]
    [106170.940108] Modules linked in: act_ct nf_flow_table act_mirred act_skbedit act_tunnel_key vxlan cls_matchall nfnetlink_cttimeout act_gact cls_flower sch_ingress mlx5_vdpa vringh vhost_iotlb vdpa bonding openvswitch nsh rpcrdma rdma_ucm
    ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core xt_MASQUERADE nf_conntrack_netlink nfnetlink iptable_nat xt_addrtype xt_conntrack nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_regis
    try overlay mlx5_core
    [106170.943496] CPU: 21 PID: 3688 Comm: kworker/u48:0 Not tainted 6.6.0-rc7_for_upstream_min_debug_2023_11_01_13_02 #1
    [106170.944361] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
    [106170.945292] Workqueue: mlx5e mlx5e_rep_neigh_update [mlx5_core]
    [106170.945846] RIP: 0010:mlx5_tc_ct_del_ft_cb+0x267/0x2b0 [mlx5_core]
    [106170.946413] Code: 89 ef 48 83 05 71 a4 14 00 01 e8 f4 06 04 e1 48 83 05 6c a4 14 00 01 48 83 c4 28 5b 5d 41 5c 41 5d c3 48 83 05 d1 8b 14 00 01 <0f> 0b 48 83 05 d7 8b 14 00 01 e9 96 fe ff ff 48 83 05 a2 90 14 00
    [106170.947924] RSP: 0018:ffff88813ff0fcb8 EFLAGS: 00010202
    [106170.948397] RAX: 0000000000000000 RBX: ffff88811eabac40 RCX: ffff88811eabad48
    [106170.949040] RDX: ffff88811eab8000 RSI: ffffffffa02cd560 RDI: 0000000000000000
    [106170.949679] RBP: ffff88811eab8000 R08: 0000000000000001 R09: ffffffffa0229700
    [106170.950317] R10: ffff888103538fc0 R11: 0000000000000001 R12: ffff88811eabad58
    [106170.950969] R13: ffff888110c01c00 R14: ffff888106b40000 R15: 0000000000000000
    [106170.951616] FS:  0000000000000000(0000) GS:ffff88885fd40000(0000) knlGS:0000000000000000
    [106170.952329] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [106170.952834] CR2: 00007f1cefd28cb0 CR3: 000000012181b006 CR4: 0000000000370ea0
    [106170.953482] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [106170.954121] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [106170.954766] Call Trace:
    [106170.955057]  <TASK>
    [106170.955315]  ? __warn+0x79/0x120
    [106170.955648]  ? mlx5_tc_ct_del_ft_cb+0x267/0x2b0 [mlx5_core]
    [106170.956172]  ? report_bug+0x17c/0x190
    [106170.956537]  ? handle_bug+0x3c/0x60
    [106170.956891]  ? exc_invalid_op+0x14/0x70
    [106170.957264]  ? asm_exc_invalid_op+0x16/0x20
    [106170.957666]  ? mlx5_del_flow_rules+0x10/0x310 [mlx5_core]
    [106170.958172]  ? mlx5_tc_ct_block_flow_offload_add+0x1240/0x1240 [mlx5_core]
    [106170.958788]  ? mlx5_tc_ct_del_ft_cb+0x267/0x2b0 [mlx5_core]
    [106170.959339]  ? mlx5_tc_ct_del_ft_cb+0xc6/0x2b0 [mlx5_core]
    [106170.959854]  ? mapping_remove+0x154/0x1d0 [mlx5_core]
    [106170.960342]  ? mlx5e_tc_action_miss_mapping_put+0x4f/0x80 [mlx5_core]
    [106170.960927]  mlx5_tc_ct_delete_flow+0x76/0xc0 [mlx5_core]
    [106170.961441]  mlx5_free_flow_attr_actions+0x13b/0x220 [mlx5_core]
    [106170.962001]  mlx5e_tc_del_fdb_flow+0x22c/0x3b0 [mlx5_core]
    [106170.962524]  mlx5e_tc_del_flow+0x95/0x3c0 [mlx5_core]
    [106170.963034]  mlx5e_flow_put+0x73/0xe0 [mlx5_core]
    [106170.963506]  mlx5e_put_flow_list+0x38/0x70 [mlx5_core]
    [106170.964002]  mlx5e_rep_update_flows+0xec/0x290 [mlx5_core]
    [106170.964525]  mlx5e_rep_neigh_update+0x1da/0x310 [mlx5_core]
    [106170.965056]  process_one_work+0x13a/0x2c0
    [106170.965443]  worker_thread+0x2e5/0x3f0
    [106170.965808]  ? rescuer_thread+0x410/0x410
    [106170.966192]  kthread+0xc6/0xf0
    [106170.966515]  ? kthread_complete_and_exit+0x20/0x20
    [106170.966970]  ret_from_fork+0x2d/0x50
    [106170.967332]  ? kthread_complete_and_exit+0x20/0x20
    [106170.967774]  ret_from_fork_asm+0x11/0x20
    [106170.970466]  </TASK>
    [106170.970726] ---[ end trace 0000000000000000 ]---
    
    Fixes: 77ac5e4 ("net/sched: act_ct: remove and free nf_table callbacks")
    Signed-off-by: Vlad Buslov <[email protected]>
    Reviewed-by: Paul Blakey <[email protected]>
    Acked-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    w1ldptr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    15f300e View commit details
    Browse the repository at this point in the history
  33. octeon_ep: explicitly test for firmware ready value

    [ Upstream commit 284f717 ]
    
    The firmware ready value is 1, and get firmware ready status
    function should explicitly test for that value. The firmware
    ready value read will be 2 after driver load, and on unbind
    till firmware rewrites the firmware ready back to 0, the value
    seen by driver will be 2, which should be regarded as not ready.
    
    Fixes: 10c073e ("octeon_ep: defer probe if firmware not ready")
    Signed-off-by: Shinas Rasheed <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    shinas-marvell authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6047060 View commit details
    Browse the repository at this point in the history
  34. octeontx2-pf: Fix promisc mcam entry action

    [ Upstream commit dbda436 ]
    
    Current implementation is such that, promisc mcam entry action
    is set as multicast even when there are no trusted VFs. multicast
    action causes the hardware to copy packet data, which reduces
    the performance.
    
    This patch fixes this issue by setting the promisc mcam entry action to
    unicast instead of multicast when there are no trusted VFs. The same
    change is made for the 'allmulti' mcam entry action.
    
    Fixes: ffd2f89 ("octeontx2-pf: Enable promisc/allmulti match MCAM entries.")
    Signed-off-by: Hariprasad Kelam <[email protected]>
    Signed-off-by: Sunil Kovvuri Goutham <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hariprasad Kelam authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5295d2a View commit details
    Browse the repository at this point in the history
  35. octeontx2-af: Update RSS algorithm index

    [ Upstream commit 570ba37 ]
    
    The RSS flow algorithm is not set up correctly for promiscuous or all
    multi MCAM entries. This has an impact on flow distribution.
    
    This patch fixes the issue by updating flow algorithm index in above
    mentioned MCAM entries.
    
    Fixes: 967db35 ("octeontx2-af: add support for multicast/promisc packet replication feature")
    Signed-off-by: Hariprasad Kelam <[email protected]>
    Signed-off-by: Sunil Kovvuri Goutham <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hariprasad Kelam authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6b5de31 View commit details
    Browse the repository at this point in the history
  36. octeontx2-af: Fix pause frame configuration

    [ Upstream commit e307b5a ]
    
    The current implementation's default Pause Forward setting is causing
    unnecessary network traffic. This patch disables Pause Forward to
    address this issue.
    
    Fixes: 1121f6b ("octeontx2-af: Priority flow control configuration support")
    Signed-off-by: Hariprasad Kelam <[email protected]>
    Signed-off-by: Sunil Kovvuri Goutham <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hariprasad Kelam authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f115b31 View commit details
    Browse the repository at this point in the history
  37. atm: Fix Use-After-Free in do_vcc_ioctl

    [ Upstream commit 24e90b9 ]
    
    Because do_vcc_ioctl() accesses sk->sk_receive_queue
    without holding a sk->sk_receive_queue.lock, it can
    cause a race with vcc_recvmsg().
    A use-after-free for skb occurs with the following flow.
    ```
    do_vcc_ioctl() -> skb_peek()
    vcc_recvmsg() -> skb_recv_datagram() -> skb_free_datagram()
    ```
    Add sk->sk_receive_queue.lock to do_vcc_ioctl() to fix this issue.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Hyunwoo Kim <[email protected]>
    Link: https://lore.kernel.org/r/20231209094210.GA403126@v4bel-B760M-AORUS-ELITE-AX
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    V4bel-theori authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    531fd46 View commit details
    Browse the repository at this point in the history
  38. net/rose: Fix Use-After-Free in rose_ioctl

    [ Upstream commit 810c38a ]
    
    Because rose_ioctl() accesses sk->sk_receive_queue
    without holding a sk->sk_receive_queue.lock, it can
    cause a race with rose_accept().
    A use-after-free for skb occurs with the following flow.
    ```
    rose_ioctl() -> skb_peek()
    rose_accept() -> skb_dequeue() -> kfree_skb()
    ```
    Add sk->sk_receive_queue.lock to rose_ioctl() to fix this issue.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Hyunwoo Kim <[email protected]>
    Link: https://lore.kernel.org/r/20231209100538.GA407321@v4bel-B760M-AORUS-ELITE-AX
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    V4bel-theori authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    63caa51 View commit details
    Browse the repository at this point in the history
  39. iavf: Introduce new state machines for flow director

    [ Upstream commit 3a0b5a2 ]
    
    New states introduced:
    
     IAVF_FDIR_FLTR_DIS_REQUEST
     IAVF_FDIR_FLTR_DIS_PENDING
     IAVF_FDIR_FLTR_INACTIVE
    
    Current FDIR state machines (SM) are not adequate to handle a few
    scenarios in the link DOWN/UP event, reset event and ntuple-feature.
    
    For example, when VF link goes DOWN and comes back UP administratively,
    the expectation is that previously installed filters should also be
    restored. But with current SM, filters are not restored.
    So with new SM, during link DOWN filters are marked as INACTIVE in
    the iavf list but removed from PF. After link UP, SM will transition
    from INACTIVE to ADD_REQUEST to restore the filter.
    
    Similarly, with VF reset, filters will be removed from the PF, but
    marked as INACTIVE in the iavf list. Filters will be restored after
    reset completion.
    
    Steps to reproduce:
    -------------------
    
    1. Create a VF. Here VF is enp8s0.
    
    2. Assign IP addresses to VF and link partner and ping continuously
    from remote. Here remote IP is 1.1.1.1.
    
    3. Check default RX Queue of traffic.
    
    ethtool -S enp8s0 | grep -E "rx-[[:digit:]]+\.packets"
    
    4. Add filter - change default RX Queue (to 15 here)
    
    ethtool -U ens8s0 flow-type ip4 src-ip 1.1.1.1 action 15 loc 5
    
    5. Ensure filter gets added and traffic is received on RX queue 15 now.
    
    Link event testing:
    -------------------
    6. Bring VF link down and up. If traffic flows to configured queue 15,
    test is success, otherwise it is a failure.
    
    Reset event testing:
    --------------------
    7. Reset the VF. If traffic flows to configured queue 15, test is success,
    otherwise it is a failure.
    
    Fixes: 0dbfbab ("iavf: Add framework to enable ethtool ntuple filters")
    Signed-off-by: Piotr Gardocki <[email protected]>
    Reviewed-by: Larysa Zaremba <[email protected]>
    Signed-off-by: Ranganatha Rao <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pgardocx authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    3beb9d6 View commit details
    Browse the repository at this point in the history
  40. iavf: Handle ntuple on/off based on new state machines for flow director

    [ Upstream commit 09d23b8 ]
    
    ntuple-filter feature on/off:
    Default is on. If turned off, the filters will be removed from both
    PF and iavf list. The removal is irrespective of current filter state.
    
    Steps to reproduce:
    -------------------
    
    1. Ensure ntuple is on.
    
    ethtool -K enp8s0 ntuple-filters on
    
    2. Create a filter to receive the traffic into non-default rx-queue like 15
    and ensure traffic is flowing into queue into 15.
    Now, turn off ntuple. Traffic should not flow to configured queue 15.
    It should flow to default RX queue.
    
    Fixes: 0dbfbab ("iavf: Add framework to enable ethtool ntuple filters")
    Signed-off-by: Piotr Gardocki <[email protected]>
    Reviewed-by: Larysa Zaremba <[email protected]>
    Signed-off-by: Ranganatha Rao <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pgardocx authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    e768a04 View commit details
    Browse the repository at this point in the history
  41. iavf: Fix iavf_shutdown to call iavf_remove instead iavf_close

    [ Upstream commit 7ae42ef ]
    
    Make the flow for pci shutdown be the same to the pci remove.
    
    iavf_shutdown was implementing an incomplete version
    of iavf_remove. It misses several calls to the kernel like
    iavf_free_misc_irq, iavf_reset_interrupt_capability, iounmap
    that might break the system on reboot or hibernation.
    
    Implement the call of iavf_remove directly in iavf_shutdown to
    close this gap.
    
    Fixes below error messages (dmesg) during shutdown stress tests -
    [685814.900917] ice 0000:88:00.0: MAC 02:d0:5f:82:43:5d does not exist for
     VF 0
    [685814.900928] ice 0000:88:00.0: MAC 33:33:00:00:00:01 does not exist for
    VF 0
    
    Reproduction:
    
    1. Create one VF interface:
    echo 1 > /sys/class/net/<interface_name>/device/sriov_numvfs
    
    2. Run live dmesg on the host:
    dmesg -wH
    
    3. On SUT, script below steps into vf_namespace_assignment.sh
    
    <#!/bin/sh> // Remove <>. Git removes # line
    if=<VF name> (edit this per VF name)
    loop=0
    
    while true; do
    
    echo test round $loop
    let loop++
    
    ip netns add ns$loop
    ip link set dev $if up
    ip link set dev $if netns ns$loop
    ip netns exec ns$loop ip link set dev $if up
    ip netns exec ns$loop ip link set dev $if netns 1
    ip netns delete ns$loop
    
    done
    
    4. Run the script for at least 1000 iterations on SUT:
    ./vf_namespace_assignment.sh
    
    Expected result:
    No errors in dmesg.
    
    Fixes: 129cf89 ("iavf: rename functions and structs to new name")
    Signed-off-by: Slawomir Laba <[email protected]>
    Reviewed-by: Michal Swiatkowski <[email protected]>
    Reviewed-by: Ahmed Zaki <[email protected]>
    Reviewed-by: Jesse Brandeburg <[email protected]>
    Co-developed-by: Ranganatha Rao <[email protected]>
    Signed-off-by: Ranganatha Rao <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    SlawomirLaba authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    54f59a2 View commit details
    Browse the repository at this point in the history
  42. qed: Fix a potential use-after-free in qed_cxt_tables_alloc

    [ Upstream commit b65d52a ]
    
    qed_ilt_shadow_alloc() will call qed_ilt_shadow_free() to
    free p_hwfn->p_cxt_mngr->ilt_shadow on error. However,
    qed_cxt_tables_alloc() accesses the freed pointer on failure
    of qed_ilt_shadow_alloc() through calling qed_cxt_mngr_free(),
    which may lead to use-after-free. Fix this issue by setting
    p_mngr->ilt_shadow to NULL in qed_ilt_shadow_free().
    
    Fixes: fe56b9e ("qed: Add module with basic common support")
    Reviewed-by: Przemek Kitszel <[email protected]>
    Signed-off-by: Dinghao Liu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dinghaoliu authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    7106a15 View commit details
    Browse the repository at this point in the history
  43. net: Remove acked SYN flag from packet in the transmit queue correctly

    [ Upstream commit f99cd56 ]
    
    syzkaller report:
    
     kernel BUG at net/core/skbuff.c:3452!
     invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
     CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.7.0-rc4-00009-gbee0e7762ad2-dirty #135
     RIP: 0010:skb_copy_and_csum_bits (net/core/skbuff.c:3452)
     Call Trace:
     icmp_glue_bits (net/ipv4/icmp.c:357)
     __ip_append_data.isra.0 (net/ipv4/ip_output.c:1165)
     ip_append_data (net/ipv4/ip_output.c:1362 net/ipv4/ip_output.c:1341)
     icmp_push_reply (net/ipv4/icmp.c:370)
     __icmp_send (./include/net/route.h:252 net/ipv4/icmp.c:772)
     ip_fragment.constprop.0 (./include/linux/skbuff.h:1234 net/ipv4/ip_output.c:592 net/ipv4/ip_output.c:577)
     __ip_finish_output (net/ipv4/ip_output.c:311 net/ipv4/ip_output.c:295)
     ip_output (net/ipv4/ip_output.c:427)
     __ip_queue_xmit (net/ipv4/ip_output.c:535)
     __tcp_transmit_skb (net/ipv4/tcp_output.c:1462)
     __tcp_retransmit_skb (net/ipv4/tcp_output.c:3387)
     tcp_retransmit_skb (net/ipv4/tcp_output.c:3404)
     tcp_retransmit_timer (net/ipv4/tcp_timer.c:604)
     tcp_write_timer (./include/linux/spinlock.h:391 net/ipv4/tcp_timer.c:716)
    
    The panic issue was trigered by tcp simultaneous initiation.
    The initiation process is as follows:
    
          TCP A                                            TCP B
    
      1.  CLOSED                                           CLOSED
    
      2.  SYN-SENT     --> <SEQ=100><CTL=SYN>              ...
    
      3.  SYN-RECEIVED <-- <SEQ=300><CTL=SYN>              <-- SYN-SENT
    
      4.               ... <SEQ=100><CTL=SYN>              --> SYN-RECEIVED
    
      5.  SYN-RECEIVED --> <SEQ=100><ACK=301><CTL=SYN,ACK> ...
    
      // TCP B: not send challenge ack for ack limit or packet loss
      // TCP A: close
    	tcp_close
    	   tcp_send_fin
                  if (!tskb && tcp_under_memory_pressure(sk))
                      tskb = skb_rb_last(&sk->tcp_rtx_queue); //pick SYN_ACK packet
               TCP_SKB_CB(tskb)->tcp_flags |= TCPHDR_FIN;  // set FIN flag
    
      6.  FIN_WAIT_1  --> <SEQ=100><ACK=301><END_SEQ=102><CTL=SYN,FIN,ACK> ...
    
      // TCP B: send challenge ack to SYN_FIN_ACK
    
      7.               ... <SEQ=301><ACK=101><CTL=ACK>   <-- SYN-RECEIVED //challenge ack
    
      // TCP A:  <SND.UNA=101>
    
      8.  FIN_WAIT_1 --> <SEQ=101><ACK=301><END_SEQ=102><CTL=SYN,FIN,ACK> ... // retransmit panic
    
    	__tcp_retransmit_skb  //skb->len=0
    	    tcp_trim_head
    		len = tp->snd_una - TCP_SKB_CB(skb)->seq // len=101-100
    		    __pskb_trim_head
    			skb->data_len -= len // skb->len=-1, wrap around
    	    ... ...
    	    ip_fragment
    		icmp_glue_bits //BUG_ON
    
    If we use tcp_trim_head() to remove acked SYN from packet that contains data
    or other flags, skb->len will be incorrectly decremented. We can remove SYN
    flag that has been acked from rtx_queue earlier than tcp_trim_head(), which
    can fix the problem mentioned above.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Co-developed-by: Eric Dumazet <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Signed-off-by: Dong Chenchen <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Dong Chenchen authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d6bef00 View commit details
    Browse the repository at this point in the history
  44. net: ena: Destroy correct number of xdp queues upon failure

    [ Upstream commit 41db6f9 ]
    
    The ena_setup_and_create_all_xdp_queues() function freed all the
    resources upon failure, after creating only xdp_num_queues queues,
    instead of freeing just the created ones.
    
    In this patch, the only resources that are freed, are the ones
    allocated right before the failure occurs.
    
    Fixes: 548c494 ("net: ena: Implement XDP_TX action")
    Signed-off-by: Shahar Itzko <[email protected]>
    Signed-off-by: David Arinzon <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davidarinzon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c22877f View commit details
    Browse the repository at this point in the history
  45. net: ena: Fix xdp drops handling due to multibuf packets

    [ Upstream commit 505b1a8 ]
    
    Current xdp code drops packets larger than ENA_XDP_MAX_MTU.
    This is an incorrect condition since the problem is not the
    size of the packet, rather the number of buffers it contains.
    
    This commit:
    
    1. Identifies and drops XDP multi-buffer packets at the
       beginning of the function.
    2. Increases the xdp drop statistic when this drop occurs.
    3. Adds a one-time print that such drops are happening to
       give better indication to the user.
    
    Fixes: 838c93d ("net: ena: implement XDP drop support")
    Signed-off-by: Arthur Kiyanovski <[email protected]>
    Signed-off-by: David Arinzon <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davidarinzon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    0cb2021 View commit details
    Browse the repository at this point in the history
  46. net: ena: Fix DMA syncing in XDP path when SWIOTLB is on

    [ Upstream commit d760117 ]
    
    This patch fixes two issues:
    
    Issue 1
    -------
    Description
    ```````````
    Current code does not call dma_sync_single_for_cpu() to sync data from
    the device side memory to the CPU side memory before the XDP code path
    uses the CPU side data.
    This causes the XDP code path to read the unset garbage data in the CPU
    side memory, resulting in incorrect handling of the packet by XDP.
    
    Solution
    ````````
    1. Add a call to dma_sync_single_for_cpu() before the XDP code starts to
       use the data in the CPU side memory.
    2. The XDP code verdict can be XDP_PASS, in which case there is a
       fallback to the non-XDP code, which also calls
       dma_sync_single_for_cpu().
       To avoid calling dma_sync_single_for_cpu() twice:
    2.1. Put the dma_sync_single_for_cpu() in the code in such a place where
         it happens before XDP and non-XDP code.
    2.2. Remove the calls to dma_sync_single_for_cpu() in the non-XDP code
         for the first buffer only (rx_copybreak and non-rx_copybreak
         cases), since the new call that was added covers these cases.
         The call to dma_sync_single_for_cpu() for the second buffer and on
         stays because only the first buffer is handled by the newly added
         dma_sync_single_for_cpu(). And there is no need for special
         handling of the second buffer and on for the XDP path since
         currently the driver supports only single buffer packets.
    
    Issue 2
    -------
    Description
    ```````````
    In case the XDP code forwarded the packet (ENA_XDP_FORWARDED),
    ena_unmap_rx_buff_attrs() is called with attrs set to 0.
    This means that before unmapping the buffer, the internal function
    dma_unmap_page_attrs() will also call dma_sync_single_for_cpu() on
    the whole buffer (not only on the data part of it).
    This sync is both wasteful (since a sync was already explicitly
    called before) and also causes a bug, which will be explained
    using the below diagram.
    
    The following diagram shows the flow of events causing the bug.
    The order of events is (1)-(4) as shown in the diagram.
    
    CPU side memory area
    
         (3)convert_to_xdp_frame() initializes the
            headroom with xdpf metadata
                          ||
                          \/
              ___________________________________
             |                                   |
     0       |                                   V                       4K
     ---------------------------------------------------------------------
     | xdpf->data      | other xdpf       |   < data >   | tailroom ||...|
     |                 | fields           |              | GARBAGE  ||   |
     ---------------------------------------------------------------------
    
                       /\                        /\
                       ||                        ||
       (4)ena_unmap_rx_buff_attrs() calls     (2)dma_sync_single_for_cpu()
          dma_sync_single_for_cpu() on the       copies data from device
          whole buffer page, overwriting         side to CPU side memory
          the xdpf->data with GARBAGE.           ||
     0                                                                   4K
     ---------------------------------------------------------------------
     | headroom                           |   < data >   | tailroom ||...|
     | GARBAGE                            |              | GARBAGE  ||   |
     ---------------------------------------------------------------------
    
    Device side memory area                      /\
                                                 ||
                                   (1) device writes RX packet data
    
    After the call to ena_unmap_rx_buff_attrs() in (4), the xdpf->data
    becomes corrupted, and so when it is later accessed in
    ena_clean_xdp_irq()->xdp_return_frame(), it causes a page fault,
    crashing the kernel.
    
    Solution
    ````````
    Explicitly tell ena_unmap_rx_buff_attrs() not to call
    dma_sync_single_for_cpu() by passing it the ENA_DMA_ATTR_SKIP_CPU_SYNC
    flag.
    
    Fixes: f7d625a ("net: ena: Add dynamic recycling mechanism for rx buffers")
    Signed-off-by: Arthur Kiyanovski <[email protected]>
    Signed-off-by: David Arinzon <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davidarinzon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    0116e02 View commit details
    Browse the repository at this point in the history
  47. net: ena: Fix XDP redirection error

    [ Upstream commit 4ab138c ]
    
    When sending TX packets, the meta descriptor can be all zeroes
    as no meta information is required (as in XDP).
    
    This patch removes the validity check, as when
    `disable_meta_caching` is enabled, such TX packets will be
    dropped otherwise.
    
    Fixes: 0e3a3f6 ("net: ena: support new LLQ acceleration mode")
    Signed-off-by: Shay Agroskin <[email protected]>
    Signed-off-by: David Arinzon <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davidarinzon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    2cc8ffc View commit details
    Browse the repository at this point in the history
  48. stmmac: dwmac-loongson: Make sure MDIO is initialized before use

    [ Upstream commit e87d3a1 ]
    
    Generic code will use mdio. If it is not initialized before use,
    the kernel will Oops.
    
    Fixes: 30bba69 ("stmmac: pci: Add dwmac support for Loongson")
    Signed-off-by: Yanteng Si <[email protected]>
    Signed-off-by: Feiyang Chen <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yanteng Si authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    e0069c2 View commit details
    Browse the repository at this point in the history
  49. sign-file: Fix incorrect return values check

    [ Upstream commit 8296494 ]
    
    There are some wrong return values check in sign-file when call OpenSSL
    API. The ERR() check cond is wrong because of the program only check the
    return value is < 0 which ignored the return val is 0. For example:
    1. CMS_final() return 1 for success or 0 for failure.
    2. i2d_CMS_bio_stream() returns 1 for success or 0 for failure.
    3. i2d_TYPEbio() return 1 for success and 0 for failure.
    4. BIO_free() return 1 for success and 0 for failure.
    
    Link: https://www.openssl.org/docs/manmaster/man3/
    Fixes: e5a2e3c ("scripts/sign-file.c: Add support for signing with a raw signature")
    Signed-off-by: Yusong Gao <[email protected]>
    Reviewed-by: Juerg Haefliger <[email protected]>
    Signed-off-by: David Howells <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]/ # v5
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yusong Gao authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f18ac4b View commit details
    Browse the repository at this point in the history
  50. vsock/virtio: Fix unsigned integer wrap around in virtio_transport_ha…

    …s_space()
    
    [ Upstream commit 60316d7 ]
    
    We need to do signed arithmetic if we expect condition
    `if (bytes < 0)` to be possible
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE
    
    Fixes: 06a8fc7 ("VSOCK: Introduce virtio_vsock_common.ko")
    Signed-off-by: Nikolay Kuratov <[email protected]>
    Reviewed-by: Stefano Garzarella <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Nikolay Kuratov authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    fa63477 View commit details
    Browse the repository at this point in the history
  51. dpaa2-switch: fix size of the dma_unmap

    [ Upstream commit 2aad7d4 ]
    
    The size of the DMA unmap was wrongly put as a sizeof of a pointer.
    Change the value of the DMA unmap to be the actual macro used for the
    allocation and the DMA map.
    
    Fixes: 1110318 ("dpaa2-switch: add tc flower hardware offload on ingress traffic")
    Signed-off-by: Ioana Ciornei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    IoanaCiornei authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    77e566c View commit details
    Browse the repository at this point in the history
  52. dpaa2-switch: do not ask for MDB, VLAN and FDB replay

    [ Upstream commit f24a49a ]
    
    Starting with commit 4e51bf4 ("net: bridge: move the switchdev
    object replay helpers to "push" mode") the switchdev_bridge_port_offload()
    helper was extended with the intention to provide switchdev drivers easy
    access to object addition and deletion replays. This works by calling
    the replay helpers with non-NULL notifier blocks.
    
    In the same commit, the dpaa2-switch driver was updated so that it
    passes valid notifier blocks to the helper. At that moment, no
    regression was identified through testing.
    
    In the meantime, the blamed commit changed the behavior in terms of
    which ports get hit by the replay. Before this commit, only the initial
    port which identified itself as offloaded through
    switchdev_bridge_port_offload() got a replay of all port objects and
    FDBs. After this, the newly joining port will trigger a replay of
    objects on all bridge ports and on the bridge itself.
    
    This behavior leads to errors in dpaa2_switch_port_vlans_add() when a
    VLAN gets installed on the same interface multiple times.
    
    The intended mechanism to address this is to pass a non-NULL ctx to the
    switchdev_bridge_port_offload() helper and then check it against the
    port's private structure. But since the driver does not have any use for
    the replayed port objects and FDBs until it gains support for LAG
    offload, it's better to fix the issue by reverting the dpaa2-switch
    driver to not ask for replay. The pointers will be added back when we
    are prepared to ignore replays on unrelated ports.
    
    Fixes: b28d580 ("net: bridge: switchdev: replay all VLAN groups")
    Signed-off-by: Ioana Ciornei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    IoanaCiornei authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    da8732c View commit details
    Browse the repository at this point in the history
  53. net: stmmac: dwmac-qcom-ethqos: Fix drops in 10M SGMII RX

    [ Upstream commit 981d947 ]
    
    In 10M SGMII mode all the packets are being dropped due to wrong Rx clock.
    SGMII 10MBPS mode needs RX clock divider programmed to avoid drops in Rx.
    Update configure SGMII function with Rx clk divider programming.
    
    Fixes: 463120c ("net: stmmac: dwmac-qcom-ethqos: add support for SGMII")
    Tested-by: Andrew Halaney <[email protected]>
    Signed-off-by: Sneh Shah <[email protected]>
    Reviewed-by: Bjorn Andersson <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Sneh Shah authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ad531df View commit details
    Browse the repository at this point in the history
  54. net: stmmac: Handle disabled MDIO busses from devicetree

    [ Upstream commit e23c0d2 ]
    
    Many hardware configurations have the MDIO bus disabled, and are instead
    using some other MDIO bus to talk to the MAC's phy.
    
    of_mdiobus_register() returns -ENODEV in this case. Let's handle it
    gracefully instead of failing to probe the MAC.
    
    Fixes: 47dd7a5 ("net: add support for STMicroelectronics Ethernet controllers.")
    Signed-off-by: Andrew Halaney <[email protected]>
    Reviewed-by: Serge Semin <[email protected]>
    Link: https://lore.kernel.org/r/20231212-b4-stmmac-handle-mdio-enodev-v2-1-600171acf79f@redhat.com
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ahalaney authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    58c5566 View commit details
    Browse the repository at this point in the history
  55. appletalk: Fix Use-After-Free in atalk_ioctl

    [ Upstream commit 189ff16 ]
    
    Because atalk_ioctl() accesses sk->sk_receive_queue
    without holding a sk->sk_receive_queue.lock, it can
    cause a race with atalk_recvmsg().
    A use-after-free for skb occurs with the following flow.
    ```
    atalk_ioctl() -> skb_peek()
    atalk_recvmsg() -> skb_recv_datagram() -> skb_free_datagram()
    ```
    Add sk->sk_receive_queue.lock to atalk_ioctl() to fix this issue.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Hyunwoo Kim <[email protected]>
    Link: https://lore.kernel.org/r/20231213041056.GA519680@v4bel-B760M-AORUS-ELITE-AX
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    V4bel-theori authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    e15ded3 View commit details
    Browse the repository at this point in the history
  56. net: atlantic: fix double free in ring reinit logic

    [ Upstream commit 7bb26ea ]
    
    Driver has a logic leak in ring data allocation/free,
    where double free may happen in aq_ring_free if system is under
    stress and driver init/deinit is happening.
    
    The probability is higher to get this during suspend/resume cycle.
    
    Verification was done simulating same conditions with
    
        stress -m 2000 --vm-bytes 20M --vm-hang 10 --backoff 1000
        while true; do sudo ifconfig enp1s0 down; sudo ifconfig enp1s0 up; done
    
    Fixed by explicitly clearing pointers to NULL on deallocation
    
    Fixes: 018423e ("net: ethernet: aquantia: Add ring support code")
    Reported-by: Linus Torvalds <[email protected]>
    Closes: https://lore.kernel.org/netdev/CAHk-=wiZZi7FcvqVSUirHBjx0bBUZ4dFrMDVLc3+3HCrtq0rBA@mail.gmail.com/
    Signed-off-by: Igor Russkikh <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    cail authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    3b5daf2 View commit details
    Browse the repository at this point in the history
  57. cred: switch to using atomic_long_t

    commit f8fa5d7 upstream.
    
    There are multiple ways to grab references to credentials, and the only
    protection we have against overflowing it is the memory required to do
    so.
    
    With memory sizes only moving in one direction, let's bump the reference
    count to 64-bit and move it outside the realm of feasibly overflowing.
    
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    axboe authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f6a7ce5 View commit details
    Browse the repository at this point in the history
  58. cred: get rid of CONFIG_DEBUG_CREDENTIALS

    commit ae19141 upstream.
    
    This code is rarely (never?) enabled by distros, and it hasn't caught
    anything in decades. Let's kill off this legacy debug code.
    
    Suggested-by: Linus Torvalds <[email protected]>
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    axboe authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    207f135 View commit details
    Browse the repository at this point in the history
  59. HID: i2c-hid: Add IDEA5002 to i2c_hid_acpi_blacklist[]

    commit a9f68ff upstream.
    
    Users have reported problems with recent Lenovo laptops that contain
    an IDEA5002 I2C HID device. Reports include fans turning on and
    running even at idle and spurious wakeups from suspend.
    
    Presumably in the Windows ecosystem there is an application that
    uses the HID device. Maybe that puts it into a lower power state so
    it doesn't cause spurious events.
    
    This device doesn't serve any functional purpose in Linux as nothing
    interacts with it so blacklist it from being probed. This will
    prevent the GPIO driver from setting up the GPIO and the spurious
    interrupts and wake events will not occur.
    
    Cc: [email protected] # 6.1
    Reported-and-tested-by: Marcus Aram <[email protected]>
    Reported-and-tested-by: Mark Herbert <[email protected]>
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2812
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    fea8562 View commit details
    Browse the repository at this point in the history
  60. HID: Add quirk for Labtec/ODDOR/aikeec handbrake

    commit 31e5252 upstream.
    
    This device needs ALWAYS_POLL quirk, otherwise it keeps reconnecting
    indefinitely. It is a handbrake for sim racing detected as joystick.
    Reported and tested by GitHub user N0th1ngM4tt3rs.
    
    Link: https://github.com/sriemer/fix-linux-mouse issue 22
    Signed-off-by: Sebastian Parschauer <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    sriemer authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6e5782b View commit details
    Browse the repository at this point in the history
  61. fuse: Rename DIRECT_IO_RELAX to DIRECT_IO_ALLOW_MMAP

    commit c55e0a5 upstream.
    
    Although DIRECT_IO_RELAX's initial usage is to allow shared mmap, its
    description indicates a purpose of reducing memory footprint. This
    may imply that it could be further used to relax other DIRECT_IO
    operations in the future.
    
    Replace it with a flag DIRECT_IO_ALLOW_MMAP which does only one thing,
    allow shared mmap of DIRECT_IO files while still bypassing the cache
    on regular reads and writes.
    
    [Miklos] Also Keep DIRECT_IO_RELAX definition for backward compatibility.
    
    Signed-off-by: Tyler Fanelli <[email protected]>
    Fixes: e78662e ("fuse: add a new fuse init flag to relax restrictions in no cache mode")
    Cc: <[email protected]> # v6.6
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    tylerfanelli authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9f36c1c View commit details
    Browse the repository at this point in the history
  62. fuse: share lookup state between submount and its parent

    commit c4d361f upstream.
    
    Fuse submounts do not perform a lookup for the nodeid that they inherit
    from their parent.  Instead, the code decrements the nlookup on the
    submount's fuse_inode when it is instantiated, and no forget is
    performed when a submount root is evicted.
    
    Trouble arises when the submount's parent is evicted despite the
    submount itself being in use.  In this author's case, the submount was
    in a container and deatched from the initial mount namespace via a
    MNT_DEATCH operation.  When memory pressure triggered the shrinker, the
    inode from the parent was evicted, which triggered enough forgets to
    render the submount's nodeid invalid.
    
    Since submounts should still function, even if their parent goes away,
    solve this problem by sharing refcounted state between the parent and
    its submount.  When all of the references on this shared state reach
    zero, it's safe to forget the final lookup of the fuse nodeid.
    
    Signed-off-by: Krister Johansen <[email protected]>
    Cc: [email protected]
    Fixes: 1866d77 ("fuse: Allow fuse_fill_super_common() for submounts")
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kmjohansen authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    2939dd3 View commit details
    Browse the repository at this point in the history
  63. fuse: disable FOPEN_PARALLEL_DIRECT_WRITES with FUSE_DIRECT_IO_ALLOW_…

    …MMAP
    
    commit 3f29f1c upstream.
    
    The new fuse init flag FUSE_DIRECT_IO_ALLOW_MMAP breaks assumptions made by
    FOPEN_PARALLEL_DIRECT_WRITES and causes test generic/095 to hit
    BUG_ON(fi->writectr < 0) assertions in fuse_set_nowrite():
    
    generic/095 5s ...
      kernel BUG at fs/fuse/dir.c:1756!
    ...
      ? fuse_set_nowrite+0x3d/0xdd
      ? do_raw_spin_unlock+0x88/0x8f
      ? _raw_spin_unlock+0x2d/0x43
      ? fuse_range_is_writeback+0x71/0x84
      fuse_sync_writes+0xf/0x19
      fuse_direct_io+0x167/0x5bd
      fuse_direct_write_iter+0xf0/0x146
    
    Auto disable FOPEN_PARALLEL_DIRECT_WRITES when server negotiated
    FUSE_DIRECT_IO_ALLOW_MMAP.
    
    Fixes: e78662e ("fuse: add a new fuse init flag to relax restrictions in no cache mode")
    Cc: <[email protected]> # v6.6
    Signed-off-by: Amir Goldstein <[email protected]>
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    amir73il authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    fbcddc7 View commit details
    Browse the repository at this point in the history
  64. fuse: dax: set fc->dax to NULL in fuse_dax_conn_free()

    commit 7f8ed28 upstream.
    
    fuse_dax_conn_free() will be called when fuse_fill_super_common() fails
    after fuse_dax_conn_alloc(). Then deactivate_locked_super() in
    virtio_fs_get_tree() will call virtio_kill_sb() to release the discarded
    superblock. This will call fuse_dax_conn_free() again in fuse_conn_put(),
    resulting in a possible double free.
    
    Fixes: 1dd5395 ("virtiofs: add a mount option to enable dax")
    Signed-off-by: Hangyu Hua <[email protected]>
    Acked-by: Vivek Goyal <[email protected]>
    Reviewed-by: Jingbo Xu <[email protected]>
    Cc: <[email protected]> # v5.10
    Signed-off-by: Miklos Szeredi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    HBh25Y authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ce5a6df View commit details
    Browse the repository at this point in the history
  65. io_uring/cmd: fix breakage in SOCKET_URING_OP_SIOC* implementation

    commit 1ba0e9d upstream.
    
    	In 8e9fad0 "io_uring: Add io_uring command support for sockets"
    you've got an include of asm-generic/ioctls.h done in io_uring/uring_cmd.c.
    That had been done for the sake of this chunk -
    +               ret = prot->ioctl(sk, SIOCINQ, &arg);
    +               if (ret)
    +                       return ret;
    +               return arg;
    +       case SOCKET_URING_OP_SIOCOUTQ:
    +               ret = prot->ioctl(sk, SIOCOUTQ, &arg);
    
    SIOC{IN,OUT}Q are defined to symbols (FIONREAD and TIOCOUTQ) that come from
    ioctls.h, all right, but the values vary by the architecture.
    
    FIONREAD is
    	0x467F on mips
    	0x4004667F on alpha, powerpc and sparc
    	0x8004667F on sh and xtensa
    	0x541B everywhere else
    TIOCOUTQ is
    	0x7472 on mips
    	0x40047473 on alpha, powerpc and sparc
    	0x80047473 on sh and xtensa
    	0x5411 everywhere else
    
    ->ioctl() expects the same values it would've gotten from userland; all
    places where we compare with SIOC{IN,OUT}Q are using asm/ioctls.h, so
    they pick the correct values.  io_uring_cmd_sock(), OTOH, ends up
    passing the default ones.
    
    Fixes: 8e9fad0 ("io_uring: Add io_uring command support for sockets")
    Cc:  <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Link: https://lore.kernel.org/r/20231214213408.GT1674809@ZenIV
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Al Viro authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9566ef5 View commit details
    Browse the repository at this point in the history
  66. ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB

    commit 3b1ff57 upstream.
    
    Add one more older NUC model that requires quirk to force all pins to be
    connected. The display codec pins are not registered properly without
    the force-connect quirk. The codec will report only one pin as having
    external connectivity, but i915 finds all three connectors on the
    system, so the two drivers are not in sync.
    
    Issue found with DRM igt-gpu-tools test kms_hdmi_inject@inject-audio.
    
    Link: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/3
    Cc: Ville Syrjälä <[email protected]>
    Cc: Jani Saarinen <[email protected]>
    Signed-off-by: Kai Vehmanen <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kv2019i authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c52ebaf View commit details
    Browse the repository at this point in the history
  67. ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants

    commit 924f5ca upstream.
    
    On ASUSTeK Z170M PLUS and Z170 PRO GAMING systems, the display codec
    pins are not registered properly without the force-connect quirk. The
    codec will report only one pin as having external connectivity, but i915
    finds all three connectors on the system, so the two drivers are not
    in sync.
    
    Issue found with DRM igt-gpu-tools test kms_hdmi_inject@inject-audio.
    
    Link: https://gitlab.freedesktop.org/drm/intel/-/issues/9801
    Cc: Ville Syrjälä <[email protected]>
    Cc: Jani Saarinen <[email protected]>
    Signed-off-by: Kai Vehmanen <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    kv2019i authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    7ec57c1 View commit details
    Browse the repository at this point in the history
  68. ALSA: hda/realtek: Apply mute LED quirk for HP15-db

    commit 9b726bf upstream.
    
    The HP laptop 15-db0403ng uses the ALC236 codec and controls the mute
    LED using COEF 0x07 index 1.
    Sound card subsystem: Hewlett-Packard Company Device [103c:84ae]
    
    Use the existing quirk for this model.
    
    Signed-off-by: Hartmut Knaack <[email protected]>
    Cc: <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Hartmut Knaack authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ffd1fe1 View commit details
    Browse the repository at this point in the history
  69. ALSA: hda/tas2781: leave hda_component in usable state

    commit 75a25d3 upstream.
    
    Unloading then loading the module causes a NULL ponter dereference.
    
    The hda_unbind zeroes the hda_component, later the hda_bind tries
    to dereference the codec field.
    
    The hda_component is only initialized once by tas2781_generic_fixup.
    
    Set only previously modified fields to NULL.
    
    BUG: kernel NULL pointer dereference, address: 0000000000000322
    Call Trace:
     <TASK>
     ? __die+0x23/0x70
     ? page_fault_oops+0x171/0x4e0
     ? exc_page_fault+0x7f/0x180
     ? asm_exc_page_fault+0x26/0x30
     ? tas2781_hda_bind+0x59/0x140 [snd_hda_scodec_tas2781_i2c]
     component_bind_all+0xf3/0x240
     try_to_bring_up_aggregate_device+0x1c3/0x270
     __component_add+0xbc/0x1a0
     tas2781_hda_i2c_probe+0x289/0x3a0 [snd_hda_scodec_tas2781_i2c]
     i2c_device_probe+0x136/0x2e0
    
    Fixes: 5be27f1 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
    Cc: [email protected]
    Signed-off-by: Gergo Koteles <[email protected]>
    Link: https://lore.kernel.org/r/8b8ed2bd5f75fbb32e354a3226c2f966fa85b46b.1702156522.git.soyer@irl.hu
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    soyersoyer authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    7fc8bfd View commit details
    Browse the repository at this point in the history
  70. ALSA: hda/tas2781: handle missing EFI calibration data

    commit 3307142 upstream.
    
    The code does not properly check whether the calibration variable is
    available in the EFI. If it is not available, it causes a NULL pointer
    dereference.
    
    Check the return value of the first get_variable call also.
    
    BUG: kernel NULL pointer dereference, address: 0000000000000000
    Call Trace:
     <TASK>
     ? __die+0x23/0x70
     ? page_fault_oops+0x171/0x4e0
     ? srso_alias_return_thunk+0x5/0x7f
     ? schedule+0x5e/0xd0
     ? exc_page_fault+0x7f/0x180
     ? asm_exc_page_fault+0x26/0x30
     ? crc32_body+0x2c/0x120
     ? tas2781_save_calibration+0xe4/0x220 [snd_hda_scodec_tas2781_i2c]
     tasdev_fw_ready+0x1af/0x280 [snd_hda_scodec_tas2781_i2c]
     request_firmware_work_func+0x59/0xa0
    
    Fixes: 5be27f1 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
    CC: [email protected]
    Signed-off-by: Gergo Koteles <[email protected]>
    Link: https://lore.kernel.org/r/f1f6583bda918f78556f67d522ca7b3b91cebbd5.1702251102.git.soyer@irl.hu
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    soyersoyer authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    795e91c View commit details
    Browse the repository at this point in the history
  71. ALSA: hda/tas2781: call cleanup functions only once

    commit 6c6fa26 upstream.
    
    If the module can load the RCA but not the firmware binary, it will call
    the cleanup functions. Then unloading the module causes general
    protection fault due to double free.
    
    Do not call the cleanup functions in tasdev_fw_ready.
    
    general protection fault, probably for non-canonical address
    0x6f2b8a2bff4c8fec: 0000 [#1] PREEMPT SMP NOPTI
    Call Trace:
     <TASK>
     ? die_addr+0x36/0x90
     ? exc_general_protection+0x1c5/0x430
     ? asm_exc_general_protection+0x26/0x30
     ? tasdevice_config_info_remove+0x6d/0xd0 [snd_soc_tas2781_fmwlib]
     tas2781_hda_unbind+0xaa/0x100 [snd_hda_scodec_tas2781_i2c]
     component_unbind+0x2e/0x50
     component_unbind_all+0x92/0xa0
     component_del+0xa8/0x140
     tas2781_hda_remove.isra.0+0x32/0x60 [snd_hda_scodec_tas2781_i2c]
     i2c_device_remove+0x26/0xb0
    
    Fixes: 5be27f1 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
    CC: [email protected]
    Signed-off-by: Gergo Koteles <[email protected]>
    Link: https://lore.kernel.org/r/1a0885c424bb21172702d254655882b59ef6477a.1702510018.git.soyer@irl.hu
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    soyersoyer authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d94fad0 View commit details
    Browse the repository at this point in the history
  72. ALSA: hda/tas2781: reset the amp before component_add

    commit 315deab upstream.
    
    Calling component_add starts loading the firmware, the callback function
    writes the program to the amplifiers. If the module resets the
    amplifiers after component_add, it happens that one of the amplifiers
    does not work because the reset and program writing are interleaving.
    
    Call tas2781_reset before component_add to ensure reliable
    initialization.
    
    Fixes: 5be27f1 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
    CC: [email protected]
    Signed-off-by: Gergo Koteles <[email protected]>
    Link: https://lore.kernel.org/r/4d23bf58558e23ee8097de01f70f1eb8d9de2d15.1702511246.git.soyer@irl.hu
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    soyersoyer authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    56e2212 View commit details
    Browse the repository at this point in the history
  73. Revert "PCI: acpiphp: Reassign resources on bridge if necessary"

    commit 5df1274 upstream.
    
    This reverts commit 40613da and the
    subsequent fix to it:
    
      cc22522 ("PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus")
    
    40613da fixed a problem where hot-adding a device with large BARs
    failed if the bridge windows programmed by firmware were not large enough.
    
    cc22522 ("PCI: acpiphp: Use pci_assign_unassigned_bridge_resources()
    only for non-root bus") fixed a problem with 40613da: an ACPI hot-add
    of a device on a PCI root bus (common in the virt world) or firmware
    sending ACPI Bus Check to non-existent Root Ports (e.g., on Dell Inspiron
    7352/0W6WV0) caused a NULL pointer dereference and suspend/resume hangs.
    
    Unfortunately the combination of 40613da and cc22522 caused other
    problems:
    
      - Fiona reported that hot-add of SCSI disks in QEMU virtual machine fails
        sometimes.
    
      - Dongli reported a similar problem with hot-add of SCSI disks.
    
      - Jonathan reported a console freeze during boot on bare metal due to an
        error in radeon GPU initialization.
    
    Revert both patches to avoid adding these problems.  This means we will
    again see the problems with hot-adding devices with large BARs and the NULL
    pointer dereferences and suspend/resume issues that 40613da and
    cc22522 were intended to fix.
    
    Fixes: 40613da ("PCI: acpiphp: Reassign resources on bridge if necessary")
    Fixes: cc22522 ("PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus")
    Reported-by: Fiona Ebner <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]
    Reported-by: Dongli Zhang <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]
    Reported-by: Jonathan Woithe <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Acked-by: Michael S. Tsirkin <[email protected]>
    Acked-by: Igor Mammedov <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    bjorn-helgaas authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5cc8d88 View commit details
    Browse the repository at this point in the history
  74. PCI: loongson: Limit MRRS to 256

    commit ef61a04 upstream.
    
    This is a partial revert of 8b3517f ("PCI: loongson: Prevent LS7A MRRS
    increases") for MIPS-based Loongson.
    
    Some MIPS Loongson systems don't support arbitrary Max_Read_Request_Size
    (MRRS) settings.  8b3517f ("PCI: loongson: Prevent LS7A MRRS
    increases") worked around that by (1) assuming that firmware configured
    MRRS to the maximum supported value and (2) preventing the PCI core from
    increasing MRRS.
    
    Unfortunately, some firmware doesn't set that maximum MRRS correctly, which
    results in devices not being initialized correctly.  One symptom, from the
    Debian report below, is this:
    
      ata4.00: exception Emask 0x0 SAct 0x20000000 SErr 0x0 action 0x6 frozen
      ata4.00: failed command: WRITE FPDMA QUEUED
      ata4.00: cmd 61/20:e8:00:f0:e1/00:00:00:00:00/40 tag 29 ncq dma 16384 out
               res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
      ata4.00: status: { DRDY }
      ata4: hard resetting link
    
    Limit MRRS to 256 because MIPS Loongson with higher MRRS support is
    considered rare.
    
    This must be done at device enablement stage because the MRRS setting may
    get lost if PCI_COMMAND_MASTER on the parent bridge is cleared, and we are
    only sure parent bridge is enabled at this point.
    
    Fixes: 8b3517f ("PCI: loongson: Prevent LS7A MRRS increases")
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217680
    Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035587
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jiaxun Yang <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Acked-by: Huacai Chen <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    FlyGoat authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4fb5358 View commit details
    Browse the repository at this point in the history
  75. PCI/ASPM: Add pci_enable_link_state_locked()

    commit 718ab82 upstream.
    
    Add pci_enable_link_state_locked() for enabling link states that can be
    used in contexts where a pci_bus_sem read lock is already held (e.g. from
    pci_walk_bus()).
    
    This helper will be used to fix a couple of potential deadlocks where
    the current helper is called with the lock already held, hence the CC
    stable tag.
    
    Fixes: f492edb ("PCI: vmd: Add quirk to configure PCIe ASPM and LTR")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Johan Hovold <[email protected]>
    [bhelgaas: include helper name in subject, commit log]
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Manivannan Sadhasivam <[email protected]>
    Cc: <[email protected]>	# 6.3
    Cc: Michael Bottini <[email protected]>
    Cc: David E. Box <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    1e1f461 View commit details
    Browse the repository at this point in the history
  76. ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE

    commit 1373665 upstream.
    
    MS confirm that "AISi" name of SMB2_CREATE_ALLOCATION_SIZE in MS-SMB2
    specification is a typo. cifs/ksmbd have been using this wrong name from
    MS-SMB2. It should be "AlSi". Also It will cause problem when running
    smb2.create.open test in smbtorture against ksmbd.
    
    Cc: [email protected]
    Fixes: 12197a7 ("Clarify SMB2/SMB3 create context and add missing ones")
    Signed-off-by: Namjae Jeon <[email protected]>
    Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    namjaejeon authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f94c443 View commit details
    Browse the repository at this point in the history
  77. PCI: vmd: Fix potential deadlock when enabling ASPM

    commit 49de0dc upstream.
    
    The vmd_pm_enable_quirk() helper is called from pci_walk_bus() during
    probe to enable ASPM for controllers with VMD_FEAT_BIOS_PM_QUIRK set.
    
    Since pci_walk_bus() already holds a pci_bus_sem read lock, use
    pci_enable_link_state_locked() to enable link states in order to avoid a
    potential deadlock (e.g. in case someone takes a write lock before
    reacquiring the read lock).
    
    Fixes: f492edb ("PCI: vmd: Add quirk to configure PCIe ASPM and LTR")
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Johan Hovold <[email protected]>
    [bhelgaas: add "potential" in subject since the deadlock has only been
    reported by lockdep, include helper name in commit log]
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Manivannan Sadhasivam <[email protected]>
    Cc: <[email protected]>	# 6.3
    Cc: Michael Bottini <[email protected]>
    Cc: David E. Box <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jhovold authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    98bd0b4 View commit details
    Browse the repository at this point in the history
  78. drm/mediatek: fix kernel oops if no crtc is found

    [ Upstream commit 4662817 ]
    
    drm_crtc_from_index(0) might return NULL if there are no CRTCs
    registered at all which will lead to a kernel oops in
    mtk_drm_crtc_dma_dev_get(). Add the missing return value check.
    
    Fixes: 0d9eee9 ("drm/mediatek: Add drm ovl_adaptor sub driver for MT8195")
    Signed-off-by: Michael Walle <[email protected]>
    Reviewed-by: Nícolas F. R. A. Prado <[email protected]>
    Tested-by: Nícolas F. R. A. Prado <[email protected]>
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Tested-by: Eugen Hristev <[email protected]>
    Reviewed-by: Eugen Hristev <[email protected]>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
    Signed-off-by: Chun-Kuang Hu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    mwalle authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    8964524 View commit details
    Browse the repository at this point in the history
  79. drm/mediatek: Add spinlock for setting vblank event in atomic_begin

    [ Upstream commit fe4c5f6 ]
    
    Add spinlock protection to avoid race condition on vblank event
    between mtk_drm_crtc_atomic_begin() and mtk_drm_finish_page_flip().
    
    Fixes: 119f517 ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.")
    Signed-off-by: Jason-JH.Lin <[email protected]>
    Suggested-by: AngeloGioacchino Del Regno <[email protected]>
    Reviewed-by: Alexandre Mergnat <[email protected]>
    Reviewed-by: Fei Shao <[email protected]>
    Tested-by: Fei Shao <[email protected]>
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Reviewed-by: CK Hu <[email protected]>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
    Signed-off-by: Chun-Kuang Hu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Jason-JH.Lin authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    7d6e9cb View commit details
    Browse the repository at this point in the history
  80. accel/ivpu: Print information about used workarounds

    [ Upstream commit eefa13a ]
    
    Use ivpu_dbg(MISC) to print information about workarounds.
    
    Reviewed-by: Karol Wachowski <[email protected]>
    Reviewed-by: Jeffrey Hugo <[email protected]>
    Signed-off-by: Stanislaw Gruszka <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Stable-dep-of: 35c49cf ("accel/ivpu/37xx: Fix interrupt_clear_with_0 WA initialization")
    Signed-off-by: Sasha Levin <[email protected]>
    sgruszka authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    0afcc62 View commit details
    Browse the repository at this point in the history
  81. accel/ivpu/37xx: Fix interrupt_clear_with_0 WA initialization

    [ Upstream commit 35c49cf ]
    
    Using PCI Device ID/Revision to initialize the interrupt_clear_with_0
    workaround is problematic - there are many pre-production
    steppings with different behavior, even with the same PCI ID/Revision
    
    Instead of checking for PCI Device ID/Revision, check the VPU
    buttress interrupt status register behavior - if this register
    is not zero after writing 1s it means there register is RW
    instead of RW1C and we need to enable the interrupt_clear_with_0
    workaround.
    
    Fixes: 7f34e01 ("accel/ivpu: Clear specific interrupt status bits on C0")
    Signed-off-by: Andrzej Kacprowski <[email protected]>
    Signed-off-by: Jacek Lawrynowicz <[email protected]>
    Reviewed-by: Jeffrey Hugo <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    akacprow authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    83a42d7 View commit details
    Browse the repository at this point in the history
  82. drm/i915/selftests: Fix engine reset count storage for multi-tile

    [ Upstream commit 7c7c863 ]
    
    Engine->id namespace is per-tile so struct igt_live_test->reset_engine[]
    needs to be two-dimensional so engine reset counts from all tiles can be
    stored with no aliasing. With aliasing, if we had a real multi-tile
    platform, the reset counts would be incorrect for same engine instance on
    different tiles.
    
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    Fixes: 0c29efa ("drm/i915/selftests: Consider multi-gt instead of to_gt()")
    Reported-by: Alan Previn Teres Alexis <[email protected]>
    Cc: Tejas Upadhyay <[email protected]>
    Cc: Andi Shyti <[email protected]>
    Cc: Daniele Ceraolo Spurio <[email protected]>
    Reviewed-by: Andi Shyti <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit 0647ece)
    Signed-off-by: Jani Nikula <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tursulin authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    54d0831 View commit details
    Browse the repository at this point in the history
  83. drm/i915: Use internal class when counting engine resets

    [ Upstream commit 1f721a9 ]
    
    Commit 5035794 ("drm/i915/gsc: Mark internal GSC engine with reserved uabi class")
    made the GSC0 engine not have a valid uabi class and so broke the engine
    reset counting, which in turn was made class based in cb823ed ("drm/i915/gt: Use intel_gt as the primary object for handling resets").
    
    Despite the title and commit text of the latter is not mentioning it (and
    has left the storage array incorrectly sized), tracking by class, despite
    it adding aliasing in hypthotetical multi-tile systems, is handy for
    virtual engines which for instance do not have a valid engine->id.
    
    Therefore we keep that but just change it to use the internal class which
    is always valid. We also add a helper to increment the count, which
    aligns with the existing getter.
    
    What was broken without this fix were out of bounds reads every time a
    reset would happen on the GSC0 engine, or during selftests when storing
    and cross-checking the counts in igt_live_test_begin and
    igt_live_test_end.
    
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    Fixes: 5035794 ("drm/i915/gsc: Mark internal GSC engine with reserved uabi class")
    [tursulin: fixed Fixes tag]
    Reported-by: Alan Previn Teres Alexis <[email protected]>
    Cc: Daniele Ceraolo Spurio <[email protected]>
    Reviewed-by: Daniele Ceraolo Spurio <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    (cherry picked from commit cf9cb02)
    Signed-off-by: Jani Nikula <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    tursulin authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    cd378c3 View commit details
    Browse the repository at this point in the history
  84. selftests/mm: cow: print ksft header before printing anything else

    [ Upstream commit a6fcd57 ]
    
    Doing a ksft_print_msg() before the ksft_print_header() seems to confuse
    the ksft framework in a strange way: running the test on the cmdline
    results in the expected output.
    
    But piping the output somewhere else, results in some odd output,
    whereby we repeatedly get the same info printed:
    	# [INFO] detected THP size: 2048 KiB
    	# [INFO] detected hugetlb page size: 2048 KiB
    	# [INFO] detected hugetlb page size: 1048576 KiB
    	# [INFO] huge zeropage is enabled
    	TAP version 13
    	1..190
    	# [INFO] Anonymous memory tests in private mappings
    	# [RUN] Basic COW after fork() ... with base page
    	# [INFO] detected THP size: 2048 KiB
    	# [INFO] detected hugetlb page size: 2048 KiB
    	# [INFO] detected hugetlb page size: 1048576 KiB
    	# [INFO] huge zeropage is enabled
    	TAP version 13
    	1..190
    	# [INFO] Anonymous memory tests in private mappings
    	# [RUN] Basic COW after fork() ... with base page
    	ok 1 No leak from parent into child
    	# [RUN] Basic COW after fork() ... with swapped out base page
    	# [INFO] detected THP size: 2048 KiB
    	# [INFO] detected hugetlb page size: 2048 KiB
    	# [INFO] detected hugetlb page size: 1048576 KiB
    	# [INFO] huge zeropage is enabled
    
    Doing the ksft_print_header() first seems to resolve that and gives us
    the output we expect:
    	TAP version 13
    	# [INFO] detected THP size: 2048 KiB
    	# [INFO] detected hugetlb page size: 2048 KiB
    	# [INFO] detected hugetlb page size: 1048576 KiB
    	# [INFO] huge zeropage is enabled
    	1..190
    	# [INFO] Anonymous memory tests in private mappings
    	# [RUN] Basic COW after fork() ... with base page
    	ok 1 No leak from parent into child
    	# [RUN] Basic COW after fork() ... with swapped out base page
    	ok 2 No leak from parent into child
    	# [RUN] Basic COW after fork() ... with THP
    	ok 3 No leak from parent into child
    	# [RUN] Basic COW after fork() ... with swapped-out THP
    	ok 4 No leak from parent into child
    	# [RUN] Basic COW after fork() ... with PTE-mapped THP
    	ok 5 No leak from parent into child
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: f4b5fd6 ("selftests/vm: anon_cow: THP tests")
    Signed-off-by: David Hildenbrand <[email protected]>
    Reported-by: Nico Pache <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    davidhildenbrand authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ca3ebcf View commit details
    Browse the repository at this point in the history
  85. x86/hyperv: Fix the detection of E820_TYPE_PRAM in a Gen2 VM

    [ Upstream commit 7e8037b ]
    
    A Gen2 VM doesn't support legacy PCI/PCIe, so both raw_pci_ops and
    raw_pci_ext_ops are NULL, and pci_subsys_init() -> pcibios_init()
    doesn't call pcibios_resource_survey() -> e820__reserve_resources_late();
    as a result, any emulated persistent memory of E820_TYPE_PRAM (12) via
    the kernel parameter memmap=nn[KMG]!ss is not added into iomem_resource
    and hence can't be detected by register_e820_pmem().
    
    Fix this by directly calling e820__reserve_resources_late() in
    hv_pci_init(), which is called from arch_initcall(pci_arch_init).
    
    It's ok to move a Gen2 VM's e820__reserve_resources_late() from
    subsys_initcall(pci_subsys_init) to arch_initcall(pci_arch_init) because
    the code in-between doesn't depend on the E820 resources.
    e820__reserve_resources_late() depends on e820__reserve_resources(),
    which has been called earlier from setup_arch().
    
    For a Gen-2 VM, the new hv_pci_init() also adds any memory of
    E820_TYPE_PMEM (7) into iomem_resource, and acpi_nfit_register_region() ->
    acpi_nfit_insert_resource() -> region_intersects() returns
    REGION_INTERSECTS, so the memory of E820_TYPE_PMEM won't get added twice.
    
    Changed the local variable "int gen2vm" to "bool gen2vm".
    
    Signed-off-by: Saurabh Sengar <[email protected]>
    Signed-off-by: Dexuan Cui <[email protected]>
    Signed-off-by: Wei Liu <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Saurabh Sengar authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    54d8c1d View commit details
    Browse the repository at this point in the history
  86. usb: aqc111: check packet for fixup for true limit

    [ Upstream commit ccab434 ]
    
    If a device sends a packet that is inbetween 0
    and sizeof(u64) the value passed to skb_trim()
    as length will wrap around ending up as some very
    large value.
    
    The driver will then proceed to parse the header
    located at that position, which will either oops or
    process some random value.
    
    The fix is to check against sizeof(u64) rather than
    0, which the driver currently does. The issue exists
    since the introduction of the driver.
    
    Signed-off-by: Oliver Neukum <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    oneukum authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    2ebf775 View commit details
    Browse the repository at this point in the history
  87. stmmac: dwmac-loongson: Add architecture dependency

    [ Upstream commit 7fbd5fc ]
    
    Only present the DWMAC_LOONGSON option on architectures where it can
    actually be used.
    
    This follows the same logic as the DWMAC_INTEL option.
    
    Signed-off-by: Jean Delvare <[email protected]>
    Cc: Keguang Zhang <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    jdelvare authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c40c0b8 View commit details
    Browse the repository at this point in the history
  88. rxrpc: Fix some minor issues with bundle tracing

    [ Upstream commit 0c3bd08 ]
    
    Fix some superficial issues with the tracing of rxrpc_bundle structs,
    including:
    
     (1) Set the debug_id when the bundle is allocated rather than when it is
         set up so that the "NEW" trace line displays the correct bundle ID.
    
     (2) Show the refcount when emitting the "FREE" traceline.
    
    Signed-off-by: David Howells <[email protected]>
    cc: Marc Dionne <[email protected]>
    cc: "David S. Miller" <[email protected]>
    cc: Eric Dumazet <[email protected]>
    cc: Jakub Kicinski <[email protected]>
    cc: Paolo Abeni <[email protected]>
    cc: [email protected]
    cc: [email protected]
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    dhowells authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    462f111 View commit details
    Browse the repository at this point in the history
  89. blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock r…

    …equired!"
    
    [ Upstream commit 27b13e2 ]
    
    Inside blkg_for_each_descendant_pre(), both
    css_for_each_descendant_pre() and blkg_lookup() requires RCU read lock,
    and either cgroup_assert_mutex_or_rcu_locked() or rcu_read_lock_held()
    is called.
    
    Fix the warning by adding rcu read lock.
    
    Reported-by: Changhui Zhong <[email protected]>
    Signed-off-by: Ming Lei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ming Lei authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5aba47c View commit details
    Browse the repository at this point in the history
  90. blk-cgroup: bypass blkcg_deactivate_policy after destroying

    [ Upstream commit e63a573 ]
    
    blkcg_deactivate_policy() can be called after blkg_destroy_all()
    returns, and it isn't necessary since blkg_destroy_all has covered
    policy deactivation.
    
    Signed-off-by: Ming Lei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Ming Lei authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    0730b1e View commit details
    Browse the repository at this point in the history
  91. bcache: avoid oversize memory allocation by small stripe_size

    [ Upstream commit baf8fb7 ]
    
    Arraies bcache->stripe_sectors_dirty and bcache->full_dirty_stripes are
    used for dirty data writeback, their sizes are decided by backing device
    capacity and stripe size. Larger backing device capacity or smaller
    stripe size make these two arraies occupies more dynamic memory space.
    
    Currently bcache->stripe_size is directly inherited from
    queue->limits.io_opt of underlying storage device. For normal hard
    drives, its limits.io_opt is 0, and bcache sets the corresponding
    stripe_size to 1TB (1<<31 sectors), it works fine 10+ years. But for
    devices do declare value for queue->limits.io_opt, small stripe_size
    (comparing to 1TB) becomes an issue for oversize memory allocations of
    bcache->stripe_sectors_dirty and bcache->full_dirty_stripes, while the
    capacity of hard drives gets much larger in recent decade.
    
    For example a raid5 array assembled by three 20TB hardrives, the raid
    device capacity is 40TB with typical 512KB limits.io_opt. After the math
    calculation in bcache code, these two arraies will occupy 400MB dynamic
    memory. Even worse Andrea Tomassetti reports that a 4KB limits.io_opt is
    declared on a new 2TB hard drive, then these two arraies request 2GB and
    512MB dynamic memory from kzalloc(). The result is that bcache device
    always fails to initialize on his system.
    
    To avoid the oversize memory allocation, bcache->stripe_size should not
    directly inherited by queue->limits.io_opt from the underlying device.
    This patch defines BCH_MIN_STRIPE_SZ (4MB) as minimal bcache stripe size
    and set bcache device's stripe size against the declared limits.io_opt
    value from the underlying storage device,
    - If the declared limits.io_opt > BCH_MIN_STRIPE_SZ, bcache device will
      set its stripe size directly by this limits.io_opt value.
    - If the declared limits.io_opt < BCH_MIN_STRIPE_SZ, bcache device will
      set its stripe size by a value multiplying limits.io_opt and euqal or
      large than BCH_MIN_STRIPE_SZ.
    
    Then the minimal stripe size of a bcache device will always be >= 4MB.
    For a 40TB raid5 device with 512KB limits.io_opt, memory occupied by
    bcache->stripe_sectors_dirty and bcache->full_dirty_stripes will be 50MB
    in total. For a 2TB hard drive with 4KB limits.io_opt, memory occupied
    by these two arraies will be 2.5MB in total.
    
    Such mount of memory allocated for bcache->stripe_sectors_dirty and
    bcache->full_dirty_stripes is reasonable for most of storage devices.
    
    Reported-by: Andrea Tomassetti <[email protected]>
    Signed-off-by: Coly Li <[email protected]>
    Reviewed-by: Eric Wheeler <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Coly Li authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    09bdafb View commit details
    Browse the repository at this point in the history
  92. bcache: remove redundant assignment to variable cur_idx

    [ Upstream commit be93825 ]
    
    Variable cur_idx is being initialized with a value that is never read,
    it is being re-assigned later in a while-loop. Remove the redundant
    assignment. Cleans up clang scan build warning:
    
    drivers/md/bcache/writeback.c:916:2: warning: Value stored to 'cur_idx'
    is never read [deadcode.DeadStores]
    
    Signed-off-by: Colin Ian King <[email protected]>
    Reviewed-by: Coly Li <[email protected]>
    Signed-off-by: Coly Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ColinIanKing authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6653417 View commit details
    Browse the repository at this point in the history
  93. bcache: add code comments for bch_btree_node_get() and __bch_btree_no…

    …de_alloc()
    
    [ Upstream commit 31f5b95 ]
    
    This patch adds code comments to bch_btree_node_get() and
    __bch_btree_node_alloc() that NULL pointer will not be returned and it
    is unnecessary to check NULL pointer by the callers of these routines.
    
    Signed-off-by: Coly Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Coly Li authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    2869189 View commit details
    Browse the repository at this point in the history
  94. bcache: avoid NULL checking to c->root in run_cache_set()

    [ Upstream commit 3eba5e0 ]
    
    In run_cache_set() after c->root returned from bch_btree_node_get(), it
    is checked by IS_ERR_OR_NULL(). Indeed it is unncessary to check NULL
    because bch_btree_node_get() will not return NULL pointer to caller.
    
    This patch replaces IS_ERR_OR_NULL() by IS_ERR() for the above reason.
    
    Signed-off-by: Coly Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Coly Li authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4a4bba9 View commit details
    Browse the repository at this point in the history
  95. nbd: fold nbd config initialization into nbd_alloc_config()

    [ Upstream commit 1b59860 ]
    
    There are no functional changes, make the code cleaner and prepare to
    fix null-ptr-dereference while accessing 'nbd->config'.
    
    Signed-off-by: Li Nan <[email protected]>
    Reviewed-by: Josef Bacik <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Li Nan authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4087936 View commit details
    Browse the repository at this point in the history
  96. nbd: factor out a helper to get nbd_config without holding 'config_lock'

    [ Upstream commit 3123ac7 ]
    
    There are no functional changes, just to make code cleaner and prepare
    to fix null-ptr-dereference while accessing 'nbd->config'.
    
    Signed-off-by: Li Nan <[email protected]>
    Reviewed-by: Josef Bacik <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Li Nan authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    8c15173 View commit details
    Browse the repository at this point in the history
  97. nbd: fix null-ptr-dereference while accessing 'nbd->config'

    [ Upstream commit c2da049 ]
    
    Memory reordering may occur in nbd_genl_connect(), causing config_refs
    to be set to 1 while nbd->config is still empty. Opening nbd at this
    time will cause null-ptr-dereference.
    
       T1                      T2
       nbd_open
        nbd_get_config_unlocked
                     	   nbd_genl_connect
                     	    nbd_alloc_and_init_config
                     	     //memory reordered
                      	     refcount_set(&nbd->config_refs, 1)  // 2
         nbd->config
          ->null point
    			     nbd->config = config  // 1
    
    Fix it by adding smp barrier to guarantee the execution sequence.
    
    Signed-off-by: Li Nan <[email protected]>
    Reviewed-by: Josef Bacik <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Li Nan authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c34fa2d View commit details
    Browse the repository at this point in the history
  98. nvme-auth: set explanation code for failure2 msgs

    [ Upstream commit 38ce157 ]
    
    Some error cases were not setting an auth-failure-reason-code-explanation.
    This means an AUTH_Failure2 message will be sent with an explanation value
    of 0 which is a reserved value.
    
    Signed-off-by: Mark O'Donovan <[email protected]>
    Reviewed-by: Hannes Reinecke <[email protected]>
    Reviewed-by: Sagi Grimberg <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    shiftee authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    89fc902 View commit details
    Browse the repository at this point in the history
  99. nvme: catch errors from nvme_configure_metadata()

    [ Upstream commit cd9aed6 ]
    
    nvme_configure_metadata() is issuing I/O, so we might incur an I/O
    error which will cause the connection to be reset.
    But in that case any further probing will race with reset and
    cause UAF errors.
    So return a status from nvme_configure_metadata() and abort
    probing if there was an I/O error.
    
    Signed-off-by: Hannes Reinecke <[email protected]>
    Signed-off-by: Keith Busch <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hreinecke authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9514925 View commit details
    Browse the repository at this point in the history
  100. selftests/bpf: fix bpf_loop_bench for new callback verification scheme

    [ Upstream commit f40bfd1 ]
    
    This is a preparatory change. A follow-up patch "bpf: verify callbacks
    as if they are called unknown number of times" changes logic for
    callbacks handling. While previously callbacks were verified as a
    single function call, new scheme takes into account that callbacks
    could be executed unknown number of times.
    
    This has dire implications for bpf_loop_bench:
    
        SEC("fentry/" SYS_PREFIX "sys_getpgid")
        int benchmark(void *ctx)
        {
                for (int i = 0; i < 1000; i++) {
                        bpf_loop(nr_loops, empty_callback, NULL, 0);
                        __sync_add_and_fetch(&hits, nr_loops);
                }
                return 0;
        }
    
    W/o callbacks change verifier sees it as a 1000 calls to
    empty_callback(). However, with callbacks change things become
    exponential:
    - i=0: state exploring empty_callback is scheduled with i=0 (a);
    - i=1: state exploring empty_callback is scheduled with i=1;
      ...
    - i=999: state exploring empty_callback is scheduled with i=999;
    - state (a) is popped from stack;
    - i=1: state exploring empty_callback is scheduled with i=1;
      ...
    
    Avoid this issue by rewriting outer loop as bpf_loop().
    Unfortunately, this adds a function call to a loop at runtime, which
    negatively affects performance:
    
                throughput               latency
       before:  149.919 ± 0.168 M ops/s, 6.670 ns/op
       after :  137.040 ± 0.187 M ops/s, 7.297 ns/op
    
    Acked-by: Andrii Nakryiko <[email protected]>
    Signed-off-by: Eduard Zingerman <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    eddyz87 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    0ade0b8 View commit details
    Browse the repository at this point in the history
  101. LoongArch: Add dependency between vmlinuz.efi and vmlinux.efi

    [ Upstream commit d3ec75b ]
    
    A common issue in Makefile is a race in parallel building.
    
    You need to be careful to prevent multiple threads from writing to the
    same file simultaneously.
    
    Commit 3939f33 ("ARM: 8418/1: add boot image dependencies to not
    generate invalid images") addressed such a bad scenario.
    
    A similar symptom occurs with the following command:
    
      $ make -j$(nproc) ARCH=loongarch vmlinux.efi vmlinuz.efi
        [ snip ]
        SORTTAB vmlinux
        OBJCOPY arch/loongarch/boot/vmlinux.efi
        OBJCOPY arch/loongarch/boot/vmlinux.efi
        PAD     arch/loongarch/boot/vmlinux.bin
        GZIP    arch/loongarch/boot/vmlinuz
        OBJCOPY arch/loongarch/boot/vmlinuz.o
        LD      arch/loongarch/boot/vmlinuz.efi.elf
        OBJCOPY arch/loongarch/boot/vmlinuz.efi
    
    The log "OBJCOPY arch/loongarch/boot/vmlinux.efi" is displayed twice.
    
    It indicates that two threads simultaneously enter arch/loongarch/boot/
    and write to arch/loongarch/boot/vmlinux.efi.
    
    It occasionally leads to a build failure:
    
      $ make -j$(nproc) ARCH=loongarch vmlinux.efi vmlinuz.efi
        [ snip ]
        SORTTAB vmlinux
        OBJCOPY arch/loongarch/boot/vmlinux.efi
        PAD     arch/loongarch/boot/vmlinux.bin
      truncate: Invalid number: ‘arch/loongarch/boot/vmlinux.bin’
      make[2]: *** [drivers/firmware/efi/libstub/Makefile.zboot:13:
      arch/loongarch/boot/vmlinux.bin] Error 1
      make[2]: *** Deleting file 'arch/loongarch/boot/vmlinux.bin'
      make[1]: *** [arch/loongarch/Makefile:146: vmlinuz.efi] Error 2
      make[1]: *** Waiting for unfinished jobs....
      make: *** [Makefile:234: __sub-make] Error 2
    
    vmlinuz.efi depends on vmlinux.efi, but such a dependency is not
    specified in arch/loongarch/Makefile.
    
    Signed-off-by: Masahiro Yamada <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    masahir0y authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    0337260 View commit details
    Browse the repository at this point in the history
  102. LoongArch: Record pc instead of offset in la_abs relocation

    [ Upstream commit aa0cbc1 ]
    
    To clarify, the previous version functioned flawlessly. However, it's
    worth noting that the LLVM's LoongArch backend currently lacks support
    for cross-section label calculations. With this patch, we enable the use
    of clang to compile relocatable kernels.
    
    Tested-by: Nathan Chancellor <[email protected]>
    Signed-off-by: WANG Rui <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    heiher authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ab3f300 View commit details
    Browse the repository at this point in the history
  103. LoongArch: Silence the boot warning about 'nokaslr'

    [ Upstream commit 902d75c ]
    
    The kernel parameter 'nokaslr' is handled before start_kernel(), so we
    don't need early_param() to mark it technically. But it can cause a boot
    warning as follows:
    
    Unknown kernel command line parameters "nokaslr", will be passed to user space.
    
    When we use 'init=/bin/bash', 'nokaslr' which passed to user space will
    even cause a kernel panic. So we use early_param() to mark 'nokaslr',
    simply print a notice and silence the boot warning (also fix a potential
    panic). This logic is similar to RISC-V.
    
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chenhuacai authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    71d8348 View commit details
    Browse the repository at this point in the history
  104. LoongArch: Mark {dmw,tlb}_virt_to_page() exports as non-GPL

    [ Upstream commit 19d86a4 ]
    
    Mark {dmw,tlb}_virt_to_page() exports as non-GPL, in order to let
    out-of-tree modules (e.g. OpenZFS) be built without errors. Otherwise
    we get:
    
    ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'dmw_virt_to_page'
    ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'tlb_virt_to_page'
    
    Reported-by: Haowu Ge <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    chenhuacai authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c28fec4 View commit details
    Browse the repository at this point in the history
  105. LoongArch: Implement constant timer shutdown interface

    [ Upstream commit d43f37b ]
    
    When a cpu is hot-unplugged, it is put in idle state and the function
    arch_cpu_idle_dead() is called. The timer interrupt for this processor
    should be disabled, otherwise there will be pending timer interrupt for
    the unplugged cpu, so that vcpu is prevented from giving up scheduling
    when system is running in vm mode.
    
    This patch implements the timer shutdown interface so that the constant
    timer will be properly disabled when a CPU is hot-unplugged.
    
    Reviewed-by: WANG Xuerui <[email protected]>
    Signed-off-by: Bibo Mao <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    bibo-mao authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    f61771a View commit details
    Browse the repository at this point in the history
  106. platform/x86: intel_telemetry: Fix kernel doc descriptions

    [ Upstream commit a658471 ]
    
    LKP found issues with a kernel doc in the driver:
    
    core.c:116: warning: Function parameter or member 'ioss_evtconfig' not described in 'telemetry_update_events'
    core.c:188: warning: Function parameter or member 'ioss_evtconfig' not described in 'telemetry_get_eventconfig'
    
    It looks like it were copy'n'paste typos when these descriptions
    had been introduced. Fix the typos.
    
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Signed-off-by: Andy Shevchenko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reviewed-by: Rajneesh Bhardwaj <[email protected]>
    Reviewed-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    andy-shev authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    086f91f View commit details
    Browse the repository at this point in the history
  107. HID: mcp2221: Set driver data before I2C adapter add

    [ Upstream commit f2d4a58 ]
    
    The process of adding an I2C adapter can invoke I2C accesses on that new
    adapter (see i2c_detect()).
    
    Ensure we have set the adapter's driver data to avoid null pointer
    dereferences in the xfer functions during the adapter add.
    
    This has been noted in the past and the same fix proposed but not
    completed. See:
    https://lore.kernel.org/lkml/[email protected]/
    
    Signed-off-by: Hamish Martin <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hamish Martin authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    2afe67c View commit details
    Browse the repository at this point in the history
  108. HID: mcp2221: Allow IO to start during probe

    [ Upstream commit 73ce9f1 ]
    
    During the probe we add an I2C adapter and as soon as we add that adapter
    it may be used for a transfer (e.g via the code in i2cdetect()).
    Those transfers are not able to complete and time out. This is because the
    HID raw_event callback (mcp2221_raw_event) will not be invoked until the
    HID device's 'driver_input_lock' is marked up at the completion of the
    probe in hid_device_probe(). This starves the driver of the responses it
    is waiting for.
    In order to allow the I2C transfers to complete while we are still in the
    probe, start the IO once we have completed init of the HID device.
    
    This issue seems to have been seen before and a patch was submitted but
    it seems it was never accepted. See:
    https://lore.kernel.org/all/[email protected]/
    
    Signed-off-by: Hamish Martin <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Hamish Martin authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d4b50ac View commit details
    Browse the repository at this point in the history
  109. HID: apple: add Jamesdonkey and A3R to non-apple keyboards list

    [ Upstream commit 113f736 ]
    
    Jamesdonkey A3R keyboard is identified as "Jamesdonkey A3R" in wired
    mode, "A3R-U" in wireless mode and "A3R" in bluetooth mode. Adding them
    to non-apple keyboards fixes function key.
    
    Signed-off-by: Yihong Cao <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Yihong Cao authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6b3507b View commit details
    Browse the repository at this point in the history
  110. HID: glorious: fix Glorious Model I HID report

    [ Upstream commit a5e913c ]
    
    The Glorious Model I mouse has a buggy HID report descriptor for its
    keyboard endpoint (used for programmable buttons). For report ID 2, there
    is a mismatch between Logical Minimum and Usage Minimum in the array that
    reports keycodes.
    
    The offending portion of the descriptor: (from hid-decode)
    
    0x95, 0x05,                    //  Report Count (5)                   30
    0x75, 0x08,                    //  Report Size (8)                    32
    0x15, 0x00,                    //  Logical Minimum (0)                34
    0x25, 0x65,                    //  Logical Maximum (101)              36
    0x05, 0x07,                    //  Usage Page (Keyboard)              38
    0x19, 0x01,                    //  Usage Minimum (1)                  40
    0x29, 0x65,                    //  Usage Maximum (101)                42
    0x81, 0x00,                    //  Input (Data,Arr,Abs)               44
    
    This bug shifts all programmed keycodes up by 1. Importantly, this causes
    "empty" array indexes of 0x00 to be interpreted as 0x01, ErrorRollOver.
    The presence of ErrorRollOver causes the system to ignore all keypresses
    from the endpoint and breaks the ability to use the programmable buttons.
    
    Setting byte 41 to 0x00 fixes this, and causes keycodes to be interpreted
    correctly.
    
    Also, USB_VENDOR_ID_GLORIOUS is changed to USB_VENDOR_ID_SINOWEALTH,
    and a new ID for Laview Technology is added. Glorious seems to be
    white-labeling controller boards or mice from these vendors. There isn't a
    single canonical vendor ID for Glorious products.
    
    Signed-off-by: Brett Raye <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    braye authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c38f7b0 View commit details
    Browse the repository at this point in the history
  111. HID: add ALWAYS_POLL quirk for Apple kb

    [ Upstream commit c550921 ]
    
    These devices disconnect if suspended without remote wakeup. They can operate
    with the standard driver.
    
    Signed-off-by: Oliver Neukum <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    oneukum authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    af48c40 View commit details
    Browse the repository at this point in the history
  112. nbd: pass nbd_sock to nbd_read_reply() instead of index

    [ Upstream commit 98c598a ]
    
    If a socket is processing ioctl 'NBD_SET_SOCK', config->socks might be
    krealloc in nbd_add_socket(), and a garbage request is received now, a UAF
    may occurs.
    
      T1
      nbd_ioctl
       __nbd_ioctl
        nbd_add_socket
         blk_mq_freeze_queue
    				T2
      				recv_work
      				 nbd_read_reply
      				  sock_xmit
         krealloc config->socks
    				   def config->socks
    
    Pass nbd_sock to nbd_read_reply(). And introduce a new function
    sock_xmit_recv(), which differs from sock_xmit only in the way it get
    socket.
    
    ==================================================================
    BUG: KASAN: use-after-free in sock_xmit+0x525/0x550
    Read of size 8 at addr ffff8880188ec428 by task kworker/u12:1/18779
    
    Workqueue: knbd4-recv recv_work
    Call Trace:
     __dump_stack
     dump_stack+0xbe/0xfd
     print_address_description.constprop.0+0x19/0x170
     __kasan_report.cold+0x6c/0x84
     kasan_report+0x3a/0x50
     sock_xmit+0x525/0x550
     nbd_read_reply+0xfe/0x2c0
     recv_work+0x1c2/0x750
     process_one_work+0x6b6/0xf10
     worker_thread+0xdd/0xd80
     kthread+0x30a/0x410
     ret_from_fork+0x22/0x30
    
    Allocated by task 18784:
     kasan_save_stack+0x1b/0x40
     kasan_set_track
     set_alloc_info
     __kasan_kmalloc
     __kasan_kmalloc.constprop.0+0xf0/0x130
     slab_post_alloc_hook
     slab_alloc_node
     slab_alloc
     __kmalloc_track_caller+0x157/0x550
     __do_krealloc
     krealloc+0x37/0xb0
     nbd_add_socket
     +0x2d3/0x880
     __nbd_ioctl
     nbd_ioctl+0x584/0x8e0
     __blkdev_driver_ioctl
     blkdev_ioctl+0x2a0/0x6e0
     block_ioctl+0xee/0x130
     vfs_ioctl
     __do_sys_ioctl
     __se_sys_ioctl+0x138/0x190
     do_syscall_64+0x33/0x40
     entry_SYSCALL_64_after_hwframe+0x61/0xc6
    
    Freed by task 18784:
     kasan_save_stack+0x1b/0x40
     kasan_set_track+0x1c/0x30
     kasan_set_free_info+0x20/0x40
     __kasan_slab_free.part.0+0x13f/0x1b0
     slab_free_hook
     slab_free_freelist_hook
     slab_free
     kfree+0xcb/0x6c0
     krealloc+0x56/0xb0
     nbd_add_socket+0x2d3/0x880
     __nbd_ioctl
     nbd_ioctl+0x584/0x8e0
     __blkdev_driver_ioctl
     blkdev_ioctl+0x2a0/0x6e0
     block_ioctl+0xee/0x130
     vfs_ioctl
     __do_sys_ioctl
     __se_sys_ioctl+0x138/0x190
     do_syscall_64+0x33/0x40
     entry_SYSCALL_64_after_hwframe+0x61/0xc6
    
    Signed-off-by: Li Nan <[email protected]>
    Reviewed-by: Yu Kuai <[email protected]>
    Reviewed-by: Ming Lei <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Li Nan authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b3ebe19 View commit details
    Browse the repository at this point in the history
  113. HID: hid-asus: reset the backlight brightness level on resume

    [ Upstream commit 546edbd ]
    
    Some devices managed by this driver automatically set brightness to 0
    before entering a suspended state and reset it back to a default
    brightness level after the resume:
    this has the effect of having the kernel report wrong brightness
    status after a sleep, and on some devices (like the Asus RC71L) that
    brightness is the intensity of LEDs directly facing the user.
    
    Fix the above issue by setting back brightness to the level it had
    before entering a sleep state.
    
    Signed-off-by: Denis Benato <[email protected]>
    Signed-off-by: Luke D. Jones <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    NeroReflex authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9fc2827 View commit details
    Browse the repository at this point in the history
  114. HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad

    [ Upstream commit 9ffccb6 ]
    
    Honor MagicBook 13 2023 has a touchpad which do not switch to the multitouch
    mode until the input mode feature is written by the host.  The touchpad do
    report the input mode at touchpad(3), while itself working under mouse mode. As
    a workaround, it is possible to call MT_QUIRE_FORCE_GET_FEATURE to force set
    feature in mt_set_input_mode for such device.
    
    The touchpad reports as BLTP7853, which cannot retrive any useful manufacture
    information on the internel by this string at present.  As the serial number of
    the laptop is GLO-G52, while DMI info reports the laptop serial number as
    GLO-GXXX, this workaround should applied to all models which has the GLO-GXXX.
    
    Signed-off-by: Aoba K <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    nexplorer-3e authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c9d25e4 View commit details
    Browse the repository at this point in the history
  115. nfc: virtual_ncidev: Add variable to check if ndev is running

    [ Upstream commit 84d2db9 ]
    
    syzbot reported an memory leak that happens when an skb is add to
    send_buff after virtual nci closed.
    This patch adds a variable to track if the ndev is running before
    handling new skb in send function.
    
    Signed-off-by: Nguyen Dinh Phi <[email protected]>
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/lkml/[email protected]
    Reviewed-by: Bongsu Jeon
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    ita93 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    1f75542 View commit details
    Browse the repository at this point in the history
  116. scripts/checkstack.pl: match all stack sizes for s390

    [ Upstream commit aab1f80 ]
    
    For some unknown reason the regular expression for checkstack only matches
    three digit numbers starting with the number "3", or any higher
    number. Which means that it skips any stack sizes smaller than 304
    bytes. This makes the checkstack script a bit less useful than it could be.
    
    Change the script to match any number. To be filtered out stack sizes
    can be configured with the min_stack variable, which omits any stack
    frame sizes smaller than 100 bytes by default.
    
    Tested-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Heiko Carstens <[email protected]>
    Signed-off-by: Alexander Gordeev <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    hcahca authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9777499 View commit details
    Browse the repository at this point in the history
  117. asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation

    [ Upstream commit 125b0bb ]
    
    We really don't want to do atomic_read() or anything like that, since we
    already have the value, not the lock.  The whole point of this is that
    we've loaded the lock from memory, and we want to check whether the
    value we loaded was a locked one or not.
    
    The main use of this is the lockref code, which loads both the lock and
    the reference count in one atomic operation, and then works on that
    combined value.  With the atomic_read(), the compiler would pointlessly
    spill the value to the stack, in order to then be able to read it back
    "atomically".
    
    This is the qspinlock version of commit c6f4a90 ("asm-generic:
    ticket-lock: Optimize arch_spin_value_unlocked()") which fixed this same
    bug for ticket locks.
    
    Cc: Guo Ren <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Waiman Long <[email protected]>
    Link: https://lore.kernel.org/all/CAHk-=whNRv0v6kQiV5QO6DJhjH4KEL36vWQ6Re8Csrnh4zbRkQ@mail.gmail.com/
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    torvalds authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    a739ceb View commit details
    Browse the repository at this point in the history
  118. eventfs: Do not allow NULL parent to eventfs_start_creating()

    [ Upstream commit fc45612 ]
    
    The eventfs directory is dynamically created via the meta data supplied by
    the existing trace events. All files and directories in eventfs has a
    parent. Do not allow NULL to be passed into eventfs_start_creating() as
    the parent because that should never happen. Warn if it does.
    
    Link: https://lkml.kernel.org/r/[email protected]
    
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Cc: Andrew Morton <[email protected]>
    Reviewed-by: Josef Bacik <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6abb8c2 View commit details
    Browse the repository at this point in the history
  119. net: usb: qmi_wwan: claim interface 4 for ZTE MF290

    [ Upstream commit 99360d9 ]
    
    Interface 4 is used by for QMI interface in stock firmware of MF28D, the
    router which uses MF290 modem. Rebind it to qmi_wwan after freeing it up
    from option driver.
    The proper configuration is:
    
    Interface mapping is:
    0: QCDM, 1: (unknown), 2: AT (PCUI), 2: AT (Modem), 4: QMI
    
    T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  4 Spd=480  MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=19d2 ProdID=0189 Rev= 0.00
    S:  Manufacturer=ZTE, Incorporated
    S:  Product=ZTE LTE Technologies MSM
    C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
    I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
    I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
    
    Cc: Bjørn Mork <[email protected]>
    Signed-off-by: Lech Perczak <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Leo-PL authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    e25ee0c View commit details
    Browse the repository at this point in the history
  120. smb: client: implement ->query_reparse_point() for SMB1

    [ Upstream commit ed3e0a1 ]
    
    Reparse points are not limited to symlinks, so implement
    ->query_reparse_point() in order to handle different file types.
    
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pcacjr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d5c959a View commit details
    Browse the repository at this point in the history
  121. smb: client: introduce ->parse_reparse_point()

    [ Upstream commit 539aad7 ]
    
    Parse reparse point into cifs_open_info_data structure and feed it
    through cifs_open_info_to_fattr().
    
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pcacjr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4d07e5d View commit details
    Browse the repository at this point in the history
  122. smb: client: set correct file type from NFS reparse points

    [ Upstream commit 45e7240 ]
    
    Handle all file types in NFS reparse points as specified in MS-FSCC
    2.1.2.6 Network File System (NFS) Reparse Data Buffer.
    
    The client is now able to set all file types based on the parsed NFS
    reparse point, which used to support only symlinks.  This works for
    SMB1+.
    
    Before patch:
    
    $ mount.cifs //srv/share /mnt -o ...
    $ ls -l /mnt
    ls: cannot access 'block': Operation not supported
    ls: cannot access 'char': Operation not supported
    ls: cannot access 'fifo': Operation not supported
    ls: cannot access 'sock': Operation not supported
    total 1
    l????????? ? ?    ?    ?            ? block
    l????????? ? ?    ?    ?            ? char
    -rwxr-xr-x 1 root root 5 Nov 18 23:22 f0
    l????????? ? ?    ?    ?            ? fifo
    l--------- 1 root root 0 Nov 18 23:23 link -> f0
    l????????? ? ?    ?    ?            ? sock
    
    After patch:
    
    $ mount.cifs //srv/share /mnt -o ...
    $ ls -l /mnt
    total 1
    brwxr-xr-x 1 root root  123,  123 Nov 18 00:34 block
    crwxr-xr-x 1 root root 1234, 1234 Nov 18 00:33 char
    -rwxr-xr-x 1 root root          5 Nov 18 23:22 f0
    prwxr-xr-x 1 root root          0 Nov 18 23:23 fifo
    lrwxr-xr-x 1 root root          0 Nov 18 23:23 link -> f0
    srwxr-xr-x 1 root root          0 Nov 19  2023 sock
    
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    pcacjr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    df32e88 View commit details
    Browse the repository at this point in the history
  123. arm64: add dependency between vmlinuz.efi and Image

    [ Upstream commit c0a8574 ]
    
    A common issue in Makefile is a race in parallel building.
    
    You need to be careful to prevent multiple threads from writing to the
    same file simultaneously.
    
    Commit 3939f33 ("ARM: 8418/1: add boot image dependencies to not
    generate invalid images") addressed such a bad scenario.
    
    A similar symptom occurs with the following command:
    
      $ make -j$(nproc) ARCH=arm64 Image vmlinuz.efi
        [ snip ]
        SORTTAB vmlinux
        OBJCOPY arch/arm64/boot/Image
        OBJCOPY arch/arm64/boot/Image
        AS      arch/arm64/boot/zboot-header.o
        PAD     arch/arm64/boot/vmlinux.bin
        GZIP    arch/arm64/boot/vmlinuz
        OBJCOPY arch/arm64/boot/vmlinuz.o
        LD      arch/arm64/boot/vmlinuz.efi.elf
        OBJCOPY arch/arm64/boot/vmlinuz.efi
    
    The log "OBJCOPY arch/arm64/boot/Image" is displayed twice.
    
    It indicates that two threads simultaneously enter arch/arm64/boot/
    and write to arch/arm64/boot/Image.
    
    It occasionally leads to a build failure:
    
      $ make -j$(nproc) ARCH=arm64 Image vmlinuz.efi
        [ snip ]
        SORTTAB vmlinux
        OBJCOPY arch/arm64/boot/Image
        PAD     arch/arm64/boot/vmlinux.bin
      truncate: Invalid number: 'arch/arm64/boot/vmlinux.bin'
      make[2]: *** [drivers/firmware/efi/libstub/Makefile.zboot:13:
      arch/arm64/boot/vmlinux.bin] Error 1
      make[2]: *** Deleting file 'arch/arm64/boot/vmlinux.bin'
      make[1]: *** [arch/arm64/Makefile:163: vmlinuz.efi] Error 2
      make[1]: *** Waiting for unfinished jobs....
      make: *** [Makefile:234: __sub-make] Error 2
    
    vmlinuz.efi depends on Image, but such a dependency is not specified
    in arch/arm64/Makefile.
    
    Signed-off-by: Masahiro Yamada <[email protected]>
    Acked-by: Ard Biesheuvel <[email protected]>
    Reviewed-by: SImon Glass <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Catalin Marinas <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    masahir0y authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    610610d View commit details
    Browse the repository at this point in the history
  124. HID: hid-asus: add const to read-only outgoing usb buffer

    [ Upstream commit 06ae5af ]
    
    In the function asus_kbd_set_report the parameter buf is read-only
    as it gets copied in a memory portion suitable for USB transfer,
    but the parameter is not marked as const: add the missing const and mark
    const immutable buffers passed to that function.
    
    Signed-off-by: Denis Benato <[email protected]>
    Signed-off-by: Luke D. Jones <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    NeroReflex authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5ce0fb8 View commit details
    Browse the repository at this point in the history
  125. perf: Fix perf_event_validate_size() lockdep splat

    commit 7e2c1e4 upstream.
    
    When lockdep is enabled, the for_each_sibling_event(sibling, event)
    macro checks that event->ctx->mutex is held. When creating a new group
    leader event, we call perf_event_validate_size() on a partially
    initialized event where event->ctx is NULL, and so when
    for_each_sibling_event() attempts to check event->ctx->mutex, we get a
    splat, as reported by Lucas De Marchi:
    
      WARNING: CPU: 8 PID: 1471 at kernel/events/core.c:1950 __do_sys_perf_event_open+0xf37/0x1080
    
    This only happens for a new event which is its own group_leader, and in
    this case there cannot be any sibling events. Thus it's safe to skip the
    check for siblings, which avoids having to make invasive and ugly
    changes to for_each_sibling_event().
    
    Avoid the splat by bailing out early when the new event is its own
    group_leader.
    
    Fixes: 382c27f ("perf: Fix perf_event_validate_size()")
    Closes: https://lore.kernel.org/lkml/[email protected]/
    Closes: https://lore.kernel.org/lkml/ZXpm6gQ%[email protected]/
    Reported-by: Lucas De Marchi <[email protected]>
    Reported-by: Pengfei Xu <[email protected]>
    Signed-off-by: Mark Rutland <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Mark Rutland authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    545d55a View commit details
    Browse the repository at this point in the history
  126. btrfs: do not allow non subvolume root targets for snapshot

    commit a8892fd upstream.
    
    Our btrfs subvolume snapshot <source> <destination> utility enforces
    that <source> is the root of the subvolume, however this isn't enforced
    in the kernel.  Update the kernel to also enforce this limitation to
    avoid problems with other users of this ioctl that don't have the
    appropriate checks in place.
    
    Reported-by: Martin Michaelis <[email protected]>
    CC: [email protected] # 4.14+
    Reviewed-by: Neal Gompa <[email protected]>
    Signed-off-by: Josef Bacik <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    josefbacik authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6544617 View commit details
    Browse the repository at this point in the history
  127. cxl/hdm: Fix dpa translation locking

    commit 6f5c4ec upstream.
    
    The helper, cxl_dpa_resource_start(), snapshots the dpa-address of an
    endpoint-decoder after acquiring the cxl_dpa_rwsem. However, it is
    sufficient to assert that cxl_dpa_rwsem is held rather than acquire it
    in the helper. Otherwise, it triggers multiple lockdep reports:
    
    1/ Tracing callbacks are in an atomic context that can not acquire sleeping
    locks:
    
        BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1525
        in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1288, name: bash
        preempt_count: 2, expected: 0
        RCU nest depth: 0, expected: 0
        [..]
        Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20230524-3.fc38 05/24/2023
        Call Trace:
         <TASK>
         dump_stack_lvl+0x71/0x90
         __might_resched+0x1b2/0x2c0
         down_read+0x1a/0x190
         cxl_dpa_resource_start+0x15/0x50 [cxl_core]
         cxl_trace_hpa+0x122/0x300 [cxl_core]
         trace_event_raw_event_cxl_poison+0x1c9/0x2d0 [cxl_core]
    
    2/ The rwsem is already held in the inject poison path:
    
        WARNING: possible recursive locking detected
        6.7.0-rc2+ #12 Tainted: G        W  OE    N
        --------------------------------------------
        bash/1288 is trying to acquire lock:
        ffffffffc05f73d0 (cxl_dpa_rwsem){++++}-{3:3}, at: cxl_dpa_resource_start+0x15/0x50 [cxl_core]
    
        but task is already holding lock:
        ffffffffc05f73d0 (cxl_dpa_rwsem){++++}-{3:3}, at: cxl_inject_poison+0x7d/0x1e0 [cxl_core]
        [..]
        Call Trace:
         <TASK>
         dump_stack_lvl+0x71/0x90
         __might_resched+0x1b2/0x2c0
         down_read+0x1a/0x190
         cxl_dpa_resource_start+0x15/0x50 [cxl_core]
         cxl_trace_hpa+0x122/0x300 [cxl_core]
         trace_event_raw_event_cxl_poison+0x1c9/0x2d0 [cxl_core]
         __traceiter_cxl_poison+0x5c/0x80 [cxl_core]
         cxl_inject_poison+0x1bc/0x1e0 [cxl_core]
    
    This appears to have been an issue since the initial implementation and
    uncovered by the new cxl-poison.sh test [1]. That test is now passing with
    these changes.
    
    Fixes: 28a3ae4 ("cxl/trace: Add an HPA to cxl_poison trace events")
    Link: http://lore.kernel.org/r/e4f2716646918135ddbadf4146e92abb659de734.1700615159.git.alison.schofield@intel.com [1]
    Cc: <[email protected]>
    Cc: Alison Schofield <[email protected]>
    Cc: Jonathan Cameron <[email protected]>
    Cc: Dave Jiang <[email protected]>
    Cc: Ira Weiny <[email protected]>
    Signed-off-by: Dan Williams <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    djbw authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c1d2d08 View commit details
    Browse the repository at this point in the history
  128. soundwire: stream: fix NULL pointer dereference for multi_link

    commit e199bf5 upstream.
    
    If bus is marked as multi_link, but number of masters in the stream is
    not higher than bus->hw_sync_min_links (bus->multi_link && m_rt_count >=
    bus->hw_sync_min_links), bank switching should not happen.  The first
    part of do_bank_switch() code properly takes these conditions into
    account, but second part (sdw_ml_sync_bank_switch()) relies purely on
    bus->multi_link property.  This is not balanced and leads to NULL
    pointer dereference:
    
      Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      ...
      Call trace:
       wait_for_completion_timeout+0x124/0x1f0
       do_bank_switch+0x370/0x6f8
       sdw_prepare_stream+0x2d0/0x438
       qcom_snd_sdw_prepare+0xa0/0x118
       sm8450_snd_prepare+0x128/0x148
       snd_soc_link_prepare+0x5c/0xe8
       __soc_pcm_prepare+0x28/0x1ec
       dpcm_be_dai_prepare+0x1e0/0x2c0
       dpcm_fe_dai_prepare+0x108/0x28c
       snd_pcm_do_prepare+0x44/0x68
       snd_pcm_action_single+0x54/0xc0
       snd_pcm_action_nonatomic+0xe4/0xec
       snd_pcm_prepare+0xc4/0x114
       snd_pcm_common_ioctl+0x1154/0x1cc0
       snd_pcm_ioctl+0x54/0x74
    
    Fixes: ce6e74d ("soundwire: Add support for multi link bank switch")
    Cc: [email protected]
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Reviewed-by: Pierre-Louis Bossart <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    krzk authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    40abc38 View commit details
    Browse the repository at this point in the history
  129. ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS

    commit 2dcf5fd upstream.
    
    For files with logical blocks close to EXT_MAX_BLOCKS, the file size
    predicted in ext4_mb_normalize_request() may exceed EXT_MAX_BLOCKS.
    This can cause some blocks to be preallocated that will not be used.
    And after [Fixes], the following issue may be triggered:
    
    =========================================================
     kernel BUG at fs/ext4/mballoc.c:4653!
     Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
     CPU: 1 PID: 2357 Comm: xfs_io 6.7.0-rc2-00195-g0f5cc96c367f
     Hardware name: linux,dummy-virt (DT)
     pc : ext4_mb_use_inode_pa+0x148/0x208
     lr : ext4_mb_use_inode_pa+0x98/0x208
     Call trace:
      ext4_mb_use_inode_pa+0x148/0x208
      ext4_mb_new_inode_pa+0x240/0x4a8
      ext4_mb_use_best_found+0x1d4/0x208
      ext4_mb_try_best_found+0xc8/0x110
      ext4_mb_regular_allocator+0x11c/0xf48
      ext4_mb_new_blocks+0x790/0xaa8
      ext4_ext_map_blocks+0x7cc/0xd20
      ext4_map_blocks+0x170/0x600
      ext4_iomap_begin+0x1c0/0x348
    =========================================================
    
    Here is a calculation when adjusting ac_b_ex in ext4_mb_new_inode_pa():
    
    	ex.fe_logical = orig_goal_end - EXT4_C2B(sbi, ex.fe_len);
    	if (ac->ac_o_ex.fe_logical >= ex.fe_logical)
    		goto adjust_bex;
    
    The problem is that when orig_goal_end is subtracted from ac_b_ex.fe_len
    it is still greater than EXT_MAX_BLOCKS, which causes ex.fe_logical to
    overflow to a very small value, which ultimately triggers a BUG_ON in
    ext4_mb_new_inode_pa() because pa->pa_free < len.
    
    The last logical block of an actual write request does not exceed
    EXT_MAX_BLOCKS, so in ext4_mb_normalize_request() also avoids normalizing
    the last logical block to exceed EXT_MAX_BLOCKS to avoid the above issue.
    
    The test case in [Link] can reproduce the above issue with 64k block size.
    
    Link: https://patchwork.kernel.org/project/fstests/list/?series=804003
    Cc:  <[email protected]> # 6.4
    Fixes: 93cdf49 ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
    Signed-off-by: Baokun Li <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    LiBaokun96 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4f18d18 View commit details
    Browse the repository at this point in the history
  130. Revert "selftests: error out if kernel header files are not yet built"

    commit 43e8832 upstream.
    
    This reverts commit 9fc96c7 ("selftests: error out if kernel header
    files are not yet built").
    
    It turns out that requiring the kernel headers to be built as a
    prerequisite to building selftests, does not work in many cases. For
    example, Peter Zijlstra writes:
    
    "My biggest beef with the whole thing is that I simply do not want to use
    'make headers', it doesn't work for me.
    
    I have a ton of output directories and I don't care to build tools into
    the output dirs, in fact some of them flat out refuse to work that way
    (bpf comes to mind)." [1]
    
    Therefore, stop erroring out on the selftests build. Additional patches
    will be required in order to change over to not requiring the kernel
    headers.
    
    [1] https://lore.kernel.org/[email protected]
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 9fc96c7 ("selftests: error out if kernel header files are not yet built")
    Signed-off-by: John Hubbard <[email protected]>
    Cc: Anders Roxell <[email protected]>
    Cc: Muhammad Usama Anjum <[email protected]>
    Cc: David Hildenbrand <[email protected]>
    Cc: Peter Xu <[email protected]>
    Cc: Jonathan Corbet <[email protected]>
    Cc: Nathan Chancellor <[email protected]>
    Cc: Shuah Khan <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Marcos Paulo de Souza <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    johnhubbard authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d228e98 View commit details
    Browse the repository at this point in the history
  131. arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify

    commit 3c06960 upstream.
    
    It is currently possible for a userspace application to enter an
    infinite page fault loop when using HugeTLB pages implemented with
    contiguous PTEs when HAFDBS is not available. This happens because:
    
    1. The kernel may sometimes write PTEs that are sw-dirty but hw-clean
       (PTE_DIRTY | PTE_RDONLY | PTE_WRITE).
    
    2. If, during a write, the CPU uses a sw-dirty, hw-clean PTE in handling
       the memory access on a system without HAFDBS, we will get a page
       fault.
    
    3. HugeTLB will check if it needs to update the dirty bits on the PTE.
       For contiguous PTEs, it will check to see if the pgprot bits need
       updating. In this case, HugeTLB wants to write a sequence of
       sw-dirty, hw-dirty PTEs, but it finds that all the PTEs it is about
       to overwrite are all pte_dirty() (pte_sw_dirty() => pte_dirty()),
       so it thinks no update is necessary.
    
    We can get the kernel to write a sw-dirty, hw-clean PTE with the
    following steps (showing the relevant VMA flags and pgprot bits):
    
    i.   Create a valid, writable contiguous PTE.
           VMA vmflags:     VM_SHARED | VM_READ | VM_WRITE
           VMA pgprot bits: PTE_RDONLY | PTE_WRITE
           PTE pgprot bits: PTE_DIRTY | PTE_WRITE
    
    ii.  mprotect the VMA to PROT_NONE.
           VMA vmflags:     VM_SHARED
           VMA pgprot bits: PTE_RDONLY
           PTE pgprot bits: PTE_DIRTY | PTE_RDONLY
    
    iii. mprotect the VMA back to PROT_READ | PROT_WRITE.
           VMA vmflags:     VM_SHARED | VM_READ | VM_WRITE
           VMA pgprot bits: PTE_RDONLY | PTE_WRITE
           PTE pgprot bits: PTE_DIRTY | PTE_WRITE | PTE_RDONLY
    
    Make it impossible to create a writeable sw-dirty, hw-clean PTE with
    pte_modify(). Such a PTE should be impossible to create, and there may
    be places that assume that pte_dirty() implies pte_hw_dirty().
    
    Signed-off-by: James Houghton <[email protected]>
    Fixes: 031e6e6 ("arm64: hugetlb: Avoid unnecessary clearing in huge_ptep_set_access_flags")
    Cc: <[email protected]>
    Acked-by: Will Deacon <[email protected]>
    Reviewed-by: Ryan Roberts <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Catalin Marinas <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    48ca authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    2c8a21a View commit details
    Browse the repository at this point in the history
  132. team: Fix use-after-free when an option instance allocation fails

    commit c12296b upstream.
    
    In __team_options_register, team_options are allocated and appended to
    the team's option_list.
    If one option instance allocation fails, the "inst_rollback" cleanup
    path frees the previously allocated options but doesn't remove them from
    the team's option_list.
    This leaves dangling pointers that can be dereferenced later by other
    parts of the team driver that iterate over options.
    
    This patch fixes the cleanup path to remove the dangling pointers from
    the list.
    
    As far as I can tell, this uaf doesn't have much security implications
    since it would be fairly hard to exploit (an attacker would need to make
    the allocation of that specific small object fail) but it's still nice
    to fix.
    
    Cc: [email protected]
    Fixes: 80f7c66 ("team: add support for per-port options")
    Signed-off-by: Florent Revest <[email protected]>
    Reviewed-by: Jiri Pirko <[email protected]>
    Reviewed-by: Hangbin Liu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    FlorentRevest authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    28b3642 View commit details
    Browse the repository at this point in the history
  133. drm/amdgpu/sdma5.2: add begin/end_use ring callbacks

    commit ab47503 upstream.
    
    Add begin/end_use ring callbacks to disallow GFXOFF when
    SDMA work is submitted and allow it again afterward.
    
    This should avoid corner cases where GFXOFF is erroneously
    entered when SDMA is still active.  For now just allow/disallow
    GFXOFF in the begin and end helpers until we root cause the
    issue.  This should not impact power as SDMA usage is pretty
    minimal and GFXOSS should not be active when SDMA is active
    anyway, this just makes it explicit.
    
    v2: move everything into sdma5.2 code.  No reason for this
    to be generic at this point.
    v3: Add comments in new code
    
    Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2220
    Reviewed-by: Mario Limonciello <[email protected]> (v1)
    Tested-by: Mario Limonciello <[email protected]> (v1)
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Cc: [email protected] # 5.15+
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    alexdeucher authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    3aae4ef View commit details
    Browse the repository at this point in the history
  134. drm/mediatek: Fix access violation in mtk_drm_crtc_dma_dev_get

    commit b6961d1 upstream.
    
    Add error handling to check NULL input in
    mtk_drm_crtc_dma_dev_get function.
    
    While display path is not configured correctly, none of crtc is
    established. So the caller of mtk_drm_crtc_dma_dev_get may pass
    input parameter *crtc as NULL, Which may cause coredump when
    we try to get the container of NULL pointer.
    
    Fixes: cb1d6bc ("drm/mediatek: Add dma dev get function")
    Signed-off-by: Stuart Lee <[email protected]>
    Cc: [email protected]
    Reviewed-by: AngeloGioacchino DEl Regno <[email protected]>
    Tested-by: Macpaul Lin <[email protected]>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
    Signed-off-by: Chun-Kuang Hu <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Stuart Lee authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    03e63e4 View commit details
    Browse the repository at this point in the history
  135. dmaengine: stm32-dma: avoid bitfield overflow assertion

    commit 54bed6b upstream.
    
    stm32_dma_get_burst() returns a negative error for invalid input, which
    gets turned into a large u32 value in stm32_dma_prep_dma_memcpy() that
    in turn triggers an assertion because it does not fit into a two-bit field:
    drivers/dma/stm32-dma.c: In function 'stm32_dma_prep_dma_memcpy':
    include/linux/compiler_types.h:354:38: error: call to '__compiletime_assert_282' declared with attribute error: FIELD_PREP: value too large for the field
         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
                                             ^
       include/linux/compiler_types.h:335:4: note: in definition of macro '__compiletime_assert'
           prefix ## suffix();    \
           ^~~~~~
       include/linux/compiler_types.h:354:2: note: in expansion of macro '_compiletime_assert'
         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         ^~~~~~~~~~~~~~~~~~~
       include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
        #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                            ^~~~~~~~~~~~~~~~~~
       include/linux/bitfield.h:68:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
          BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ?  \
          ^~~~~~~~~~~~~~~~
       include/linux/bitfield.h:114:3: note: in expansion of macro '__BF_FIELD_CHECK'
          __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
          ^~~~~~~~~~~~~~~~
       drivers/dma/stm32-dma.c:1237:4: note: in expansion of macro 'FIELD_PREP'
           FIELD_PREP(STM32_DMA_SCR_PBURST_MASK, dma_burst) |
           ^~~~~~~~~~
    
    As an easy workaround, assume the error can happen, so try to handle this
    by failing stm32_dma_prep_dma_memcpy() before the assertion. It replicates
    what is done in stm32_dma_set_xfer_param() where stm32_dma_get_burst() is
    also used.
    
    Fixes: 1c32d6c ("dmaengine: stm32-dma: use bitfield helpers")
    Fixes: a2b6103 ("dmaengine: stm32-dma: Improve memory burst management")
    Signed-off-by: Arnd Bergmann <[email protected]>
    Signed-off-by: Amelie Delaunay <[email protected]>
    Cc: [email protected]
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ADESTM authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    9127515 View commit details
    Browse the repository at this point in the history
  136. dmaengine: fsl-edma: fix DMA channel leak in eDMAv4

    commit 4ee632c upstream.
    
    Allocate channel count consistently increases due to a missing source ID
    (srcid) cleanup in the fsl_edma_free_chan_resources() function at imx93
    eDMAv4.
    
    Reset 'srcid' at fsl_edma_free_chan_resources().
    
    Cc: [email protected]
    Fixes: 72f5801 ("dmaengine: fsl-edma: integrate v3 support")
    Signed-off-by: Frank Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    nxpfrankli authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ed50e07 View commit details
    Browse the repository at this point in the history
  137. mm/mglru: fix underprotected page cache

    commit 0814880 upstream.
    
    Unmapped folios accessed through file descriptors can be underprotected.
    Those folios are added to the oldest generation based on:
    
    1. The fact that they are less costly to reclaim (no need to walk the
       rmap and flush the TLB) and have less impact on performance (don't
       cause major PFs and can be non-blocking if needed again).
    2. The observation that they are likely to be single-use. E.g., for
       client use cases like Android, its apps parse configuration files
       and store the data in heap (anon); for server use cases like MySQL,
       it reads from InnoDB files and holds the cached data for tables in
       buffer pools (anon).
    
    However, the oldest generation can be very short lived, and if so, it
    doesn't provide the PID controller with enough time to respond to a surge
    of refaults.  (Note that the PID controller uses weighted refaults and
    those from evicted generations only take a half of the whole weight.) In
    other words, for a short lived generation, the moving average smooths out
    the spike quickly.
    
    To fix the problem:
    1. For folios that are already on LRU, if they can be beyond the
       tracking range of tiers, i.e., five accesses through file
       descriptors, move them to the second oldest generation to give them
       more time to age. (Note that tiers are used by the PID controller
       to statistically determine whether folios accessed multiple times
       through file descriptors are worth protecting.)
    2. When adding unmapped folios to LRU, adjust the placement of them so
       that they are not too close to the tail. The effect of this is
       similar to the above.
    
    On Android, launching 55 apps sequentially:
                               Before     After      Change
      workingset_refault_anon  25641024   25598972   0%
      workingset_refault_file  115016834  106178438  -8%
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: ac35a49 ("mm: multi-gen LRU: minimal implementation")
    Signed-off-by: Yu Zhao <[email protected]>
    Reported-by: Charan Teja Kalla <[email protected]>
    Tested-by: Kalesh Singh <[email protected]>
    Cc: T.J. Mercier <[email protected]>
    Cc: Kairui Song <[email protected]>
    Cc: Hillf Danton <[email protected]>
    Cc: Jaroslav Pulchart <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    yuzhaogoogle authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b2ce691 View commit details
    Browse the repository at this point in the history
  138. mm/mglru: try to stop at high watermarks

    commit 5095a2b upstream.
    
    The initial MGLRU patchset didn't include the memcg LRU support, and it
    relied on should_abort_scan(), added by commit f76c833 ("mm:
    multi-gen LRU: optimize multiple memcgs"), to "backoff to avoid
    overshooting their aggregate reclaim target by too much".
    
    Later on when the memcg LRU was added, should_abort_scan() was deemed
    unnecessary, and the test results [1] showed no side effects after it was
    removed by commit a579086 ("mm: multi-gen LRU: remove eviction
    fairness safeguard").
    
    However, that test used memory.reclaim, which sets nr_to_reclaim to
    SWAP_CLUSTER_MAX.  So it can overshoot only by SWAP_CLUSTER_MAX-1 pages,
    i.e., from nr_reclaimed=nr_to_reclaim-1 to
    nr_reclaimed=nr_to_reclaim+SWAP_CLUSTER_MAX-1.  Compared with the batch
    size kswapd sets to nr_to_reclaim, SWAP_CLUSTER_MAX is tiny.  Therefore
    that test isn't able to reproduce the worst case scenario, i.e., kswapd
    overshooting GBs on large systems and "consuming 100% CPU" (see the Closes
    tag).
    
    Bring back a simplified version of should_abort_scan() on top of the memcg
    LRU, so that kswapd stops when all eligible zones are above their
    respective high watermarks plus a small delta to lower the chance of
    KSWAPD_HIGH_WMARK_HIT_QUICKLY.  Note that this only applies to order-0
    reclaim, meaning compaction-induced reclaim can still run wild (which is a
    different problem).
    
    On Android, launching 55 apps sequentially:
               Before     After      Change
      pgpgin   838377172  802955040  -4%
      pgpgout  38037080   34336300   -10%
    
    [1] https://lore.kernel.org/[email protected]/
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: a579086 ("mm: multi-gen LRU: remove eviction fairness safeguard")
    Signed-off-by: Yu Zhao <[email protected]>
    Reported-by: Charan Teja Kalla <[email protected]>
    Reported-by: Jaroslav Pulchart <[email protected]>
    Closes: https://lore.kernel.org/CAK8fFZ4DY+GtBA40Pm7Nn5xCHy+51w3sfxPqkqpqakSXYyX+Wg@mail.gmail.com/
    Tested-by: Jaroslav Pulchart <[email protected]>
    Tested-by: Kalesh Singh <[email protected]>
    Cc: Hillf Danton <[email protected]>
    Cc: Kairui Song <[email protected]>
    Cc: T.J. Mercier <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    yuzhaogoogle authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c5f67b7 View commit details
    Browse the repository at this point in the history
  139. mm/mglru: respect min_ttl_ms with memcgs

    commit 8aa4206 upstream.
    
    While investigating kswapd "consuming 100% CPU" [1] (also see "mm/mglru:
    try to stop at high watermarks"), it was discovered that the memcg LRU can
    breach the thrashing protection imposed by min_ttl_ms.
    
    Before the memcg LRU:
      kswapd()
        shrink_node_memcgs()
          mem_cgroup_iter()
            inc_max_seq()  // always hit a different memcg
        lru_gen_age_node()
          mem_cgroup_iter()
            check the timestamp of the oldest generation
    
    After the memcg LRU:
      kswapd()
        shrink_many()
          restart:
            iterate the memcg LRU:
              inc_max_seq()  // occasionally hit the same memcg
              if raced with lru_gen_rotate_memcg():
                goto restart
        lru_gen_age_node()
          mem_cgroup_iter()
            check the timestamp of the oldest generation
    
    Specifically, when the restart happens in shrink_many(), it needs to stick
    with the (memcg LRU) generation it began with.  In other words, it should
    neither re-read memcg_lru->seq nor age an lruvec of a different
    generation.  Otherwise it can hit the same memcg multiple times without
    giving lru_gen_age_node() a chance to check the timestamp of that memcg's
    oldest generation (against min_ttl_ms).
    
    [1] https://lore.kernel.org/CAK8fFZ4DY+GtBA40Pm7Nn5xCHy+51w3sfxPqkqpqakSXYyX+Wg@mail.gmail.com/
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: e4dde56 ("mm: multi-gen LRU: per-node lru_gen_folio lists")
    Signed-off-by: Yu Zhao <[email protected]>
    Tested-by: T.J. Mercier <[email protected]>
    Cc: Charan Teja Kalla <[email protected]>
    Cc: Hillf Danton <[email protected]>
    Cc: Jaroslav Pulchart <[email protected]>
    Cc: Kairui Song <[email protected]>
    Cc: Kalesh Singh <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    yuzhaogoogle authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    6b131c2 View commit details
    Browse the repository at this point in the history
  140. mm/mglru: reclaim offlined memcgs harder

    commit 4376807 upstream.
    
    In the effort to reduce zombie memcgs [1], it was discovered that the
    memcg LRU doesn't apply enough pressure on offlined memcgs.  Specifically,
    instead of rotating them to the tail of the current generation
    (MEMCG_LRU_TAIL) for a second attempt, it moves them to the next
    generation (MEMCG_LRU_YOUNG) after the first attempt.
    
    Not applying enough pressure on offlined memcgs can cause them to build
    up, and this can be particularly harmful to memory-constrained systems.
    
    On Pixel 8 Pro, launching apps for 50 cycles:
                     Before  After  Change
      Zombie memcgs  45      35     -22%
    
    [1] https://lore.kernel.org/CABdmKX2M6koq4Q0Cmp_-=wbP0Qa190HdEGGaHfxNS05gAkUtPA@mail.gmail.com/
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: e4dde56 ("mm: multi-gen LRU: per-node lru_gen_folio lists")
    Signed-off-by: Yu Zhao <[email protected]>
    Reported-by: T.J. Mercier <[email protected]>
    Tested-by: T.J. Mercier <[email protected]>
    Cc: Charan Teja Kalla <[email protected]>
    Cc: Hillf Danton <[email protected]>
    Cc: Jaroslav Pulchart <[email protected]>
    Cc: Kairui Song <[email protected]>
    Cc: Kalesh Singh <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    yuzhaogoogle authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    a107d6a View commit details
    Browse the repository at this point in the history
  141. mm/shmem: fix race in shmem_undo_range w/THP

    commit 55ac8bb upstream.
    
    Split folios during the second loop of shmem_undo_range.  It's not
    sufficient to only split folios when dealing with partial pages, since
    it's possible for a THP to be faulted in after that point.  Calling
    truncate_inode_folio in that situation can result in throwing away data
    outside of the range being targeted.
    
    [[email protected]: tidy up comment layout]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: b9a8a41 ("truncate,shmem: Handle truncates that split large folios")
    Signed-off-by: David Stevens <[email protected]>
    Cc: Matthew Wilcox (Oracle) <[email protected]>
    Cc: Suleiman Souhlal <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    David Stevens authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    7a4ae7a View commit details
    Browse the repository at this point in the history
  142. kexec: drop dependency on ARCH_SUPPORTS_KEXEC from CRASH_DUMP

    commit c41bd25 upstream.
    
    In commit f8ff234 ("kernel/Kconfig.kexec: drop select of KEXEC for
    CRASH_DUMP") we tried to fix a config regression, where CONFIG_CRASH_DUMP
    required CONFIG_KEXEC.
    
    However, it was not enough at least for arm64 platforms.  While further
    testing the patch with our arm64 config I noticed that CONFIG_CRASH_DUMP
    is unavailable in menuconfig.  This is because CONFIG_CRASH_DUMP still
    depends on the new CONFIG_ARCH_SUPPORTS_KEXEC introduced in commit
    91506f7 ("arm64/kexec: refactor for kernel/Kconfig.kexec") and on
    arm64 CONFIG_ARCH_SUPPORTS_KEXEC requires CONFIG_PM_SLEEP_SMP=y, which in
    turn requires either CONFIG_SUSPEND=y or CONFIG_HIBERNATION=y neither of
    which are set in our config.
    
    Given that we already established that CONFIG_KEXEC (which is a switch for
    kexec system call itself) is not required for CONFIG_CRASH_DUMP drop
    CONFIG_ARCH_SUPPORTS_KEXEC dependency as well.  The arm64 kernel builds
    just fine with CONFIG_CRASH_DUMP=y and with both CONFIG_KEXEC=n and
    CONFIG_KEXEC_FILE=n after f8ff234 ("kernel/Kconfig.kexec: drop select
    of KEXEC for CRASH_DUMP") and this patch are applied given that the
    necessary shared bits are included via CONFIG_KEXEC_CORE dependency.
    
    [[email protected]: don't export some symbols when CONFIG_MMU=n]
      Link: https://lkml.kernel.org/r/ZW03ODUKGGhP1ZGU@MiWiFi-R3L-srv
    [[email protected]: riscv, kexec: fix dependency of two items]
      Link: https://lkml.kernel.org/r/ZW04G/SKnhbE5mnX@MiWiFi-R3L-srv
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 91506f7 ("arm64/kexec: refactor for kernel/Kconfig.kexec")
    Signed-off-by: Ignat Korchagin <[email protected]>
    Signed-off-by: Baoquan He <[email protected]>
    Acked-by: Baoquan He <[email protected]>
    Cc: Alexander Gordeev <[email protected]>
    Cc: <[email protected]> # 6.6+: f8ff234: kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
    Cc: <[email protected]> # 6.6+
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ignatk authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    37b561d View commit details
    Browse the repository at this point in the history
  143. btrfs: free qgroup reserve when ORDERED_IOERR is set

    commit f63e116 upstream.
    
    An ordered extent completing is a critical moment in qgroup reserve
    handling, as the ownership of the reservation is handed off from the
    ordered extent to the delayed ref. In the happy path we release (unlock)
    but do not free (decrement counter) the reservation, and the delayed ref
    drives the free. However, on an error, we don't create a delayed ref,
    since there is no ref to add. Therefore, free on the error path.
    
    CC: [email protected] # 6.1+
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: Boris Burkov <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    boryas authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    14570df View commit details
    Browse the repository at this point in the history
  144. btrfs: fix qgroup_free_reserved_data int overflow

    commit 9e65bfc upstream.
    
    The reserved data counter and input parameter is a u64, but we
    inadvertently accumulate it in an int. Overflowing that int results in
    freeing the wrong amount of data and breaking reserve accounting.
    
    Unfortunately, this overflow rot spreads from there, as the qgroup
    release/free functions rely on returning an int to take advantage of
    negative values for error codes.
    
    Therefore, the full fix is to return the "released" or "freed" amount by
    a u64 argument and to return 0 or negative error code via the return
    value.
    
    Most of the call sites simply ignore the return value, though some
    of them handle the error and count the returned bytes. Change all of
    them accordingly.
    
    CC: [email protected] # 6.1+
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: Boris Burkov <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    boryas authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    1823491 View commit details
    Browse the repository at this point in the history
  145. btrfs: don't clear qgroup reserved bit in release_folio

    commit a868055 upstream.
    
    The EXTENT_QGROUP_RESERVED bit is used to "lock" regions of the file for
    duplicate reservations. That is two writes to that range in one
    transaction shouldn't create two reservations, as the reservation will
    only be freed once when the write finally goes down. Therefore, it is
    never OK to clear that bit without freeing the associated qgroup
    reserve. At this point, we don't want to be freeing the reserve, so mask
    off the bit.
    
    CC: [email protected] # 5.15+
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: Boris Burkov <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    boryas authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d3cf024 View commit details
    Browse the repository at this point in the history
  146. drm/amdgpu: fix tear down order in amdgpu_vm_pt_free

    commit ceb9a32 upstream.
    
    When freeing PD/PT with shadows it can happen that the shadow
    destruction races with detaching the PD/PT from the VM causing a NULL
    pointer dereference in the invalidation code.
    
    Fix this by detaching the the PD/PT from the VM first and then
    freeing the shadow instead.
    
    Signed-off-by: Christian König <[email protected]>
    Fixes: https://gitlab.freedesktop.org/drm/amd/-/issues/2867
    Cc: <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    ChristianKoenigAMD authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    d506706 View commit details
    Browse the repository at this point in the history
  147. drm/edid: also call add modes in EDID connector update fallback

    commit 759f14e upstream.
    
    When the separate add modes call was added back in commit c533b51
    ("drm/edid: add separate drm_edid_connector_add_modes()"), it failed to
    address drm_edid_override_connector_update(). Also call add modes there.
    
    Reported-by: bbaa <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]
    Fixes: c533b51 ("drm/edid: add separate drm_edid_connector_add_modes()")
    Cc: <[email protected]> # v6.3+
    Signed-off-by: Jani Nikula <[email protected]>
    Reviewed-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    jnikula authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    a511e85 View commit details
    Browse the repository at this point in the history
  148. drm/amd/display: Restore guard against default backlight value < 1 nit

    commit b96ab33 upstream.
    
    Mark reports that brightness is not restored after Xorg dpms screen blank.
    
    This behavior was introduced by commit d9e8658 ("drm/amd/display:
    Simplify brightness initialization") which dropped the cached backlight
    value in display code, but also removed code for when the default value
    read back was less than 1 nit.
    
    Restore this code so that the backlight brightness is restored to the
    correct default value in this circumstance.
    
    Reported-by: Mark Herbert <[email protected]>
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3031
    Cc: [email protected]
    Cc: Camille Cho <[email protected]>
    Cc: Krunoslav Kovac <[email protected]>
    Cc: Hamza Mahfooz <[email protected]>
    Fixes: d9e8658 ("drm/amd/display: Simplify brightness initialization")
    Acked-by: Alex Deucher <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    c7f6e83 View commit details
    Browse the repository at this point in the history
  149. drm/amd/display: Disable PSR-SU on Parade 0803 TCON again

    commit e7ab758 upstream.
    
    When screen brightness is rapidly changed and PSR-SU is enabled the
    display hangs on panels with this TCON even on the latest DCN 3.1.4
    microcode (0x8002a81 at this time).
    
    This was disabled previously as commit 072030b ("drm/amd: Disable
    PSR-SU on Parade 0803 TCON") but reverted as commit 1e66a17 ("Revert
    "drm/amd: Disable PSR-SU on Parade 0803 TCON"") in favor of testing for
    a new enough microcode (commit cd2e31a ("drm/amd/display: Set minimum
    requirement for using PSR-SU on Phoenix")).
    
    As hangs are still happening specifically with this TCON, disable PSR-SU
    again for it until it can be root caused.
    
    Cc: [email protected]
    Cc: [email protected]
    Cc: [email protected]
    Cc: Marc Rossi <[email protected]>
    Cc: Hamza Mahfooz <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2046131
    Acked-by: Alex Deucher <[email protected]>
    Reviewed-by: Harry Wentland <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    superm1 authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    a8f922a View commit details
    Browse the repository at this point in the history
  150. drm/i915: Fix ADL+ tiled plane stride when the POT stride is smaller …

    …than the original
    
    commit 324b70e upstream.
    
    plane_view_scanout_stride() currently assumes that we had to pad the
    mapping stride with dummy pages in order to align it. But that is not
    the case if the original fb stride exceeds the aligned stride used
    to populate the remapped view, which is calculated from the user
    specified framebuffer width rather than the user specified framebuffer
    stride.
    
    Ignore the original fb stride in this case and just stick to the POT
    aligned stride. Getting this wrong will cause the plane to fetch the
    wrong data, and can lead to fault errors if the page tables at the
    bogus location aren't even populated.
    
    TODO: figure out if this is OK for CCS, or if we should instead increase
    the width of the view to cover the entire user specified fb stride
    instead...
    
    Cc: Imre Deak <[email protected]>
    Cc: Juha-Pekka Heikkila <[email protected]>
    Signed-off-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Reviewed-by: Imre Deak <[email protected]>
    Reviewed-by: Juha-Pekka Heikkila <[email protected]>
    (cherry picked from commit 01a39f1)
    Cc: [email protected]
    Signed-off-by: Jani Nikula <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vsyrjala authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b6295a1 View commit details
    Browse the repository at this point in the history
  151. drm/i915: Fix intel_atomic_setup_scalers() plane_state handling

    commit c3070f0 upstream.
    
    Since the plane_state variable is declared outside the scaler_users
    loop in intel_atomic_setup_scalers(), and it's never reset back to
    NULL inside the loop we may end up calling intel_atomic_setup_scaler()
    with a non-NULL plane state for the pipe scaling case. That is bad
    because intel_atomic_setup_scaler() determines whether we are doing
    plane scaling or pipe scaling based on plane_state!=NULL. The end
    result is that we may miscalculate the scaler mode for pipe scaling.
    
    The hardware becomes somewhat upset if we end up in this situation
    when scanning out a planar format on a SDR plane. We end up
    programming the pipe scaler into planar mode as well, and the
    result is a screenfull of garbage.
    
    Fix the situation by making sure we pass the correct plane_state==NULL
    when calculating the scaler mode for pipe scaling.
    
    Cc: [email protected]
    Signed-off-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Reviewed-by: Jani Nikula <[email protected]>
    (cherry picked from commit e811441)
    Signed-off-by: Jani Nikula <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vsyrjala authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    a9d951b View commit details
    Browse the repository at this point in the history
  152. drm/i915: Fix remapped stride with CCS on ADL+

    commit 0ccd963 upstream.
    
    On ADL+ the hardware automagically calculates the CCS AUX surface
    stride from the main surface stride, so when remapping we can't
    really play a lot of tricks with the main surface stride, or else
    the AUX surface stride would get miscalculated and no longer
    match the actual data layout in memory.
    
    Supposedly we could remap in 256 main surface tile units
    (AUX page(4096)/cachline(64)*4(4x1 main surface tiles per
    AUX cacheline)=256 main surface tiles), but the extra complexity
    is probably not worth the hassle.
    
    So let's just make sure our mapping stride is calculated from
    the full framebuffer stride (instead of the framebuffer width).
    This way the stride we program into PLANE_STRIDE will be the
    original framebuffer stride, and thus there will be no change
    to the AUX stride/layout.
    
    Cc: [email protected]
    Cc: Imre Deak <[email protected]>
    Cc: Juha-Pekka Heikkila <[email protected]>
    Signed-off-by: Ville Syrjälä <[email protected]>
    Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
    Reviewed-by: Imre Deak <[email protected]>
    (cherry picked from commit 2c12eb3)
    Signed-off-by: Jani Nikula <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    vsyrjala authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4029b02 View commit details
    Browse the repository at this point in the history
  153. smb: client: fix OOB in receive_encrypted_standard()

    commit eec04ea upstream.
    
    Fix potential OOB in receive_encrypted_standard() if server returned a
    large shdr->NextCommand that would end up writing off the end of
    @next_buffer.
    
    Fixes: b24df3e ("cifs: update receive_encrypted_standard to handle compounded responses")
    Cc: [email protected]
    Reported-by: Robert Morris <[email protected]>
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5347333 View commit details
    Browse the repository at this point in the history
  154. smb: client: fix potential OOBs in smb2_parse_contexts()

    commit af1689a upstream.
    
    Validate offsets and lengths before dereferencing create contexts in
    smb2_parse_contexts().
    
    This fixes following oops when accessing invalid create contexts from
    server:
    
      BUG: unable to handle page fault for address: ffff8881178d8cc3
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD 4a01067 P4D 4a01067 PUD 0
      Oops: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 3 PID: 1736 Comm: mount.cifs Not tainted 6.7.0-rc4 #1
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
      rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
      RIP: 0010:smb2_parse_contexts+0xa0/0x3a0 [cifs]
      Code: f8 10 75 13 48 b8 93 ad 25 50 9c b4 11 e7 49 39 06 0f 84 d2 00
      00 00 8b 45 00 85 c0 74 61 41 29 c5 48 01 c5 41 83 fd 0f 76 55 <0f> b7
      7d 04 0f b7 45 06 4c 8d 74 3d 00 66 83 f8 04 75 bc ba 04 00
      RSP: 0018:ffffc900007939e0 EFLAGS: 00010216
      RAX: ffffc90000793c78 RBX: ffff8880180cc000 RCX: ffffc90000793c90
      RDX: ffffc90000793cc0 RSI: ffff8880178d8cc0 RDI: ffff8880180cc000
      RBP: ffff8881178d8cbf R08: ffffc90000793c22 R09: 0000000000000000
      R10: ffff8880180cc000 R11: 0000000000000024 R12: 0000000000000000
      R13: 0000000000000020 R14: 0000000000000000 R15: ffffc90000793c22
      FS: 00007f873753cbc0(0000) GS:ffff88806bc00000(0000)
      knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffff8881178d8cc3 CR3: 00000000181ca000 CR4: 0000000000750ef0
      PKRU: 55555554
      Call Trace:
       <TASK>
       ? __die+0x23/0x70
       ? page_fault_oops+0x181/0x480
       ? search_module_extables+0x19/0x60
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? exc_page_fault+0x1b6/0x1c0
       ? asm_exc_page_fault+0x26/0x30
       ? smb2_parse_contexts+0xa0/0x3a0 [cifs]
       SMB2_open+0x38d/0x5f0 [cifs]
       ? smb2_is_path_accessible+0x138/0x260 [cifs]
       smb2_is_path_accessible+0x138/0x260 [cifs]
       cifs_is_path_remote+0x8d/0x230 [cifs]
       cifs_mount+0x7e/0x350 [cifs]
       cifs_smb3_do_mount+0x128/0x780 [cifs]
       smb3_get_tree+0xd9/0x290 [cifs]
       vfs_get_tree+0x2c/0x100
       ? capable+0x37/0x70
       path_mount+0x2d7/0xb80
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? _raw_spin_unlock_irqrestore+0x44/0x60
       __x64_sys_mount+0x11a/0x150
       do_syscall_64+0x47/0xf0
       entry_SYSCALL_64_after_hwframe+0x6f/0x77
      RIP: 0033:0x7f8737657b1e
    
    Reported-by: Robert Morris <[email protected]>
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    17a0f64 View commit details
    Browse the repository at this point in the history
  155. smb: client: fix NULL deref in asn1_ber_decoder()

    commit 90d025c upstream.
    
    If server replied SMB2_NEGOTIATE with a zero SecurityBufferOffset,
    smb2_get_data_area() sets @len to non-zero but return NULL, so
    decode_negTokeninit() ends up being called with a NULL @security_blob:
    
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD 0 P4D 0
      Oops: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 2 PID: 871 Comm: mount.cifs Not tainted 6.7.0-rc4 #2
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
      RIP: 0010:asn1_ber_decoder+0x173/0xc80
      Code: 01 4c 39 2c 24 75 09 45 84 c9 0f 85 2f 03 00 00 48 8b 14 24 4c 29 ea 48 83 fa 01 0f 86 1e 07 00 00 48 8b 74 24 28 4d 8d 5d 01 <42> 0f b6 3c 2e 89 fa 40 88 7c 24 5c f7 d2 83 e2 1f 0f 84 3d 07 00
      RSP: 0018:ffffc9000063f950 EFLAGS: 00010202
      RAX: 0000000000000002 RBX: 0000000000000000 RCX: 000000000000004a
      RDX: 000000000000004a RSI: 0000000000000000 RDI: 0000000000000000
      RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000002 R11: 0000000000000001 R12: 0000000000000000
      R13: 0000000000000000 R14: 000000000000004d R15: 0000000000000000
      FS:  00007fce52b0fbc0(0000) GS:ffff88806ba00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000000 CR3: 000000001ae64000 CR4: 0000000000750ef0
      PKRU: 55555554
      Call Trace:
       <TASK>
       ? __die+0x23/0x70
       ? page_fault_oops+0x181/0x480
       ? __stack_depot_save+0x1e6/0x480
       ? exc_page_fault+0x6f/0x1c0
       ? asm_exc_page_fault+0x26/0x30
       ? asn1_ber_decoder+0x173/0xc80
       ? check_object+0x40/0x340
       decode_negTokenInit+0x1e/0x30 [cifs]
       SMB2_negotiate+0xc99/0x17c0 [cifs]
       ? smb2_negotiate+0x46/0x60 [cifs]
       ? srso_alias_return_thunk+0x5/0xfbef5
       smb2_negotiate+0x46/0x60 [cifs]
       cifs_negotiate_protocol+0xae/0x130 [cifs]
       cifs_get_smb_ses+0x517/0x1040 [cifs]
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? queue_delayed_work_on+0x5d/0x90
       cifs_mount_get_session+0x78/0x200 [cifs]
       dfs_mount_share+0x13a/0x9f0 [cifs]
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? lock_acquire+0xbf/0x2b0
       ? find_nls+0x16/0x80
       ? srso_alias_return_thunk+0x5/0xfbef5
       cifs_mount+0x7e/0x350 [cifs]
       cifs_smb3_do_mount+0x128/0x780 [cifs]
       smb3_get_tree+0xd9/0x290 [cifs]
       vfs_get_tree+0x2c/0x100
       ? capable+0x37/0x70
       path_mount+0x2d7/0xb80
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? _raw_spin_unlock_irqrestore+0x44/0x60
       __x64_sys_mount+0x11a/0x150
       do_syscall_64+0x47/0xf0
       entry_SYSCALL_64_after_hwframe+0x6f/0x77
      RIP: 0033:0x7fce52c2ab1e
    
    Fix this by setting @len to zero when @off == 0 so callers won't
    attempt to dereference non-existing data areas.
    
    Reported-by: Robert Morris <[email protected]>
    Cc: [email protected]
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ef748d4 View commit details
    Browse the repository at this point in the history
  156. smb: client: fix OOB in smb2_query_reparse_point()

    commit 3a42709 upstream.
    
    Validate @ioctl_rsp->OutputOffset and @ioctl_rsp->OutputCount so that
    their sum does not wrap to a number that is smaller than @reparse_buf
    and we end up with a wild pointer as follows:
    
      BUG: unable to handle page fault for address: ffff88809c5cd45f
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD 4a01067 P4D 4a01067 PUD 0
      Oops: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 2 PID: 1260 Comm: mount.cifs Not tainted 6.7.0-rc4 #2
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
      rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
      RIP: 0010:smb2_query_reparse_point+0x3e0/0x4c0 [cifs]
      Code: ff ff e8 f3 51 fe ff 41 89 c6 58 5a 45 85 f6 0f 85 14 fe ff ff
      49 8b 57 48 8b 42 60 44 8b 42 64 42 8d 0c 00 49 39 4f 50 72 40 <8b>
      04 02 48 8b 9d f0 fe ff ff 49 8b 57 50 89 03 48 8b 9d e8 fe ff
      RSP: 0018:ffffc90000347a90 EFLAGS: 00010212
      RAX: 000000008000001f RBX: ffff88800ae11000 RCX: 00000000000000ec
      RDX: ffff88801c5cd440 RSI: 0000000000000000 RDI: ffffffff82004aa4
      RBP: ffffc90000347bb0 R08: 00000000800000cd R09: 0000000000000001
      R10: 0000000000000000 R11: 0000000000000024 R12: ffff8880114d4100
      R13: ffff8880114d4198 R14: 0000000000000000 R15: ffff8880114d4000
      FS: 00007f02c07babc0(0000) GS:ffff88806ba00000(0000)
      knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: ffff88809c5cd45f CR3: 0000000011750000 CR4: 0000000000750ef0
      PKRU: 55555554
      Call Trace:
       <TASK>
       ? __die+0x23/0x70
       ? page_fault_oops+0x181/0x480
       ? search_module_extables+0x19/0x60
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? exc_page_fault+0x1b6/0x1c0
       ? asm_exc_page_fault+0x26/0x30
       ? _raw_spin_unlock_irqrestore+0x44/0x60
       ? smb2_query_reparse_point+0x3e0/0x4c0 [cifs]
       cifs_get_fattr+0x16e/0xa50 [cifs]
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? lock_acquire+0xbf/0x2b0
       cifs_root_iget+0x163/0x5f0 [cifs]
       cifs_smb3_do_mount+0x5bd/0x780 [cifs]
       smb3_get_tree+0xd9/0x290 [cifs]
       vfs_get_tree+0x2c/0x100
       ? capable+0x37/0x70
       path_mount+0x2d7/0xb80
       ? srso_alias_return_thunk+0x5/0xfbef5
       ? _raw_spin_unlock_irqrestore+0x44/0x60
       __x64_sys_mount+0x11a/0x150
       do_syscall_64+0x47/0xf0
       entry_SYSCALL_64_after_hwframe+0x6f/0x77
      RIP: 0033:0x7f02c08d5b1e
    
    Fixes: 2e4564b ("smb3: add support for stat of WSL reparse points for special file types")
    Cc: [email protected]
    Reported-by: Robert Morris <[email protected]>
    Signed-off-by: Paulo Alcantara (SUSE) <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    pcacjr authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    e72ed49 View commit details
    Browse the repository at this point in the history
  157. ring-buffer: Fix memory leak of free page

    commit 17d8017 upstream.
    
    Reading the ring buffer does a swap of a sub-buffer within the ring buffer
    with a empty sub-buffer. This allows the reader to have full access to the
    content of the sub-buffer that was swapped out without having to worry
    about contention with the writer.
    
    The readers call ring_buffer_alloc_read_page() to allocate a page that
    will be used to swap with the ring buffer. When the code is finished with
    the reader page, it calls ring_buffer_free_read_page(). Instead of freeing
    the page, it stores it as a spare. Then next call to
    ring_buffer_alloc_read_page() will return this spare instead of calling
    into the memory management system to allocate a new page.
    
    Unfortunately, on freeing of the ring buffer, this spare page is not
    freed, and causes a memory leak.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Fixes: 73a757e ("ring-buffer: Return reader page back into existing ring buffer")
    Acked-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b02bf0d View commit details
    Browse the repository at this point in the history
  158. tracing: Update snapshot buffer on resize if it is allocated

    commit d06aff1 upstream.
    
    The snapshot buffer is to mimic the main buffer so that when a snapshot is
    needed, the snapshot and main buffer are swapped. When the snapshot buffer
    is allocated, it is set to the minimal size that the ring buffer may be at
    and still functional. When it is allocated it becomes the same size as the
    main ring buffer, and when the main ring buffer changes in size, it should
    do.
    
    Currently, the resize only updates the snapshot buffer if it's used by the
    current tracer (ie. the preemptirqsoff tracer). But it needs to be updated
    anytime it is allocated.
    
    When changing the size of the main buffer, instead of looking to see if
    the current tracer is utilizing the snapshot buffer, just check if it is
    allocated to know if it should be updated or not.
    
    Also fix typo in comment just above the code change.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Fixes: ad909e2 ("tracing: Add internal tracing_snapshot() functions")
    Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5062b8c View commit details
    Browse the repository at this point in the history
  159. ring-buffer: Do not update before stamp when switching sub-buffers

    commit 9e45e39 upstream.
    
    The ring buffer timestamps are synchronized by two timestamp placeholders.
    One is the "before_stamp" and the other is the "write_stamp" (sometimes
    referred to as the "after stamp" but only in the comments. These two
    stamps are key to knowing how to handle nested events coming in with a
    lockless system.
    
    When moving across sub-buffers, the before stamp is updated but the write
    stamp is not. There's an effort to put back the before stamp to something
    that seems logical in case there's nested events. But as the current event
    is about to cross sub-buffers, and so will any new nested event that happens,
    updating the before stamp is useless, and could even introduce new race
    conditions.
    
    The first event on a sub-buffer simply uses the sub-buffer's timestamp
    and keeps a "delta" of zero. The "before_stamp" and "write_stamp" are not
    used in the algorithm in this case. There's no reason to try to fix the
    before_stamp when this happens.
    
    As a bonus, it removes a cmpxchg() when crossing sub-buffers!
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Fixes: a389d86 ("ring-buffer: Have nested events still record running time stamp")
    Reviewed-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5e58483 View commit details
    Browse the repository at this point in the history
  160. ring-buffer: Have saved event hold the entire event

    commit b049525 upstream.
    
    For the ring buffer iterator (non-consuming read), the event needs to be
    copied into the iterator buffer to make sure that a writer does not
    overwrite it while the user is reading it. If a write happens during the
    copy, the buffer is simply discarded.
    
    But the temp buffer itself was not big enough. The allocation of the
    buffer was only BUF_MAX_DATA_SIZE, which is the maximum data size that can
    be passed into the ring buffer and saved. But the temp buffer needs to
    hold the meta data as well. That would be BUF_PAGE_SIZE and not
    BUF_MAX_DATA_SIZE.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Fixes: 785888c ("ring-buffer: Have rb_iter_head_event() handle concurrent writer")
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    307ed13 View commit details
    Browse the repository at this point in the history
  161. ring-buffer: Fix writing to the buffer with max_data_size

    commit b3ae7b6 upstream.
    
    The maximum ring buffer data size is the maximum size of data that can be
    recorded on the ring buffer. Events must be smaller than the sub buffer
    data size minus any meta data. This size is checked before trying to
    allocate from the ring buffer because the allocation assumes that the size
    will fit on the sub buffer.
    
    The maximum size was calculated as the size of a sub buffer page (which is
    currently PAGE_SIZE minus the sub buffer header) minus the size of the
    meta data of an individual event. But it missed the possible adding of a
    time stamp for events that are added long enough apart that the event meta
    data can't hold the time delta.
    
    When an event is added that is greater than the current BUF_MAX_DATA_SIZE
    minus the size of a time stamp, but still less than or equal to
    BUF_MAX_DATA_SIZE, the ring buffer would go into an infinite loop, looking
    for a page that can hold the event. Luckily, there's a check for this loop
    and after 1000 iterations and a warning is emitted and the ring buffer is
    disabled. But this should never happen.
    
    This can happen when a large event is added first, or after a long period
    where an absolute timestamp is prefixed to the event, increasing its size
    by 8 bytes. This passes the check and then goes into the algorithm that
    causes the infinite loop.
    
    For events that are the first event on the sub-buffer, it does not need to
    add a timestamp, because the sub-buffer itself contains an absolute
    timestamp, and adding one is redundant.
    
    The fix is to check if the event is to be the first event on the
    sub-buffer, and if it is, then do not add a timestamp.
    
    This also fixes 32 bit adding a timestamp when a read of before_stamp or
    write_stamp is interrupted. There's still no need to add that timestamp if
    the event is going to be the first event on the sub buffer.
    
    Also, if the buffer has "time_stamp_abs" set, then also check if the
    length plus the timestamp is greater than the BUF_MAX_DATA_SIZE.
    
    Link: https://lore.kernel.org/all/[email protected]/
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Fixes: a4543a2 ("ring-buffer: Get timestamp after event is allocated")
    Fixes: 58fbc3c ("ring-buffer: Consolidate add_timestamp to remove some branches")
    Reported-by: Kent Overstreet <[email protected]> # (on IRC)
    Acked-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    ae76d9b View commit details
    Browse the repository at this point in the history
  162. ring-buffer: Fix a race in rb_time_cmpxchg() for 32 bit archs

    commit fff88fa upstream.
    
    Mathieu Desnoyers pointed out an issue in the rb_time_cmpxchg() for 32 bit
    architectures. That is:
    
     static bool rb_time_cmpxchg(rb_time_t *t, u64 expect, u64 set)
     {
    	unsigned long cnt, top, bottom, msb;
    	unsigned long cnt2, top2, bottom2, msb2;
    	u64 val;
    
    	/* The cmpxchg always fails if it interrupted an update */
    	 if (!__rb_time_read(t, &val, &cnt2))
    		 return false;
    
    	 if (val != expect)
    		 return false;
    
    <<<< interrupted here!
    
    	 cnt = local_read(&t->cnt);
    
    The problem is that the synchronization counter in the rb_time_t is read
    *after* the value of the timestamp is read. That means if an interrupt
    were to come in between the value being read and the counter being read,
    it can change the value and the counter and the interrupted process would
    be clueless about it!
    
    The counter needs to be read first and then the value. That way it is easy
    to tell if the value is stale or not. If the counter hasn't been updated,
    then the value is still good.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]/
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Fixes: 10464b4 ("ring-buffer: Add rb_time_t 64 bit operations for speeding up 32 bit")
    Reported-by: Mathieu Desnoyers <[email protected]>
    Reviewed-by: Mathieu Desnoyers <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    bc17bc9 View commit details
    Browse the repository at this point in the history
  163. ring-buffer: Do not try to put back write_stamp

    commit dd93942 upstream.
    
    If an update to an event is interrupted by another event between the time
    the initial event allocated its buffer and where it wrote to the
    write_stamp, the code try to reset the write stamp back to the what it had
    just overwritten. It knows that it was overwritten via checking the
    before_stamp, and if it didn't match what it wrote to the before_stamp
    before it allocated its space, it knows it was overwritten.
    
    To put back the write_stamp, it uses the before_stamp it read. The problem
    here is that by writing the before_stamp to the write_stamp it makes the
    two equal again, which means that the write_stamp can be considered valid
    as the last timestamp written to the ring buffer. But this is not
    necessarily true. The event that interrupted the event could have been
    interrupted in a way that it was interrupted as well, and can end up
    leaving with an invalid write_stamp. But if this happens and returns to
    this context that uses the before_stamp to update the write_stamp again,
    it can possibly incorrectly make it valid, causing later events to have in
    correct time stamps.
    
    As it is OK to leave this function with an invalid write_stamp (one that
    doesn't match the before_stamp), there's no reason to try to make it valid
    again in this case. If this race happens, then just leave with the invalid
    write_stamp and the next event to come along will just add a absolute
    timestamp and validate everything again.
    
    Bonus points: This gets rid of another cmpxchg64!
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Cc: Joel Fernandes <[email protected]>
    Cc: Vincent Donnefort <[email protected]>
    Fixes: a389d86 ("ring-buffer: Have nested events still record running time stamp")
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    b3778a2 View commit details
    Browse the repository at this point in the history
  164. ring-buffer: Have rb_time_cmpxchg() set the msb counter too

    commit 0aa0e52 upstream.
    
    The rb_time_cmpxchg() on 32-bit architectures requires setting three
    32-bit words to represent the 64-bit timestamp, with some salt for
    synchronization. Those are: msb, top, and bottom
    
    The issue is, the rb_time_cmpxchg() did not properly salt the msb portion,
    and the msb that was written was stale.
    
    Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
    
    Cc: [email protected]
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mark Rutland <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Fixes: f03f2ab ("ring-buffer: Have 32 bit time stamps use all 64 bits")
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    rostedt authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    3432f96 View commit details
    Browse the repository at this point in the history
  165. x86/speculation, objtool: Use absolute relocations for annotations

    commit b8ec60e upstream.
    
    .discard.retpoline_safe sections do not have the SHF_ALLOC flag.  These
    sections referencing text sections' STT_SECTION symbols with PC-relative
    relocations like R_386_PC32 [0] is conceptually not suitable.  Newer
    LLD will report warnings for REL relocations even for relocatable links [1]:
    
        ld.lld: warning: vmlinux.a(drivers/i2c/busses/i2c-i801.o):(.discard.retpoline_safe+0x120): has non-ABS relocation R_386_PC32 against symbol ''
    
    Switch to absolute relocations instead, which indicate link-time
    addresses.  In a relocatable link, these addresses are also output
    section offsets, used by checks in tools/objtool/check.c.  When linking
    vmlinux, these .discard.* sections will be discarded, therefore it is
    not a problem that R_X86_64_32 cannot represent a kernel address.
    
    Alternatively, we could set the SHF_ALLOC flag for .discard.* sections,
    but I think non-SHF_ALLOC for sections to be discarded makes more sense.
    
    Note: if we decide to never support REL architectures (e.g. arm, i386),
    we can utilize R_*_NONE relocations (.reloc ., BFD_RELOC_NONE, sym),
    making .discard.* sections zero-sized.  That said, the section content
    waste is 4 bytes per entry, much smaller than sizeof(Elf{32,64}_Rel).
    
      [0] commit 1c0c1fa ("objtool: Use relative pointers for annotations")
      [1] ClangBuiltLinux#1937
    
    Signed-off-by: Fangrui Song <[email protected]>
    Signed-off-by: Ingo Molnar <[email protected]>
    Acked-by: Peter Zijlstra (Intel) <[email protected]>
    Cc: Josh Poimboeuf <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: Nathan Chancellor <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    MaskRay authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    06f61af View commit details
    Browse the repository at this point in the history
  166. RDMA/mlx5: Change the key being sent for MPV device affiliation

    commit 02e7d13 upstream.
    
    Change the key that we send from IB driver to EN driver regarding the
    MPV device affiliation, since at that stage the IB device is not yet
    initialized, so its index would be zero for different IB devices and
    cause wrong associations between unrelated master and slave devices.
    
    Instead use a unique value from inside the core device which is already
    initialized at this stage.
    
    Fixes: 0d29371 ("RDMA/mlx5: Send events from IB driver about device affiliation state")
    Signed-off-by: Patrisious Haddad <[email protected]>
    Link: https://lore.kernel.org/r/ac7e66357d963fc68d7a419515180212c96d137d.1697705185.git.leon@kernel.org
    Signed-off-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    PatrisiousHaddad authored and gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    885faf3 View commit details
    Browse the repository at this point in the history
  167. Linux 6.6.8

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Ronald Warsow <[email protected]>
    Tested-by: SeongJae Park <[email protected]>
    Tested-by: Conor Dooley <[email protected]>
    Tested-by: Ricardo B. Marliere <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Justin M. Forbes <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Kelsey Steele <[email protected]>
    Tested-by: Bagas Sanjaya <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    gregkh committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    4c9646a View commit details
    Browse the repository at this point in the history
  168. base packaging

    Kernel Builder (kathleen) committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    0778025 View commit details
    Browse the repository at this point in the history
  169. UBUNTU: SAUCE: kbuild: add -fcf-protection=none when using retpoline …

    …flags
    
    BugLink: [Replace -fcf-protection=none patch with new version]
    
    The gcc -fcf-protection=branch option is not compatible with
    -mindirect-branch=thunk-extern. The latter is used when
    CONFIG_RETPOLINE is selected, and this will fail to build with
    a gcc which has -fcf-protection=branch enabled by default. Adding
    -fcf-protection=none when building with retpoline support to
    prevents such build failures.
    
    Signed-off-by: Seth Forshee <[email protected]>
    Seth Forshee authored and Kernel Builder (kathleen) committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    df72a3b View commit details
    Browse the repository at this point in the history
  170. UBUNTU: SAUCE: add vmlinux.strip to BOOT_TARGETS1 on powerpc

    Signed-off-by: Andy Whitcroft <[email protected]>
    Andy Whitcroft authored and Kernel Builder (kathleen) committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    5d6066c View commit details
    Browse the repository at this point in the history
  171. UBUNTU: SAUCE: tools/hv/lsvmbus -- add manual page

    BugLink: http://bugs.launchpad.net/bugs/1585311
    
    Signed-off-by: Andy Whitcroft <[email protected]>
    Acked-by: Tim Gardner <[email protected]>
    Acked-by: Brad Figg <[email protected]>
    Signed-off-by: Kamal Mostafa <[email protected]>
    Andy Whitcroft authored and Kernel Builder (kathleen) committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    e30030e View commit details
    Browse the repository at this point in the history
  172. debian changelog

    Kernel Builder (kathleen) committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    bb2f8ee View commit details
    Browse the repository at this point in the history
  173. configs (based on Ubuntu-6.6.0-14.14)

    Kernel Builder (kathleen) committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    e4bac4a View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. chore: System76 Linux scripts

    jackpot51 authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    dcbfac1 View commit details
    Browse the repository at this point in the history
  2. chore: Pop packaging

    mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    6ea7aa3 View commit details
    Browse the repository at this point in the history
  3. fix: hotfix remove nocf_check attribute for ibt

    Signed-off-by: Michael Aaron Murphy <[email protected]>
    jglathe authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    82ed7ee View commit details
    Browse the repository at this point in the history
  4. ALSA: hda/realtek - Reapply pin fixup for oryp5

    The pin fixup is required to detect headset microphones on the oryp5.
    
    Fixes: 80690a2 ("ALSA: hda/realtek - Add quirk for Tuxedo XC 1509")
    Signed-off-by: Tim Crawford <[email protected]>
    crawfxrd authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    9f1a7b8 View commit details
    Browse the repository at this point in the history
  5. pinctrl: Export intel_pinctrl_probe

    jackpot51 authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    0f4d4e4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ea8c721 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e48a90a View commit details
    Browse the repository at this point in the history
  8. Mixer-Maps: Add alternate ALC4080

    Asus released motherboard(s) with an alternate ALC4080 that lacks
    a SPDIF jack, and requires applying this map.
    13r0ck authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    eb3d976 View commit details
    Browse the repository at this point in the history
  9. Rewrite mixer map for TRX40 Aorus Master

    The Aorus Xtreme uses the same ID for audio controller, but the
    maps are very different. This successfully fixes all of the
    audio jacks on the back.
    13r0ck authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    3f3ffeb View commit details
    Browse the repository at this point in the history
  10. ALSA: hda - Improve 3.5mm hotplug w/ROG strix B550

    When plugging of unplugging an audio jack on this motherbaord,
    sometimes the audio jacks would stop appearing to
    pipewire/pulseaudio. Interestingly `cat`-ing out the file
    `/proc/asound/<card number>/codec#0`, and or restarting pipewire
    fixes the issue temporarily.
    
    This PR improves the current functionality by making hotplug with
    one 3.5mm jack work, it still breaks if hotplug is between multiple
    jacks though.
    13r0ck authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    c03a923 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a5e24a4 View commit details
    Browse the repository at this point in the history
  12. Revert "misc: rtsx: rts522a rts5228 rts5261 support Runtime PM" (#193)

    This reverts commit 86f4c65.
    13r0ck authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    bdfdd5c View commit details
    Browse the repository at this point in the history
  13. Revert "i2c: acpi: Use ACPI wake capability bit to set wake_irq"

    This reverts commit b38f2d5.
    13r0ck authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    2093089 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5bedb18 View commit details
    Browse the repository at this point in the history
  15. Add pang13 microphone quirk

    jackpot51 authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    a0e100a View commit details
    Browse the repository at this point in the history
  16. Revert "drm/i915/dmc: Use unversioned path for ADLP"

    This reverts commit 81f6650.
    jackpot51 authored and mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    88f2231 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    8748738 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9661d0c View commit details
    Browse the repository at this point in the history
  19. DROP ON REBASE: 6.6.8-76060608.202312201634 based on 6.6.8-060608.202…

    …312201634
    
    Signed-off-by: Michael Aaron Murphy <[email protected]>
    mmstick committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    9d57c85 View commit details
    Browse the repository at this point in the history