From 0833a6f421864a9c9547ac5778c8b962d6b9dd88 Mon Sep 17 00:00:00 2001 From: Yousaf Kaukab Date: Mar 21 2024 14:54:46 +0000 Subject: Merge remote-tracking branch 'origin/users/mfranc/SLE15-SP5/for-next' into SLE15-SP5 Pull s390 fixes from Miroslav Franc --- diff --git a/patches.suse/KVM-s390-only-deliver-the-set-service-event-bits.patch b/patches.suse/KVM-s390-only-deliver-the-set-service-event-bits.patch new file mode 100644 index 0000000..b9ea24f --- /dev/null +++ b/patches.suse/KVM-s390-only-deliver-the-set-service-event-bits.patch @@ -0,0 +1,56 @@ +From: Eric Farman +Date: Mon, 5 Feb 2024 22:43:00 +0100 +Subject: KVM: s390: only deliver the set service event bits +Git-commit: 85a19b3054274e09bcd9043d7d3203c3836688d0 +Patch-mainline: v6.8 or v6.8-rc8 (next release) +References: git-fixes bsc#1221631 + +The SCLP driver code masks off the last two bits of the parameter [1] +to determine if a read is required, but doesn't care about the +contents of those bits. Meanwhile, the KVM code that delivers +event interrupts masks off those two bits but sends both to the +guest, even if only one was specified by userspace [2]. + +This works for the driver code, but it means any nuances of those +bits gets lost. Use the event pending mask as an actual mask, and +only send the bit(s) that were specified in the pending interrupt. + +[1] Linux: sclp_interrupt_handler() (drivers/s390/char/sclp.c:658) +[2] QEMU: service_interrupt() (hw/s390x/sclp.c:360..363) + +Fixes: 0890ddea1a90 ("KVM: s390: protvirt: Add SCLP interrupt handling") +Signed-off-by: Eric Farman +Reviewed-by: Christian Borntraeger +Reviewed-by: Janosch Frank +Link: https://lore.kernel.org/r/20240205214300.1018522-1-farman@linux.ibm.com +Signed-off-by: Janosch Frank +Message-Id: <20240205214300.1018522-1-farman@linux.ibm.com> + +Acked-by: Miroslav Franc +--- + arch/s390/kvm/interrupt.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c +index fc4007cc067a..20e080e9150b 100644 +--- a/arch/s390/kvm/interrupt.c ++++ b/arch/s390/kvm/interrupt.c +@@ -1031,7 +1031,7 @@ static int __must_check __deliver_service_ev(struct kvm_vcpu *vcpu) + return 0; + } + ext = fi->srv_signal; +- /* only clear the event bit */ ++ /* only clear the event bits */ + fi->srv_signal.ext_params &= ~SCCB_EVENT_PENDING; + clear_bit(IRQ_PEND_EXT_SERVICE_EV, &fi->pending_irqs); + spin_unlock(&fi->lock); +@@ -1041,7 +1041,7 @@ static int __must_check __deliver_service_ev(struct kvm_vcpu *vcpu) + trace_kvm_s390_deliver_interrupt(vcpu->vcpu_id, KVM_S390_INT_SERVICE, + ext.ext_params, 0); + +- return write_sclp(vcpu, SCCB_EVENT_PENDING); ++ return write_sclp(vcpu, ext.ext_params & SCCB_EVENT_PENDING); + } + + static int __must_check __deliver_pfault_done(struct kvm_vcpu *vcpu) + diff --git a/patches.suse/s390-pai-fix-attr_event_free-upper-limit-for-pai-device-drivers.patch b/patches.suse/s390-pai-fix-attr_event_free-upper-limit-for-pai-device-drivers.patch new file mode 100644 index 0000000..19e7ff0 --- /dev/null +++ b/patches.suse/s390-pai-fix-attr_event_free-upper-limit-for-pai-device-drivers.patch @@ -0,0 +1,54 @@ +From: Thomas Richter +Date: Thu, 18 Jan 2024 13:03:39 +0100 +Subject: s390/pai: fix attr_event_free upper limit for pai device drivers +Git-commit: 225d09d6e5f3870560665a1829d2db79330b4c58 +Patch-mainline: v6.8 or v6.8-rc8 (next release) +References: git-fixes bsc#1221633 + +When the device drivers are initialized, a sysfs directory +is created. This contains many attributes which are allocated with +kzalloc(). Should it fail, the memory for the attributes already +created is freed in attr_event_free(). Its second parameter is number +of attribute elements to delete. This parameter is off by one. +When i. e. the 10th attribute fails to get created, attributes +numbered 0 to 9 should be deleted. Currently only attributes +numbered 0 to 8 are deleted. + +Fixes: 39d62336f5c1 ("s390/pai: add support for cryptography counters") +Reported-by: Sumanth Korikkar +Signed-off-by: Thomas Richter +Acked-by: Sumanth Korikkar +Signed-off-by: Heiko Carstens +Acked-by: Miroslav Franc +--- + arch/s390/kernel/perf_pai_crypto.c | 2 +- + arch/s390/kernel/perf_pai_ext.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/s390/kernel/perf_pai_crypto.c b/arch/s390/kernel/perf_pai_crypto.c +index bf8a672b15a4..522a5ea0a9f4 100644 +--- a/arch/s390/kernel/perf_pai_crypto.c ++++ b/arch/s390/kernel/perf_pai_crypto.c +@@ -721,7 +721,7 @@ static int __init attr_event_init(void) + for (i = 0; i < ARRAY_SIZE(paicrypt_ctrnames); i++) { + ret = attr_event_init_one(attrs, i); + if (ret) { +- attr_event_free(attrs, i - 1); ++ attr_event_free(attrs, i); + return ret; + } + } +diff --git a/arch/s390/kernel/perf_pai_ext.c b/arch/s390/kernel/perf_pai_ext.c +index af7f2b538c8f..95d1a890640a 100644 +--- a/arch/s390/kernel/perf_pai_ext.c ++++ b/arch/s390/kernel/perf_pai_ext.c +@@ -611,7 +611,7 @@ static int __init attr_event_init(void) + for (i = 0; i < ARRAY_SIZE(paiext_ctrnames); i++) { + ret = attr_event_init_one(attrs, i); + if (ret) { +- attr_event_free(attrs, i - 1); ++ attr_event_free(attrs, i); + return ret; + } + } + diff --git a/patches.suse/s390-vfio-ap-always-filter-entire-AP-matrix.patch b/patches.suse/s390-vfio-ap-always-filter-entire-AP-matrix.patch index 53e4612..66daa83 100644 --- a/patches.suse/s390-vfio-ap-always-filter-entire-AP-matrix.patch +++ b/patches.suse/s390-vfio-ap-always-filter-entire-AP-matrix.patch @@ -3,7 +3,7 @@ Date: Mon, 15 Jan 2024 13:54:31 -0500 Subject: s390/vfio-ap: always filter entire AP matrix Git-commit: 850fb7fa8c684a4c6bf0e4b6978f4ddcc5d43d11 Patch-mainline: v6.7 or v6.7-rc9 (next release) -References: git-fixes bsc#1219012 +References: git-fixes bsc#1219012 CVE-2024-26620 bsc#1221298 The vfio_ap_mdev_filter_matrix function is called whenever a new adapter or domain is assigned to the mdev. The purpose of the function is to update diff --git a/series.conf b/series.conf index 66948e2..95bf043 100644 --- a/series.conf +++ b/series.conf @@ -45586,6 +45586,7 @@ patches.suse/Documentation-hw-vuln-Add-documentation-for-RFDS.patch patches.suse/x86-rfds-Mitigate-Register-File-Data-Sampling-RFDS.patch patches.suse/KVM-x86-Export-RFDS_NO-and-RFDS_CLEAR-to-guests.patch + patches.suse/s390-pai-fix-attr_event_free-upper-limit-for-pai-device-drivers.patch patches.suse/arm64-dts-allwinner-h6-Add-RX-DMA-channel-for-SPDIF.patch patches.suse/arm64-dts-imx8mm-venice-gw71xx-fix-USB-OTG-VBUS-2.patch patches.suse/doc-guide-kernel-doc-tell-about-object-like-macros.patch @@ -45683,6 +45684,7 @@ patches.suse/ALSA-usb-audio-Stop-parsing-channels-bits-when-all-c.patch patches.suse/nilfs2-fix-failure-to-detect-DAT-corruption-in-btree.patch patches.suse/nilfs2-prevent-kernel-bug-at-submit_bh_wbc.patch + patches.suse/KVM-s390-only-deliver-the-set-service-event-bits.patch patches.suse/powerpc-pseries-Fix-potential-memleak-in-papr_get_at.patch # jejb/scsi for-next