From: Greg Kroah-Hartman Date: Wed, 12 Jun 2024 12:33:54 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v4.19.316~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=66616f8f8162a7b5b22b81b53327305f58ef0a87;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches 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 --- 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 index 00000000000..4a07b1e47dc --- /dev/null +++ b/queue-6.6/afs-don-t-cross-.backup-mountpoint-from-backup-volume.patch @@ -0,0 +1,50 @@ +From 29be9100aca2915fab54b5693309bc42956542e5 Mon Sep 17 00:00:00 2001 +From: Marc Dionne +Date: Fri, 24 May 2024 17:17:55 +0100 +Subject: afs: Don't cross .backup mountpoint from backup volume + +From: Marc Dionne + +commit 29be9100aca2915fab54b5693309bc42956542e5 upstream. + +Don't cross a mountpoint that explicitly specifies a backup volume +(target is .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 +Link: http://lists.infradead.org/pipermail/linux-afs/2024-May/008454.html +Reported-by: Markus Suvanto +Link: http://lists.infradead.org/pipermail/linux-afs/2024-February/008074.html +Signed-off-by: Marc Dionne +Signed-off-by: David Howells +Link: https://lore.kernel.org/r/768760.1716567475@warthog.procyon.org.uk +Reviewed-by: Jeffrey Altman +cc: linux-afs@lists.infradead.org +Signed-off-by: Christian Brauner +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..5c2d8e80645 --- /dev/null +++ b/queue-6.6/mmc-core-do-not-force-a-retune-before-rpmb-switch.patch @@ -0,0 +1,66 @@ +From 67380251e8bbd3302c64fea07f95c31971b91c22 Mon Sep 17 00:00:00 2001 +From: Jorge Ramirez-Ortiz +Date: Wed, 3 Jan 2024 12:29:11 +0100 +Subject: mmc: core: Do not force a retune before RPMB switch + +From: Jorge Ramirez-Ortiz + +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 +Acked-by: Avri Altman +Acked-by: Adrian Hunter +Link: https://lore.kernel.org/r/20240103112911.2954632-1-jorge@foundries.io +Signed-off-by: Ulf Hansson +Signed-off-by: Florian Fainelli +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..256c97a6ec2 --- /dev/null +++ b/queue-6.6/net-sfp-bus-fix-sfp-mode-detect-from-bitrate.patch @@ -0,0 +1,52 @@ +From 97eb5d51b4a584a60e5d096bdb6b33edc9f50d8d Mon Sep 17 00:00:00 2001 +From: "Russell King (Oracle)" +Date: Mon, 15 Jan 2024 12:43:38 +0000 +Subject: net: sfp-bus: fix SFP mode detect from bitrate + +From: Russell King (Oracle) + +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) +Reviewed-by: Maxime Chevallier +Link: https://lore.kernel.org/r/E1rPMJW-001Ahf-L0@rmk-PC.armlinux.org.uk +Signed-off-by: Jakub Kicinski +Cc: Daniel Golle +Signed-off-by: Greg Kroah-Hartman +--- + 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); + diff --git a/queue-6.6/series b/queue-6.6/series index 4d8fc4c769e..331f6d95d57 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -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