From: Greg Kroah-Hartman Date: Mon, 26 Aug 2024 12:10:05 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v6.1.107~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2b2d4546856694db7f890359dafd249f60d0087;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch kvm-arm64-make-icc_-sgi-_el1-undef-in-the-absence-of-a-vgicv3.patch mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch --- diff --git a/queue-5.10/cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch b/queue-5.10/cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch new file mode 100644 index 00000000000..7bed87b8cc1 --- /dev/null +++ b/queue-5.10/cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch @@ -0,0 +1,38 @@ +From 80a1e7b83bb1834b5568a3872e64c05795d88f31 Mon Sep 17 00:00:00 2001 +From: Nikolay Kuratov +Date: Mon, 19 Aug 2024 10:54:08 +0300 +Subject: cxgb4: add forgotten u64 ivlan cast before shift + +From: Nikolay Kuratov + +commit 80a1e7b83bb1834b5568a3872e64c05795d88f31 upstream. + +It is done everywhere in cxgb4 code, e.g. in is_filter_exact_match() +There is no reason it should not be done here + +Found by Linux Verification Center (linuxtesting.org) with SVACE + +Signed-off-by: Nikolay Kuratov +Cc: stable@vger.kernel.org +Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") +Reviewed-by: Simon Horman +Reviewed-by: Jacob Keller +Link: https://patch.msgid.link/20240819075408.92378-1-kniv@yandex-team.ru +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c ++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +@@ -1244,7 +1244,8 @@ static u64 hash_filter_ntuple(struct ch_ + * in the Compressed Filter Tuple. + */ + if (tp->vlan_shift >= 0 && fs->mask.ivlan) +- ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift; ++ ntuple |= (u64)(FT_VLAN_VLD_F | ++ fs->val.ivlan) << tp->vlan_shift; + + if (tp->port_shift >= 0 && fs->mask.iport) + ntuple |= (u64)fs->val.iport << tp->port_shift; diff --git a/queue-5.10/kvm-arm64-make-icc_-sgi-_el1-undef-in-the-absence-of-a-vgicv3.patch b/queue-5.10/kvm-arm64-make-icc_-sgi-_el1-undef-in-the-absence-of-a-vgicv3.patch new file mode 100644 index 00000000000..77d73130639 --- /dev/null +++ b/queue-5.10/kvm-arm64-make-icc_-sgi-_el1-undef-in-the-absence-of-a-vgicv3.patch @@ -0,0 +1,66 @@ +From 3e6245ebe7ef341639e9a7e402b3ade8ad45a19f Mon Sep 17 00:00:00 2001 +From: Marc Zyngier +Date: Tue, 20 Aug 2024 11:03:38 +0100 +Subject: KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 + +From: Marc Zyngier + +commit 3e6245ebe7ef341639e9a7e402b3ade8ad45a19f upstream. + +On a system with a GICv3, if a guest hasn't been configured with +GICv3 and that the host is not capable of GICv2 emulation, +a write to any of the ICC_*SGI*_EL1 registers is trapped to EL2. + +We therefore try to emulate the SGI access, only to hit a NULL +pointer as no private interrupt is allocated (no GIC, remember?). + +The obvious fix is to give the guest what it deserves, in the +shape of a UNDEF exception. + +Reported-by: Alexander Potapenko +Signed-off-by: Marc Zyngier +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240820100349.3544850-2-maz@kernel.org +Signed-off-by: Oliver Upton +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/kvm/sys_regs.c | 6 ++++++ + arch/arm64/kvm/vgic/vgic.h | 7 +++++++ + 2 files changed, 13 insertions(+) + +--- a/arch/arm64/kvm/sys_regs.c ++++ b/arch/arm64/kvm/sys_regs.c +@@ -30,6 +30,7 @@ + #include + + #include "sys_regs.h" ++#include "vgic/vgic.h" + + #include "trace.h" + +@@ -275,6 +276,11 @@ static bool access_gic_sgi(struct kvm_vc + { + bool g1; + ++ if (!kvm_has_gicv3(vcpu->kvm)) { ++ kvm_inject_undefined(vcpu); ++ return false; ++ } ++ + if (!p->is_write) + return read_from_write_only(vcpu, p, r); + +--- a/arch/arm64/kvm/vgic/vgic.h ++++ b/arch/arm64/kvm/vgic/vgic.h +@@ -318,4 +318,11 @@ int vgic_v4_init(struct kvm *kvm); + void vgic_v4_teardown(struct kvm *kvm); + void vgic_v4_configure_vsgis(struct kvm *kvm); + ++static inline bool kvm_has_gicv3(struct kvm *kvm) ++{ ++ return (static_branch_unlikely(&kvm_vgic_global_state.gicv3_cpuif) && ++ irqchip_in_kernel(kvm) && ++ kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3); ++} ++ + #endif diff --git a/queue-5.10/mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch b/queue-5.10/mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch new file mode 100644 index 00000000000..eaa7f6260a0 --- /dev/null +++ b/queue-5.10/mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch @@ -0,0 +1,47 @@ +From 6275c7bc8dd07644ea8142a1773d826800f0f3f7 Mon Sep 17 00:00:00 2001 +From: Ben Whitten +Date: Sun, 11 Aug 2024 22:22:11 +0100 +Subject: mmc: dw_mmc: allow biu and ciu clocks to defer + +From: Ben Whitten + +commit 6275c7bc8dd07644ea8142a1773d826800f0f3f7 upstream. + +Fix a race condition if the clock provider comes up after mmc is probed, +this causes mmc to fail without retrying. +When given the DEFER error from the clk source, pass it on up the chain. + +Fixes: f90a0612f0e1 ("mmc: dw_mmc: lookup for optional biu and ciu clocks") +Signed-off-by: Ben Whitten +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20240811212212.123255-1-ben.whitten@gmail.com +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mmc/host/dw_mmc.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/mmc/host/dw_mmc.c ++++ b/drivers/mmc/host/dw_mmc.c +@@ -3171,6 +3171,10 @@ int dw_mci_probe(struct dw_mci *host) + host->biu_clk = devm_clk_get(host->dev, "biu"); + if (IS_ERR(host->biu_clk)) { + dev_dbg(host->dev, "biu clock not available\n"); ++ ret = PTR_ERR(host->biu_clk); ++ if (ret == -EPROBE_DEFER) ++ return ret; ++ + } else { + ret = clk_prepare_enable(host->biu_clk); + if (ret) { +@@ -3182,6 +3186,10 @@ int dw_mci_probe(struct dw_mci *host) + host->ciu_clk = devm_clk_get(host->dev, "ciu"); + if (IS_ERR(host->ciu_clk)) { + dev_dbg(host->dev, "ciu clock not available\n"); ++ ret = PTR_ERR(host->ciu_clk); ++ if (ret == -EPROBE_DEFER) ++ goto err_clk_biu; ++ + host->bus_hz = host->pdata->bus_hz; + } else { + ret = clk_prepare_enable(host->ciu_clk); diff --git a/queue-5.10/series b/queue-5.10/series index 8ef81813e80..889a4d5f791 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -111,3 +111,6 @@ binfmt_misc-pass-binfmt_misc-flags-to-the-interpreter.patch mips-loongson64-set-timer-mode-in-cpu-probe.patch hid-wacom-defer-calculation-of-resolution-until-resolution_code-is-known.patch hid-microsoft-add-rumble-support-to-latest-xbox-controllers.patch +cxgb4-add-forgotten-u64-ivlan-cast-before-shift.patch +kvm-arm64-make-icc_-sgi-_el1-undef-in-the-absence-of-a-vgicv3.patch +mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch