]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Oct 2024 11:06:22 +0000 (13:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Oct 2024 11:06:22 +0000 (13:06 +0200)
added patches:
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
null_blk-fix-return-value-of-nullb_device_power_store.patch
perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch
revert-ubifs-ubifs_symlink-fix-memleak-of-inode-i_link-in-error-path.patch

queue-6.6/crypto-octeontx-select-crypto_authenc.patch [new file with mode: 0644]
queue-6.6/drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch [new file with mode: 0644]
queue-6.6/drm-amd-display-revert-avoid-overflow-assignment.patch [new file with mode: 0644]
queue-6.6/null_blk-fix-return-value-of-nullb_device_power_store.patch [new file with mode: 0644]
queue-6.6/perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch [new file with mode: 0644]
queue-6.6/revert-ubifs-ubifs_symlink-fix-memleak-of-inode-i_link-in-error-path.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/crypto-octeontx-select-crypto_authenc.patch b/queue-6.6/crypto-octeontx-select-crypto_authenc.patch
new file mode 100644 (file)
index 0000000..9b2743c
--- /dev/null
@@ -0,0 +1,45 @@
+From c398cb8eb0a263a1b7a18892d9f244751689675c Mon Sep 17 00:00:00 2001
+From: Herbert Xu <herbert@gondor.apana.org.au>
+Date: Thu, 5 Sep 2024 10:21:49 +0800
+Subject: crypto: octeontx* - Select CRYPTO_AUTHENC
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+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 <lkp@intel.com>
+Closes: https://lore.kernel.org/oe-kbuild-all/202409042013.gT2ZI4wR-lkp@intel.com/
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/marvell/Kconfig | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/crypto/marvell/Kconfig b/drivers/crypto/marvell/Kconfig
+index a48591af12d0..78217577aa54 100644
+--- 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
+-- 
+2.46.2
+
diff --git a/queue-6.6/drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch b/queue-6.6/drm-amd-display-check-link_res-hpo_dp_link_enc-before-using-it.patch
new file mode 100644 (file)
index 0000000..9503f54
--- /dev/null
@@ -0,0 +1,40 @@
+From d925c04d974c657d10471c0c2dba3bc9c7d994ee Mon Sep 17 00:00:00 2001
+From: Alex Hung <alex.hung@amd.com>
+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 <alex.hung@amd.com>
+
+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 <rodrigo.siqueira@amd.com>
+Signed-off-by: Alex Hung <alex.hung@amd.com>
+Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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.6/drm-amd-display-revert-avoid-overflow-assignment.patch b/queue-6.6/drm-amd-display-revert-avoid-overflow-assignment.patch
new file mode 100644 (file)
index 0000000..b9af366
--- /dev/null
@@ -0,0 +1,57 @@
+From e80f8f491df873ea2e07c941c747831234814612 Mon Sep 17 00:00:00 2001
+From: Gabe Teeger <Gabe.Teeger@amd.com>
+Date: Thu, 25 Jul 2024 18:42:21 -0400
+Subject: drm/amd/display: Revert Avoid overflow assignment
+
+From: Gabe Teeger <Gabe.Teeger@amd.com>
+
+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 <alex.hung@amd.com>
+Signed-off-by: Gabe Teeger <Gabe.Teeger@amd.com>
+Signed-off-by: Wayne Lin <wayne.lin@amd.com>
+Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -721,7 +721,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
+@@ -849,8 +849,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.6/null_blk-fix-return-value-of-nullb_device_power_store.patch b/queue-6.6/null_blk-fix-return-value-of-nullb_device_power_store.patch
new file mode 100644 (file)
index 0000000..cdd9317
--- /dev/null
@@ -0,0 +1,36 @@
+From d9ff882b54f99f96787fa3df7cd938966843c418 Mon Sep 17 00:00:00 2001
+From: Damien Le Moal <dlemoal@kernel.org>
+Date: Mon, 27 May 2024 13:34:45 +0900
+Subject: null_blk: Fix return value of nullb_device_power_store()
+
+From: Damien Le Moal <dlemoal@kernel.org>
+
+commit d9ff882b54f99f96787fa3df7cd938966843c418 upstream.
+
+When powering on a null_blk device that is not already on, the return
+value ret that is initialized to be count is reused to check the return
+value of null_add_dev(), leading to nullb_device_power_store() to return
+null_add_dev() return value (0 on success) instead of "count".
+So make sure to set ret to be equal to count when there are no errors.
+
+Fixes: a2db328b0839 ("null_blk: fix null-ptr-dereference while configuring 'power' and 'submit_queues'")
+Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
+Reviewed-by: Yu Kuai <yukuai3@huawei.com>
+Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
+Link: https://lore.kernel.org/r/20240527043445.235267-1-dlemoal@kernel.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/block/null_blk/main.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/block/null_blk/main.c
++++ b/drivers/block/null_blk/main.c
+@@ -470,6 +470,7 @@ static ssize_t nullb_device_power_store(
+               set_bit(NULLB_DEV_FL_CONFIGURED, &dev->flags);
+               dev->power = newp;
++              ret = count;
+       } else if (dev->power && !newp) {
+               if (test_and_clear_bit(NULLB_DEV_FL_UP, &dev->flags)) {
+                       dev->power = newp;
diff --git a/queue-6.6/perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch b/queue-6.6/perf-report-fix-segfault-when-sym-sort-key-is-not-used.patch
new file mode 100644 (file)
index 0000000..807f7ca
--- /dev/null
@@ -0,0 +1,88 @@
+From 9af2efee41b27a0f386fb5aa95d8d0b4b5d9fede Mon Sep 17 00:00:00 2001
+From: Namhyung Kim <namhyung@kernel.org>
+Date: Mon, 26 Aug 2024 15:10:42 -0700
+Subject: perf report: Fix segfault when 'sym' sort key is not used
+
+From: Namhyung Kim <namhyung@kernel.org>
+
+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 <namhyung@kernel.org>
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Ian Rogers <irogers@google.com>
+Cc: Ingo Molnar <mingo@kernel.org>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Kan Liang <kan.liang@linux.intel.com>
+Cc: Matt Fleming <matt@readmodwrite.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Stephane Eranian <eranian@google.com>
+Link: https://lore.kernel.org/r/20240826221045.1202305-2-namhyung@kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -637,7 +637,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.6/revert-ubifs-ubifs_symlink-fix-memleak-of-inode-i_link-in-error-path.patch b/queue-6.6/revert-ubifs-ubifs_symlink-fix-memleak-of-inode-i_link-in-error-path.patch
new file mode 100644 (file)
index 0000000..ed00342
--- /dev/null
@@ -0,0 +1,33 @@
+From 7bed61a1cf166b5c113047fc8f60ff22dcb04893 Mon Sep 17 00:00:00 2001
+From: Zhihao Cheng <chengzhihao1@huawei.com>
+Date: Wed, 10 Apr 2024 15:37:45 +0800
+Subject: Revert "ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path"
+
+From: Zhihao Cheng <chengzhihao1@huawei.com>
+
+commit 7bed61a1cf166b5c113047fc8f60ff22dcb04893 upstream.
+
+This reverts commit 6379b44cdcd67f5f5d986b73953e99700591edfa. Commit
+1e022216dcd2 ("ubifs: ubifs_symlink: Fix memleak of inode->i_link in
+error path") is applied again in commit 6379b44cdcd6 ("ubifs:
+ubifs_symlink: Fix memleak of inode->i_link in error path"), which
+changed ubifs_mknod (It won't become a real problem). Just revert it.
+
+Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ubifs/dir.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/fs/ubifs/dir.c
++++ b/fs/ubifs/dir.c
+@@ -1126,8 +1126,6 @@ out_cancel:
+       dir_ui->ui_size = dir->i_size;
+       mutex_unlock(&dir_ui->ui_mutex);
+ out_inode:
+-      /* Free inode->i_link before inode is marked as bad. */
+-      fscrypt_free_inode(inode);
+       make_bad_inode(inode);
+       iput(inode);
+ out_fname:
index d2ce62519c0fe6254c0ba1b57c08be7af41f9b4f..d920c7c6bbfc51b51c25f4214d18891e4f5f6e1e 100644 (file)
@@ -378,3 +378,9 @@ null_blk-fix-null-ptr-dereference-while-configuring-power-and-submit_queues.patc
 net-stmmac-move-the-est-lock-to-struct-stmmac_priv.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
+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
+null_blk-fix-return-value-of-nullb_device_power_store.patch
+revert-ubifs-ubifs_symlink-fix-memleak-of-inode-i_link-in-error-path.patch