From: Greg Kroah-Hartman Date: Thu, 15 Aug 2024 08:40:29 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v4.19.320~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b843139cbd8cadf13b5c2db83683c08a5c9634f;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: asoc-cs35l56-patch-cs35l56_irq1_mask_18-to-the-default-value.patch loongarch-define-__arch_want_new_stat-in-unistd.h.patch nvme-pci-add-apst-quirk-for-lenovo-n60z-laptop.patch --- diff --git a/queue-6.10/asoc-cs35l56-patch-cs35l56_irq1_mask_18-to-the-default-value.patch b/queue-6.10/asoc-cs35l56-patch-cs35l56_irq1_mask_18-to-the-default-value.patch new file mode 100644 index 00000000000..4abeded372d --- /dev/null +++ b/queue-6.10/asoc-cs35l56-patch-cs35l56_irq1_mask_18-to-the-default-value.patch @@ -0,0 +1,34 @@ +From 72776774b55bb59b7b1b09117e915a5030110304 Mon Sep 17 00:00:00 2001 +From: Simon Trimmer +Date: Wed, 7 Aug 2024 14:26:48 +0000 +Subject: ASoC: cs35l56: Patch CS35L56_IRQ1_MASK_18 to the default value + +From: Simon Trimmer + +commit 72776774b55bb59b7b1b09117e915a5030110304 upstream. + +Device tuning files made with early revision tooling may contain +configuration that can unmask IRQ signals that are owned by the host. + +Adding a safe default to the regmap patch ensures that the hardware +matches the driver expectations. + +Signed-off-by: Simon Trimmer +Link: https://patch.msgid.link/20240807142648.46932-1-simont@opensource.cirrus.com +Signed-off-by: Mark Brown +Signed-off-by: Richard Fitzgerald +Signed-off-by: Greg Kroah-Hartman +--- + sound/soc/codecs/cs35l56-shared.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/soc/codecs/cs35l56-shared.c ++++ b/sound/soc/codecs/cs35l56-shared.c +@@ -36,6 +36,7 @@ static const struct reg_sequence cs35l56 + { CS35L56_SWIRE_DP3_CH2_INPUT, 0x00000019 }, + { CS35L56_SWIRE_DP3_CH3_INPUT, 0x00000029 }, + { CS35L56_SWIRE_DP3_CH4_INPUT, 0x00000028 }, ++ { CS35L56_IRQ1_MASK_18, 0x1f7df0ff }, + + /* These are not reset by a soft-reset, so patch to defaults. */ + { CS35L56_MAIN_RENDER_USER_MUTE, 0x00000000 }, diff --git a/queue-6.10/loongarch-define-__arch_want_new_stat-in-unistd.h.patch b/queue-6.10/loongarch-define-__arch_want_new_stat-in-unistd.h.patch new file mode 100644 index 00000000000..7a2a98fe72b --- /dev/null +++ b/queue-6.10/loongarch-define-__arch_want_new_stat-in-unistd.h.patch @@ -0,0 +1,63 @@ +From 7697a0fe0154468f5df35c23ebd7aa48994c2cdc Mon Sep 17 00:00:00 2001 +From: Huacai Chen +Date: Sat, 20 Jul 2024 22:40:58 +0800 +Subject: LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h + +From: Huacai Chen + +commit 7697a0fe0154468f5df35c23ebd7aa48994c2cdc upstream. + +Chromium sandbox apparently wants to deny statx [1] so it could properly +inspect arguments after the sandboxed process later falls back to fstat. +Because there's currently not a "fd-only" version of statx, so that the +sandbox has no way to ensure the path argument is empty without being +able to peek into the sandboxed process's memory. For architectures able +to do newfstatat though, glibc falls back to newfstatat after getting +-ENOSYS for statx, then the respective SIGSYS handler [2] takes care of +inspecting the path argument, transforming allowed newfstatat's into +fstat instead which is allowed and has the same type of return value. + +But, as LoongArch is the first architecture to not have fstat nor +newfstatat, the LoongArch glibc does not attempt falling back at all +when it gets -ENOSYS for statx -- and you see the problem there! + +Actually, back when the LoongArch port was under review, people were +aware of the same problem with sandboxing clone3 [3], so clone was +eventually kept. Unfortunately it seemed at that time no one had noticed +statx, so besides restoring fstat/newfstatat to LoongArch uapi (and +postponing the problem further), it seems inevitable that we would need +to tackle seccomp deep argument inspection. + +However, this is obviously a decision that shouldn't be taken lightly, +so we just restore fstat/newfstatat by defining __ARCH_WANT_NEW_STAT +in unistd.h. This is the simplest solution for now, and so we hope the +community will tackle the long-standing problem of seccomp deep argument +inspection in the future [4][5]. + +Also add "newstat" to syscall_abis_64 in Makefile.syscalls due to +upstream asm-generic changes. + +More infomation please reading this thread [6]. + +[1] https://chromium-review.googlesource.com/c/chromium/src/+/2823150 +[2] https://chromium.googlesource.com/chromium/src/sandbox/+/c085b51940bd/linux/seccomp-bpf-helpers/sigsys_handlers.cc#355 +[3] https://lore.kernel.org/linux-arch/20220511211231.GG7074@brightrain.aerifal.cx/ +[4] https://lwn.net/Articles/799557/ +[5] https://lpc.events/event/4/contributions/560/attachments/397/640/deep-arg-inspection.pdf +[6] https://lore.kernel.org/loongarch/20240226-granit-seilschaft-eccc2433014d@brauner/T/#t + +Cc: stable@vger.kernel.org +Signed-off-by: Huacai Chen +Signed-off-by: Greg Kroah-Hartman +--- + arch/loongarch/include/uapi/asm/unistd.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/loongarch/include/uapi/asm/unistd.h ++++ b/arch/loongarch/include/uapi/asm/unistd.h +@@ -1,4 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ ++#define __ARCH_WANT_NEW_STAT + #define __ARCH_WANT_SYS_CLONE + #define __ARCH_WANT_SYS_CLONE3 + diff --git a/queue-6.10/nvme-pci-add-apst-quirk-for-lenovo-n60z-laptop.patch b/queue-6.10/nvme-pci-add-apst-quirk-for-lenovo-n60z-laptop.patch new file mode 100644 index 00000000000..83935f46a5a --- /dev/null +++ b/queue-6.10/nvme-pci-add-apst-quirk-for-lenovo-n60z-laptop.patch @@ -0,0 +1,39 @@ +From ab091ec536cb7b271983c0c063b17f62f3591583 Mon Sep 17 00:00:00 2001 +From: WangYuli +Date: Mon, 15 Jul 2024 17:31:44 +0800 +Subject: nvme/pci: Add APST quirk for Lenovo N60z laptop + +From: WangYuli + +commit ab091ec536cb7b271983c0c063b17f62f3591583 upstream. + +There is a hardware power-saving problem with the Lenovo N60z +board. When turn it on and leave it for 10 hours, there is a +20% chance that a nvme disk will not wake up until reboot. + +Link: https://lore.kernel.org/all/2B5581C46AC6E335+9c7a81f1-05fb-4fd0-9fbb-108757c21628@uniontech.com +Signed-off-by: hmy +Signed-off-by: Wentao Guan +Signed-off-by: WangYuli +Signed-off-by: Keith Busch +Signed-off-by: Greg Kroah-Hartman +--- + drivers/nvme/host/pci.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/nvme/host/pci.c ++++ b/drivers/nvme/host/pci.c +@@ -2933,6 +2933,13 @@ static unsigned long check_vendor_combin + return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND; + } + ++ /* ++ * NVMe SSD drops off the PCIe bus after system idle ++ * for 10 hours on a Lenovo N60z board. ++ */ ++ if (dmi_match(DMI_BOARD_NAME, "LXKT-ZXEG-N6")) ++ return NVME_QUIRK_NO_APST; ++ + return 0; + } + diff --git a/queue-6.10/series b/queue-6.10/series index 6e0d6915102..020b15a7024 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -2,3 +2,6 @@ exec-fix-toctou-between-perm-check-and-set-uid-gid-usage.patch drm-amd-display-defer-handling-mst-up-request-in-resume.patch drm-amd-display-separate-setting-and-programming-of-cursor.patch drm-amd-display-prevent-ipx-from-link-detect-and-set-mode.patch +loongarch-define-__arch_want_new_stat-in-unistd.h.patch +nvme-pci-add-apst-quirk-for-lenovo-n60z-laptop.patch +asoc-cs35l56-patch-cs35l56_irq1_mask_18-to-the-default-value.patch