From: Greg Kroah-Hartman Date: Tue, 8 Oct 2024 11:02:42 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v6.6.55~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f44e0c5e36f1b764c302c1bafd53204a827a4a0d;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: alsa-control-fix-leftover-snd_power_unref.patch crypto-octeontx-select-crypto_authenc.patch drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch drm-amd-display-revert-avoid-overflow-assignment.patch perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch --- diff --git a/queue-6.10/alsa-control-fix-leftover-snd_power_unref.patch b/queue-6.10/alsa-control-fix-leftover-snd_power_unref.patch new file mode 100644 index 00000000000..6c0ccb5cb34 --- /dev/null +++ b/queue-6.10/alsa-control-fix-leftover-snd_power_unref.patch @@ -0,0 +1,31 @@ +From fef1ac950c600ba50ef4d65ca03c8dae9be7f9ea Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 1 Aug 2024 08:42:01 +0200 +Subject: ALSA: control: Fix leftover snd_power_unref() + +From: Takashi Iwai + +commit fef1ac950c600ba50ef4d65ca03c8dae9be7f9ea upstream. + +One snd_power_unref() was forgotten and left at __snd_ctl_elem_info() +in the previous change for reorganizing the locking order. + +Fixes: fcc62b19104a ("ALSA: control: Take power_ref lock primarily") +Link: https://github.com/thesofproject/linux/pull/5127 +Link: https://patch.msgid.link/20240801064203.30284-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/core/control.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/sound/core/control.c ++++ b/sound/core/control.c +@@ -1165,7 +1165,6 @@ static int __snd_ctl_elem_info(struct sn + info->access = 0; + #endif + result = kctl->info(kctl, info); +- snd_power_unref(card); + if (result >= 0) { + snd_BUG_ON(info->access); + index_offset = snd_ctl_get_ioff(kctl, &info->id); diff --git a/queue-6.10/crypto-octeontx-select-crypto_authenc.patch b/queue-6.10/crypto-octeontx-select-crypto_authenc.patch new file mode 100644 index 00000000000..34a80f73a7b --- /dev/null +++ b/queue-6.10/crypto-octeontx-select-crypto_authenc.patch @@ -0,0 +1,40 @@ +From c398cb8eb0a263a1b7a18892d9f244751689675c Mon Sep 17 00:00:00 2001 +From: Herbert Xu +Date: Thu, 5 Sep 2024 10:21:49 +0800 +Subject: crypto: octeontx* - Select CRYPTO_AUTHENC + +From: Herbert Xu + +commit c398cb8eb0a263a1b7a18892d9f244751689675c upstream. + +Select CRYPTO_AUTHENC as the function crypto_authenec_extractkeys +may not be available without it. + +Fixes: 311eea7e37c4 ("crypto: octeontx - Fix authenc setkey") +Fixes: 7ccb750dcac8 ("crypto: octeontx2 - Fix authenc setkey") +Reported-by: kernel test robot +Closes: https://lore.kernel.org/oe-kbuild-all/202409042013.gT2ZI4wR-lkp@intel.com/ +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman +--- + drivers/crypto/marvell/Kconfig | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/crypto/marvell/Kconfig ++++ b/drivers/crypto/marvell/Kconfig +@@ -28,6 +28,7 @@ config CRYPTO_DEV_OCTEONTX_CPT + select CRYPTO_SKCIPHER + select CRYPTO_HASH + select CRYPTO_AEAD ++ select CRYPTO_AUTHENC + select CRYPTO_DEV_MARVELL + help + This driver allows you to utilize the Marvell Cryptographic +@@ -47,6 +48,7 @@ config CRYPTO_DEV_OCTEONTX2_CPT + select CRYPTO_SKCIPHER + select CRYPTO_HASH + select CRYPTO_AEAD ++ select CRYPTO_AUTHENC + select NET_DEVLINK + help + This driver allows you to utilize the Marvell Cryptographic diff --git a/queue-6.10/drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch b/queue-6.10/drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch new file mode 100644 index 00000000000..9503f54b082 --- /dev/null +++ b/queue-6.10/drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch @@ -0,0 +1,40 @@ +From d925c04d974c657d10471c0c2dba3bc9c7d994ee Mon Sep 17 00:00:00 2001 +From: Alex Hung +Date: Thu, 27 Jun 2024 16:45:39 -0600 +Subject: drm/amd/display: Check link_res->hpo_dp_link_enc before using it + +From: Alex Hung + +commit d925c04d974c657d10471c0c2dba3bc9c7d994ee upstream. + +[WHAT & HOW] +Functions dp_enable_link_phy and dp_disable_link_phy can pass link_res +without initializing hpo_dp_link_enc and it is necessary to check for +null before dereferencing. + +This fixes 1 FORWARD_NULL issue reported by Coverity. + +Fixes: 0beca868cde8 ("drm/amd/display: Check link_res->hpo_dp_link_enc before using it") +Reviewed-by: Rodrigo Siqueira +Signed-off-by: Alex Hung +Signed-off-by: Aurabindo Pillai +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c ++++ b/drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c +@@ -110,6 +110,11 @@ void enable_hpo_dp_link_output(struct dc + enum clock_source_id clock_source, + const struct dc_link_settings *link_settings) + { ++ if (!link_res->hpo_dp_link_enc) { ++ DC_LOG_ERROR("%s: invalid hpo_dp_link_enc\n", __func__); ++ return; ++ } ++ + if (link->dc->res_pool->dccg->funcs->set_symclk32_le_root_clock_gating) + link->dc->res_pool->dccg->funcs->set_symclk32_le_root_clock_gating( + link->dc->res_pool->dccg, diff --git a/queue-6.10/drm-amd-display-revert-avoid-overflow-assignment.patch b/queue-6.10/drm-amd-display-revert-avoid-overflow-assignment.patch new file mode 100644 index 00000000000..7c488aa12fe --- /dev/null +++ b/queue-6.10/drm-amd-display-revert-avoid-overflow-assignment.patch @@ -0,0 +1,57 @@ +From e80f8f491df873ea2e07c941c747831234814612 Mon Sep 17 00:00:00 2001 +From: Gabe Teeger +Date: Thu, 25 Jul 2024 18:42:21 -0400 +Subject: drm/amd/display: Revert Avoid overflow assignment + +From: Gabe Teeger + +commit e80f8f491df873ea2e07c941c747831234814612 upstream. + +This reverts commit a15268787b79 ("drm/amd/display: Avoid overflow assignment in link_dp_cts") +Due to regression causing DPMS hang. + +Reviewed-by: Alex Hung +Signed-off-by: Gabe Teeger +Signed-off-by: Wayne Lin +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 2 +- + drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c | 3 +-- + drivers/gpu/drm/amd/display/include/dpcd_defs.h | 1 - + 3 files changed, 2 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h ++++ b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h +@@ -727,7 +727,7 @@ struct dp_audio_test_data_flags { + struct dp_audio_test_data { + + struct dp_audio_test_data_flags flags; +- uint32_t sampling_rate; ++ uint8_t sampling_rate; + uint8_t channel_count; + uint8_t pattern_type; + uint8_t pattern_period[8]; +--- a/drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c ++++ b/drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +@@ -775,8 +775,7 @@ bool dp_set_test_pattern( + core_link_read_dpcd(link, DP_TRAINING_PATTERN_SET, + &training_pattern.raw, + sizeof(training_pattern)); +- if (pattern <= PHY_TEST_PATTERN_END_DP11) +- training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern; ++ training_pattern.v1_3.LINK_QUAL_PATTERN_SET = pattern; + core_link_write_dpcd(link, DP_TRAINING_PATTERN_SET, + &training_pattern.raw, + sizeof(training_pattern)); +--- a/drivers/gpu/drm/amd/display/include/dpcd_defs.h ++++ b/drivers/gpu/drm/amd/display/include/dpcd_defs.h +@@ -76,7 +76,6 @@ enum dpcd_phy_test_patterns { + PHY_TEST_PATTERN_D10_2, + PHY_TEST_PATTERN_SYMBOL_ERROR, + PHY_TEST_PATTERN_PRBS7, +- PHY_TEST_PATTERN_END_DP11 = PHY_TEST_PATTERN_PRBS7, + PHY_TEST_PATTERN_80BIT_CUSTOM,/* For DP1.2 only */ + PHY_TEST_PATTERN_CP2520_1, + PHY_TEST_PATTERN_CP2520_2, diff --git a/queue-6.10/perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch b/queue-6.10/perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch new file mode 100644 index 00000000000..d12b913b71e --- /dev/null +++ b/queue-6.10/perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch @@ -0,0 +1,88 @@ +From 9af2efee41b27a0f386fb5aa95d8d0b4b5d9fede Mon Sep 17 00:00:00 2001 +From: Namhyung Kim +Date: Mon, 26 Aug 2024 15:10:42 -0700 +Subject: perf report: Fix segfault when 'sym' sort key is not used + +From: Namhyung Kim + +commit 9af2efee41b27a0f386fb5aa95d8d0b4b5d9fede upstream. + +The fields in the hist_entry are filled on-demand which means they only +have meaningful values when relevant sort keys are used. + +So if neither of 'dso' nor 'sym' sort keys are used, the map/symbols in +the hist entry can be garbage. So it shouldn't access it +unconditionally. + +I got a segfault, when I wanted to see cgroup profiles. + + $ sudo perf record -a --all-cgroups --synth=cgroup true + + $ sudo perf report -s cgroup + + Program received signal SIGSEGV, Segmentation fault. + 0x00005555557a8d90 in map__dso (map=0x0) at util/map.h:48 + 48 return RC_CHK_ACCESS(map)->dso; + (gdb) bt + #0 0x00005555557a8d90 in map__dso (map=0x0) at util/map.h:48 + #1 0x00005555557aa39b in map__load (map=0x0) at util/map.c:344 + #2 0x00005555557aa592 in map__find_symbol (map=0x0, addr=140736115941088) at util/map.c:385 + #3 0x00005555557ef000 in hists__findnew_entry (hists=0x555556039d60, entry=0x7fffffffa4c0, al=0x7fffffffa8c0, sample_self=true) + at util/hist.c:644 + #4 0x00005555557ef61c in __hists__add_entry (hists=0x555556039d60, al=0x7fffffffa8c0, sym_parent=0x0, bi=0x0, mi=0x0, ki=0x0, + block_info=0x0, sample=0x7fffffffaa90, sample_self=true, ops=0x0) at util/hist.c:761 + #5 0x00005555557ef71f in hists__add_entry (hists=0x555556039d60, al=0x7fffffffa8c0, sym_parent=0x0, bi=0x0, mi=0x0, ki=0x0, + sample=0x7fffffffaa90, sample_self=true) at util/hist.c:779 + #6 0x00005555557f00fb in iter_add_single_normal_entry (iter=0x7fffffffa900, al=0x7fffffffa8c0) at util/hist.c:1015 + #7 0x00005555557f09a7 in hist_entry_iter__add (iter=0x7fffffffa900, al=0x7fffffffa8c0, max_stack_depth=127, arg=0x7fffffffbce0) + at util/hist.c:1260 + #8 0x00005555555ba7ce in process_sample_event (tool=0x7fffffffbce0, event=0x7ffff7c14128, sample=0x7fffffffaa90, evsel=0x555556039ad0, + machine=0x5555560388e8) at builtin-report.c:334 + #9 0x00005555557b30c8 in evlist__deliver_sample (evlist=0x555556039010, tool=0x7fffffffbce0, event=0x7ffff7c14128, + sample=0x7fffffffaa90, evsel=0x555556039ad0, machine=0x5555560388e8) at util/session.c:1232 + #10 0x00005555557b32bc in machines__deliver_event (machines=0x5555560388e8, evlist=0x555556039010, event=0x7ffff7c14128, + sample=0x7fffffffaa90, tool=0x7fffffffbce0, file_offset=110888, file_path=0x555556038ff0 "perf.data") at util/session.c:1271 + #11 0x00005555557b3848 in perf_session__deliver_event (session=0x5555560386d0, event=0x7ffff7c14128, tool=0x7fffffffbce0, + file_offset=110888, file_path=0x555556038ff0 "perf.data") at util/session.c:1354 + #12 0x00005555557affaf in ordered_events__deliver_event (oe=0x555556038e60, event=0x555556135aa0) at util/session.c:132 + #13 0x00005555557bb605 in do_flush (oe=0x555556038e60, show_progress=false) at util/ordered-events.c:245 + #14 0x00005555557bb95c in __ordered_events__flush (oe=0x555556038e60, how=OE_FLUSH__ROUND, timestamp=0) at util/ordered-events.c:324 + #15 0x00005555557bba46 in ordered_events__flush (oe=0x555556038e60, how=OE_FLUSH__ROUND) at util/ordered-events.c:342 + #16 0x00005555557b1b3b in perf_event__process_finished_round (tool=0x7fffffffbce0, event=0x7ffff7c15bb8, oe=0x555556038e60) + at util/session.c:780 + #17 0x00005555557b3b27 in perf_session__process_user_event (session=0x5555560386d0, event=0x7ffff7c15bb8, file_offset=117688, + file_path=0x555556038ff0 "perf.data") at util/session.c:1406 + +As you can see the entry->ms.map was NULL even if he->ms.map has a +value. This is because 'sym' sort key is not given, so it cannot assume +whether he->ms.sym and entry->ms.sym is the same. I only checked the +'sym' sort key here as it implies 'dso' behavior (so maps are the same). + +Fixes: ac01c8c4246546fd ("perf hist: Update hist symbol when updating maps") +Signed-off-by: Namhyung Kim +Cc: Adrian Hunter +Cc: Ian Rogers +Cc: Ingo Molnar +Cc: Jiri Olsa +Cc: Kan Liang +Cc: Matt Fleming +Cc: Peter Zijlstra +Cc: Stephane Eranian +Link: https://lore.kernel.org/r/20240826221045.1202305-2-namhyung@kernel.org +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/hist.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/perf/util/hist.c ++++ b/tools/perf/util/hist.c +@@ -636,7 +636,7 @@ static struct hist_entry *hists__findnew + * mis-adjust symbol addresses when computing + * the history counter to increment. + */ +- if (he->ms.map != entry->ms.map) { ++ if (hists__has(hists, sym) && he->ms.map != entry->ms.map) { + if (he->ms.sym) { + u64 addr = he->ms.sym->start; + he->ms.sym = map__find_symbol(entry->ms.map, addr); diff --git a/queue-6.10/series b/queue-6.10/series index 239431d9fbe..051b6c6222b 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -475,3 +475,8 @@ revert-drm-amd-display-skip-recompute-dsc-params-if-no-stream-on-link.patch drm-sched-revert-always-increment-correct-scheduler-score.patch rxrpc-fix-a-race-between-socket-set-up-and-i-o-thread-creation.patch vhost-scsi-null-ptr-dereference-in-vhost_scsi_get_req.patch +alsa-control-fix-leftover-snd_power_unref.patch +crypto-octeontx-select-crypto_authenc.patch +drm-amd-display-revert-avoid-overflow-assignment.patch +perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch +drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch