]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jun 2024 12:33:54 +0000 (14:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jun 2024 12:33:54 +0000 (14:33 +0200)
added patches:
afs-don-t-cross-.backup-mountpoint-from-backup-volume.patch
mmc-core-do-not-force-a-retune-before-rpmb-switch.patch
net-sfp-bus-fix-sfp-mode-detect-from-bitrate.patch

queue-6.6/afs-don-t-cross-.backup-mountpoint-from-backup-volume.patch [new file with mode: 0644]
queue-6.6/mmc-core-do-not-force-a-retune-before-rpmb-switch.patch [new file with mode: 0644]
queue-6.6/net-sfp-bus-fix-sfp-mode-detect-from-bitrate.patch [new file with mode: 0644]
queue-6.6/series

diff --git a/queue-6.6/afs-don-t-cross-.backup-mountpoint-from-backup-volume.patch b/queue-6.6/afs-don-t-cross-.backup-mountpoint-from-backup-volume.patch
new file mode 100644 (file)
index 0000000..4a07b1e
--- /dev/null
@@ -0,0 +1,50 @@
+From 29be9100aca2915fab54b5693309bc42956542e5 Mon Sep 17 00:00:00 2001
+From: Marc Dionne <marc.dionne@auristor.com>
+Date: Fri, 24 May 2024 17:17:55 +0100
+Subject: afs: Don't cross .backup mountpoint from backup volume
+
+From: Marc Dionne <marc.dionne@auristor.com>
+
+commit 29be9100aca2915fab54b5693309bc42956542e5 upstream.
+
+Don't cross a mountpoint that explicitly specifies a backup volume
+(target is <vol>.backup) when starting from a backup volume.
+
+It it not uncommon to mount a volume's backup directly in the volume
+itself.  This can cause tools that are not paying attention to get
+into a loop mounting the volume onto itself as they attempt to
+traverse the tree, leading to a variety of problems.
+
+This doesn't prevent the general case of loops in a sequence of
+mountpoints, but addresses a common special case in the same way
+as other afs clients.
+
+Reported-by: Jan Henrik Sylvester <jan.henrik.sylvester@uni-hamburg.de>
+Link: http://lists.infradead.org/pipermail/linux-afs/2024-May/008454.html
+Reported-by: Markus Suvanto <markus.suvanto@gmail.com>
+Link: http://lists.infradead.org/pipermail/linux-afs/2024-February/008074.html
+Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+Link: https://lore.kernel.org/r/768760.1716567475@warthog.procyon.org.uk
+Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
+cc: linux-afs@lists.infradead.org
+Signed-off-by: Christian Brauner <brauner@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/afs/mntpt.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/fs/afs/mntpt.c
++++ b/fs/afs/mntpt.c
+@@ -140,6 +140,11 @@ static int afs_mntpt_set_params(struct f
+               put_page(page);
+               if (ret < 0)
+                       return ret;
++
++              /* Don't cross a backup volume mountpoint from a backup volume */
++              if (src_as->volume && src_as->volume->type == AFSVL_BACKVOL &&
++                  ctx->type == AFSVL_BACKVOL)
++                      return -ENODEV;
+       }
+       return 0;
diff --git a/queue-6.6/mmc-core-do-not-force-a-retune-before-rpmb-switch.patch b/queue-6.6/mmc-core-do-not-force-a-retune-before-rpmb-switch.patch
new file mode 100644 (file)
index 0000000..5c2d8e8
--- /dev/null
@@ -0,0 +1,66 @@
+From 67380251e8bbd3302c64fea07f95c31971b91c22 Mon Sep 17 00:00:00 2001
+From: Jorge Ramirez-Ortiz <jorge@foundries.io>
+Date: Wed, 3 Jan 2024 12:29:11 +0100
+Subject: mmc: core: Do not force a retune before RPMB switch
+
+From: Jorge Ramirez-Ortiz <jorge@foundries.io>
+
+commit 67380251e8bbd3302c64fea07f95c31971b91c22 upstream.
+
+Requesting a retune before switching to the RPMB partition has been
+observed to cause CRC errors on the RPMB reads (-EILSEQ).
+
+Since RPMB reads can not be retried, the clients would be directly
+affected by the errors.
+
+This commit disables the retune request prior to switching to the RPMB
+partition: mmc_retune_pause() no longer triggers a retune before the
+pause period begins.
+
+This was verified with the sdhci-of-arasan driver (ZynqMP) configured
+for HS200 using two separate eMMC cards (DG4064 and 064GB2). In both
+cases, the error was easy to reproduce triggering every few tenths of
+reads.
+
+With this commit, systems that were utilizing OP-TEE to access RPMB
+variables will experience an enhanced performance. Specifically, when
+OP-TEE is configured to employ RPMB as a secure storage solution, it not
+only writes the data but also the secure filesystem within the
+partition. As a result, retrieving any variable involves multiple RPMB
+reads, typically around five.
+
+For context, on ZynqMP, each retune request consumed approximately
+8ms. Consequently, reading any RPMB variable used to take at the very
+minimum 40ms.
+
+After droping the need to retune before switching to the RPMB partition,
+this is no longer the case.
+
+Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
+Acked-by: Avri Altman <avri.altman@wdc.com>
+Acked-by: Adrian Hunter <adrian.hunter@intel.com>
+Link: https://lore.kernel.org/r/20240103112911.2954632-1-jorge@foundries.io
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/mmc/core/host.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/mmc/core/host.c
++++ b/drivers/mmc/core/host.c
+@@ -119,13 +119,12 @@ void mmc_retune_enable(struct mmc_host *
+ /*
+  * Pause re-tuning for a small set of operations.  The pause begins after the
+- * next command and after first doing re-tuning.
++ * next command.
+  */
+ void mmc_retune_pause(struct mmc_host *host)
+ {
+       if (!host->retune_paused) {
+               host->retune_paused = 1;
+-              mmc_retune_needed(host);
+               mmc_retune_hold(host);
+       }
+ }
diff --git a/queue-6.6/net-sfp-bus-fix-sfp-mode-detect-from-bitrate.patch b/queue-6.6/net-sfp-bus-fix-sfp-mode-detect-from-bitrate.patch
new file mode 100644 (file)
index 0000000..256c97a
--- /dev/null
@@ -0,0 +1,52 @@
+From 97eb5d51b4a584a60e5d096bdb6b33edc9f50d8d Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
+Date: Mon, 15 Jan 2024 12:43:38 +0000
+Subject: net: sfp-bus: fix SFP mode detect from bitrate
+
+From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+
+commit 97eb5d51b4a584a60e5d096bdb6b33edc9f50d8d upstream.
+
+The referenced commit moved the setting of the Autoneg and pause bits
+early in sfp_parse_support(). However, we check whether the modes are
+empty before using the bitrate to set some modes. Setting these bits
+so early causes that test to always be false, preventing this working,
+and thus some modules that used to work no longer do.
+
+Move them just before the call to the quirk.
+
+Fixes: 8110633db49d ("net: sfp-bus: allow SFP quirks to override Autoneg and pause bits")
+Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
+Link: https://lore.kernel.org/r/E1rPMJW-001Ahf-L0@rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Cc: Daniel Golle <daniel@makrotopia.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/phy/sfp-bus.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/phy/sfp-bus.c
++++ b/drivers/net/phy/sfp-bus.c
+@@ -151,10 +151,6 @@ void sfp_parse_support(struct sfp_bus *b
+       unsigned int br_min, br_nom, br_max;
+       __ETHTOOL_DECLARE_LINK_MODE_MASK(modes) = { 0, };
+-      phylink_set(modes, Autoneg);
+-      phylink_set(modes, Pause);
+-      phylink_set(modes, Asym_Pause);
+-
+       /* Decode the bitrate information to MBd */
+       br_min = br_nom = br_max = 0;
+       if (id->base.br_nominal) {
+@@ -339,6 +335,10 @@ void sfp_parse_support(struct sfp_bus *b
+               }
+       }
++      phylink_set(modes, Autoneg);
++      phylink_set(modes, Pause);
++      phylink_set(modes, Asym_Pause);
++
+       if (bus->sfp_quirk && bus->sfp_quirk->modes)
+               bus->sfp_quirk->modes(id, modes, interfaces);
index 4d8fc4c769ea49bddc4196f2719f539a98e59ba3..331f6d95d57253d88216ce22ca8a8c5e011bd896 100644 (file)
@@ -1,2 +1,5 @@
 e1000e-move-force-smbus-near-the-end-of-enable_ulp-function.patch
 drm-i915-hwmon-get-rid-of-devm.patch
+mmc-core-do-not-force-a-retune-before-rpmb-switch.patch
+afs-don-t-cross-.backup-mountpoint-from-backup-volume.patch
+net-sfp-bus-fix-sfp-mode-detect-from-bitrate.patch