From: Greg Kroah-Hartman Date: Sun, 12 Jan 2025 09:18:35 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.1.125~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6066e38ca39023028a79b26d8edf17441b42ce0a;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch drm-amdkfd-fixed-page-fault-when-enable-mes-shader-debugger.patch io_uring-timeout-fix-multishot-updates.patch riscv-fix-sleeping-in-invalid-context-in-die.patch smb-client-sync-the-root-session-and-superblock-context-passwords-before-automounting.patch --- diff --git a/queue-6.6/acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch b/queue-6.6/acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch new file mode 100644 index 00000000000..e146416e248 --- /dev/null +++ b/queue-6.6/acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch @@ -0,0 +1,42 @@ +From 66d337fede44dcbab4107d37684af8fcab3d648e Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 20 Dec 2024 19:13:52 +0100 +Subject: ACPI: resource: Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[] + +From: Hans de Goede + +commit 66d337fede44dcbab4107d37684af8fcab3d648e upstream. + +Like the Vivobook X1704VAP the X1504VAP has its keyboard IRQ (1) described +as ActiveLow in the DSDT, which the kernel overrides to EdgeHigh which +breaks the keyboard. + +Add the X1504VAP to the irq1_level_low_skip_override[] quirk table to fix +this. + +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219224 +Cc: All applicable +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241220181352.25974-1-hdegoede@redhat.com +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/resource.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/acpi/resource.c ++++ b/drivers/acpi/resource.c +@@ -440,6 +440,13 @@ static const struct dmi_system_id asus_l + }, + }, + { ++ /* Asus Vivobook X1504VAP */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), ++ DMI_MATCH(DMI_BOARD_NAME, "X1504VAP"), ++ }, ++ }, ++ { + /* Asus Vivobook X1704VAP */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), diff --git a/queue-6.6/acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch b/queue-6.6/acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch new file mode 100644 index 00000000000..701aac230b6 --- /dev/null +++ b/queue-6.6/acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch @@ -0,0 +1,58 @@ +From 7ed4e4a659d99499dc6968c61970d41b64feeac0 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 28 Dec 2024 17:48:45 +0100 +Subject: ACPI: resource: Add TongFang GM5HG0A to irq1_edge_low_force_override[] + +From: Hans de Goede + +commit 7ed4e4a659d99499dc6968c61970d41b64feeac0 upstream. + +The TongFang GM5HG0A is a TongFang barebone design which is sold under +various brand names. + +The ACPI IRQ override for the keyboard IRQ must be used on these AMD Zen +laptops in order for the IRQ to work. + +At least on the SKIKK Vanaheim variant the DMI product- and board-name +strings have been replaced by the OEM with "Vanaheim" so checking that +board-name contains "GM5HG0A" as is usually done for TongFang barebones +quirks does not work. + +The DMI OEM strings do contain "GM5HG0A". I have looked at the dmidecode +for a few other TongFang devices and the TongFang code-name string being +in the OEM strings seems to be something which is consistently true. + +Add a quirk checking one of the DMI_OEM_STRING(s) is "GM5HG0A" in the hope +that this will work for other OEM versions of the "GM5HG0A" too. + +Link: https://www.skikk.eu/en/laptops/vanaheim-15-rtx-4060 +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219614 +Cc: All applicable +Signed-off-by: Hans de Goede +Link: https://patch.msgid.link/20241228164845.42381-1-hdegoede@redhat.com +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/resource.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/drivers/acpi/resource.c ++++ b/drivers/acpi/resource.c +@@ -633,6 +633,17 @@ static const struct dmi_system_id lg_lap + DMI_MATCH(DMI_BOARD_NAME, "GMxHGxx"), + }, + }, ++ { ++ /* ++ * TongFang GM5HG0A in case of the SKIKK Vanaheim relabel the ++ * board-name is changed, so check OEM strings instead. Note ++ * OEM string matches are always exact matches. ++ * https://bugzilla.kernel.org/show_bug.cgi?id=219614 ++ */ ++ .matches = { ++ DMI_EXACT_MATCH(DMI_OEM_STRING, "GM5HG0A"), ++ }, ++ }, + { } + }; + diff --git a/queue-6.6/drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch b/queue-6.6/drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch new file mode 100644 index 00000000000..b668049a096 --- /dev/null +++ b/queue-6.6/drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch @@ -0,0 +1,38 @@ +From 21541bc6b44241e3f791f9e552352d8440b2b29e Mon Sep 17 00:00:00 2001 +From: Melissa Wen +Date: Tue, 17 Dec 2024 17:45:04 -0300 +Subject: drm/amd/display: increase MAX_SURFACES to the value supported by hw + +From: Melissa Wen + +commit 21541bc6b44241e3f791f9e552352d8440b2b29e upstream. + +As the hw supports up to 4 surfaces, increase the maximum number of +surfaces to prevent the DC error when trying to use more than three +planes. + +[drm:dc_state_add_plane [amdgpu]] *ERROR* Surface: can not attach plane_state 000000003e2cb82c! Maximum is: 3 + +Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3693 +Signed-off-by: Melissa Wen +Reviewed-by: Rodrigo Siqueira +Signed-off-by: Rodrigo Siqueira +Signed-off-by: Alex Deucher +(cherry picked from commit b8d6daffc871a42026c3c20bff7b8fa0302298c1) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/dc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/display/dc/dc.h ++++ b/drivers/gpu/drm/amd/display/dc/dc.h +@@ -49,7 +49,7 @@ struct dmub_notification; + + #define DC_VER "3.2.247" + +-#define MAX_SURFACES 3 ++#define MAX_SURFACES 4 + #define MAX_PLANES 6 + #define MAX_STREAMS 6 + #define MIN_VIEWPORT_SIZE 12 diff --git a/queue-6.6/drm-amdkfd-fixed-page-fault-when-enable-mes-shader-debugger.patch b/queue-6.6/drm-amdkfd-fixed-page-fault-when-enable-mes-shader-debugger.patch new file mode 100644 index 00000000000..e08ae0e1295 --- /dev/null +++ b/queue-6.6/drm-amdkfd-fixed-page-fault-when-enable-mes-shader-debugger.patch @@ -0,0 +1,74 @@ +From 9738609449c3e44d1afb73eecab4763362b57930 Mon Sep 17 00:00:00 2001 +From: "Jesse.zhang@amd.com" +Date: Wed, 18 Dec 2024 18:23:52 +0800 +Subject: drm/amdkfd: fixed page fault when enable MES shader debugger + +From: Jesse.zhang@amd.com + +commit 9738609449c3e44d1afb73eecab4763362b57930 upstream. + +Initialize the process context address before setting the shader debugger. + +[ 260.781212] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:32 vmid:0 pasid:0) +[ 260.781236] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000000000 from client 10 +[ 260.781255] amdgpu 0000:03:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00040A40 +[ 260.781270] amdgpu 0000:03:00.0: amdgpu: Faulty UTCL2 client ID: CPC (0x5) +[ 260.781284] amdgpu 0000:03:00.0: amdgpu: MORE_FAULTS: 0x0 +[ 260.781296] amdgpu 0000:03:00.0: amdgpu: WALKER_ERROR: 0x0 +[ 260.781308] amdgpu 0000:03:00.0: amdgpu: PERMISSION_FAULTS: 0x4 +[ 260.781320] amdgpu 0000:03:00.0: amdgpu: MAPPING_ERROR: 0x0 +[ 260.781332] amdgpu 0000:03:00.0: amdgpu: RW: 0x1 +[ 260.782017] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:32 vmid:0 pasid:0) +[ 260.782039] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000000000 from client 10 +[ 260.782058] amdgpu 0000:03:00.0: amdgpu: GCVM_L2_PROTECTION_FAULT_STATUS:0x00040A41 +[ 260.782073] amdgpu 0000:03:00.0: amdgpu: Faulty UTCL2 client ID: CPC (0x5) +[ 260.782087] amdgpu 0000:03:00.0: amdgpu: MORE_FAULTS: 0x1 +[ 260.782098] amdgpu 0000:03:00.0: amdgpu: WALKER_ERROR: 0x0 +[ 260.782110] amdgpu 0000:03:00.0: amdgpu: PERMISSION_FAULTS: 0x4 +[ 260.782122] amdgpu 0000:03:00.0: amdgpu: MAPPING_ERROR: 0x0 +[ 260.782137] amdgpu 0000:03:00.0: amdgpu: RW: 0x1 +[ 260.782155] amdgpu 0000:03:00.0: amdgpu: [gfxhub] page fault (src_id:0 ring:32 vmid:0 pasid:0) +[ 260.782166] amdgpu 0000:03:00.0: amdgpu: in page starting at address 0x0000000000000000 from client 10 + +Fixes: 438b39ac74e2 ("drm/amdkfd: pause autosuspend when creating pdd") +Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3849 +Signed-off-by: Jesse Zhang +Reviewed-by: Alex Deucher +Signed-off-by: Alex Deucher +(cherry picked from commit 5b231f5bc9ff02ec5737f2ec95cdf15ac95088e9) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdkfd/kfd_debug.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.c +@@ -349,10 +349,27 @@ int kfd_dbg_set_mes_debug_mode(struct kf + { + uint32_t spi_dbg_cntl = pdd->spi_dbg_override | pdd->spi_dbg_launch_mode; + uint32_t flags = pdd->process->dbg_flags; ++ struct amdgpu_device *adev = pdd->dev->adev; ++ int r; + + if (!kfd_dbg_is_per_vmid_supported(pdd->dev)) + return 0; + ++ if (!pdd->proc_ctx_cpu_ptr) { ++ r = amdgpu_amdkfd_alloc_gtt_mem(adev, ++ AMDGPU_MES_PROC_CTX_SIZE, ++ &pdd->proc_ctx_bo, ++ &pdd->proc_ctx_gpu_addr, ++ &pdd->proc_ctx_cpu_ptr, ++ false); ++ if (r) { ++ dev_err(adev->dev, ++ "failed to allocate process context bo\n"); ++ return r; ++ } ++ memset(pdd->proc_ctx_cpu_ptr, 0, AMDGPU_MES_PROC_CTX_SIZE); ++ } ++ + return amdgpu_mes_set_shader_debugger(pdd->dev->adev, pdd->proc_ctx_gpu_addr, spi_dbg_cntl, + pdd->watch_points, flags, sq_trap_en); + } diff --git a/queue-6.6/io_uring-timeout-fix-multishot-updates.patch b/queue-6.6/io_uring-timeout-fix-multishot-updates.patch new file mode 100644 index 00000000000..e5fa4990f6f --- /dev/null +++ b/queue-6.6/io_uring-timeout-fix-multishot-updates.patch @@ -0,0 +1,41 @@ +From c83c846231db8b153bfcb44d552d373c34f78245 Mon Sep 17 00:00:00 2001 +From: Pavel Begunkov +Date: Sat, 4 Jan 2025 18:29:02 +0000 +Subject: io_uring/timeout: fix multishot updates + +From: Pavel Begunkov + +commit c83c846231db8b153bfcb44d552d373c34f78245 upstream. + +After update only the first shot of a multishot timeout request adheres +to the new timeout value while all subsequent retries continue to use +the old value. Don't forget to update the timeout stored in struct +io_timeout_data. + +Cc: stable@vger.kernel.org +Fixes: ea97f6c8558e8 ("io_uring: add support for multishot timeouts") +Reported-by: Christian Mazakas +Signed-off-by: Pavel Begunkov +Link: https://lore.kernel.org/r/e6516c3304eb654ec234cfa65c88a9579861e597.1736015288.git.asml.silence@gmail.com +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman +--- + io_uring/timeout.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/io_uring/timeout.c ++++ b/io_uring/timeout.c +@@ -413,10 +413,12 @@ static int io_timeout_update(struct io_r + + timeout->off = 0; /* noseq */ + data = req->async_data; ++ data->ts = *ts; ++ + list_add_tail(&timeout->list, &ctx->timeout_list); + hrtimer_init(&data->timer, io_timeout_get_clock(data), mode); + data->timer.function = io_timeout_fn; +- hrtimer_start(&data->timer, timespec64_to_ktime(*ts), mode); ++ hrtimer_start(&data->timer, timespec64_to_ktime(data->ts), mode); + return 0; + } + diff --git a/queue-6.6/riscv-fix-sleeping-in-invalid-context-in-die.patch b/queue-6.6/riscv-fix-sleeping-in-invalid-context-in-die.patch new file mode 100644 index 00000000000..81968f30001 --- /dev/null +++ b/queue-6.6/riscv-fix-sleeping-in-invalid-context-in-die.patch @@ -0,0 +1,74 @@ +From 6a97f4118ac07cfdc316433f385dbdc12af5025e Mon Sep 17 00:00:00 2001 +From: Nam Cao +Date: Mon, 18 Nov 2024 10:13:33 +0100 +Subject: riscv: Fix sleeping in invalid context in die() + +From: Nam Cao + +commit 6a97f4118ac07cfdc316433f385dbdc12af5025e upstream. + +die() can be called in exception handler, and therefore cannot sleep. +However, die() takes spinlock_t which can sleep with PREEMPT_RT enabled. +That causes the following warning: + +BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 +in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 285, name: mutex +preempt_count: 110001, expected: 0 +RCU nest depth: 0, expected: 0 +CPU: 0 UID: 0 PID: 285 Comm: mutex Not tainted 6.12.0-rc7-00022-ge19049cf7d56-dirty #234 +Hardware name: riscv-virtio,qemu (DT) +Call Trace: + dump_backtrace+0x1c/0x24 + show_stack+0x2c/0x38 + dump_stack_lvl+0x5a/0x72 + dump_stack+0x14/0x1c + __might_resched+0x130/0x13a + rt_spin_lock+0x2a/0x5c + die+0x24/0x112 + do_trap_insn_illegal+0xa0/0xea + _new_vmalloc_restore_context_a0+0xcc/0xd8 +Oops - illegal instruction [#1] + +Switch to use raw_spinlock_t, which does not sleep even with PREEMPT_RT +enabled. + +Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code") +Signed-off-by: Nam Cao +Cc: stable@vger.kernel.org +Reviewed-by: Sebastian Andrzej Siewior +Link: https://lore.kernel.org/r/20241118091333.1185288-1-namcao@linutronix.de +Signed-off-by: Palmer Dabbelt +Signed-off-by: Greg Kroah-Hartman +--- + arch/riscv/kernel/traps.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/arch/riscv/kernel/traps.c ++++ b/arch/riscv/kernel/traps.c +@@ -34,7 +34,7 @@ + + int show_unhandled_signals = 1; + +-static DEFINE_SPINLOCK(die_lock); ++static DEFINE_RAW_SPINLOCK(die_lock); + + static void dump_kernel_instr(const char *loglvl, struct pt_regs *regs) + { +@@ -66,7 +66,7 @@ void die(struct pt_regs *regs, const cha + + oops_enter(); + +- spin_lock_irqsave(&die_lock, flags); ++ raw_spin_lock_irqsave(&die_lock, flags); + console_verbose(); + bust_spinlocks(1); + +@@ -85,7 +85,7 @@ void die(struct pt_regs *regs, const cha + + bust_spinlocks(0); + add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); +- spin_unlock_irqrestore(&die_lock, flags); ++ raw_spin_unlock_irqrestore(&die_lock, flags); + oops_exit(); + + if (in_interrupt()) diff --git a/queue-6.6/series b/queue-6.6/series index f2b5b229078..883c8ba56a4 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -69,3 +69,10 @@ sctp-sysctl-plpmtud_probe_interval-avoid-using-current-nsproxy.patch ksmbd-implement-new-smb3-posix-type.patch drm-amd-display-add-check-for-granularity-in-dml-ceil-floor-helpers.patch thermal-of-fix-of-node-leak-in-of_thermal_zone_find.patch +smb-client-sync-the-root-session-and-superblock-context-passwords-before-automounting.patch +riscv-fix-sleeping-in-invalid-context-in-die.patch +acpi-resource-add-tongfang-gm5hg0a-to-irq1_edge_low_force_override.patch +acpi-resource-add-asus-vivobook-x1504vap-to-irq1_level_low_skip_override.patch +drm-amdkfd-fixed-page-fault-when-enable-mes-shader-debugger.patch +drm-amd-display-increase-max_surfaces-to-the-value-supported-by-hw.patch +io_uring-timeout-fix-multishot-updates.patch diff --git a/queue-6.6/smb-client-sync-the-root-session-and-superblock-context-passwords-before-automounting.patch b/queue-6.6/smb-client-sync-the-root-session-and-superblock-context-passwords-before-automounting.patch new file mode 100644 index 00000000000..0234a820b1d --- /dev/null +++ b/queue-6.6/smb-client-sync-the-root-session-and-superblock-context-passwords-before-automounting.patch @@ -0,0 +1,62 @@ +From 20b1aa912316ffb7fbb5f407f17c330f2a22ddff Mon Sep 17 00:00:00 2001 +From: Meetakshi Setiya +Date: Wed, 8 Jan 2025 05:10:34 -0500 +Subject: smb: client: sync the root session and superblock context passwords before automounting + +From: Meetakshi Setiya + +commit 20b1aa912316ffb7fbb5f407f17c330f2a22ddff upstream. + +In some cases, when password2 becomes the working password, the +client swaps the two password fields in the root session struct, but +not in the smb3_fs_context struct in cifs_sb. DFS automounts inherit +fs context from their parent mounts. Therefore, they might end up +getting the passwords in the stale order. +The automount should succeed, because the mount function will end up +retrying with the actual password anyway. But to reduce these +unnecessary session setup retries for automounts, we can sync the +parent context's passwords with the root session's passwords before +duplicating it to the child's fs context. + +Cc: stable@vger.kernel.org +Signed-off-by: Meetakshi Setiya +Reviewed-by: Shyam Prasad N +Acked-by: Paulo Alcantara (Red Hat) +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman +--- + fs/smb/client/namespace.c | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +--- a/fs/smb/client/namespace.c ++++ b/fs/smb/client/namespace.c +@@ -196,11 +196,28 @@ static struct vfsmount *cifs_do_automoun + struct smb3_fs_context tmp; + char *full_path; + struct vfsmount *mnt; ++ struct cifs_sb_info *mntpt_sb; ++ struct cifs_ses *ses; + + if (IS_ROOT(mntpt)) + return ERR_PTR(-ESTALE); + +- cur_ctx = CIFS_SB(mntpt->d_sb)->ctx; ++ mntpt_sb = CIFS_SB(mntpt->d_sb); ++ ses = cifs_sb_master_tcon(mntpt_sb)->ses; ++ cur_ctx = mntpt_sb->ctx; ++ ++ /* ++ * At this point, the root session should be in the mntpt sb. We should ++ * bring the sb context passwords in sync with the root session's ++ * passwords. This would help prevent unnecessary retries and password ++ * swaps for automounts. ++ */ ++ mutex_lock(&ses->session_mutex); ++ rc = smb3_sync_session_ctx_passwords(mntpt_sb, ses); ++ mutex_unlock(&ses->session_mutex); ++ ++ if (rc) ++ return ERR_PTR(rc); + + fc = fs_context_for_submount(path->mnt->mnt_sb->s_type, mntpt); + if (IS_ERR(fc))