diff --git a/blacklist.conf b/blacklist.conf index 831d326..984de19 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -830,3 +830,6 @@ ad39c08186f8a0f221337985036ba86731d6aafe # fixing patch was not picked fa2bbff7b0b4e211fec5e5686ef96350690597b5 # break KABI 8761b9b580d53162cca7868385069c0d4354c9e0 # cleanup designed to break kABI 687fe7dfb736b03ab820d172ea5dbfc1ec447135 # cleanup designed to break kABI +162aadaa0df8217b0cc49d919dd00022fef65e78 # No file to patch +008820524844326ffb3123cebceba1960c0ad0dc # No file to patch +f19e5bb91d53264d7dac5d845a4825afadf72440 # No file to patch diff --git a/config/arm64/default b/config/arm64/default index f8d539e..73dfb97 100644 --- a/config/arm64/default +++ b/config/arm64/default @@ -4608,9 +4608,9 @@ CONFIG_DEVPORT=y # CONFIG_HPET is not set CONFIG_TCG_TPM=y CONFIG_HW_RANDOM_TPM=y -CONFIG_TCG_TIS_CORE=m +CONFIG_TCG_TIS_CORE=y CONFIG_TCG_TIS=m -CONFIG_TCG_TIS_SPI=m +CONFIG_TCG_TIS_SPI=y # CONFIG_TCG_TIS_SPI_CR50 is not set CONFIG_TCG_TIS_SYNQUACER=m CONFIG_TCG_TIS_I2C_CR50=m @@ -4837,7 +4837,7 @@ CONFIG_SPI_SUN4I=m CONFIG_SPI_SUN6I=m CONFIG_SPI_SYNQUACER=m CONFIG_SPI_MXIC=m -CONFIG_SPI_TEGRA210_QUAD=m +CONFIG_SPI_TEGRA210_QUAD=y CONFIG_SPI_TEGRA114=m CONFIG_SPI_TEGRA20_SFLASH=m # CONFIG_SPI_TEGRA20_SLINK is not set diff --git a/config/arm64/kvmsmall b/config/arm64/kvmsmall index e996a95..2da1e46 100644 --- a/config/arm64/kvmsmall +++ b/config/arm64/kvmsmall @@ -784,6 +784,7 @@ CONFIG_STM_SOURCE_CONSOLE=m # CONFIG_TARGET_CORE is not set # CONFIG_TCG_ATMEL is not set # CONFIG_TCG_INFINEON is not set +CONFIG_TCG_TIS_CORE=m # CONFIG_TCG_TIS_I2C_ATMEL is not set # CONFIG_TCG_TIS_I2C_INFINEON is not set # CONFIG_TCG_TIS_I2C_NUVOTON is not set diff --git a/patches.suse/ALSA-aaci-Delete-unused-variable-in-aaci_do_suspend.patch b/patches.suse/ALSA-aaci-Delete-unused-variable-in-aaci_do_suspend.patch new file mode 100644 index 0000000..1dc7d1e --- /dev/null +++ b/patches.suse/ALSA-aaci-Delete-unused-variable-in-aaci_do_suspend.patch @@ -0,0 +1,32 @@ +From 5a94041db154bc55274c35a9cde2206efb5e9f80 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Tue, 12 Mar 2024 12:22:28 +0100 +Subject: [PATCH] ALSA: aaci: Delete unused variable in aaci_do_suspend +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: 5a94041db154bc55274c35a9cde2206efb5e9f80 +Patch-mainline: v6.9-rc1 +References: git-fixes + +The variable aaci is not used anymore and can be deleted. + +Fixes: 792a6c51875c ("[ALSA] Fix PM support") +Signed-off-by: Thomas Weißschuh +Link: https://lore.kernel.org/r/20240312-aaci-unused-v1-1-09be643f67c2@linutronix.de +Signed-off-by: Takashi Iwai + +--- + sound/arm/aaci.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/sound/arm/aaci.c ++++ b/sound/arm/aaci.c +@@ -740,7 +740,6 @@ static const struct snd_pcm_ops aaci_cap + #ifdef CONFIG_PM + static int aaci_do_suspend(struct snd_card *card) + { +- struct aaci *aaci = card->private_data; + snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); + return 0; + } diff --git a/patches.suse/ALSA-aw2-avoid-casting-function-pointers.patch b/patches.suse/ALSA-aw2-avoid-casting-function-pointers.patch new file mode 100644 index 0000000..1c3f299 --- /dev/null +++ b/patches.suse/ALSA-aw2-avoid-casting-function-pointers.patch @@ -0,0 +1,55 @@ +From 022a13a1db302d55aad3c7c4c40d2c9392f3842b Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Tue, 13 Feb 2024 11:13:19 +0100 +Subject: [PATCH] ALSA: aw2: avoid casting function pointers +Git-commit: 022a13a1db302d55aad3c7c4c40d2c9392f3842b +Patch-mainline: v6.9-rc1 +References: git-fixes + +clang-16 started warning about incompatible function pointers here: + +sound/pci/aw2/aw2-alsa.c:363:11: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 363 | (snd_aw2_saa7146_it_cb) + | ^~~~~~~~~~~~~~~~~~~~~~~ + 364 | snd_pcm_period_elapsed, + | ~~~~~~~~~~~~~~~~~~~~~~ +sound/pci/aw2/aw2-alsa.c:392:10: error: cast from 'void (*)(struct snd_pcm_substream *)' to 'snd_aw2_saa7146_it_cb' (aka 'void (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 392 | (snd_aw2_saa7146_it_cb) + | ^~~~~~~~~~~~~~~~~~~~~~~ + 393 | snd_pcm_period_elapsed, + | ~~~~~~~~~~~~~~~~~~~~~~ + +Add a forward declaration for struct snd_pcm_substrea to allow it to just +use the correct prototype. + +Fixes: 98f2a97f207a ("[ALSA] Emagic Audiowerk 2 ALSA driver.") +Signed-off-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20240213101327.460191-1-arnd@kernel.org +Signed-off-by: Takashi Iwai + +--- + sound/pci/aw2/aw2-saa7146.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/sound/pci/aw2/aw2-saa7146.h b/sound/pci/aw2/aw2-saa7146.h +index b5c5a71c0ac3..3a3de56b9b07 100644 +--- a/sound/pci/aw2/aw2-saa7146.h ++++ b/sound/pci/aw2/aw2-saa7146.h +@@ -19,11 +19,12 @@ + + #define NUM_STREAM_CAPTURE_ANA 0 + +-typedef void (*snd_aw2_saa7146_it_cb) (void *); ++struct snd_pcm_substream; ++typedef void (*snd_aw2_saa7146_it_cb) (struct snd_pcm_substream *); + + struct snd_aw2_saa7146_cb_param { + snd_aw2_saa7146_it_cb p_it_callback; +- void *p_callback_param; ++ struct snd_pcm_substream *p_callback_param; + }; + + /* definition of the chip-specific record */ +-- +2.43.0 + diff --git a/patches.suse/ALSA-ctxfi-avoid-casting-function-pointers.patch b/patches.suse/ALSA-ctxfi-avoid-casting-function-pointers.patch new file mode 100644 index 0000000..33c833e --- /dev/null +++ b/patches.suse/ALSA-ctxfi-avoid-casting-function-pointers.patch @@ -0,0 +1,256 @@ +From aabdedf4d2fe2f83cb025ae972202dcee4eb024b Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Tue, 13 Feb 2024 11:12:46 +0100 +Subject: [PATCH] ALSA: ctxfi: avoid casting function pointers +Git-commit: aabdedf4d2fe2f83cb025ae972202dcee4eb024b +Patch-mainline: v6.9-rc1 +References: git-fixes + +This driver creates an abstraction for different components by casting function +pointers to slightly incompatible types for each one to get the correct +argument even when the caller does not know those types. This is a +bit unreliable and not allowed in combination with control flow integrity +(kcfi): + +sound/pci/ctxfi/ctatc.c:115:25: error: cast from 'int (*)(struct hw *, struct src_mgr **)' to 'create_t' (aka 'int (*)(struct hw *, void **)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 115 | [SRC] = { .create = (create_t)src_mgr_create, + | ^~~~~~~~~~~~~~~~~~~~~~~~ +sound/pci/ctxfi/ctatc.c:116:20: error: cast from 'int (*)(struct src_mgr *)' to 'destroy_t' (aka 'int (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 116 | .destroy = (destroy_t)src_mgr_destroy }, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +sound/pci/ctxfi/ctatc.c:117:27: error: cast from 'int (*)(struct hw *, struct srcimp_mgr **)' to 'create_t' (aka 'int (*)(struct hw *, void **)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 117 | [SRCIMP] = { .create = (create_t)srcimp_mgr_create, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +sound/pci/ctxfi/ctatc.c:118:20: error: cast from 'int (*)(struct srcimp_mgr *)' to 'destroy_t' (aka 'int (*)(void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 118 | .destroy = (destroy_t)srcimp_mgr_destroy }, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Change these to always pass void pointers and move the abstraction one level +down. + +Fixes: 8cc72361481f ("ALSA: SB X-Fi driver merge") +Signed-off-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20240213101303.460008-1-arnd@kernel.org +Signed-off-by: Takashi Iwai + +--- + sound/pci/ctxfi/ctamixer.c | 10 ++++++---- + sound/pci/ctxfi/ctamixer.h | 8 ++++---- + sound/pci/ctxfi/ctatc.c | 23 ++++++++++------------- + sound/pci/ctxfi/ctdaio.c | 5 +++-- + sound/pci/ctxfi/ctdaio.h | 4 ++-- + sound/pci/ctxfi/ctsrc.c | 10 ++++++---- + sound/pci/ctxfi/ctsrc.h | 8 ++++---- + 7 files changed, 35 insertions(+), 33 deletions(-) + +diff --git a/sound/pci/ctxfi/ctamixer.c b/sound/pci/ctxfi/ctamixer.c +index d074727c3e21..397900929aa6 100644 +--- a/sound/pci/ctxfi/ctamixer.c ++++ b/sound/pci/ctxfi/ctamixer.c +@@ -292,7 +292,7 @@ static int put_amixer_rsc(struct amixer_mgr *mgr, struct amixer *amixer) + return 0; + } + +-int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr) ++int amixer_mgr_create(struct hw *hw, void **ramixer_mgr) + { + int err; + struct amixer_mgr *amixer_mgr; +@@ -321,8 +321,9 @@ int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr) + return err; + } + +-int amixer_mgr_destroy(struct amixer_mgr *amixer_mgr) ++int amixer_mgr_destroy(void *ptr) + { ++ struct amixer_mgr *amixer_mgr = ptr; + rsc_mgr_uninit(&amixer_mgr->mgr); + kfree(amixer_mgr); + return 0; +@@ -446,7 +447,7 @@ static int put_sum_rsc(struct sum_mgr *mgr, struct sum *sum) + return 0; + } + +-int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr) ++int sum_mgr_create(struct hw *hw, void **rsum_mgr) + { + int err; + struct sum_mgr *sum_mgr; +@@ -475,8 +476,9 @@ int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr) + return err; + } + +-int sum_mgr_destroy(struct sum_mgr *sum_mgr) ++int sum_mgr_destroy(void *ptr) + { ++ struct sum_mgr *sum_mgr = ptr; + rsc_mgr_uninit(&sum_mgr->mgr); + kfree(sum_mgr); + return 0; +diff --git a/sound/pci/ctxfi/ctamixer.h b/sound/pci/ctxfi/ctamixer.h +index 4498e6139d0e..8fc017da6bda 100644 +--- a/sound/pci/ctxfi/ctamixer.h ++++ b/sound/pci/ctxfi/ctamixer.h +@@ -43,8 +43,8 @@ struct sum_mgr { + }; + + /* Constructor and destructor of daio resource manager */ +-int sum_mgr_create(struct hw *hw, struct sum_mgr **rsum_mgr); +-int sum_mgr_destroy(struct sum_mgr *sum_mgr); ++int sum_mgr_create(struct hw *hw, void **ptr); ++int sum_mgr_destroy(void *ptr); + + /* Define the descriptor of a amixer resource */ + struct amixer_rsc_ops; +@@ -89,7 +89,7 @@ struct amixer_mgr { + }; + + /* Constructor and destructor of amixer resource manager */ +-int amixer_mgr_create(struct hw *hw, struct amixer_mgr **ramixer_mgr); +-int amixer_mgr_destroy(struct amixer_mgr *amixer_mgr); ++int amixer_mgr_create(struct hw *hw, void **ramixer_mgr); ++int amixer_mgr_destroy(void *amixer_mgr); + + #endif /* CTAMIXER_H */ +diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c +index fbdb8a3d5b8e..2a3e9d8ba7db 100644 +--- a/sound/pci/ctxfi/ctatc.c ++++ b/sound/pci/ctxfi/ctatc.c +@@ -105,23 +105,20 @@ static struct { + .public_name = "Mixer"} + }; + +-typedef int (*create_t)(struct hw *, void **); +-typedef int (*destroy_t)(void *); +- + static struct { + int (*create)(struct hw *hw, void **rmgr); + int (*destroy)(void *mgr); + } rsc_mgr_funcs[NUM_RSCTYP] = { +- [SRC] = { .create = (create_t)src_mgr_create, +- .destroy = (destroy_t)src_mgr_destroy }, +- [SRCIMP] = { .create = (create_t)srcimp_mgr_create, +- .destroy = (destroy_t)srcimp_mgr_destroy }, +- [AMIXER] = { .create = (create_t)amixer_mgr_create, +- .destroy = (destroy_t)amixer_mgr_destroy }, +- [SUM] = { .create = (create_t)sum_mgr_create, +- .destroy = (destroy_t)sum_mgr_destroy }, +- [DAIO] = { .create = (create_t)daio_mgr_create, +- .destroy = (destroy_t)daio_mgr_destroy } ++ [SRC] = { .create = src_mgr_create, ++ .destroy = src_mgr_destroy }, ++ [SRCIMP] = { .create = srcimp_mgr_create, ++ .destroy = srcimp_mgr_destroy }, ++ [AMIXER] = { .create = amixer_mgr_create, ++ .destroy = amixer_mgr_destroy }, ++ [SUM] = { .create = sum_mgr_create, ++ .destroy = sum_mgr_destroy }, ++ [DAIO] = { .create = daio_mgr_create, ++ .destroy = daio_mgr_destroy } + }; + + static int +diff --git a/sound/pci/ctxfi/ctdaio.c b/sound/pci/ctxfi/ctdaio.c +index 7fc720046ce2..83aaf9441ef3 100644 +--- a/sound/pci/ctxfi/ctdaio.c ++++ b/sound/pci/ctxfi/ctdaio.c +@@ -684,7 +684,7 @@ static int daio_mgr_commit_write(struct daio_mgr *mgr) + return 0; + } + +-int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr) ++int daio_mgr_create(struct hw *hw, void **rdaio_mgr) + { + int err, i; + struct daio_mgr *daio_mgr; +@@ -738,8 +738,9 @@ int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr) + return err; + } + +-int daio_mgr_destroy(struct daio_mgr *daio_mgr) ++int daio_mgr_destroy(void *ptr) + { ++ struct daio_mgr *daio_mgr = ptr; + unsigned long flags; + + /* free daio input mapper list */ +diff --git a/sound/pci/ctxfi/ctdaio.h b/sound/pci/ctxfi/ctdaio.h +index bd6310f48013..15147fe5f74a 100644 +--- a/sound/pci/ctxfi/ctdaio.h ++++ b/sound/pci/ctxfi/ctdaio.h +@@ -115,7 +115,7 @@ struct daio_mgr { + }; + + /* Constructor and destructor of daio resource manager */ +-int daio_mgr_create(struct hw *hw, struct daio_mgr **rdaio_mgr); +-int daio_mgr_destroy(struct daio_mgr *daio_mgr); ++int daio_mgr_create(struct hw *hw, void **ptr); ++int daio_mgr_destroy(void *ptr); + + #endif /* CTDAIO_H */ +diff --git a/sound/pci/ctxfi/ctsrc.c b/sound/pci/ctxfi/ctsrc.c +index 4a94b4708a77..159bd4008069 100644 +--- a/sound/pci/ctxfi/ctsrc.c ++++ b/sound/pci/ctxfi/ctsrc.c +@@ -540,7 +540,7 @@ static int src_mgr_commit_write(struct src_mgr *mgr) + return 0; + } + +-int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr) ++int src_mgr_create(struct hw *hw, void **rsrc_mgr) + { + int err, i; + struct src_mgr *src_mgr; +@@ -580,8 +580,9 @@ int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr) + return err; + } + +-int src_mgr_destroy(struct src_mgr *src_mgr) ++int src_mgr_destroy(void *ptr) + { ++ struct src_mgr *src_mgr = ptr; + rsc_mgr_uninit(&src_mgr->mgr); + kfree(src_mgr); + +@@ -821,7 +822,7 @@ static int srcimp_imap_delete(struct srcimp_mgr *mgr, struct imapper *entry) + return err; + } + +-int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrcimp_mgr) ++int srcimp_mgr_create(struct hw *hw, void **rsrcimp_mgr) + { + int err; + struct srcimp_mgr *srcimp_mgr; +@@ -866,8 +867,9 @@ int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrcimp_mgr) + return err; + } + +-int srcimp_mgr_destroy(struct srcimp_mgr *srcimp_mgr) ++int srcimp_mgr_destroy(void *ptr) + { ++ struct srcimp_mgr *srcimp_mgr = ptr; + unsigned long flags; + + /* free src input mapper list */ +diff --git a/sound/pci/ctxfi/ctsrc.h b/sound/pci/ctxfi/ctsrc.h +index 1124daf50c9b..e6366cc6a7ae 100644 +--- a/sound/pci/ctxfi/ctsrc.h ++++ b/sound/pci/ctxfi/ctsrc.h +@@ -139,10 +139,10 @@ struct srcimp_mgr { + }; + + /* Constructor and destructor of SRC resource manager */ +-int src_mgr_create(struct hw *hw, struct src_mgr **rsrc_mgr); +-int src_mgr_destroy(struct src_mgr *src_mgr); ++int src_mgr_create(struct hw *hw, void **ptr); ++int src_mgr_destroy(void *ptr); + /* Constructor and destructor of SRCIMP resource manager */ +-int srcimp_mgr_create(struct hw *hw, struct srcimp_mgr **rsrc_mgr); +-int srcimp_mgr_destroy(struct srcimp_mgr *srcimp_mgr); ++int srcimp_mgr_create(struct hw *hw, void **ptr); ++int srcimp_mgr_destroy(void *ptr); + + #endif /* CTSRC_H */ +-- +2.43.0 + diff --git a/patches.suse/ALSA-seq-fix-function-cast-warnings.patch b/patches.suse/ALSA-seq-fix-function-cast-warnings.patch new file mode 100644 index 0000000..33c1af9 --- /dev/null +++ b/patches.suse/ALSA-seq-fix-function-cast-warnings.patch @@ -0,0 +1,94 @@ +From d7bf73809849463f76de42aad62c850305dd6c5d Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 13 Feb 2024 14:53:43 +0100 +Subject: [PATCH] ALSA: seq: fix function cast warnings +Git-commit: d7bf73809849463f76de42aad62c850305dd6c5d +Patch-mainline: v6.9-rc1 +References: git-fixes + +clang-16 points out a control flow integrity (kcfi) issue when event +callbacks get converted to incompatible types: + +sound/core/seq/seq_midi.c:135:30: error: cast from 'int (*)(struct snd_rawmidi_substream *, const char *, int)' to 'snd_seq_dump_func_t' (aka 'int (*)(void *, void *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 135 | snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +sound/core/seq/seq_virmidi.c:83:31: error: cast from 'int (*)(struct snd_rawmidi_substream *, const unsigned char *, int)' to 'snd_seq_dump_func_t' (aka 'int (*)(void *, void *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] + 83 | snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For addressing those errors, introduce wrapper functions that are used +for callbacks and bridge to the actual function call with pointer +cast. + +The code was originally added with the initial ALSA merge in linux-2.5.4. + +[ the patch description shamelessly copied from Arnd's original patch + -- tiwai ] + +Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") +Reported-by: Arnd Bergmann +Link: https://lore.kernel.org/r/20240213101020.459183-1-arnd@kernel.org +Link: https://lore.kernel.org/r/20240213135343.16411-1-tiwai@suse.de +Signed-off-by: Takashi Iwai + +--- + sound/core/seq/seq_midi.c | 8 +++++++- + sound/core/seq/seq_virmidi.c | 9 ++++++++- + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c +index 18320a248aa7..78dcb0ea1558 100644 +--- a/sound/core/seq/seq_midi.c ++++ b/sound/core/seq/seq_midi.c +@@ -113,6 +113,12 @@ static int dump_midi(struct snd_rawmidi_substream *substream, const char *buf, i + return 0; + } + ++/* callback for snd_seq_dump_var_event(), bridging to dump_midi() */ ++static int __dump_midi(void *ptr, void *buf, int count) ++{ ++ return dump_midi(ptr, buf, count); ++} ++ + static int event_process_midi(struct snd_seq_event *ev, int direct, + void *private_data, int atomic, int hop) + { +@@ -132,7 +138,7 @@ static int event_process_midi(struct snd_seq_event *ev, int direct, + pr_debug("ALSA: seq_midi: invalid sysex event flags = 0x%x\n", ev->flags); + return 0; + } +- snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)dump_midi, substream); ++ snd_seq_dump_var_event(ev, __dump_midi, substream); + snd_midi_event_reset_decode(msynth->parser); + } else { + if (msynth->parser == NULL) +diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c +index 1b9260108e48..1678737f11be 100644 +--- a/sound/core/seq/seq_virmidi.c ++++ b/sound/core/seq/seq_virmidi.c +@@ -62,6 +62,13 @@ static void snd_virmidi_init_event(struct snd_virmidi *vmidi, + /* + * decode input event and put to read buffer of each opened file + */ ++ ++/* callback for snd_seq_dump_var_event(), bridging to snd_rawmidi_receive() */ ++static int dump_to_rawmidi(void *ptr, void *buf, int count) ++{ ++ return snd_rawmidi_receive(ptr, buf, count); ++} ++ + static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev, + struct snd_seq_event *ev, + bool atomic) +@@ -80,7 +87,7 @@ static int snd_virmidi_dev_receive_event(struct snd_virmidi_dev *rdev, + if (ev->type == SNDRV_SEQ_EVENT_SYSEX) { + if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE) + continue; +- snd_seq_dump_var_event(ev, (snd_seq_dump_func_t)snd_rawmidi_receive, vmidi->substream); ++ snd_seq_dump_var_event(ev, dump_to_rawmidi, vmidi->substream); + snd_midi_event_reset_decode(vmidi->parser); + } else { + len = snd_midi_event_decode(vmidi->parser, msg, sizeof(msg), ev); +-- +2.43.0 + diff --git a/patches.suse/ALSA-usb-audio-Stop-parsing-channels-bits-when-all-c.patch b/patches.suse/ALSA-usb-audio-Stop-parsing-channels-bits-when-all-c.patch new file mode 100644 index 0000000..c7162f7 --- /dev/null +++ b/patches.suse/ALSA-usb-audio-Stop-parsing-channels-bits-when-all-c.patch @@ -0,0 +1,41 @@ +From a39d51ff1f52cd0b6fe7d379ac93bd8b4237d1b7 Mon Sep 17 00:00:00 2001 +From: Johan Carlsson +Date: Wed, 13 Mar 2024 09:15:09 +0100 +Subject: [PATCH] ALSA: usb-audio: Stop parsing channels bits when all channels are found. +Git-commit: a39d51ff1f52cd0b6fe7d379ac93bd8b4237d1b7 +Patch-mainline: v6.9-rc1 +References: git-fixes + +If a usb audio device sets more bits than the amount of channels +it could write outside of the map array. + +Signed-off-by: Johan Carlsson +Fixes: 04324ccc75f9 ("ALSA: usb-audio: add channel map support") +Message-id: <20240313081509.9801-1-johan.carlsson@teenage.engineering> +Signed-off-by: Takashi Iwai + +--- + sound/usb/stream.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/sound/usb/stream.c b/sound/usb/stream.c +index 3d4add94e367..d5409f387945 100644 +--- a/sound/usb/stream.c ++++ b/sound/usb/stream.c +@@ -300,9 +300,12 @@ static struct snd_pcm_chmap_elem *convert_chmap(int channels, unsigned int bits, + c = 0; + + if (bits) { +- for (; bits && *maps; maps++, bits >>= 1) ++ for (; bits && *maps; maps++, bits >>= 1) { + if (bits & 1) + chmap->map[c++] = *maps; ++ if (c == chmap->channels) ++ break; ++ } + } else { + /* If we're missing wChannelConfig, then guess something + to make sure the channel map is not skipped entirely */ +-- +2.43.0 + diff --git a/patches.suse/ASoC-amd-acp-Add-missing-error-handling-in-sof-mach.patch b/patches.suse/ASoC-amd-acp-Add-missing-error-handling-in-sof-mach.patch new file mode 100644 index 0000000..1642562 --- /dev/null +++ b/patches.suse/ASoC-amd-acp-Add-missing-error-handling-in-sof-mach.patch @@ -0,0 +1,54 @@ +From d0ada20279db2649a7549a2b8a4a3379c59f238d Mon Sep 17 00:00:00 2001 +From: Cristian Ciocaltea +Date: Tue, 19 Dec 2023 05:07:21 +0200 +Subject: [PATCH] ASoC: amd: acp: Add missing error handling in sof-mach +Git-commit: d0ada20279db2649a7549a2b8a4a3379c59f238d +Patch-mainline: v6.9-rc1 +References: git-fixes + +Handle potential acp_sofdsp_dai_links_create() errors in ACP SOF machine +driver's probe function. Note there is no need for an undo. + +While at it, switch to dev_err_probe(). + +Fixes: 9f84940f5004 ("ASoC: amd: acp: Add SOF audio support on Chrome board") +Signed-off-by: Cristian Ciocaltea +Reviewed-by: Emil Velikov +Link: https://msgid.link/r/20231219030728.2431640-4-cristian.ciocaltea@collabora.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + sound/soc/amd/acp/acp-sof-mach.c | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c +index 1d313fcb5f2d..6f0ca23638af 100644 +--- a/sound/soc/amd/acp/acp-sof-mach.c ++++ b/sound/soc/amd/acp/acp-sof-mach.c +@@ -112,16 +112,14 @@ static int acp_sof_probe(struct platform_device *pdev) + if (dmi_id && dmi_id->driver_data) + acp_card_drvdata->tdm_mode = dmi_id->driver_data; + +- acp_sofdsp_dai_links_create(card); ++ ret = acp_sofdsp_dai_links_create(card); ++ if (ret) ++ return dev_err_probe(&pdev->dev, ret, "Failed to create DAI links\n"); + + ret = devm_snd_soc_register_card(&pdev->dev, card); +- if (ret) { +- dev_err(&pdev->dev, +- "devm_snd_soc_register_card(%s) failed: %d\n", +- card->name, ret); +- return ret; +- } +- ++ if (ret) ++ return dev_err_probe(&pdev->dev, ret, ++ "Failed to register card(%s)\n", card->name); + return 0; + } + +-- +2.43.0 + diff --git a/patches.suse/ASoC-meson-axg-tdm-interface-add-frame-rate-constrai.patch b/patches.suse/ASoC-meson-axg-tdm-interface-add-frame-rate-constrai.patch new file mode 100644 index 0000000..192a4b1 --- /dev/null +++ b/patches.suse/ASoC-meson-axg-tdm-interface-add-frame-rate-constrai.patch @@ -0,0 +1,86 @@ +From 59c6a3a43b221cc2a211181b1298e43b2c2df782 Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Fri, 23 Feb 2024 18:51:08 +0100 +Subject: [PATCH] ASoC: meson: axg-tdm-interface: add frame rate constraint +Git-commit: 59c6a3a43b221cc2a211181b1298e43b2c2df782 +Patch-mainline: v6.9-rc1 +References: git-fixes + +According to Amlogic datasheets for the SoCs supported by this driver, the +maximum bit clock rate is 100MHz. + +The tdm interface allows the rates listed by the DAI driver, regardless of +the number slots or their width. However, these will impact the bit clock +rate. + +Hitting the 100MHz limit is very unlikely for most use cases but it is +possible. + +For example with 32 slots / 32 bits wide, the maximum rate is no longer +384kHz but ~96kHz. + +Add the constraint accordingly if the component is not already active. +If it is active, the rate is already constrained by the first stream rate. + +Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver") +Signed-off-by: Jerome Brunet +Link: https://msgid.link/r/20240223175116.2005407-3-jbrunet@baylibre.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + sound/soc/meson/axg-tdm-interface.c | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) + +diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c +index cd5168e826df..2cedbce73837 100644 +--- a/sound/soc/meson/axg-tdm-interface.c ++++ b/sound/soc/meson/axg-tdm-interface.c +@@ -12,6 +12,9 @@ + + #include "axg-tdm.h" + ++/* Maximum bit clock frequency according the datasheets */ ++#define MAX_SCLK 100000000 /* Hz */ ++ + enum { + TDM_IFACE_PAD, + TDM_IFACE_LOOPBACK, +@@ -153,19 +156,27 @@ static int axg_tdm_iface_startup(struct snd_pcm_substream *substream, + return -EINVAL; + } + +- /* Apply component wide rate symmetry */ + if (snd_soc_component_active(dai->component)) { ++ /* Apply component wide rate symmetry */ + ret = snd_pcm_hw_constraint_single(substream->runtime, + SNDRV_PCM_HW_PARAM_RATE, + iface->rate); +- if (ret < 0) { +- dev_err(dai->dev, +- "can't set iface rate constraint\n"); +- return ret; +- } ++ ++ } else { ++ /* Limit rate according to the slot number and width */ ++ unsigned int max_rate = ++ MAX_SCLK / (iface->slots * iface->slot_width); ++ ret = snd_pcm_hw_constraint_minmax(substream->runtime, ++ SNDRV_PCM_HW_PARAM_RATE, ++ 0, max_rate); + } + +- return 0; ++ if (ret < 0) ++ dev_err(dai->dev, "can't set iface rate constraint\n"); ++ else ++ ret = 0; ++ ++ return ret; + } + + static int axg_tdm_iface_set_stream(struct snd_pcm_substream *substream, +-- +2.43.0 + diff --git a/patches.suse/ASoC-meson-axg-tdm-interface-fix-mclk-setup-without-.patch b/patches.suse/ASoC-meson-axg-tdm-interface-fix-mclk-setup-without-.patch new file mode 100644 index 0000000..28136df --- /dev/null +++ b/patches.suse/ASoC-meson-axg-tdm-interface-fix-mclk-setup-without-.patch @@ -0,0 +1,49 @@ +From e3741a8d28a1137f8b19ae6f3d6e3be69a454a0a Mon Sep 17 00:00:00 2001 +From: Jerome Brunet +Date: Fri, 23 Feb 2024 18:51:07 +0100 +Subject: [PATCH] ASoC: meson: axg-tdm-interface: fix mclk setup without mclk-fs +Git-commit: e3741a8d28a1137f8b19ae6f3d6e3be69a454a0a +Patch-mainline: v6.9-rc1 +References: git-fixes + +By default, when mclk-fs is not provided, the tdm-interface driver +requests an MCLK that is 4x the bit clock, SCLK. + +However there is no justification for this: + +* If the codec needs MCLK for its operation, mclk-fs is expected to be set + according to the codec requirements. +* If the codec does not need MCLK the minimum is 2 * SCLK, because this is + minimum the divider between SCLK and MCLK can do. + +Multiplying by 4 may cause problems because the PLL limit may be reached +sooner than it should, so use 2x instead. + +Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver") +Signed-off-by: Jerome Brunet +Link: https://msgid.link/r/20240223175116.2005407-2-jbrunet@baylibre.com +Signed-off-by: Mark Brown +Acked-by: Takashi Iwai + +--- + sound/soc/meson/axg-tdm-interface.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c +index 1c3d433cefd2..cd5168e826df 100644 +--- a/sound/soc/meson/axg-tdm-interface.c ++++ b/sound/soc/meson/axg-tdm-interface.c +@@ -264,8 +264,8 @@ static int axg_tdm_iface_set_sclk(struct snd_soc_dai *dai, + srate = iface->slots * iface->slot_width * params_rate(params); + + if (!iface->mclk_rate) { +- /* If no specific mclk is requested, default to bit clock * 4 */ +- clk_set_rate(iface->mclk, 4 * srate); ++ /* If no specific mclk is requested, default to bit clock * 2 */ ++ clk_set_rate(iface->mclk, 2 * srate); + } else { + /* Check if we can actually get the bit clock from mclk */ + if (iface->mclk_rate % srate) { +-- +2.43.0 + diff --git a/patches.suse/Documentation-hw-vuln-Add-documentation-for-RFDS.patch b/patches.suse/Documentation-hw-vuln-Add-documentation-for-RFDS.patch index 64953ab..edd8ffc 100644 --- a/patches.suse/Documentation-hw-vuln-Add-documentation-for-RFDS.patch +++ b/patches.suse/Documentation-hw-vuln-Add-documentation-for-RFDS.patch @@ -1,7 +1,8 @@ From: Pawan Gupta Date: Tue, 5 Mar 2024 15:06:06 +0200 Subject: Documentation/hw-vuln: Add documentation for RFDS -Patch-mainline: Not yet, embargo +Git-commit: 4e42765d1be01111df0c0275bbaf1db1acef346e +Patch-mainline: v6.9-rc1 References: bsc#1213456 CVE-2023-28746 Add the documentation for transient execution vulnerability Register @@ -11,7 +12,7 @@ Acked-by: Josh Poimboeuf Signed-off-by: Pawan Gupta Acked-by: Nikolay Borisov --- - Documentation/admin-guide/hw-vuln/index.rst | 1 + Documentation/admin-guide/hw-vuln/index.rst | 1 Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst | 105 +++++++++++ 2 files changed, 106 insertions(+) diff --git a/patches.suse/HID-amd_sfh-Update-HPD-sensor-structure-elements.patch b/patches.suse/HID-amd_sfh-Update-HPD-sensor-structure-elements.patch new file mode 100644 index 0000000..6cbc6c8 --- /dev/null +++ b/patches.suse/HID-amd_sfh-Update-HPD-sensor-structure-elements.patch @@ -0,0 +1,44 @@ +From bbf0dec30696638b8bdc28cb2f5bf23f8d760b52 Mon Sep 17 00:00:00 2001 +From: Basavaraj Natikar +Date: Wed, 14 Feb 2024 20:11:41 +0530 +Subject: [PATCH] HID: amd_sfh: Update HPD sensor structure elements +Git-commit: bbf0dec30696638b8bdc28cb2f5bf23f8d760b52 +Patch-mainline: v6.9-rc1 +References: git-fixes + +HPD sensor data is not populating properly because of wrong order of HPD +sensor structure elements. So update the order of structure elements to +match the HPD sensor data received from the firmware. + +Fixes: 24a31ea94922 ("HID: amd_sfh: Add initial support for HPD sensor") +Co-developed-by: Akshata MukundShetty +Signed-off-by: Akshata MukundShetty +Signed-off-by: Basavaraj Natikar +Signed-off-by: Jiri Kosina +Acked-by: Takashi Iwai + +--- + drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +index 70add75fc506..05e400a4a83e 100644 +--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h ++++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +@@ -90,10 +90,10 @@ enum mem_use_type { + struct hpd_status { + union { + struct { +- u32 human_presence_report : 4; +- u32 human_presence_actual : 4; +- u32 probablity : 8; + u32 object_distance : 16; ++ u32 probablity : 8; ++ u32 human_presence_actual : 4; ++ u32 human_presence_report : 4; + } shpd; + u32 val; + }; +-- +2.43.0 + diff --git a/patches.suse/HID-lenovo-Add-middleclick_workaround-sysfs-knob-for.patch b/patches.suse/HID-lenovo-Add-middleclick_workaround-sysfs-knob-for.patch new file mode 100644 index 0000000..196a9eb --- /dev/null +++ b/patches.suse/HID-lenovo-Add-middleclick_workaround-sysfs-knob-for.patch @@ -0,0 +1,134 @@ +From 2814646f76f8518326964f12ff20aaee70ba154d Mon Sep 17 00:00:00 2001 +From: Mikhail Khvainitski +Date: Sat, 23 Dec 2023 21:12:13 +0200 +Subject: [PATCH] HID: lenovo: Add middleclick_workaround sysfs knob for cptkbd +Git-commit: 2814646f76f8518326964f12ff20aaee70ba154d +Patch-mainline: v6.9-rc1 +References: git-fixes + +Previous attempt to autodetect well-behaving patched firmware +introduced in commit 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw +on cptkbd and stop applying workaround") has shown that there are +false-positives on original firmware (on both 1st gen and 2nd gen +keyboards) which causes the middle button click workaround to be +mistakenly disabled. + +This commit adds explicit parameter to sysfs to control this +workaround. + +Fixes: 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround") +Fixes: 43527a0094c1 ("HID: lenovo: Restrict detection of patched firmware only to USB cptkbd") +Signed-off-by: Mikhail Khvainitski +Signed-off-by: Jiri Kosina +Acked-by: Takashi Iwai + +--- + drivers/hid/hid-lenovo.c | 57 +++++++++++++++++++++++++++------------- + 1 file changed, 39 insertions(+), 18 deletions(-) + +diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c +index 149a3c74346b..f86c1ea83a03 100644 +--- a/drivers/hid/hid-lenovo.c ++++ b/drivers/hid/hid-lenovo.c +@@ -54,10 +54,10 @@ struct lenovo_drvdata { + /* 0: Up + * 1: Down (undecided) + * 2: Scrolling +- * 3: Patched firmware, disable workaround + */ + u8 middlebutton_state; + bool fn_lock; ++ bool middleclick_workaround_cptkbd; + }; + + #define map_key_clear(c) hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) +@@ -621,6 +621,36 @@ static ssize_t attr_sensitivity_store_cptkbd(struct device *dev, + return count; + } + ++static ssize_t attr_middleclick_workaround_show_cptkbd(struct device *dev, ++ struct device_attribute *attr, ++ char *buf) ++{ ++ struct hid_device *hdev = to_hid_device(dev); ++ struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev); ++ ++ return snprintf(buf, PAGE_SIZE, "%u\n", ++ cptkbd_data->middleclick_workaround_cptkbd); ++} ++ ++static ssize_t attr_middleclick_workaround_store_cptkbd(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, ++ size_t count) ++{ ++ struct hid_device *hdev = to_hid_device(dev); ++ struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev); ++ int value; ++ ++ if (kstrtoint(buf, 10, &value)) ++ return -EINVAL; ++ if (value < 0 || value > 1) ++ return -EINVAL; ++ ++ cptkbd_data->middleclick_workaround_cptkbd = !!value; ++ ++ return count; ++} ++ + + static struct device_attribute dev_attr_fn_lock = + __ATTR(fn_lock, S_IWUSR | S_IRUGO, +@@ -632,10 +662,16 @@ static struct device_attribute dev_attr_sensitivity_cptkbd = + attr_sensitivity_show_cptkbd, + attr_sensitivity_store_cptkbd); + ++static struct device_attribute dev_attr_middleclick_workaround_cptkbd = ++ __ATTR(middleclick_workaround, S_IWUSR | S_IRUGO, ++ attr_middleclick_workaround_show_cptkbd, ++ attr_middleclick_workaround_store_cptkbd); ++ + + static struct attribute *lenovo_attributes_cptkbd[] = { + &dev_attr_fn_lock.attr, + &dev_attr_sensitivity_cptkbd.attr, ++ &dev_attr_middleclick_workaround_cptkbd.attr, + NULL + }; + +@@ -686,23 +722,7 @@ static int lenovo_event_cptkbd(struct hid_device *hdev, + { + struct lenovo_drvdata *cptkbd_data = hid_get_drvdata(hdev); + +- if (cptkbd_data->middlebutton_state != 3) { +- /* REL_X and REL_Y events during middle button pressed +- * are only possible on patched, bug-free firmware +- * so set middlebutton_state to 3 +- * to never apply workaround anymore +- */ +- if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD && +- cptkbd_data->middlebutton_state == 1 && +- usage->type == EV_REL && +- (usage->code == REL_X || usage->code == REL_Y)) { +- cptkbd_data->middlebutton_state = 3; +- /* send middle button press which was hold before */ +- input_event(field->hidinput->input, +- EV_KEY, BTN_MIDDLE, 1); +- input_sync(field->hidinput->input); +- } +- ++ if (cptkbd_data->middleclick_workaround_cptkbd) { + /* "wheel" scroll events */ + if (usage->type == EV_REL && (usage->code == REL_WHEEL || + usage->code == REL_HWHEEL)) { +@@ -1166,6 +1186,7 @@ static int lenovo_probe_cptkbd(struct hid_device *hdev) + cptkbd_data->middlebutton_state = 0; + cptkbd_data->fn_lock = true; + cptkbd_data->sensitivity = 0x05; ++ cptkbd_data->middleclick_workaround_cptkbd = true; + lenovo_features_set_cptkbd(hdev); + + ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_cptkbd); +-- +2.43.0 + diff --git a/patches.suse/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch b/patches.suse/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch index b7fcd62..ba80ddf 100644 --- a/patches.suse/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch +++ b/patches.suse/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch @@ -1,7 +1,8 @@ From: Pawan Gupta Date: Tue, 5 Mar 2024 15:22:10 +0200 Subject: KVM: x86: Export RFDS_NO and RFDS_CLEAR to guests -Patch-mainline: Not yet, embargo +Git-commit: 2a0180129d726a4b953232175857d442651b55a0 +Patch-mainline: v6.9-rc1 References: bsc#1213456 CVE-2023-28746 Mitigation for RFDS requires RFDS_CLEAR capability which is enumerated diff --git a/patches.suse/PCI-AER-Fix-rootport-attribute-paths-in-ABI-docs.patch b/patches.suse/PCI-AER-Fix-rootport-attribute-paths-in-ABI-docs.patch new file mode 100644 index 0000000..17715ef --- /dev/null +++ b/patches.suse/PCI-AER-Fix-rootport-attribute-paths-in-ABI-docs.patch @@ -0,0 +1,52 @@ +From 0e7d29a39a546161ea3a49e8e282a43212d7ff68 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Fri, 2 Feb 2024 14:16:34 +0100 +Subject: [PATCH] PCI/AER: Fix rootport attribute paths in ABI docs +Git-commit: 0e7d29a39a546161ea3a49e8e282a43212d7ff68 +Patch-mainline: v6.9-rc1 +References: git-fixes + +The 'aer_stats' directory never made it into the sixth and final revision +of the series adding the sysfs AER attributes. + +Link: https://lore.kernel.org/r/20240202131635.11405-2-johan+linaro@kernel.org +Link: https://lore.kernel.org/lkml/20180621184822.GB14136@bhelgaas-glaptop.roam.corp.google.com/ +Fixes: 12833017e581 ("PCI/AER: Add sysfs attributes for rootport cumulative stats") +Signed-off-by: Johan Hovold +Signed-off-by: Bjorn Helgaas +Acked-by: Takashi Iwai + +--- + Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats b/Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats +index 860db53037a5..24087d5fd417 100644 +--- a/Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats ++++ b/Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats +@@ -100,19 +100,19 @@ collectors) that are AER capable. These indicate the number of error messages as + device, so these counters include them and are thus cumulative of all the error + messages on the PCI hierarchy originating at that root port. + +-What: /sys/bus/pci/devices//aer_stats/aer_rootport_total_err_cor ++What: /sys/bus/pci/devices//aer_rootport_total_err_cor + Date: July 2018 + KernelVersion: 4.19.0 + Contact: linux-pci@vger.kernel.org, rajatja@google.com + Description: Total number of ERR_COR messages reported to rootport. + +-What: /sys/bus/pci/devices//aer_stats/aer_rootport_total_err_fatal ++What: /sys/bus/pci/devices//aer_rootport_total_err_fatal + Date: July 2018 + KernelVersion: 4.19.0 + Contact: linux-pci@vger.kernel.org, rajatja@google.com + Description: Total number of ERR_FATAL messages reported to rootport. + +-What: /sys/bus/pci/devices//aer_stats/aer_rootport_total_err_nonfatal ++What: /sys/bus/pci/devices//aer_rootport_total_err_nonfatal + Date: July 2018 + KernelVersion: 4.19.0 + Contact: linux-pci@vger.kernel.org, rajatja@google.com +-- +2.43.0 + diff --git a/patches.suse/PCI-DPC-Print-all-TLP-Prefixes-not-just-the-first.patch b/patches.suse/PCI-DPC-Print-all-TLP-Prefixes-not-just-the-first.patch new file mode 100644 index 0000000..0e813cf --- /dev/null +++ b/patches.suse/PCI-DPC-Print-all-TLP-Prefixes-not-just-the-first.patch @@ -0,0 +1,45 @@ +From 6568d82512b0a64809acff3d7a747362fa4288c8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= +Date: Thu, 18 Jan 2024 13:08:15 +0200 +Subject: [PATCH] PCI/DPC: Print all TLP Prefixes, not just the first +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: 6568d82512b0a64809acff3d7a747362fa4288c8 +Patch-mainline: v6.9-rc1 +References: git-fixes + +The TLP Prefix Log Register consists of multiple DWORDs (PCIe r6.1 sec +7.9.14.13) but the loop in dpc_process_rp_pio_error() keeps reading from +the first DWORD, so we print only the first PIO TLP Prefix (duplicated +several times), and we never print the second, third, etc., Prefixes. + +Add the iteration count based offset calculation into the config read. + +Fixes: f20c4ea49ec4 ("PCI/DPC: Add eDPC support") +Link: https://lore.kernel.org/r/20240118110815.3867-1-ilpo.jarvinen@linux.intel.com +Signed-off-by: Ilpo Järvinen +[bhelgaas: add user-visible details to commit log] +Signed-off-by: Bjorn Helgaas +Acked-by: Takashi Iwai + +--- + drivers/pci/pcie/dpc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/pci/pcie/dpc.c b/drivers/pci/pcie/dpc.c +index 94111e438241..e5d7c12854fa 100644 +--- a/drivers/pci/pcie/dpc.c ++++ b/drivers/pci/pcie/dpc.c +@@ -234,7 +234,7 @@ static void dpc_process_rp_pio_error(struct pci_dev *pdev) + + for (i = 0; i < pdev->dpc_rp_log_size - 5; i++) { + pci_read_config_dword(pdev, +- cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG, &prefix); ++ cap + PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG + i * 4, &prefix); + pci_err(pdev, "TLP Prefix Header: dw%d, %#010x\n", i, prefix); + } + clear_status: +-- +2.43.0 + diff --git a/patches.suse/PCI-Mark-3ware-9650SE-Root-Port-Extended-Tags-as-bro.patch b/patches.suse/PCI-Mark-3ware-9650SE-Root-Port-Extended-Tags-as-bro.patch new file mode 100644 index 0000000..8e1f272 --- /dev/null +++ b/patches.suse/PCI-Mark-3ware-9650SE-Root-Port-Extended-Tags-as-bro.patch @@ -0,0 +1,56 @@ +From baf67aefbe7d7deafa59ca49612d163f8889934c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Wedekind?= +Date: Mon, 19 Feb 2024 14:28:11 +0100 +Subject: [PATCH] PCI: Mark 3ware-9650SE Root Port Extended Tags as broken +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: baf67aefbe7d7deafa59ca49612d163f8889934c +Patch-mainline: v6.9-rc1 +References: git-fixes + +Per PCIe r6.1, sec 2.2.6.2 and 7.5.3.4, a Requester may not use 8-bit Tags +unless its Extended Tag Field Enable is set, but all Receivers/Completers +must handle 8-bit Tags correctly regardless of their Extended Tag Field +Enable. + +Some devices do not handle 8-bit Tags as Completers, so add a quirk for +them. If we find such a device, we disable Extended Tags for the entire +hierarchy to make peer-to-peer DMA possible. + +The 3ware 9650SE seems to have issues with handling 8-bit tags. Mark it as +broken. + +This fixes PCI Parity Errors like : + + 3w-9xxx: scsi0: ERROR: (0x06:0x000C): PCI Parity Error: clearing. + 3w-9xxx: scsi0: ERROR: (0x06:0x000D): PCI Abort: clearing. + 3w-9xxx: scsi0: ERROR: (0x06:0x000E): Controller Queue Error: clearing. + 3w-9xxx: scsi0: ERROR: (0x06:0x0010): Microcontroller Error: clearing. + +Link: https://lore.kernel.org/r/20240219132811.8351-1-joerg@wedekind.de +Fixes: 60db3a4d8cc9 ("PCI: Enable PCIe Extended Tags if supported") +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=202425 +Signed-off-by: Jörg Wedekind +Signed-off-by: Bjorn Helgaas +Acked-by: Takashi Iwai + +--- + drivers/pci/quirks.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c +index d797df6e5f3e..2ebbe51a7efe 100644 +--- a/drivers/pci/quirks.c ++++ b/drivers/pci/quirks.c +@@ -5527,6 +5527,7 @@ static void quirk_no_ext_tags(struct pci_dev *pdev) + + pci_walk_bus(bridge->bus, pci_configure_extended_tags, NULL); + } ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_3WARE, 0x1004, quirk_no_ext_tags); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0132, quirk_no_ext_tags); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0140, quirk_no_ext_tags); + DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0141, quirk_no_ext_tags); +-- +2.43.0 + diff --git a/patches.suse/PCI-P2PDMA-Fix-a-sleeping-issue-in-a-RCU-read-sectio.patch b/patches.suse/PCI-P2PDMA-Fix-a-sleeping-issue-in-a-RCU-read-sectio.patch new file mode 100644 index 0000000..dbe71d2 --- /dev/null +++ b/patches.suse/PCI-P2PDMA-Fix-a-sleeping-issue-in-a-RCU-read-sectio.patch @@ -0,0 +1,38 @@ +From 1e5c66afd4a40bb7be17cb33cbb1a1085f727730 Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Thu, 4 Jan 2024 20:52:35 +0100 +Subject: [PATCH] PCI/P2PDMA: Fix a sleeping issue in a RCU read section +Git-commit: 1e5c66afd4a40bb7be17cb33cbb1a1085f727730 +Patch-mainline: v6.9-rc1 +References: git-fixes + +It is not allowed to sleep within a RCU read section, so use GFP_ATOMIC +instead of GFP_KERNEL here. + +Link: https://lore.kernel.org/r/02d9ec4a10235def0e764ff1f5be881ba12e16e8.1704397858.git.christophe.jaillet@wanadoo.fr +Fixes: ae21f835a5bd ("PCI/P2PDMA: Finish RCU conversion of pdev->p2pdma") +Signed-off-by: Christophe JAILLET +Signed-off-by: Bjorn Helgaas +Reviewed-by: Logan Gunthorpe +Acked-by: Takashi Iwai + +--- + drivers/pci/p2pdma.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c +index 0c361561b855..4f47a13cb500 100644 +--- a/drivers/pci/p2pdma.c ++++ b/drivers/pci/p2pdma.c +@@ -661,7 +661,7 @@ calc_map_type_and_dist(struct pci_dev *provider, struct pci_dev *client, + p2pdma = rcu_dereference(provider->p2pdma); + if (p2pdma) + xa_store(&p2pdma->map_types, map_types_idx(client), +- xa_mk_value(map_type), GFP_KERNEL); ++ xa_mk_value(map_type), GFP_ATOMIC); + rcu_read_unlock(); + return map_type; + } +-- +2.43.0 + diff --git a/patches.suse/PCI-dwc-endpoint-Fix-advertised-resizable-BAR-size.patch b/patches.suse/PCI-dwc-endpoint-Fix-advertised-resizable-BAR-size.patch new file mode 100644 index 0000000..a36e3be --- /dev/null +++ b/patches.suse/PCI-dwc-endpoint-Fix-advertised-resizable-BAR-size.patch @@ -0,0 +1,56 @@ +From 72e34b8593e08a0ee759b7a038e0b178418ea6f8 Mon Sep 17 00:00:00 2001 +From: Niklas Cassel +Date: Thu, 7 Mar 2024 12:15:20 +0100 +Subject: [PATCH] PCI: dwc: endpoint: Fix advertised resizable BAR size +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: 72e34b8593e08a0ee759b7a038e0b178418ea6f8 +Patch-mainline: v6.9-rc1 +References: git-fixes + +The commit message in commit fc9a77040b04 ("PCI: designware-ep: Configure +Resizable BAR cap to advertise the smallest size") claims that it modifies +the Resizable BAR capability to only advertise support for 1 MB size BARs. + +However, the commit writes all zeroes to PCI_REBAR_CAP (the register which +contains the possible BAR sizes that a BAR be resized to). + +According to the spec, it is illegal to not have a bit set in +PCI_REBAR_CAP, and 1 MB is the smallest size allowed. + +Set bit 4 in PCI_REBAR_CAP, so that we actually advertise support for a +1 MB BAR size. + +Before: Capabilities: [2e8 v1] Physical Resizable BAR BAR 0: current size: 1MB BAR 1: current size: 1MB BAR 2: current size: 1MB BAR 3: current size: 1MB BAR 4: current size: 1MB BAR 5: current size: 1MB +After: Capabilities: [2e8 v1] Physical Resizable BAR BAR 0: current size: 1MB, supported: 1MB BAR 1: current size: 1MB, supported: 1MB BAR 2: current size: 1MB, supported: 1MB BAR 3: current size: 1MB, supported: 1MB BAR 4: current size: 1MB, supported: 1MB BAR 5: current size: 1MB, supported: 1MB + +Fixes: fc9a77040b04 ("PCI: designware-ep: Configure Resizable BAR cap to advertise the smallest size") +Link: https://lore.kernel.org/linux-pci/20240307111520.3303774-1-cassel@kernel.org +Signed-off-by: Niklas Cassel +Signed-off-by: Krzysztof Wilczyński +Reviewed-by: Manivannan Sadhasivam +Cc: # 5.2 +Acked-by: Takashi Iwai + +--- + drivers/pci/controller/dwc/pcie-designware-ep.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/pci/controller/dwc/pcie-designware-ep.c ++++ b/drivers/pci/controller/dwc/pcie-designware-ep.c +@@ -660,8 +660,13 @@ int dw_pcie_ep_init_complete(struct dw_p + nbars = (reg & PCI_REBAR_CTRL_NBAR_MASK) >> + PCI_REBAR_CTRL_NBAR_SHIFT; + ++ /* ++ * PCIe r6.0, sec 7.8.6.2 require us to support at least one ++ * size in the range from 1 MB to 512 GB. Advertise support ++ * for 1 MB BAR size only. ++ */ + for (i = 0; i < nbars; i++, offset += PCI_REBAR_CTRL) +- dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, 0x0); ++ dw_pcie_writel_dbi(pci, offset + PCI_REBAR_CAP, BIT(4)); + } + + dw_pcie_setup(pci); diff --git a/patches.suse/PCI-switchtec-Fix-an-error-handling-path-in-switchte.patch b/patches.suse/PCI-switchtec-Fix-an-error-handling-path-in-switchte.patch new file mode 100644 index 0000000..ba5a1e0 --- /dev/null +++ b/patches.suse/PCI-switchtec-Fix-an-error-handling-path-in-switchte.patch @@ -0,0 +1,46 @@ +From dec529b0b0572b32f9eb91c882dd1f08ca657efb Mon Sep 17 00:00:00 2001 +From: Christophe JAILLET +Date: Sun, 24 Dec 2023 15:30:01 +0100 +Subject: [PATCH] PCI: switchtec: Fix an error handling path in switchtec_pci_probe() +Git-commit: dec529b0b0572b32f9eb91c882dd1f08ca657efb +Patch-mainline: v6.9-rc1 +References: git-fixes + +The commit in Fixes changed the logic on how resources are released and +introduced a new switchtec_exit_pci() that need to be called explicitly in +order to undo a corresponding switchtec_init_pci(). + +This was done in the remove function, but not in the probe. + +Fix the probe now. + +Fixes: df25461119d9 ("PCI: switchtec: Fix stdev_release() crash after surprise hot remove") +Link: https://lore.kernel.org/r/01446d2ccb91a578239915812f2b7dfbeb2882af.1703428183.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Christophe JAILLET +Signed-off-by: Bjorn Helgaas +Acked-by: Takashi Iwai + +--- + drivers/pci/switch/switchtec.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/pci/switch/switchtec.c ++++ b/drivers/pci/switch/switchtec.c +@@ -1614,7 +1614,7 @@ static int switchtec_pci_probe(struct pc + rc = switchtec_init_isr(stdev); + if (rc) { + dev_err(&stdev->dev, "failed to init isr.\n"); +- goto err_put; ++ goto err_exit_pci; + } + + iowrite32(SWITCHTEC_EVENT_CLEAR | +@@ -1635,6 +1635,8 @@ static int switchtec_pci_probe(struct pc + + err_devadd: + stdev_kill(stdev); ++err_exit_pci: ++ switchtec_exit_pci(stdev); + err_put: + ida_simple_remove(&switchtec_minor_ida, MINOR(stdev->dev.devt)); + put_device(&stdev->dev); diff --git a/patches.suse/arm64-dts-allwinner-h6-Add-RX-DMA-channel-for-SPDIF.patch b/patches.suse/arm64-dts-allwinner-h6-Add-RX-DMA-channel-for-SPDIF.patch new file mode 100644 index 0000000..4091dbf --- /dev/null +++ b/patches.suse/arm64-dts-allwinner-h6-Add-RX-DMA-channel-for-SPDIF.patch @@ -0,0 +1,60 @@ +From: Chen-Yu Tsai +Date: Sun, 28 Jan 2024 00:32:45 +0800 +Subject: arm64: dts: allwinner: h6: Add RX DMA channel for SPDIF +Git-commit: 7b59348c11f3355e284d77bbe3d33632ddadcfc2 +Patch-mainline: v6.8 or v6.8-rc8 (next release) +References: git-fixes + +The SPDIF hardware found on the H6 supports both transmit and receive +functions. However it is missing the RX DMA channel. + +Add the SPDIF hardware block's RX DMA channel. Also remove the +by-default pinmux, since the end device can choose to implement +either or both functionalities. + +Fixes: f95b598df419 ("arm64: dts: allwinner: Add SPDIF node for Allwinner H6") +Signed-off-by: Chen-Yu Tsai +Reviewed-by: Andre Przywara +Reviewed-by: Jernej Skrabec +Link: https://lore.kernel.org/r/20240127163247.384439-6-wens@kernel.org +Signed-off-by: Jernej Skrabec +Acked-by: Ivan T. Ivanov +--- + arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 2 ++ + arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 7 +++---- + 2 files changed, 5 insertions(+), 4 deletions(-) + +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +@@ -290,6 +290,8 @@ + }; + + &spdif { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spdif_tx_pin>; + status = "okay"; + }; + +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +@@ -394,6 +394,7 @@ + function = "spi1"; + }; + ++ /omit-if-no-ref/ + spdif_tx_pin: spdif-tx-pin { + pins = "PH7"; + function = "spdif"; +@@ -643,10 +644,8 @@ + clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>; + clock-names = "apb", "spdif"; + resets = <&ccu RST_BUS_SPDIF>; +- dmas = <&dma 2>; +- dma-names = "tx"; +- pinctrl-names = "default"; +- pinctrl-0 = <&spdif_tx_pin>; ++ dmas = <&dma 2>, <&dma 2>; ++ dma-names = "rx", "tx"; + status = "disabled"; + }; + diff --git a/patches.suse/arm64-dts-imx8mm-venice-gw71xx-fix-USB-OTG-VBUS-2.patch b/patches.suse/arm64-dts-imx8mm-venice-gw71xx-fix-USB-OTG-VBUS-2.patch new file mode 100644 index 0000000..8a3d4b0 --- /dev/null +++ b/patches.suse/arm64-dts-imx8mm-venice-gw71xx-fix-USB-OTG-VBUS-2.patch @@ -0,0 +1,78 @@ +From: Tim Harvey +Date: Wed, 20 Dec 2023 15:30:46 -0800 +Subject: arm64: dts: imx8mm-venice-gw71xx: fix USB OTG VBUS +Git-commit: ec2cb52fcfef5d58574f2cfbc9a99ffc20ae5a9d +Patch-mainline: v6.8 or v6.8-rc8 (next release) +References: git-fixes + +The GW71xx does not have a gpio controlled vbus regulator but it does +require some pinctrl. Remove the regulator and move the valid pinctrl +into the usbotg1 node. + +Fixes: bd306fdb4e60 ("arm64: dts: imx8mm-venice-gw71xx: fix USB OTG VBUS") +Signed-off-by: Tim Harvey +Signed-off-by: Shawn Guo +Acked-by: Ivan T. Ivanov +--- + arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi | 29 ++++------------ + 1 file changed, 9 insertions(+), 20 deletions(-) + +--- a/arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi ++++ b/arch/arm64/boot/dts/freescale/imx8mm-venice-gw71xx.dtsi +@@ -40,17 +40,6 @@ + gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; +- +- reg_usb_otg1_vbus: regulator-usb-otg1 { +- pinctrl-names = "default"; +- pinctrl-0 = <&pinctrl_reg_usb1_en>; +- compatible = "regulator-fixed"; +- regulator-name = "usb_otg1_vbus"; +- gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>; +- enable-active-high; +- regulator-min-microvolt = <5000000>; +- regulator-max-microvolt = <5000000>; +- }; + }; + + /* off-board header */ +@@ -102,9 +91,10 @@ + }; + + &usbotg1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usbotg1>; + dr_mode = "otg"; + over-current-active-low; +- vbus-supply = <®_usb_otg1_vbus>; + status = "okay"; + }; + +@@ -156,14 +146,6 @@ + >; + }; + +- pinctrl_reg_usb1_en: regusb1grp { +- fsl,pins = < +- MX8MM_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x41 +- MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x141 +- MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x41 +- >; +- }; +- + pinctrl_spi2: spi2grp { + fsl,pins = < + MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0xd6 +@@ -186,4 +168,11 @@ + MX8MM_IOMUXC_UART3_TXD_UART3_DCE_TX 0x140 + >; + }; ++ ++ pinctrl_usbotg1: usbotg1grp { ++ fsl,pins = < ++ MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x141 ++ MX8MM_IOMUXC_GPIO1_IO13_USB1_OTG_OC 0x41 ++ >; ++ }; + }; diff --git a/patches.suse/arm64-dts-rockchip-add-ES8316-codec-for-ROCK-Pi-4.patch b/patches.suse/arm64-dts-rockchip-add-ES8316-codec-for-ROCK-Pi-4.patch new file mode 100644 index 0000000..91758f5 --- /dev/null +++ b/patches.suse/arm64-dts-rockchip-add-ES8316-codec-for-ROCK-Pi-4.patch @@ -0,0 +1,70 @@ +From: Alex Bee +Date: Fri, 18 Jun 2021 20:12:55 +0200 +Subject: arm64: dts: rockchip: add ES8316 codec for ROCK Pi 4 +Git-commit: 65bd2b8bdb3bddc37bea695789713916327e1c1f +Patch-mainline: v5.16-rc1 +References: git-fixes + +ROCK Pi 4 boards have the codec connected to i2s0 and it is accessible +via i2c1 address 0x11. +Add an audio-graph-card for it. + +Signed-off-by: Alex Bee +Link: https://lore.kernel.org/r/20210618181256.27992-5-knaerzche@gmail.com +Signed-off-by: Heiko Stuebner +Acked-by: Ivan T. Ivanov +--- + arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 28 +++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +@@ -36,6 +36,12 @@ + reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; + }; + ++ sound { ++ compatible = "audio-graph-card"; ++ label = "Analog"; ++ dais = <&i2s0_p0>; ++ }; ++ + vcc12v_dcin: dc-12v { + compatible = "regulator-fixed"; + regulator-name = "vcc12v_dcin"; +@@ -422,6 +428,20 @@ + i2c-scl-rising-time-ns = <300>; + i2c-scl-falling-time-ns = <15>; + status = "okay"; ++ ++ es8316: codec@11 { ++ compatible = "everest,es8316"; ++ reg = <0x11>; ++ clocks = <&cru SCLK_I2S_8CH_OUT>; ++ clock-names = "mclk"; ++ #sound-dai-cells = <0>; ++ ++ port { ++ es8316_p0_0: endpoint { ++ remote-endpoint = <&i2s0_p0_0>; ++ }; ++ }; ++ }; + }; + + &i2c3 { +@@ -441,6 +461,14 @@ + rockchip,capture-channels = <2>; + rockchip,playback-channels = <2>; + status = "okay"; ++ ++ i2s0_p0: port { ++ i2s0_p0_0: endpoint { ++ dai-format = "i2s"; ++ mclk-fs = <256>; ++ remote-endpoint = <&es8316_p0_0>; ++ }; ++ }; + }; + + &i2s1 { diff --git a/patches.suse/arm64-dts-rockchip-add-SPDIF-node-for-ROCK-Pi-4.patch b/patches.suse/arm64-dts-rockchip-add-SPDIF-node-for-ROCK-Pi-4.patch new file mode 100644 index 0000000..c442d66 --- /dev/null +++ b/patches.suse/arm64-dts-rockchip-add-SPDIF-node-for-ROCK-Pi-4.patch @@ -0,0 +1,64 @@ +From: Alex Bee +Date: Fri, 18 Jun 2021 20:12:56 +0200 +Subject: arm64: dts: rockchip: add SPDIF node for ROCK Pi 4 +Git-commit: 697dd494cb1cf56acfb764214a1e4788e4d1a983 +Patch-mainline: v5.16-rc1 +References: git-fixes + +Add a SPDIF audio-graph-card to ROCK Pi 4 device tree. + +It's not enabled by default since all dma channels are used by +the (already) enabled i2s0/1/2 and the pin is muxed with GPIO4_C5 +which might be in use already. +If enabled SPDIF_TX will be available at pin #15. + +Signed-off-by: Alex Bee +Link: https://lore.kernel.org/r/20210618181256.27992-6-knaerzche@gmail.com +Signed-off-by: Heiko Stuebner +Acked-by: Ivan T. Ivanov +--- + arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 26 +++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +@@ -42,6 +42,23 @@ + dais = <&i2s0_p0>; + }; + ++ sound-dit { ++ compatible = "audio-graph-card"; ++ label = "SPDIF"; ++ dais = <&spdif_p0>; ++ }; ++ ++ spdif-dit { ++ compatible = "linux,spdif-dit"; ++ #sound-dai-cells = <0>; ++ ++ port { ++ dit_p0_0: endpoint { ++ remote-endpoint = <&spdif_p0_0>; ++ }; ++ }; ++ }; ++ + vcc12v_dcin: dc-12v { + compatible = "regulator-fixed"; + regulator-name = "vcc12v_dcin"; +@@ -631,6 +648,15 @@ + status = "okay"; + }; + ++&spdif { ++ ++ spdif_p0: port { ++ spdif_p0_0: endpoint { ++ remote-endpoint = <&dit_p0_0>; ++ }; ++ }; ++}; ++ + &tcphy0 { + status = "okay"; + }; diff --git a/patches.suse/arm64-dts-rockchip-fix-regulator-name-on-rk3399-rock-4.patch b/patches.suse/arm64-dts-rockchip-fix-regulator-name-on-rk3399-rock-4.patch new file mode 100644 index 0000000..e4ea931 --- /dev/null +++ b/patches.suse/arm64-dts-rockchip-fix-regulator-name-on-rk3399-rock-4.patch @@ -0,0 +1,103 @@ +From: FUKAUMI Naoki +Date: Fri, 9 Sep 2022 19:50:04 +0000 +Subject: arm64: dts: rockchip: fix regulator name on rk3399-rock-4 +Git-commit: 69448624b770aa88a71536a16900dd3cc6002919 +Patch-mainline: v6.1-rc1 +References: git-fixes + +fix regulator name + +ref: + https://dl.radxa.com/rockpi4/docs/hw/rockpi4/rockpi4_v13_sch_20181112.pdf + +Signed-off-by: FUKAUMI Naoki +Link: https://lore.kernel.org/r/20220909195006.127957-4-naoki@radxa.com +Signed-off-by: Heiko Stuebner +Acked-by: Ivan T. Ivanov +--- + arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 25 ++++++++++----------- + 1 file changed, 13 insertions(+), 12 deletions(-) + +--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi +@@ -121,24 +121,25 @@ + vin-supply = <&vcc5v0_sys>; + }; + +- vcc5v0_typec: vcc5v0-typec-regulator { ++ vbus_typec: vbus-typec-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_typec_en>; +- regulator-name = "vcc5v0_typec"; ++ regulator-name = "vbus_typec"; + regulator-always-on; + vin-supply = <&vcc5v0_sys>; + }; + +- vcc_lan: vcc3v3-phy-regulator { ++ vcc3v3_lan: vcc3v3-lan-regulator { + compatible = "regulator-fixed"; +- regulator-name = "vcc_lan"; ++ regulator-name = "vcc3v3_lan"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; ++ vin-supply = <&vcc3v3_sys>; + }; + + vdd_log: vdd-log { +@@ -185,7 +186,7 @@ + assigned-clocks = <&cru SCLK_RMII_SRC>; + assigned-clock-parents = <&clkin_gmac>; + clock_in_out = "input"; +- phy-supply = <&vcc_lan>; ++ phy-supply = <&vcc3v3_lan>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; +@@ -290,8 +291,8 @@ + }; + }; + +- vcc1v8_codec: LDO_REG1 { +- regulator-name = "vcc1v8_codec"; ++ vcca1v8_codec: LDO_REG1 { ++ regulator-name = "vcca1v8_codec"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; +@@ -301,8 +302,8 @@ + }; + }; + +- vcc1v8_hdmi: LDO_REG2 { +- regulator-name = "vcc1v8_hdmi"; ++ vcca1v8_hdmi: LDO_REG2 { ++ regulator-name = "vcca1v8_hdmi"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; +@@ -359,8 +360,8 @@ + }; + }; + +- vcc0v9_hdmi: LDO_REG7 { +- regulator-name = "vcc0v9_hdmi"; ++ vcca0v9_hdmi: LDO_REG7 { ++ regulator-name = "vcca0v9_hdmi"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <900000>; +@@ -502,7 +503,7 @@ + status = "okay"; + + bt656-supply = <&vcc_3v0>; +- audio-supply = <&vcc1v8_codec>; ++ audio-supply = <&vcca1v8_codec>; + sdmmc-supply = <&vcc_sdio>; + gpio1830-supply = <&vcc_3v0>; + }; diff --git a/patches.suse/arm64-dts-rockchip-set-num-cs-property-for-spi-on-px30.patch b/patches.suse/arm64-dts-rockchip-set-num-cs-property-for-spi-on-px30.patch new file mode 100644 index 0000000..8b67ccf --- /dev/null +++ b/patches.suse/arm64-dts-rockchip-set-num-cs-property-for-spi-on-px30.patch @@ -0,0 +1,43 @@ +From: Heiko Stuebner +Date: Fri, 19 Jan 2024 11:16:56 +0100 +Subject: arm64: dts: rockchip: set num-cs property for spi on px30 +Git-commit: 334bf0710c98d391f4067b72f535d6c4c84dfb6f +Patch-mainline: v6.8-rc6 +References: git-fixes + +The px30 has two spi controllers with two chip-selects each. +The num-cs property is specified as the total number of chip +selects a controllers has and is used since 2020 to find uses +of chipselects outside that range in the Rockchip spi driver. + +Without the property set, the default is 1, so spi devices +using the second chipselect will not be created. + +Fixes: eb1262e3cc8b ("spi: spi-rockchip: use num-cs property and ctlr->enable_gpiods") +Signed-off-by: Heiko Stuebner +Reviewed-by: Quentin Schulz +Link: https://lore.kernel.org/r/20240119101656.965744-1-heiko@sntech.de +Signed-off-by: Heiko Stuebner +Acked-by: Ivan T. Ivanov +--- + arch/arm64/boot/dts/rockchip/px30.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/px30.dtsi ++++ b/arch/arm64/boot/dts/rockchip/px30.dtsi +@@ -585,6 +585,7 @@ + clock-names = "spiclk", "apb_pclk"; + dmas = <&dmac 12>, <&dmac 13>; + dma-names = "tx", "rx"; ++ num-cs = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_clk &spi0_csn &spi0_miso &spi0_mosi>; + #address-cells = <1>; +@@ -600,6 +601,7 @@ + clock-names = "spiclk", "apb_pclk"; + dmas = <&dmac 14>, <&dmac 15>; + dma-names = "tx", "rx"; ++ num-cs = <2>; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_clk &spi1_csn0 &spi1_csn1 &spi1_miso &spi1_mosi>; + #address-cells = <1>; diff --git a/patches.suse/arm64-mm-fix-VA-range-sanity-check.patch b/patches.suse/arm64-mm-fix-VA-range-sanity-check.patch new file mode 100644 index 0000000..6ce1647 --- /dev/null +++ b/patches.suse/arm64-mm-fix-VA-range-sanity-check.patch @@ -0,0 +1,99 @@ +From: Mark Rutland +Date: Thu, 15 Jun 2023 11:26:28 +0100 +Subject: arm64: mm: fix VA-range sanity check +Git-commit: ab9b4008092c86dc12497af155a0901cc1156999 +Patch-mainline: v6.5-rc1 +References: git-fixes + +Both create_mapping_noalloc() and update_mapping_prot() sanity-check +their 'virt' parameter, but the check itself doesn't make much sense. +The condition used today appears to be a historical accident. + +The sanity-check condition: + + if ((virt >= PAGE_END) && (virt < VMALLOC_START)) { + [ ... warning here ... ] + return; + } + +... can only be true for the KASAN shadow region or the module region, +and there's no reason to exclude these specifically for creating and +updateing mappings. + +When arm64 support was first upstreamed in commit: + + c1cc1552616d0f35 ("arm64: MMU initialisation") + +... the condition was: + + if (virt < VMALLOC_START) { + [ ... warning here ... ] + return; + } + +At the time, VMALLOC_START was the lowest kernel address, and this was +checking whether 'virt' would be translated via TTBR1. + +Subsequently in commit: + + 14c127c957c1c607 ("arm64: mm: Flip kernel VA space") + +... the condition was changed to: + + if ((virt >= VA_START) && (virt < VMALLOC_START)) { + [ ... warning here ... ] + return; + } + +This appear to have been a thinko. The commit moved the linear map to +the bottom of the kernel address space, with VMALLOC_START being at the +halfway point. The old condition would warn for changes to the linear +map below this, and at the time VA_START was the end of the linear map. + +Subsequently we cleaned up the naming of VA_START in commit: + + 77ad4ce69321abbe ("arm64: memory: rename VA_START to PAGE_END") + +... keeping the erroneous condition as: + + if ((virt >= PAGE_END) && (virt < VMALLOC_START)) { + [ ... warning here ... ] + return; + } + +Correct the condition to check against the start of the TTBR1 address +space, which is currently PAGE_OFFSET. This simplifies the logic, and +more clearly matches the "outside kernel range" message in the warning. + +Signed-off-by: Mark Rutland +Cc: Russell King +Cc: Steve Capper +Cc: Will Deacon +Reviewed-by: Russell King (Oracle) +Link: https://lore.kernel.org/r/20230615102628.1052103-1-mark.rutland@arm.com +Signed-off-by: Catalin Marinas +Acked-by: Ivan T. Ivanov +--- + arch/arm64/mm/mmu.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm64/mm/mmu.c ++++ b/arch/arm64/mm/mmu.c +@@ -436,7 +436,7 @@ static phys_addr_t pgd_pgtable_alloc(int + static void __init create_mapping_noalloc(phys_addr_t phys, unsigned long virt, + phys_addr_t size, pgprot_t prot) + { +- if ((virt >= PAGE_END) && (virt < VMALLOC_START)) { ++ if (virt < PAGE_OFFSET) { + pr_warn("BUG: not creating mapping for %pa at 0x%016lx - outside kernel range\n", + &phys, virt); + return; +@@ -463,7 +463,7 @@ void __init create_pgd_mapping(struct mm + static void update_mapping_prot(phys_addr_t phys, unsigned long virt, + phys_addr_t size, pgprot_t prot) + { +- if ((virt >= PAGE_END) && (virt < VMALLOC_START)) { ++ if (virt < PAGE_OFFSET) { + pr_warn("BUG: not updating mapping for %pa at 0x%016lx - outside kernel range\n", + &phys, virt); + return; diff --git a/patches.suse/arm64-set-__exception_irq_entry-with-__irq_entry-as-a-default.patch b/patches.suse/arm64-set-__exception_irq_entry-with-__irq_entry-as-a-default.patch new file mode 100644 index 0000000..0d706b9 --- /dev/null +++ b/patches.suse/arm64-set-__exception_irq_entry-with-__irq_entry-as-a-default.patch @@ -0,0 +1,159 @@ +From: Youngmin Nam +Date: Mon, 24 Apr 2023 10:04:36 +0900 +Subject: arm64: set __exception_irq_entry with __irq_entry as a default +Git-commit: f6794950f0e5ba37e3bbedda4d6ab0aad7395dd3 +Patch-mainline: v6.5-rc1 +References: git-fixes + +filter_irq_stacks() is supposed to cut entries which are related irq entries +from its call stack. +And in_irqentry_text() which is called by filter_irq_stacks() +uses __irqentry_text_start/end symbol to find irq entries in callstack. + +But it doesn't work correctly as without "CONFIG_FUNCTION_GRAPH_TRACER", +arm64 kernel doesn't include gic_handle_irq which is entry point of arm64 irq +between __irqentry_text_start and __irqentry_text_end as we discussed in below link. +https://lore.kernel.org/all/CACT4Y+aReMGLYua2rCLHgFpS9io5cZC04Q8GLs-uNmrn1ezxYQ@mail.gmail.com/#t + +This problem can makes unintentional deep call stack entries especially +in KASAN enabled situation as below. + +[ 2479.383395]I[0:launcher-loader: 1719] Stack depot reached limit capacity +[ 2479.383538]I[0:launcher-loader: 1719] WARNING: CPU: 0 PID: 1719 at lib/stackdepot.c:129 __stack_depot_save+0x464/0x46c +[ 2479.385693]I[0:launcher-loader: 1719] pstate: 624000c5 (nZCv daIF +PAN -UAO +TCO -DIT -SSBS BTYPE=--) +[ 2479.385724]I[0:launcher-loader: 1719] pc : __stack_depot_save+0x464/0x46c +[ 2479.385751]I[0:launcher-loader: 1719] lr : __stack_depot_save+0x460/0x46c +[ 2479.385774]I[0:launcher-loader: 1719] sp : ffffffc0080073c0 +[ 2479.385793]I[0:launcher-loader: 1719] x29: ffffffc0080073e0 x28: ffffffd00b78a000 x27: 0000000000000000 +[ 2479.385839]I[0:launcher-loader: 1719] x26: 000000000004d1dd x25: ffffff891474f000 x24: 00000000ca64d1dd +[ 2479.385882]I[0:launcher-loader: 1719] x23: 0000000000000200 x22: 0000000000000220 x21: 0000000000000040 +[ 2479.385925]I[0:launcher-loader: 1719] x20: ffffffc008007440 x19: 0000000000000000 x18: 0000000000000000 +[ 2479.385969]I[0:launcher-loader: 1719] x17: 2065726568207475 x16: 000000000000005e x15: 2d2d2d2d2d2d2d20 +[ 2479.386013]I[0:launcher-loader: 1719] x14: 5d39313731203a72 x13: 00000000002f6b30 x12: 00000000002f6af8 +[ 2479.386057]I[0:launcher-loader: 1719] x11: 00000000ffffffff x10: ffffffb90aacf000 x9 : e8a74a6c16008800 +[ 2479.386101]I[0:launcher-loader: 1719] x8 : e8a74a6c16008800 x7 : 00000000002f6b30 x6 : 00000000002f6af8 +[ 2479.386145]I[0:launcher-loader: 1719] x5 : ffffffc0080070c8 x4 : ffffffd00b192380 x3 : ffffffd0092b313c +[ 2479.386189]I[0:launcher-loader: 1719] x2 : 0000000000000001 x1 : 0000000000000004 x0 : 0000000000000022 +[ 2479.386231]I[0:launcher-loader: 1719] Call trace: +[ 2479.386248]I[0:launcher-loader: 1719] __stack_depot_save+0x464/0x46c +[ 2479.386273]I[0:launcher-loader: 1719] kasan_save_stack+0x58/0x70 +[ 2479.386303]I[0:launcher-loader: 1719] save_stack_info+0x34/0x138 +[ 2479.386331]I[0:launcher-loader: 1719] kasan_save_free_info+0x18/0x24 +[ 2479.386358]I[0:launcher-loader: 1719] ____kasan_slab_free+0x16c/0x170 +[ 2479.386385]I[0:launcher-loader: 1719] __kasan_slab_free+0x10/0x20 +[ 2479.386410]I[0:launcher-loader: 1719] kmem_cache_free+0x238/0x53c +[ 2479.386435]I[0:launcher-loader: 1719] mempool_free_slab+0x1c/0x28 +[ 2479.386460]I[0:launcher-loader: 1719] mempool_free+0x7c/0x1a0 +[ 2479.386484]I[0:launcher-loader: 1719] bvec_free+0x34/0x80 +[ 2479.386514]I[0:launcher-loader: 1719] bio_free+0x60/0x98 +[ 2479.386540]I[0:launcher-loader: 1719] bio_put+0x50/0x21c +[ 2479.386567]I[0:launcher-loader: 1719] f2fs_write_end_io+0x4ac/0x4d0 +[ 2479.386594]I[0:launcher-loader: 1719] bio_endio+0x2dc/0x300 +[ 2479.386622]I[0:launcher-loader: 1719] __dm_io_complete+0x324/0x37c +[ 2479.386650]I[0:launcher-loader: 1719] dm_io_dec_pending+0x60/0xa4 +[ 2479.386676]I[0:launcher-loader: 1719] clone_endio+0xf8/0x2f0 +[ 2479.386700]I[0:launcher-loader: 1719] bio_endio+0x2dc/0x300 +[ 2479.386727]I[0:launcher-loader: 1719] blk_update_request+0x258/0x63c +[ 2479.386754]I[0:launcher-loader: 1719] scsi_end_request+0x50/0x304 +[ 2479.386782]I[0:launcher-loader: 1719] scsi_io_completion+0x88/0x160 +[ 2479.386808]I[0:launcher-loader: 1719] scsi_finish_command+0x17c/0x194 +[ 2479.386833]I[0:launcher-loader: 1719] scsi_complete+0xcc/0x158 +[ 2479.386859]I[0:launcher-loader: 1719] blk_mq_complete_request+0x4c/0x5c +[ 2479.386885]I[0:launcher-loader: 1719] scsi_done_internal+0xf4/0x1e0 +[ 2479.386910]I[0:launcher-loader: 1719] scsi_done+0x14/0x20 +[ 2479.386935]I[0:launcher-loader: 1719] ufshcd_compl_one_cqe+0x578/0x71c +[ 2479.386963]I[0:launcher-loader: 1719] ufshcd_mcq_poll_cqe_nolock+0xc8/0x150 +[ 2479.386991]I[0:launcher-loader: 1719] ufshcd_intr+0x868/0xc0c +[ 2479.387017]I[0:launcher-loader: 1719] __handle_irq_event_percpu+0xd0/0x348 +[ 2479.387044]I[0:launcher-loader: 1719] handle_irq_event_percpu+0x24/0x74 +[ 2479.387068]I[0:launcher-loader: 1719] handle_irq_event+0x74/0xe0 +[ 2479.387091]I[0:launcher-loader: 1719] handle_fasteoi_irq+0x174/0x240 +[ 2479.387118]I[0:launcher-loader: 1719] handle_irq_desc+0x7c/0x2c0 +[ 2479.387147]I[0:launcher-loader: 1719] generic_handle_domain_irq+0x1c/0x28 +[ 2479.387174]I[0:launcher-loader: 1719] gic_handle_irq+0x64/0x158 +[ 2479.387204]I[0:launcher-loader: 1719] call_on_irq_stack+0x2c/0x54 +[ 2479.387231]I[0:launcher-loader: 1719] do_interrupt_handler+0x70/0xa0 +[ 2479.387258]I[0:launcher-loader: 1719] el1_interrupt+0x34/0x68 +[ 2479.387283]I[0:launcher-loader: 1719] el1h_64_irq_handler+0x18/0x24 +[ 2479.387308]I[0:launcher-loader: 1719] el1h_64_irq+0x68/0x6c +[ 2479.387332]I[0:launcher-loader: 1719] blk_attempt_bio_merge+0x8/0x170 +[ 2479.387356]I[0:launcher-loader: 1719] blk_mq_attempt_bio_merge+0x78/0x98 +[ 2479.387383]I[0:launcher-loader: 1719] blk_mq_submit_bio+0x324/0xa40 +[ 2479.387409]I[0:launcher-loader: 1719] __submit_bio+0x104/0x138 +[ 2479.387436]I[0:launcher-loader: 1719] submit_bio_noacct_nocheck+0x1d0/0x4a0 +[ 2479.387462]I[0:launcher-loader: 1719] submit_bio_noacct+0x618/0x804 +[ 2479.387487]I[0:launcher-loader: 1719] submit_bio+0x164/0x180 +[ 2479.387511]I[0:launcher-loader: 1719] f2fs_submit_read_bio+0xe4/0x1c4 +[ 2479.387537]I[0:launcher-loader: 1719] f2fs_mpage_readpages+0x888/0xa4c +[ 2479.387563]I[0:launcher-loader: 1719] f2fs_readahead+0xd4/0x19c +[ 2479.387587]I[0:launcher-loader: 1719] read_pages+0xb0/0x4ac +[ 2479.387614]I[0:launcher-loader: 1719] page_cache_ra_unbounded+0x238/0x288 +[ 2479.387642]I[0:launcher-loader: 1719] do_page_cache_ra+0x60/0x6c +[ 2479.387669]I[0:launcher-loader: 1719] page_cache_ra_order+0x318/0x364 +[ 2479.387695]I[0:launcher-loader: 1719] ondemand_readahead+0x30c/0x3d8 +[ 2479.387722]I[0:launcher-loader: 1719] page_cache_sync_ra+0xb4/0xc8 +[ 2479.387749]I[0:launcher-loader: 1719] filemap_read+0x268/0xd24 +[ 2479.387777]I[0:launcher-loader: 1719] f2fs_file_read_iter+0x1a0/0x62c +[ 2479.387806]I[0:launcher-loader: 1719] vfs_read+0x258/0x34c +[ 2479.387831]I[0:launcher-loader: 1719] ksys_pread64+0x8c/0xd0 +[ 2479.387857]I[0:launcher-loader: 1719] __arm64_sys_pread64+0x48/0x54 +[ 2479.387881]I[0:launcher-loader: 1719] invoke_syscall+0x58/0x158 +[ 2479.387909]I[0:launcher-loader: 1719] el0_svc_common+0xf0/0x134 +[ 2479.387935]I[0:launcher-loader: 1719] do_el0_svc+0x44/0x114 +[ 2479.387961]I[0:launcher-loader: 1719] el0_svc+0x2c/0x80 +[ 2479.387985]I[0:launcher-loader: 1719] el0t_64_sync_handler+0x48/0x114 +[ 2479.388010]I[0:launcher-loader: 1719] el0t_64_sync+0x190/0x194 +[ 2479.388038]I[0:launcher-loader: 1719] Kernel panic - not syncing: kernel: panic_on_warn set ... + +So let's set __exception_irq_entry with __irq_entry as a default. +Applying this patch, we can see gic_hande_irq is included in Systemp.map as below. + +* Before +ffffffc008010000 T __do_softirq +ffffffc008010000 T __irqentry_text_end +ffffffc008010000 T __irqentry_text_start +ffffffc008010000 T __softirqentry_text_start +ffffffc008010000 T _stext +ffffffc00801066c T __softirqentry_text_end +ffffffc008010670 T __entry_text_start + +* After +ffffffc008010000 T __irqentry_text_start +ffffffc008010000 T _stext +ffffffc008010000 t gic_handle_irq +ffffffc00801013c t gic_handle_irq +ffffffc008010294 T __irqentry_text_end +ffffffc008010298 T __do_softirq +ffffffc008010298 T __softirqentry_text_start +ffffffc008010904 T __softirqentry_text_end +ffffffc008010908 T __entry_text_start + +Signed-off-by: Youngmin Nam +Signed-off-by: SEO HOYOUNG +Reviewed-by: Mark Rutland +Link: https://lore.kernel.org/r/20230424010436.779733-1-youngmin.nam@samsung.com +Signed-off-by: Catalin Marinas +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/exception.h | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/arch/arm64/include/asm/exception.h ++++ b/arch/arm64/include/asm/exception.h +@@ -8,16 +8,11 @@ + #define __ASM_EXCEPTION_H + + #include +-#include + #include + + #include + +-#ifdef CONFIG_FUNCTION_GRAPH_TRACER + #define __exception_irq_entry __irq_entry +-#else +-#define __exception_irq_entry __kprobes +-#endif + + static inline unsigned long disr_to_esr(u64 disr) + { diff --git a/patches.suse/backlight-da9052-Fully-initialize-backlight_properti.patch b/patches.suse/backlight-da9052-Fully-initialize-backlight_properti.patch new file mode 100644 index 0000000..7ed4707 --- /dev/null +++ b/patches.suse/backlight-da9052-Fully-initialize-backlight_properti.patch @@ -0,0 +1,37 @@ +From 0285e9efaee8276305db5c52a59baf84e9731556 Mon Sep 17 00:00:00 2001 +From: Daniel Thompson +Date: Tue, 20 Feb 2024 15:35:24 +0000 +Subject: [PATCH] backlight: da9052: Fully initialize backlight_properties during probe +Git-commit: 0285e9efaee8276305db5c52a59baf84e9731556 +Patch-mainline: v6.9-rc1 +References: git-fixes + +props is stack allocated and the fields that are not explcitly set +by the probe function need to be zeroed or we'll get undefined behaviour +(especially so power/blank states)! + +Fixes: 6ede3d832aaa ("backlight: add driver for DA9052/53 PMIC v1") +Signed-off-by: Daniel Thompson +Link: https://lore.kernel.org/r/20240220153532.76613-2-daniel.thompson@linaro.org +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/video/backlight/da9052_bl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c +index 1cdc8543310b..b8ff7046510e 100644 +--- a/drivers/video/backlight/da9052_bl.c ++++ b/drivers/video/backlight/da9052_bl.c +@@ -117,6 +117,7 @@ static int da9052_backlight_probe(struct platform_device *pdev) + wleds->led_reg = platform_get_device_id(pdev)->driver_data; + wleds->state = DA9052_WLEDS_OFF; + ++ memset(&props, 0, sizeof(struct backlight_properties)); + props.type = BACKLIGHT_RAW; + props.max_brightness = DA9052_MAX_BRIGHTNESS; + +-- +2.43.0 + diff --git a/patches.suse/backlight-lm3630a-Don-t-set-bl-props.brightness-in-g.patch b/patches.suse/backlight-lm3630a-Don-t-set-bl-props.brightness-in-g.patch new file mode 100644 index 0000000..32ef6fc --- /dev/null +++ b/patches.suse/backlight-lm3630a-Don-t-set-bl-props.brightness-in-g.patch @@ -0,0 +1,77 @@ +From 4bf7ddd2d2f0f8826f25f74c7eba4e2c323a1446 Mon Sep 17 00:00:00 2001 +From: Luca Weiss +Date: Tue, 20 Feb 2024 00:11:20 +0100 +Subject: [PATCH] backlight: lm3630a: Don't set bl->props.brightness in get_brightness +Git-commit: 4bf7ddd2d2f0f8826f25f74c7eba4e2c323a1446 +Patch-mainline: v6.9-rc1 +References: git-fixes + +There's no need to set bl->props.brightness, the get_brightness function +is just supposed to return the current brightness and not touch the +struct. + +With that done we can also remove the 'goto out' and just return the +value. + +Fixes: 0c2a665a648e ("backlight: add Backlight driver for lm3630 chip") +Signed-off-by: Luca Weiss +Reviewed-by: Daniel Thompson +Link: https://lore.kernel.org/r/20240220-lm3630a-fixups-v1-2-9ca62f7e4a33@z3ntu.xyz +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/video/backlight/lm3630a_bl.c | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c +index 8e275275b808..26ff4178cc16 100644 +--- a/drivers/video/backlight/lm3630a_bl.c ++++ b/drivers/video/backlight/lm3630a_bl.c +@@ -233,7 +233,7 @@ static int lm3630a_bank_a_get_brightness(struct backlight_device *bl) + if (rval < 0) + goto out_i2c_err; + brightness |= rval; +- goto out; ++ return brightness; + } + + /* disable sleep */ +@@ -244,11 +244,8 @@ static int lm3630a_bank_a_get_brightness(struct backlight_device *bl) + rval = lm3630a_read(pchip, REG_BRT_A); + if (rval < 0) + goto out_i2c_err; +- brightness = rval; ++ return rval; + +-out: +- bl->props.brightness = brightness; +- return bl->props.brightness; + out_i2c_err: + dev_err(pchip->dev, "i2c failed to access register\n"); + return 0; +@@ -310,7 +307,7 @@ static int lm3630a_bank_b_get_brightness(struct backlight_device *bl) + if (rval < 0) + goto out_i2c_err; + brightness |= rval; +- goto out; ++ return brightness; + } + + /* disable sleep */ +@@ -321,11 +318,8 @@ static int lm3630a_bank_b_get_brightness(struct backlight_device *bl) + rval = lm3630a_read(pchip, REG_BRT_B); + if (rval < 0) + goto out_i2c_err; +- brightness = rval; ++ return rval; + +-out: +- bl->props.brightness = brightness; +- return bl->props.brightness; + out_i2c_err: + dev_err(pchip->dev, "i2c failed to access register\n"); + return 0; +-- +2.43.0 + diff --git a/patches.suse/backlight-lm3630a-Initialize-backlight_properties-on.patch b/patches.suse/backlight-lm3630a-Initialize-backlight_properties-on.patch new file mode 100644 index 0000000..7f36e53 --- /dev/null +++ b/patches.suse/backlight-lm3630a-Initialize-backlight_properties-on.patch @@ -0,0 +1,37 @@ +From ad9aeb0e3aa90ebdad5fabf9c21783740eb95907 Mon Sep 17 00:00:00 2001 +From: Luca Weiss +Date: Tue, 20 Feb 2024 00:11:19 +0100 +Subject: [PATCH] backlight: lm3630a: Initialize backlight_properties on init +Git-commit: ad9aeb0e3aa90ebdad5fabf9c21783740eb95907 +Patch-mainline: v6.9-rc1 +References: git-fixes + +The backlight_properties struct should be initialized to zero before +using, otherwise there will be some random values in the struct. + +Fixes: 0c2a665a648e ("backlight: add Backlight driver for lm3630 chip") +Signed-off-by: Luca Weiss +Reviewed-by: Daniel Thompson +Link: https://lore.kernel.org/r/20240220-lm3630a-fixups-v1-1-9ca62f7e4a33@z3ntu.xyz +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/video/backlight/lm3630a_bl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c +index a3412c936ca2..8e275275b808 100644 +--- a/drivers/video/backlight/lm3630a_bl.c ++++ b/drivers/video/backlight/lm3630a_bl.c +@@ -343,6 +343,7 @@ static int lm3630a_backlight_register(struct lm3630a_chip *pchip) + struct backlight_properties props; + const char *label; + ++ memset(&props, 0, sizeof(struct backlight_properties)); + props.type = BACKLIGHT_RAW; + if (pdata->leda_ctrl != LM3630A_LEDA_DISABLE) { + props.brightness = pdata->leda_init_brt; +-- +2.43.0 + diff --git a/patches.suse/backlight-lm3639-Fully-initialize-backlight_properti.patch b/patches.suse/backlight-lm3639-Fully-initialize-backlight_properti.patch new file mode 100644 index 0000000..f3b874f --- /dev/null +++ b/patches.suse/backlight-lm3639-Fully-initialize-backlight_properti.patch @@ -0,0 +1,37 @@ +From abb5a5d951fbea3feb5c4ba179b89bb96a1d3462 Mon Sep 17 00:00:00 2001 +From: Daniel Thompson +Date: Tue, 20 Feb 2024 15:35:25 +0000 +Subject: [PATCH] backlight: lm3639: Fully initialize backlight_properties during probe +Git-commit: abb5a5d951fbea3feb5c4ba179b89bb96a1d3462 +Patch-mainline: v6.9-rc1 +References: git-fixes + +props is stack allocated and the fields that are not explcitly set +by the probe function need to be zeroed or we'll get undefined behaviour +(especially so power/blank states)! + +Fixes: 0f59858d5119 ("backlight: add new lm3639 backlight driver") +Signed-off-by: Daniel Thompson +Link: https://lore.kernel.org/r/20240220153532.76613-3-daniel.thompson@linaro.org +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/video/backlight/lm3639_bl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c +index 5246c171497d..564f62acd721 100644 +--- a/drivers/video/backlight/lm3639_bl.c ++++ b/drivers/video/backlight/lm3639_bl.c +@@ -338,6 +338,7 @@ static int lm3639_probe(struct i2c_client *client) + } + + /* backlight */ ++ memset(&props, 0, sizeof(struct backlight_properties)); + props.type = BACKLIGHT_RAW; + props.brightness = pdata->init_brt_led; + props.max_brightness = pdata->max_brt_led; +-- +2.43.0 + diff --git a/patches.suse/backlight-lp8788-Fully-initialize-backlight_properti.patch b/patches.suse/backlight-lp8788-Fully-initialize-backlight_properti.patch new file mode 100644 index 0000000..dbd8280 --- /dev/null +++ b/patches.suse/backlight-lp8788-Fully-initialize-backlight_properti.patch @@ -0,0 +1,37 @@ +From 392346827fbe8a7fd573dfb145170d7949f639a6 Mon Sep 17 00:00:00 2001 +From: Daniel Thompson +Date: Tue, 20 Feb 2024 15:35:26 +0000 +Subject: [PATCH] backlight: lp8788: Fully initialize backlight_properties during probe +Git-commit: 392346827fbe8a7fd573dfb145170d7949f639a6 +Patch-mainline: v6.9-rc1 +References: git-fixes + +props is stack allocated and the fields that are not explcitly set +by the probe function need to be zeroed or we'll get undefined behaviour +(especially so power/blank states)! + +Fixes: c5a51053cf3b ("backlight: add new lp8788 backlight driver") +Signed-off-by: Daniel Thompson +Link: https://lore.kernel.org/r/20240220153532.76613-4-daniel.thompson@linaro.org +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/video/backlight/lp8788_bl.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c +index d1a14b0db265..31f97230ee50 100644 +--- a/drivers/video/backlight/lp8788_bl.c ++++ b/drivers/video/backlight/lp8788_bl.c +@@ -191,6 +191,7 @@ static int lp8788_backlight_register(struct lp8788_bl *bl) + int init_brt; + char *name; + ++ memset(&props, 0, sizeof(struct backlight_properties)); + props.type = BACKLIGHT_PLATFORM; + props.max_brightness = MAX_BRIGHTNESS; + +-- +2.43.0 + diff --git a/patches.suse/leds-aw2013-Unlock-mutex-before-destroying-it.patch b/patches.suse/leds-aw2013-Unlock-mutex-before-destroying-it.patch new file mode 100644 index 0000000..0136fca --- /dev/null +++ b/patches.suse/leds-aw2013-Unlock-mutex-before-destroying-it.patch @@ -0,0 +1,32 @@ +From 6969d0a2ba1adc9ba6a49b9805f24080896c255c Mon Sep 17 00:00:00 2001 +From: George Stark +Date: Thu, 14 Dec 2023 20:36:05 +0300 +Subject: [PATCH] leds: aw2013: Unlock mutex before destroying it +Git-commit: 6969d0a2ba1adc9ba6a49b9805f24080896c255c +Patch-mainline: v6.9-rc1 +References: git-fixes + +In the probe() callback in case of error mutex is destroyed being locked +which is not allowed so unlock the mutex before destroying. + +Fixes: 59ea3c9faf32 ("leds: add aw2013 driver") +Signed-off-by: George Stark +Reviewed-by: Andy Shevchenko +Link: https://lore.kernel.org/r/20231214173614.2820929-2-gnstark@salutedevices.com +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/leds/leds-aw2013.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/leds/leds-aw2013.c ++++ b/drivers/leds/leds-aw2013.c +@@ -397,6 +397,7 @@ error_reg: + regulator_disable(chip->vcc_regulator); + + error: ++ mutex_unlock(&chip->mutex); + mutex_destroy(&chip->mutex); + return ret; + } diff --git a/patches.suse/mfd-altera-sysmgr-Call-of_node_put-only-when-of_pars.patch b/patches.suse/mfd-altera-sysmgr-Call-of_node_put-only-when-of_pars.patch new file mode 100644 index 0000000..3b5904f --- /dev/null +++ b/patches.suse/mfd-altera-sysmgr-Call-of_node_put-only-when-of_pars.patch @@ -0,0 +1,41 @@ +From e28c28a34ee9fa2ea671a20e5e7064e6220d55e7 Mon Sep 17 00:00:00 2001 +From: Peter Griffin +Date: Tue, 20 Feb 2024 11:50:12 +0000 +Subject: [PATCH] mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref +Git-commit: e28c28a34ee9fa2ea671a20e5e7064e6220d55e7 +Patch-mainline: v6.9-rc1 +References: git-fixes + +of_parse_phandle() returns a device_node with refcount incremented, which +the callee needs to call of_node_put() on when done. We should only call +of_node_put() when the property argument is provided though as otherwise +nothing has taken a reference on the node. + +Fixes: f36e789a1f8d ("mfd: altera-sysmgr: Add SOCFPGA System Manager") +Signed-off-by: Peter Griffin +Link: https://lore.kernel.org/r/20240220115012.471689-4-peter.griffin@linaro.org +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/mfd/altera-sysmgr.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c +index 0e52bd2ebd74..fb5f988e61f3 100644 +--- a/drivers/mfd/altera-sysmgr.c ++++ b/drivers/mfd/altera-sysmgr.c +@@ -109,7 +109,9 @@ struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np, + + dev = driver_find_device_by_of_node(&altr_sysmgr_driver.driver, + (void *)sysmgr_np); +- of_node_put(sysmgr_np); ++ if (property) ++ of_node_put(sysmgr_np); ++ + if (!dev) + return ERR_PTR(-EPROBE_DEFER); + +-- +2.43.0 + diff --git a/patches.suse/mfd-syscon-Call-of_node_put-only-when-of_parse_phand.patch b/patches.suse/mfd-syscon-Call-of_node_put-only-when-of_parse_phand.patch new file mode 100644 index 0000000..a3ed09b --- /dev/null +++ b/patches.suse/mfd-syscon-Call-of_node_put-only-when-of_parse_phand.patch @@ -0,0 +1,41 @@ +From d2b0680cf3b05490b579e71b0df6e07451977745 Mon Sep 17 00:00:00 2001 +From: Peter Griffin +Date: Tue, 20 Feb 2024 11:50:10 +0000 +Subject: [PATCH] mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref +Git-commit: d2b0680cf3b05490b579e71b0df6e07451977745 +Patch-mainline: v6.9-rc1 +References: git-fixes + +of_parse_phandle() returns a device_node with refcount incremented, which +the callee needs to call of_node_put() on when done. We should only call +of_node_put() when the property argument is provided though as otherwise +nothing has taken a reference on the node. + +Fixes: 45330bb43421 ("mfd: syscon: Allow property as NULL in syscon_regmap_lookup_by_phandle") +Signed-off-by: Peter Griffin +Link: https://lore.kernel.org/r/20240220115012.471689-2-peter.griffin@linaro.org +Signed-off-by: Lee Jones +Acked-by: Takashi Iwai + +--- + drivers/mfd/syscon.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c +index c9550368d9ea..7d0e91164cba 100644 +--- a/drivers/mfd/syscon.c ++++ b/drivers/mfd/syscon.c +@@ -238,7 +238,9 @@ struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np, + return ERR_PTR(-ENODEV); + + regmap = syscon_node_to_regmap(syscon_np); +- of_node_put(syscon_np); ++ ++ if (property) ++ of_node_put(syscon_np); + + return regmap; + } +-- +2.43.0 + diff --git a/patches.suse/nilfs2-fix-failure-to-detect-DAT-corruption-in-btree.patch b/patches.suse/nilfs2-fix-failure-to-detect-DAT-corruption-in-btree.patch new file mode 100644 index 0000000..d62c689 --- /dev/null +++ b/patches.suse/nilfs2-fix-failure-to-detect-DAT-corruption-in-btree.patch @@ -0,0 +1,131 @@ +From f2f26b4a84a0ef41791bd2d70861c8eac748f4ba Mon Sep 17 00:00:00 2001 +From: Ryusuke Konishi +Date: Wed, 13 Mar 2024 19:58:26 +0900 +Subject: [PATCH] nilfs2: fix failure to detect DAT corruption in btree and direct mappings +Git-commit: f2f26b4a84a0ef41791bd2d70861c8eac748f4ba +Patch-mainline: v6.9-rc1 +References: git-fixes + +Patch series "nilfs2: fix kernel bug at submit_bh_wbc()". + +This resolves a kernel BUG reported by syzbot. Since there are two +flaws involved, I've made each one a separate patch. + +The first patch alone resolves the syzbot-reported bug, but I think +both fixes should be sent to stable, so I've tagged them as such. + + +This patch (of 2): + +Syzbot has reported a kernel bug in submit_bh_wbc() when writing file data +to a nilfs2 file system whose metadata is corrupted. + +There are two flaws involved in this issue. + +The first flaw is that when nilfs_get_block() locates a data block using +btree or direct mapping, if the disk address translation routine +nilfs_dat_translate() fails with internal code -ENOENT due to DAT metadata +corruption, it can be passed back to nilfs_get_block(). This causes +nilfs_get_block() to misidentify an existing block as non-existent, +causing both data block lookup and insertion to fail inconsistently. + +The second flaw is that nilfs_get_block() returns a successful status in +this inconsistent state. This causes the caller __block_write_begin_int() +or others to request a read even though the buffer is not mapped, +resulting in a BUG_ON check for the BH_Mapped flag in submit_bh_wbc() +failing. + +This fixes the first issue by changing the return value to code -EINVAL +when a conversion using DAT fails with code -ENOENT, avoiding the +conflicting condition that leads to the kernel bug described above. Here, +code -EINVAL indicates that metadata corruption was detected during the +block lookup, which will be properly handled as a file system error and +converted to -EIO when passing through the nilfs2 bmap layer. + +Link: https://lkml.kernel.org/r/20240313105827.5296-1-konishi.ryusuke@gmail.com +Link: https://lkml.kernel.org/r/20240313105827.5296-2-konishi.ryusuke@gmail.com +Fixes: c3a7abf06ce7 ("nilfs2: support contiguous lookup of blocks") +Signed-off-by: Ryusuke Konishi +Reported-by: syzbot+cfed5b56649bddf80d6e@syzkaller.appspotmail.com +Closes: https://syzkaller.appspot.com/bug?extid=cfed5b56649bddf80d6e +Tested-by: Ryusuke Konishi +Cc: +Signed-off-by: Andrew Morton +Acked-by: Takashi Iwai + +--- + fs/nilfs2/btree.c | 9 +++++++-- + fs/nilfs2/direct.c | 9 +++++++-- + 2 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c +index 13592e82eaf6..65659fa0372e 100644 +--- a/fs/nilfs2/btree.c ++++ b/fs/nilfs2/btree.c +@@ -724,7 +724,7 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree, + dat = nilfs_bmap_get_dat(btree); + ret = nilfs_dat_translate(dat, ptr, &blocknr); + if (ret < 0) +- goto out; ++ goto dat_error; + ptr = blocknr; + } + cnt = 1; +@@ -743,7 +743,7 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree, + if (dat) { + ret = nilfs_dat_translate(dat, ptr2, &blocknr); + if (ret < 0) +- goto out; ++ goto dat_error; + ptr2 = blocknr; + } + if (ptr2 != ptr + cnt || ++cnt == maxblocks) +@@ -781,6 +781,11 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree, + out: + nilfs_btree_free_path(path); + return ret; ++ ++ dat_error: ++ if (ret == -ENOENT) ++ ret = -EINVAL; /* Notify bmap layer of metadata corruption */ ++ goto out; + } + + static void nilfs_btree_promote_key(struct nilfs_bmap *btree, +diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c +index 4c85914f2abc..893ab36824cc 100644 +--- a/fs/nilfs2/direct.c ++++ b/fs/nilfs2/direct.c +@@ -66,7 +66,7 @@ static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct, + dat = nilfs_bmap_get_dat(direct); + ret = nilfs_dat_translate(dat, ptr, &blocknr); + if (ret < 0) +- return ret; ++ goto dat_error; + ptr = blocknr; + } + +@@ -79,7 +79,7 @@ static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct, + if (dat) { + ret = nilfs_dat_translate(dat, ptr2, &blocknr); + if (ret < 0) +- return ret; ++ goto dat_error; + ptr2 = blocknr; + } + if (ptr2 != ptr + cnt) +@@ -87,6 +87,11 @@ static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct, + } + *ptrp = ptr; + return cnt; ++ ++ dat_error: ++ if (ret == -ENOENT) ++ ret = -EINVAL; /* Notify bmap layer of metadata corruption */ ++ return ret; + } + + static __u64 +-- +2.43.0 + diff --git a/patches.suse/nilfs2-prevent-kernel-bug-at-submit_bh_wbc.patch b/patches.suse/nilfs2-prevent-kernel-bug-at-submit_bh_wbc.patch new file mode 100644 index 0000000..72800bf --- /dev/null +++ b/patches.suse/nilfs2-prevent-kernel-bug-at-submit_bh_wbc.patch @@ -0,0 +1,44 @@ +From 269cdf353b5bdd15f1a079671b0f889113865f20 Mon Sep 17 00:00:00 2001 +From: Ryusuke Konishi +Date: Wed, 13 Mar 2024 19:58:27 +0900 +Subject: [PATCH] nilfs2: prevent kernel bug at submit_bh_wbc() +Git-commit: 269cdf353b5bdd15f1a079671b0f889113865f20 +Patch-mainline: v6.9-rc1 +References: git-fixes + +Fix a bug where nilfs_get_block() returns a successful status when +searching and inserting the specified block both fail inconsistently. If +this inconsistent behavior is not due to a previously fixed bug, then an +unexpected race is occurring, so return a temporary error -EAGAIN instead. + +This prevents callers such as __block_write_begin_int() from requesting a +read into a buffer that is not mapped, which would cause the BUG_ON check +for the BH_Mapped flag in submit_bh_wbc() to fail. + +Link: https://lkml.kernel.org/r/20240313105827.5296-3-konishi.ryusuke@gmail.com +Fixes: 1f5abe7e7dbc ("nilfs2: replace BUG_ON and BUG calls triggerable from ioctl") +Signed-off-by: Ryusuke Konishi +Cc: +Signed-off-by: Andrew Morton +Acked-by: Takashi Iwai + +--- + fs/nilfs2/inode.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c +index a475095a5e80..7340a01d80e1 100644 +--- a/fs/nilfs2/inode.c ++++ b/fs/nilfs2/inode.c +@@ -112,7 +112,7 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff, + "%s (ino=%lu): a race condition while inserting a data block at offset=%llu", + __func__, inode->i_ino, + (unsigned long long)blkoff); +- err = 0; ++ err = -EAGAIN; + } + nilfs_transaction_abort(inode->i_sb); + goto out; +-- +2.43.0 + diff --git a/patches.suse/pinctrl-mediatek-Drop-bogus-slew-rate-register-range.patch b/patches.suse/pinctrl-mediatek-Drop-bogus-slew-rate-register-range.patch new file mode 100644 index 0000000..b14f158 --- /dev/null +++ b/patches.suse/pinctrl-mediatek-Drop-bogus-slew-rate-register-range.patch @@ -0,0 +1,40 @@ +From e15ab05a6b3ed42f2f43f8bd1a1abdbde64afecd Mon Sep 17 00:00:00 2001 +From: Chen-Yu Tsai +Date: Wed, 31 Jan 2024 15:19:08 +0800 +Subject: [PATCH] pinctrl: mediatek: Drop bogus slew rate register range for MT8192 +Git-commit: e15ab05a6b3ed42f2f43f8bd1a1abdbde64afecd +Patch-mainline: v6.9-rc1 +References: git-fixes + +The MT8192 does not support configuring pin slew rate. This is evident +from both the datasheet, and the fact that the driver points the slew +rate register range at the GPIO direction register range. + +Drop the bogus setting. + +Fixes: d32f38f2a8fc ("pinctrl: mediatek: Add pinctrl driver for mt8192") +Signed-off-by: Chen-Yu Tsai +Reviewed-by: AngeloGioacchino Del Regno +Link: https://lore.kernel.org/r/20240131071910.3950450-2-wenst@chromium.org +Signed-off-by: Linus Walleij +Acked-by: Takashi Iwai + +--- + drivers/pinctrl/mediatek/pinctrl-mt8192.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/drivers/pinctrl/mediatek/pinctrl-mt8192.c b/drivers/pinctrl/mediatek/pinctrl-mt8192.c +index e3a76381f7f4..3f8a9dbcb704 100644 +--- a/drivers/pinctrl/mediatek/pinctrl-mt8192.c ++++ b/drivers/pinctrl/mediatek/pinctrl-mt8192.c +@@ -1379,7 +1379,6 @@ static const struct mtk_pin_reg_calc mt8192_reg_cals[PINCTRL_PIN_REG_MAX] = { + [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt8192_pin_dir_range), + [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt8192_pin_di_range), + [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt8192_pin_do_range), +- [PINCTRL_PIN_REG_SR] = MTK_RANGE(mt8192_pin_dir_range), + [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt8192_pin_smt_range), + [PINCTRL_PIN_REG_IES] = MTK_RANGE(mt8192_pin_ies_range), + [PINCTRL_PIN_REG_PU] = MTK_RANGE(mt8192_pin_pu_range), +-- +2.43.0 + diff --git a/patches.suse/platform-mellanox-mlxreg-hotplug-Remove-redundant-NU.patch b/patches.suse/platform-mellanox-mlxreg-hotplug-Remove-redundant-NU.patch new file mode 100644 index 0000000..eb39d02 --- /dev/null +++ b/patches.suse/platform-mellanox-mlxreg-hotplug-Remove-redundant-NU.patch @@ -0,0 +1,59 @@ +From 30f96b2cb70d882515efae4d4af698f18a65c75e Mon Sep 17 00:00:00 2001 +From: Daniil Dulov +Date: Wed, 6 Mar 2024 18:38:04 +0300 +Subject: [PATCH] platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check +Mime-version: 1.0 +Content-type: text/plain; charset=UTF-8 +Content-transfer-encoding: 8bit +Git-commit: 30f96b2cb70d882515efae4d4af698f18a65c75e +Patch-mainline: v6.9-rc1 +References: git-fixes + +Pointer item is checked fo NULL at mlxreg_hotplug_work_helper() and then +it is dereferenced to produce dev_err(). +This pointer is also dereferenced before calling this function and should +never be NULL except some piece of hardware is broken as it is said in +the comment before the check. So, this check can be safely removed. + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Fixes: c6acad68eb2d ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface") +Signed-off-by: Daniil Dulov +Reviewed-by: Vadim Pasternak +Link: https://lore.kernel.org/r/20240306153804.6509-1-d.dulov@aladdin.ru +Reviewed-by: Ilpo Järvinen +Signed-off-by: Ilpo Järvinen +Acked-by: Takashi Iwai + +--- + drivers/platform/mellanox/mlxreg-hotplug.c | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c +index 5c022b258f91..0ce9fff1f7d4 100644 +--- a/drivers/platform/mellanox/mlxreg-hotplug.c ++++ b/drivers/platform/mellanox/mlxreg-hotplug.c +@@ -348,20 +348,6 @@ mlxreg_hotplug_work_helper(struct mlxreg_hotplug_priv_data *priv, + u32 regval, bit; + int ret; + +- /* +- * Validate if item related to received signal type is valid. +- * It should never happen, excepted the situation when some +- * piece of hardware is broken. In such situation just produce +- * error message and return. Caller must continue to handle the +- * signals from other devices if any. +- */ +- if (unlikely(!item)) { +- dev_err(priv->dev, "False signal: at offset:mask 0x%02x:0x%02x.\n", +- item->reg, item->mask); +- +- return; +- } +- + /* Mask event. */ + ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_MASK_OFF, + 0); +-- +2.43.0 + diff --git a/patches.suse/sched-rt-Disallow-writing-invalid-values-to-sched_rt.patch b/patches.suse/sched-rt-Disallow-writing-invalid-values-to-sched_rt.patch new file mode 100644 index 0000000..75b3ca3 --- /dev/null +++ b/patches.suse/sched-rt-Disallow-writing-invalid-values-to-sched_rt.patch @@ -0,0 +1,104 @@ +From 0766e7317aab461889ae7fbb0da83fc70840f5ca Mon Sep 17 00:00:00 2001 +From: Cyril Hrubis +Date: Mon, 2 Oct 2023 13:55:51 +0200 +Subject: [PATCH] sched/rt: Disallow writing invalid values to + sched_rt_period_us +Patch-mainline: v6.7-rc1 +Git-commit: 079be8fc630943d9fc70a97807feb73d169ee3fc +References: bsc#1220176 + +commit 079be8fc630943d9fc70a97807feb73d169ee3fc upstream. + +The validation of the value written to sched_rt_period_us was broken +because: + + - the sysclt_sched_rt_period is declared as unsigned int + - parsed by proc_do_intvec() + - the range is asserted after the value parsed by proc_do_intvec() + +Because of this negative values written to the file were written into a +unsigned integer that were later on interpreted as large positive +integers which did passed the check: + + if (sysclt_sched_rt_period <= 0) + return EINVAL; + +This commit fixes the parsing by setting explicit range for both +perid_us and runtime_us into the sched_rt_sysctls table and processes +the values with proc_dointvec_minmax() instead. + +Alternatively if we wanted to use full range of unsigned int for the +period value we would have to split the proc_handler and use +proc_douintvec() for it however even the +Documentation/scheduller/sched-rt-group.rst describes the range as 1 to +INT_MAX. + +As far as I can tell the only problem this causes is that the sysctl +file allows writing negative values which when read back may confuse +userspace. + +There is also a LTP test being submitted for these sysctl files at: + + http://patchwork.ozlabs.org/project/ltp/patch/20230901144433.2526-1-chrubis@suse.cz/ + +Signed-off-by: Cyril Hrubis +Signed-off-by: Ingo Molnar +Link: https://lore.kernel.org/r/20231002115553.3007-2-chrubis@suse.cz +[ pvorel: rebased for 5.15, 5.10 ] +[ pvorel: backported 0766e7317aab461889ae7fbb0da83fc70840f5ca from stable-5.15.150 ] +Reviewed-by: Petr Vorel +Signed-off-by: Petr Vorel +Signed-off-by: Greg Kroah-Hartman +--- + kernel/sched/rt.c | 5 +---- + kernel/sysctl.c | 4 ++++ + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c +index b05684202b20..5fc99dce5145 100644 +--- a/kernel/sched/rt.c ++++ b/kernel/sched/rt.c +@@ -2806,9 +2806,6 @@ static int sched_rt_global_constraints(void) + + static int sched_rt_global_validate(void) + { +- if (sysctl_sched_rt_period <= 0) +- return -EINVAL; +- + if ((sysctl_sched_rt_runtime != RUNTIME_INF) && + ((sysctl_sched_rt_runtime > sysctl_sched_rt_period) || + ((u64)sysctl_sched_rt_runtime * +@@ -2839,7 +2836,7 @@ int sched_rt_handler(struct ctl_table *table, int write, void *buffer, + old_period = sysctl_sched_rt_period; + old_runtime = sysctl_sched_rt_runtime; + +- ret = proc_dointvec(table, write, buffer, lenp, ppos); ++ ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); + + if (!ret && write) { + ret = sched_rt_global_validate(); +diff --git a/kernel/sysctl.c b/kernel/sysctl.c +index 928798f89ca1..4554e80c4272 100644 +--- a/kernel/sysctl.c ++++ b/kernel/sysctl.c +@@ -1821,6 +1821,8 @@ static struct ctl_table kern_table[] = { + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = sched_rt_handler, ++ .extra1 = SYSCTL_ONE, ++ .extra2 = SYSCTL_INT_MAX, + }, + { + .procname = "sched_rt_runtime_us", +@@ -1828,6 +1830,8 @@ static struct ctl_table kern_table[] = { + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = sched_rt_handler, ++ .extra1 = SYSCTL_NEG_ONE, ++ .extra2 = SYSCTL_INT_MAX, + }, + { + .procname = "sched_deadline_period_max_us", +-- +2.35.3 + diff --git a/patches.suse/sched-rt-sysctl_sched_rr_timeslice-show-default-time.patch b/patches.suse/sched-rt-sysctl_sched_rr_timeslice-show-default-time.patch new file mode 100644 index 0000000..8fef48b --- /dev/null +++ b/patches.suse/sched-rt-sysctl_sched_rr_timeslice-show-default-time.patch @@ -0,0 +1,52 @@ +From 50349893930ab4ac29465abf9c9791c5b34a3210 Mon Sep 17 00:00:00 2001 +From: Cyril Hrubis +Date: Wed, 2 Aug 2023 17:19:06 +0200 +Subject: [PATCH] sched/rt: sysctl_sched_rr_timeslice show default timeslice + after reset +Patch-mainline: v6.6-rc1 +Git-commit: c1fc6484e1fb7cc2481d169bfef129a1b0676abe +References: bsc#1220176 + +commit c1fc6484e1fb7cc2481d169bfef129a1b0676abe upstream. + +The sched_rr_timeslice can be reset to default by writing value that is +<= 0. However after reading from this file we always got the last value +written, which is not useful at all. + +$ echo -1 > /proc/sys/kernel/sched_rr_timeslice_ms +$ cat /proc/sys/kernel/sched_rr_timeslice_ms +-1 + +Fix this by setting the variable that holds the sysctl file value to the +jiffies_to_msecs(RR_TIMESLICE) in case that <= 0 value was written. + +Signed-off-by: Cyril Hrubis +Signed-off-by: Peter Zijlstra (Intel) +Reviewed-by: Petr Vorel +Acked-by: Mel Gorman +Tested-by: Petr Vorel +Cc: Mahmoud Adam +Link: https://lore.kernel.org/r/20230802151906.25258-3-chrubis@suse.cz +Signed-off-by: Greg Kroah-Hartman +[ pvorel: backported 50349893930ab4ac29465abf9c9791c5b34a3210 from stable-5.15.150 ] +--- + kernel/sched/rt.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c +index 7045595aacac..2481219100af 100644 +--- a/kernel/sched/rt.c ++++ b/kernel/sched/rt.c +@@ -2883,6 +2883,9 @@ int sched_rr_handler(struct ctl_table *table, int write, void *buffer, + sched_rr_timeslice = + sysctl_sched_rr_timeslice <= 0 ? RR_TIMESLICE : + msecs_to_jiffies(sysctl_sched_rr_timeslice); ++ ++ if (sysctl_sched_rr_timeslice <= 0) ++ sysctl_sched_rr_timeslice = jiffies_to_msecs(RR_TIMESLICE); + } + mutex_unlock(&mutex); + +-- +2.35.3 + diff --git a/patches.suse/x86-entry-ia32-Ensure-s32-is-sign-extended-to-s64.patch b/patches.suse/x86-entry-ia32-Ensure-s32-is-sign-extended-to-s64.patch index 5835c45..abbba9e 100644 --- a/patches.suse/x86-entry-ia32-Ensure-s32-is-sign-extended-to-s64.patch +++ b/patches.suse/x86-entry-ia32-Ensure-s32-is-sign-extended-to-s64.patch @@ -1,7 +1,8 @@ From: Richard Palethorpe Date: Mon, 27 Sep 2021 17:19:55 +0100 Subject: x86/entry/ia32: Ensure s32 is sign extended to s64 -Patch-mainline: Not yet, resubmitted upstream +Git-commit: 56062d60f117dccfb5281869e0ab61e090baf864 +Patch-mainline: v6.8-rc2 References: bsc#1193285 Presently ia32 registers stored in ptregs are unconditionally cast to diff --git a/patches.suse/x86-mmio-Disable-KVM-mitigation-when-X86_FEATURE_CLEAR_CPU.patch b/patches.suse/x86-mmio-Disable-KVM-mitigation-when-X86_FEATURE_CLEAR_CPU.patch new file mode 100644 index 0000000..9bd6c47 --- /dev/null +++ b/patches.suse/x86-mmio-Disable-KVM-mitigation-when-X86_FEATURE_CLEAR_CPU.patch @@ -0,0 +1,59 @@ +From: Pawan Gupta +Date: Mon, 11 Mar 2024 12:29:43 -0700 +Subject: x86/mmio: Disable KVM mitigation when X86_FEATURE_CLEAR_CPU_BUF is + set +Git-commit: e95df4ec0c0c9791941f112db699fae794b9862a +Patch-mainline: v6.9-rc1 +References: bsc#1213456 CVE-2023-28746 + +Currently MMIO Stale Data mitigation for CPUs not affected by MDS/TAA is +to only deploy VERW at VMentry by enabling mmio_stale_data_clear static +branch. No mitigation is needed for kernel->user transitions. If such +CPUs are also affected by RFDS, its mitigation may set +X86_FEATURE_CLEAR_CPU_BUF to deploy VERW at kernel->user and VMentry. +This could result in duplicate VERW at VMentry. + +Fix this by disabling mmio_stale_data_clear static branch when +X86_FEATURE_CLEAR_CPU_BUF is enabled. + +Signed-off-by: Pawan Gupta +Signed-off-by: Dave Hansen +Reviewed-by: Dave Hansen +Acked-by: Nikolay Borisov +--- + arch/x86/kernel/cpu/bugs.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c +index 48d049cd74e7..cd6ac89c1a0d 100644 +--- a/arch/x86/kernel/cpu/bugs.c ++++ b/arch/x86/kernel/cpu/bugs.c +@@ -422,6 +422,13 @@ static void __init mmio_select_mitigation(void) + if (boot_cpu_has_bug(X86_BUG_MDS) || (boot_cpu_has_bug(X86_BUG_TAA) && + boot_cpu_has(X86_FEATURE_RTM))) + setup_force_cpu_cap(X86_FEATURE_CLEAR_CPU_BUF); ++ ++ /* ++ * X86_FEATURE_CLEAR_CPU_BUF could be enabled by other VERW based ++ * mitigations, disable KVM-only mitigation in that case. ++ */ ++ if (boot_cpu_has(X86_FEATURE_CLEAR_CPU_BUF)) ++ static_branch_disable(&mmio_stale_data_clear); + else + static_branch_enable(&mmio_stale_data_clear); + +@@ -498,8 +505,11 @@ static void __init md_clear_update_mitigation(void) + taa_mitigation = TAA_MITIGATION_VERW; + taa_select_mitigation(); + } +- if (mmio_mitigation == MMIO_MITIGATION_OFF && +- boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA)) { ++ /* ++ * MMIO_MITIGATION_OFF is not checked here so that mmio_stale_data_clear ++ * gets updated correctly as per X86_FEATURE_CLEAR_CPU_BUF state. ++ */ ++ if (boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA)) { + mmio_mitigation = MMIO_MITIGATION_VERW; + mmio_select_mitigation(); + } + diff --git a/patches.suse/x86-rfds-Mitigate-Register-File-Data-Sampling-RFDS.patch b/patches.suse/x86-rfds-Mitigate-Register-File-Data-Sampling-RFDS.patch index 0c2d557..afdb73a 100644 --- a/patches.suse/x86-rfds-Mitigate-Register-File-Data-Sampling-RFDS.patch +++ b/patches.suse/x86-rfds-Mitigate-Register-File-Data-Sampling-RFDS.patch @@ -1,7 +1,8 @@ From: Pawan Gupta Date: Tue, 5 Mar 2024 15:21:53 +0200 Subject: x86/rfds: Mitigate Register File Data Sampling (RFDS) -Patch-mainline: Not yet, embargo +Git-commit: 8076fcde016c9c0e0660543e67bff86cb48a7c9c +Patch-mainline: v6.9-rc1 References: bsc#1213456 CVE-2023-28746 RFDS is a CPU vulnerability that may allow userspace to infer kernel @@ -33,15 +34,15 @@ Acked-by: Nikolay Borisov arch/x86/kernel/cpu/common.c | 39 +++++++++- drivers/base/cpu.c | 8 ++ include/linux/cpu.h | 2 - Documentation/ABI/testing/sysfs-devices-system-cpu | 1 + Documentation/ABI/testing/sysfs-devices-system-cpu | 1 Documentation/admin-guide/kernel-parameters.txt | 22 +++++ arch/x86/Kconfig | 11 ++ - arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/cpufeatures.h | 1 arch/x86/include/asm/msr-index.h | 8 ++ arch/x86/kernel/cpu/bugs.c | 80 ++++++++++++++++++++- arch/x86/kernel/cpu/common.c | 39 +++++++++- drivers/base/cpu.c | 8 ++ - include/linux/cpu.h | 2 + include/linux/cpu.h | 2 9 files changed, 166 insertions(+), 6 deletions(-) --- a/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -59,7 +60,7 @@ Acked-by: Nikolay Borisov @@ -1059,6 +1059,27 @@ The filter can be disabled or changed to another driver later using sysfs. - + + reg_file_data_sampling= + [X86] Controls mitigation for Register File Data + Sampling (RFDS) vulnerability. RFDS is a CPU @@ -95,9 +96,9 @@ Acked-by: Nikolay Borisov --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -504,6 +504,17 @@ config GDS_FORCE_MITIGATION - + If in doubt, say N. - + +config MITIGATION_RFDS + bool "RFDS Mitigation" + depends on CPU_SUP_INTEL @@ -109,13 +110,13 @@ Acked-by: Nikolay Borisov + stored in floating point, vector and integer registers. + See also + - + config X86_CPU_RESCTRL bool "x86 CPU resource control support" --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -483,4 +483,5 @@ - + /* BUG word 2 */ #define X86_BUG_DIV0 X86_BUG(1*32 + 0) /* AMD DIV0 speculation bug */ +#define X86_BUG_RFDS X86_BUG(1*32 + 1) /* CPU is vulnerable to Register File Data Sampling */ @@ -134,14 +135,14 @@ Acked-by: Nikolay Borisov + * VERW clears CPU Register + * File. + */ - + #define MSR_IA32_BBL_CR_CTL 0x00000119 #define MSR_IA32_BBL_CR_CTL3 0x0000011e --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -471,6 +471,58 @@ static int __init mmio_stale_data_parse_ early_param("mmio_stale_data", mmio_stale_data_parse_cmdline); - + #undef pr_fmt +#define pr_fmt(fmt) "Register File Data Sampling: " fmt + @@ -196,7 +197,7 @@ Acked-by: Nikolay Borisov + +#undef pr_fmt #define pr_fmt(fmt) "" fmt - + static void __init md_clear_update_mitigation(void) @@ -500,6 +552,11 @@ static void __init md_clear_update_mitig mmio_mitigation = MMIO_MITIGATION_VERW; @@ -217,14 +218,14 @@ Acked-by: Nikolay Borisov + if (boot_cpu_has_bug(X86_BUG_RFDS)) + pr_info("Register File Data Sampling: %s\n", rfds_strings[rfds_mitigation]); } - + static void __init md_clear_select_mitigation(void) @@ -516,11 +575,12 @@ static void __init md_clear_select_mitig mds_select_mitigation(); taa_select_mitigation(); mmio_select_mitigation(); + rfds_select_mitigation(); - + /* - * As MDS, TAA and MMIO Stale Data mitigations are inter-related, update - * and print their mitigation after MDS, TAA and MMIO Stale Data @@ -238,7 +239,7 @@ Acked-by: Nikolay Borisov @@ -2506,6 +2566,11 @@ static ssize_t mmio_stale_data_show_stat sched_smt_active() ? "vulnerable" : "disabled"); } - + +static ssize_t rfds_show_state(char *buf) +{ + return sysfs_emit(buf, "%s\n", rfds_strings[rfds_mitigation]); @@ -250,7 +251,7 @@ Acked-by: Nikolay Borisov @@ -2666,6 +2731,10 @@ static ssize_t cpu_show_common(struct de case X86_BUG_GDS: return gds_show_state(buf); - + + case X86_BUG_RFDS: + return rfds_show_state(buf); + @@ -276,8 +277,8 @@ Acked-by: Nikolay Borisov #define GDS BIT(6) +/* CPU is affected by Register File Data Sampling */ +#define RFDS BIT(7) - - + + static const struct x86_cpu_id cpu_vuln_blacklist[] __initconst = { @@ -1249,9 +1251,18 @@ static const struct x86_cpu_id cpu_vuln_ VULNBL_INTEL_STEPPINGS(TIGERLAKE, X86_STEPPING_ANY, GDS), @@ -298,13 +299,13 @@ Acked-by: Nikolay Borisov + VULNBL_INTEL_STEPPINGS(ATOM_GOLDMONT, X86_STEPPING_ANY, RFDS), + VULNBL_INTEL_STEPPINGS(ATOM_GOLDMONT_D, X86_STEPPING_ANY, RFDS), + VULNBL_INTEL_STEPPINGS(ATOM_GOLDMONT_PLUS, X86_STEPPING_ANY, RFDS), - + VULNBL_AMD(0x15, RETBLEED), VULNBL_AMD(0x16, RETBLEED), @@ -1285,6 +1296,25 @@ static bool arch_cap_mmio_immune(u64 ia3 ia32_cap & ARCH_CAP_SBDR_SSDP_NO); } - + +static bool __init vulnerable_to_rfds(u64 ia32_cap) +{ + /* The "immunity" bit trumps everything else: */ @@ -330,19 +331,19 @@ Acked-by: Nikolay Borisov @@ -1396,6 +1426,9 @@ static void __init cpu_set_bug_bits(stru boot_cpu_has(X86_FEATURE_AVX)) setup_force_cpu_bug(X86_BUG_GDS); - + + if (vulnerable_to_rfds(ia32_cap)) + setup_force_cpu_bug(X86_BUG_RFDS); + if (cpu_matches(cpu_vuln_whitelist, NO_MELTDOWN)) return; - + --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -588,6 +588,12 @@ ssize_t __weak cpu_show_gds(struct devic return sysfs_emit(buf, "Not affected\n"); } - + +ssize_t __weak cpu_show_reg_file_data_sampling(struct device *dev, + struct device_attribute *attr, char *buf) +{ @@ -357,7 +358,7 @@ Acked-by: Nikolay Borisov static DEVICE_ATTR(spec_rstack_overflow, 0444, cpu_show_spec_rstack_overflow, NULL); static DEVICE_ATTR(gather_data_sampling, 0444, cpu_show_gds, NULL); +static DEVICE_ATTR(reg_file_data_sampling, 0444, cpu_show_reg_file_data_sampling, NULL); - + static struct attribute *cpu_root_vulnerabilities_attrs[] = { &dev_attr_meltdown.attr, @@ -616,6 +623,7 @@ static struct attribute *cpu_root_vulner @@ -367,7 +368,7 @@ Acked-by: Nikolay Borisov + &dev_attr_reg_file_data_sampling.attr, NULL }; - + --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -75,6 +75,8 @@ extern ssize_t cpu_show_spec_rstack_over @@ -376,6 +377,6 @@ Acked-by: Nikolay Borisov struct device_attribute *attr, char *buf); +extern ssize_t cpu_show_reg_file_data_sampling(struct device *dev, + struct device_attribute *attr, char *buf); - + extern __printf(4, 5) struct device *cpu_device_create(struct device *parent, void *drvdata, diff --git a/series.conf b/series.conf index fadb437..3e2adbc 100644 --- a/series.conf +++ b/series.conf @@ -10668,6 +10668,8 @@ patches.suse/arm64-zynqmp-Do-not-duplicate-flash-partition-label-.patch patches.suse/arm64-zynqmp-Fix-serial-compatible-string.patch patches.suse/arm64-dts-rockchip-Disable-CDN-DP-on-Pinebook-Pro.patch + patches.suse/arm64-dts-rockchip-add-ES8316-codec-for-ROCK-Pi-4.patch + patches.suse/arm64-dts-rockchip-add-SPDIF-node-for-ROCK-Pi-4.patch patches.suse/arm64-dts-rockchip-fix-rk3568-mbi-alias.patch patches.suse/arm64-dts-rockchip-Fix-GPU-register-width-for-RK3328.patch patches.suse/arm64-dts-renesas-beacon-Fix-Ethernet-PHY-mode.patch @@ -35945,6 +35947,7 @@ patches.suse/ARM-dts-kirkwood-lsxl-remove-first-ethernet-port.patch patches.suse/ARM-dts-armada-38x-Add-gpio-ranges-for-pin-muxing.patch patches.suse/ARM-dts-turris-omnia-Add-label-for-wan-port.patch + patches.suse/arm64-dts-rockchip-fix-regulator-name-on-rk3399-rock-4.patch patches.suse/ARM-dts-exynos-correct-s5k6a3-reset-polarity-on-Mida.patch patches.suse/ARM-dts-exynos-fix-polarity-of-VBUS-GPIO-of-Origen.patch patches.suse/ARM-Drop-CMDLINE_-dependency-on-ATAGS.patch @@ -42339,6 +42342,8 @@ patches.suse/arm64-entry-Simplify-tramp_alias-macro-and-tramp_exit-routine.patch patches.suse/arm64-xor-neon-mark-xor_arm64_neon_-static.patch patches.suse/arm64-module-plts-inline-linux-moduleloader.h.patch + patches.suse/arm64-set-__exception_irq_entry-with-__irq_entry-as-a-default.patch + patches.suse/arm64-mm-fix-VA-range-sanity-check.patch patches.suse/ACPI-button-Add-lid-disable-DMI-quirk-for-Nextbook-A.patch patches.suse/ACPI-video-Add-backlight-native-DMI-quirk-for-Apple-.patch patches.suse/ACPI-video-Add-backlight-native-DMI-quirk-for-Lenovo-bd5d93d.patch @@ -43347,6 +43352,7 @@ patches.suse/cpu-SMT-Allow-enabling-partial-SMT-states-via-sysfs.patch patches.suse/x86-sev-Make-enc_dec_hypercall-accept-a-size-instead-of-npages patches.suse/sched-rt-Fix-sysctl_sched_rr_timeslice-intial-value.patch + patches.suse/sched-rt-sysctl_sched_rr_timeslice-show-default-time.patch patches.suse/x86-cpu-fix-amd_check_microcode-declaration.patch patches.suse/x86-alternative-add-a-_alt_reloc_selftest-prototype.patch patches.suse/s390-ipl-add-missing-secure-has_secure-file-to-ipl-type-unknown.patch @@ -44245,6 +44251,7 @@ patches.suse/x86-cpu-Clear-SVM-feature-if-disabled-by-BIOS.patch patches.suse/x86-amd_nb-Add-AMD-Family-MI300-PCI-IDs.patch patches.suse/cleanup-Make-no_free_ptr-__must_check.patch + patches.suse/sched-rt-Disallow-writing-invalid-values-to-sched_rt.patch patches.suse/x86-boot-fix-incorrect-startup_gdt_descr-size.patch patches.suse/clocksource-drivers-timer-imx-gpt-Fix-potential-memo.patch patches.suse/clocksource-drivers-timer-atmel-tcb-Fix-initializati.patch @@ -45330,6 +45337,7 @@ patches.suse/drm-bridge-anx7625-Ensure-bridge-is-suspended-in-dis.patch patches.suse/ahci-asm1166-correct-count-of-reported-ports.patch patches.suse/platform-x86-touchscreen_dmi-Add-info-for-the-TECLAS.patch + patches.suse/x86-entry-ia32-Ensure-s32-is-sign-extended-to-s64.patch patches.suse/clocksource-Skip-watchdog-check-for-large-watchdog-i.patch patches.suse/tracing-trigger-Fix-to-return-error-if-failed-to-alloc-snapshot.patch patches.suse/scsi-isci-Fix-an-error-code-problem-in-isci_io_request_build.patch @@ -45493,6 +45501,7 @@ patches.suse/drm-syncobj-call-drm_syncobj_fence_add_wait-when-WAI.patch patches.suse/drm-amd-display-Fix-memory-leak-in-dm_sw_fini.patch patches.suse/s390-use-the-correct-count-for-__iowrite64_copy.patch + patches.suse/arm64-dts-rockchip-set-num-cs-property-for-spi-on-px30.patch patches.suse/i2c-imx-when-being-a-target-mark-the-last-read-as-pr.patch patches.suse/PCI-MSI-Prevent-MSI-hardware-interrupt-number-truncation.patch patches.suse/x86-bugs-Add-asm-helpers-for-executing-VERW.patch @@ -45570,6 +45579,12 @@ patches.suse/RAS-AMD-FMPM-Save-SPA-values.patch patches.suse/RAS-AMD-FMPM-Add-debugfs-interface-to-print-record-entries.patch patches.suse/RAS-AMD-FMPM-Fix-off-by-one-when-unwinding-on-error.patch + patches.suse/x86-mmio-Disable-KVM-mitigation-when-X86_FEATURE_CLEAR_CPU.patch + patches.suse/Documentation-hw-vuln-Add-documentation-for-RFDS.patch + patches.suse/x86-rfds-Mitigate-Register-File-Data-Sampling-RFDS.patch + patches.suse/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch + patches.suse/arm64-dts-allwinner-h6-Add-RX-DMA-channel-for-SPDIF.patch + patches.suse/arm64-dts-imx8mm-venice-gw71xx-fix-USB-OTG-VBUS-2.patch patches.suse/doc-guide-kernel-doc-tell-about-object-like-macros.patch patches.suse/wifi-b43-Stop-wake-correct-queue-in-DMA-Tx-path-when.patch patches.suse/wifi-b43-Stop-wake-correct-queue-in-PIO-Tx-path-when.patch @@ -45637,6 +45652,34 @@ patches.suse/drm-amdgpu-Fix-missing-break-in-ATOM_ARG_IMM-Case-of.patch patches.suse/drm-etnaviv-Restore-some-id-values.patch patches.suse/drm-msm-dpu-add-division-of-drm_display_mode-s-hskew.patch + patches.suse/HID-amd_sfh-Update-HPD-sensor-structure-elements.patch + patches.suse/HID-lenovo-Add-middleclick_workaround-sysfs-knob-for.patch + patches.suse/pinctrl-mediatek-Drop-bogus-slew-rate-register-range.patch + patches.suse/mfd-syscon-Call-of_node_put-only-when-of_parse_phand.patch + patches.suse/mfd-altera-sysmgr-Call-of_node_put-only-when-of_pars.patch + patches.suse/backlight-lm3630a-Initialize-backlight_properties-on.patch + patches.suse/backlight-lm3630a-Don-t-set-bl-props.brightness-in-g.patch + patches.suse/backlight-da9052-Fully-initialize-backlight_properti.patch + patches.suse/backlight-lm3639-Fully-initialize-backlight_properti.patch + patches.suse/backlight-lp8788-Fully-initialize-backlight_properti.patch + patches.suse/leds-aw2013-Unlock-mutex-before-destroying-it.patch + patches.suse/platform-mellanox-mlxreg-hotplug-Remove-redundant-NU.patch + patches.suse/PCI-AER-Fix-rootport-attribute-paths-in-ABI-docs.patch + patches.suse/PCI-DPC-Print-all-TLP-Prefixes-not-just-the-first.patch + patches.suse/PCI-Mark-3ware-9650SE-Root-Port-Extended-Tags-as-bro.patch + patches.suse/PCI-P2PDMA-Fix-a-sleeping-issue-in-a-RCU-read-sectio.patch + patches.suse/PCI-switchtec-Fix-an-error-handling-path-in-switchte.patch + patches.suse/PCI-dwc-endpoint-Fix-advertised-resizable-BAR-size.patch + patches.suse/ALSA-ctxfi-avoid-casting-function-pointers.patch + patches.suse/ALSA-aw2-avoid-casting-function-pointers.patch + patches.suse/ALSA-seq-fix-function-cast-warnings.patch + patches.suse/ASoC-amd-acp-Add-missing-error-handling-in-sof-mach.patch + patches.suse/ASoC-meson-axg-tdm-interface-fix-mclk-setup-without-.patch + patches.suse/ASoC-meson-axg-tdm-interface-add-frame-rate-constrai.patch + patches.suse/ALSA-aaci-Delete-unused-variable-in-aaci_do_suspend.patch + patches.suse/ALSA-usb-audio-Stop-parsing-channels-bits-when-all-c.patch + patches.suse/nilfs2-fix-failure-to-detect-DAT-corruption-in-btree.patch + patches.suse/nilfs2-prevent-kernel-bug-at-submit_bh_wbc.patch # jejb/scsi for-next patches.suse/scsi-lpfc-Initialize-status-local-variable-in-lpfc_s.patch @@ -45763,12 +45806,6 @@ # x86 patches.suse/x86-apic-force-bigsmp-apic-on-IBM-EXA3-4.patch - patches.suse/x86-entry-ia32-Ensure-s32-is-sign-extended-to-s64.patch - - patches.suse/Documentation-hw-vuln-Add-documentation-for-RFDS.patch - patches.suse/x86-rfds-Mitigate-Register-File-Data-Sampling-RFDS.patch - patches.suse/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch - # s390x patches.suse/s390-qeth-remove-OSN-deprecation-notice.patch