]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.7-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Feb 2024 15:26:18 +0000 (16:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Feb 2024 15:26:18 +0000 (16:26 +0100)
added patches:
ahci-extend-asm1061-43-bit-dma-address-quirk-to-other-asm106x-parts.patch
drm-amd-display-avoid-enum-conversion-warning.patch
drm-amd-display-fix-buffer-overflow-in-get_host_router_total_dp_tunnel_bw.patch
revert-drm-amd-display-increased-min_dcfclk_mhz-and-min_fclk_mhz.patch
smb3-add-missing-null-server-pointer-check.patch

queue-6.7/ahci-extend-asm1061-43-bit-dma-address-quirk-to-other-asm106x-parts.patch [new file with mode: 0644]
queue-6.7/drm-amd-display-avoid-enum-conversion-warning.patch [new file with mode: 0644]
queue-6.7/drm-amd-display-fix-buffer-overflow-in-get_host_router_total_dp_tunnel_bw.patch [new file with mode: 0644]
queue-6.7/revert-drm-amd-display-increased-min_dcfclk_mhz-and-min_fclk_mhz.patch [new file with mode: 0644]
queue-6.7/series
queue-6.7/smb3-add-missing-null-server-pointer-check.patch [new file with mode: 0644]

diff --git a/queue-6.7/ahci-extend-asm1061-43-bit-dma-address-quirk-to-other-asm106x-parts.patch b/queue-6.7/ahci-extend-asm1061-43-bit-dma-address-quirk-to-other-asm106x-parts.patch
new file mode 100644 (file)
index 0000000..ef60f98
--- /dev/null
@@ -0,0 +1,46 @@
+From 51af8f255bdaca6d501afc0d085b808f67b44d91 Mon Sep 17 00:00:00 2001
+From: Lennert Buytenhek <kernel@wantstofly.org>
+Date: Tue, 30 Jan 2024 15:21:51 +0200
+Subject: ahci: Extend ASM1061 43-bit DMA address quirk to other ASM106x parts
+
+From: Lennert Buytenhek <kernel@wantstofly.org>
+
+commit 51af8f255bdaca6d501afc0d085b808f67b44d91 upstream.
+
+ASMedia have confirmed that all ASM106x parts currently listed in
+ahci_pci_tbl[] suffer from the 43-bit DMA address limitation that we ran
+into on the ASM1061, and therefore, we need to apply the quirk added by
+commit 20730e9b2778 ("ahci: add 43-bit DMA address quirk for ASMedia
+ASM1061 controllers") to the other supported ASM106x parts as well.
+
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/linux-ide/ZbopwKZJAKQRA4Xv@x1-carbon/
+Signed-off-by: Lennert Buytenhek <kernel@wantstofly.org>
+[cassel: add link to ASMedia confirmation email]
+Signed-off-by: Niklas Cassel <cassel@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/ata/ahci.c |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/drivers/ata/ahci.c
++++ b/drivers/ata/ahci.c
+@@ -606,13 +606,13 @@ static const struct pci_device_id ahci_p
+       { PCI_VDEVICE(PROMISE, 0x3781), board_ahci },   /* FastTrak TX8660 ahci-mode */
+       /* ASMedia */
+-      { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci },   /* ASM1060 */
+-      { PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci },   /* ASM1060 */
++      { PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci_43bit_dma }, /* ASM1060 */
++      { PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci_43bit_dma }, /* ASM1060 */
+       { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci_43bit_dma }, /* ASM1061 */
+       { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci_43bit_dma }, /* ASM1061/1062 */
+-      { PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci },   /* ASM1061R */
+-      { PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci },   /* ASM1062R */
+-      { PCI_VDEVICE(ASMEDIA, 0x0624), board_ahci },   /* ASM1062+JMB575 */
++      { PCI_VDEVICE(ASMEDIA, 0x0621), board_ahci_43bit_dma }, /* ASM1061R */
++      { PCI_VDEVICE(ASMEDIA, 0x0622), board_ahci_43bit_dma }, /* ASM1062R */
++      { PCI_VDEVICE(ASMEDIA, 0x0624), board_ahci_43bit_dma }, /* ASM1062+JMB575 */
+       { PCI_VDEVICE(ASMEDIA, 0x1062), board_ahci },   /* ASM1062A */
+       { PCI_VDEVICE(ASMEDIA, 0x1064), board_ahci },   /* ASM1064 */
+       { PCI_VDEVICE(ASMEDIA, 0x1164), board_ahci },   /* ASM1164 */
diff --git a/queue-6.7/drm-amd-display-avoid-enum-conversion-warning.patch b/queue-6.7/drm-amd-display-avoid-enum-conversion-warning.patch
new file mode 100644 (file)
index 0000000..d3124e8
--- /dev/null
@@ -0,0 +1,44 @@
+From d7643fe6fb76edb1f2f1497bf5e8b8f4774b5129 Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <nathan@kernel.org>
+Date: Wed, 10 Jan 2024 13:46:47 -0700
+Subject: drm/amd/display: Avoid enum conversion warning
+
+From: Nathan Chancellor <nathan@kernel.org>
+
+commit d7643fe6fb76edb1f2f1497bf5e8b8f4774b5129 upstream.
+
+Clang warns (or errors with CONFIG_WERROR=y) when performing arithmetic
+with different enumerated types, which is usually a bug:
+
+    drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_dpia_bw.c:548:24: error: arithmetic between different enumeration types ('const enum dc_link_rate' and 'const enum dc_lane_count') [-Werror,-Wenum-enum-conversion]
+      548 |                         link_cap->link_rate * link_cap->lane_count * LINK_RATE_REF_FREQ_IN_KHZ * 8;
+          |                         ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
+    1 error generated.
+
+In this case, there is not a problem because the enumerated types are
+basically treated as '#define' values. Add an explicit cast to an
+integral type to silence the warning.
+
+Closes: https://github.com/ClangBuiltLinux/linux/issues/1976
+Fixes: 5f3bce13266e ("drm/amd/display: Request usb4 bw for mst streams")
+Signed-off-by: Nathan Chancellor <nathan@kernel.org>
+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/protocols/link_dp_dpia_bw.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
++++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
+@@ -544,8 +544,9 @@ int link_dp_dpia_get_dp_overhead_in_dp_t
+                */
+               const struct dc_link_settings *link_cap =
+                       dc_link_get_link_cap(link);
+-              uint32_t link_bw_in_kbps =
+-                      link_cap->link_rate * link_cap->lane_count * LINK_RATE_REF_FREQ_IN_KHZ * 8;
++              uint32_t link_bw_in_kbps = (uint32_t)link_cap->link_rate *
++                                         (uint32_t)link_cap->lane_count *
++                                         LINK_RATE_REF_FREQ_IN_KHZ * 8;
+               link_mst_overhead = (link_bw_in_kbps / 64) + ((link_bw_in_kbps % 64) ? 1 : 0);
+       }
diff --git a/queue-6.7/drm-amd-display-fix-buffer-overflow-in-get_host_router_total_dp_tunnel_bw.patch b/queue-6.7/drm-amd-display-fix-buffer-overflow-in-get_host_router_total_dp_tunnel_bw.patch
new file mode 100644 (file)
index 0000000..dd9158c
--- /dev/null
@@ -0,0 +1,50 @@
+From 97cba232549b9fe7e491fb60a69cf93075015f29 Mon Sep 17 00:00:00 2001
+From: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
+Date: Mon, 29 Jan 2024 21:17:09 +0530
+Subject: drm/amd/display: Fix buffer overflow in 'get_host_router_total_dp_tunnel_bw()'
+
+From: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
+
+commit 97cba232549b9fe7e491fb60a69cf93075015f29 upstream.
+
+The error message buffer overflow 'dc->links' 12 <= 12 suggests that the
+code is trying to access an element of the dc->links array that is
+beyond its bounds. In C, arrays are zero-indexed, so an array with 12
+elements has valid indices from 0 to 11. Trying to access dc->links[12]
+would be an attempt to access the 13th element of a 12-element array,
+which is a buffer overflow.
+
+To fix this, ensure that the loop does not go beyond the last valid
+index when accessing dc->links[i + 1] by subtracting 1 from the loop
+condition.
+
+This would ensure that i + 1 is always a valid index in the array.
+
+Fixes the below:
+drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_dpia_bw.c:208 get_host_router_total_dp_tunnel_bw() error: buffer overflow 'dc->links' 12 <= 12
+
+Fixes: 59f1622a5f05 ("drm/amd/display: Add dpia display mode validation logic")
+Cc: PeiChen Huang <peichen.huang@amd.com>
+Cc: Aric Cyr <aric.cyr@amd.com>
+Cc: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
+Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
+Cc: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
+Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
+Reviewed-by: Tom Chung <chiahsuan.chung@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/protocols/link_dp_dpia_bw.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
++++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
+@@ -196,7 +196,7 @@ static int get_host_router_total_dp_tunn
+       struct dc_link *link_dpia_primary, *link_dpia_secondary;
+       int total_bw = 0;
+-      for (uint8_t i = 0; i < MAX_PIPES * 2; ++i) {
++      for (uint8_t i = 0; i < (MAX_PIPES * 2) - 1; ++i) {
+               if (!dc->links[i] || dc->links[i]->ep_type != DISPLAY_ENDPOINT_USB4_DPIA)
+                       continue;
diff --git a/queue-6.7/revert-drm-amd-display-increased-min_dcfclk_mhz-and-min_fclk_mhz.patch b/queue-6.7/revert-drm-amd-display-increased-min_dcfclk_mhz-and-min_fclk_mhz.patch
new file mode 100644 (file)
index 0000000..862741d
--- /dev/null
@@ -0,0 +1,38 @@
+From a538dabf772c169641e151834e161e241802ab33 Mon Sep 17 00:00:00 2001
+From: Sohaib Nadeem <sohaib.nadeem@amd.com>
+Date: Mon, 29 Jan 2024 17:33:40 -0500
+Subject: Revert "drm/amd/display: increased min_dcfclk_mhz and min_fclk_mhz"
+
+From: Sohaib Nadeem <sohaib.nadeem@amd.com>
+
+commit a538dabf772c169641e151834e161e241802ab33 upstream.
+
+[why]:
+This reverts commit 2ff33c759a4247c84ec0b7815f1f223e155ba82a.
+
+The commit caused corruption when running some applications in fullscreen
+
+Cc: Mario Limonciello <mario.limonciello@amd.com>
+Cc: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
+Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
+Signed-off-by: Sohaib Nadeem <sohaib.nadeem@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/dml/dcn32/dcn32_fpu.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
++++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
+@@ -2719,7 +2719,7 @@ static int build_synthetic_soc_states(bo
+       struct _vcs_dpi_voltage_scaling_st entry = {0};
+       struct clk_limit_table_entry max_clk_data = {0};
+-      unsigned int min_dcfclk_mhz = 399, min_fclk_mhz = 599;
++      unsigned int min_dcfclk_mhz = 199, min_fclk_mhz = 299;
+       static const unsigned int num_dcfclk_stas = 5;
+       unsigned int dcfclk_sta_targets[DC__VOLTAGE_STATES] = {199, 615, 906, 1324, 1564};
index b1b2d5117e59e3f32e88be1c195817c0bb96486b..a64bc840df2d0580da90757bcc58a0ee810ba8a2 100644 (file)
@@ -224,3 +224,8 @@ selftests-mptcp-diag-check-currestab-counters.patch
 selftests-mptcp-diag-fix-bash-warnings-on-older-kernels.patch
 selftests-mptcp-diag-unique-in-use-subtest-names.patch
 selftests-mptcp-diag-unique-cestab-subtest-names.patch
+ahci-extend-asm1061-43-bit-dma-address-quirk-to-other-asm106x-parts.patch
+smb3-add-missing-null-server-pointer-check.patch
+drm-amd-display-avoid-enum-conversion-warning.patch
+drm-amd-display-fix-buffer-overflow-in-get_host_router_total_dp_tunnel_bw.patch
+revert-drm-amd-display-increased-min_dcfclk_mhz-and-min_fclk_mhz.patch
diff --git a/queue-6.7/smb3-add-missing-null-server-pointer-check.patch b/queue-6.7/smb3-add-missing-null-server-pointer-check.patch
new file mode 100644 (file)
index 0000000..4ebef98
--- /dev/null
@@ -0,0 +1,34 @@
+From 45be0882c5f91e1b92e645001dd1a53b3bd58c97 Mon Sep 17 00:00:00 2001
+From: Steve French <stfrench@microsoft.com>
+Date: Mon, 5 Feb 2024 14:43:17 -0600
+Subject: smb3: add missing null server pointer check
+
+From: Steve French <stfrench@microsoft.com>
+
+commit 45be0882c5f91e1b92e645001dd1a53b3bd58c97 upstream.
+
+Address static checker warning in cifs_ses_get_chan_index():
+    warn: variable dereferenced before check 'server'
+To be consistent, and reduce risk, we should add another check
+for null server pointer.
+
+Fixes: 88675b22d34e ("cifs: do not search for channel if server is terminating")
+Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
+Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/smb/client/sess.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/smb/client/sess.c
++++ b/fs/smb/client/sess.c
+@@ -76,7 +76,7 @@ cifs_ses_get_chan_index(struct cifs_ses
+       unsigned int i;
+       /* if the channel is waiting for termination */
+-      if (server->terminate)
++      if (server && server->terminate)
+               return CIFS_INVAL_CHAN_INDEX;
+       for (i = 0; i < ses->chan_count; i++) {