diff --git a/patches.suse/s390-ctcm-fix-ctcm_new_device-error-return-code.patch b/patches.suse/s390-ctcm-fix-ctcm_new_device-error-return-code.patch new file mode 100644 index 0000000..db30e9c --- /dev/null +++ b/patches.suse/s390-ctcm-fix-ctcm_new_device-error-return-code.patch @@ -0,0 +1,51 @@ +From: Arnd Bergmann +Date: Wed, 17 Apr 2019 18:29:13 +0200 +Subject: s390: ctcm: fix ctcm_new_device error return code +Git-commit: 27b141fc234a3670d21bd742c35d7205d03cbb3a +Patch-mainline: v5.1-rc7 +References: git-fixes bsc#1211361 + +clang points out that the return code from this function is +undefined for one of the error paths: + +../drivers/s390/net/ctcm_main.c:1595:7: warning: variable 'result' is used uninitialized whenever 'if' condition is true + [-Wsometimes-uninitialized] + if (priv->channel[direction] == NULL) { + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../drivers/s390/net/ctcm_main.c:1638:9: note: uninitialized use occurs here + return result; + ^~~~~~ +../drivers/s390/net/ctcm_main.c:1595:3: note: remove the 'if' if its condition is always false + if (priv->channel[direction] == NULL) { + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../drivers/s390/net/ctcm_main.c:1539:12: note: initialize the variable 'result' to silence this warning + int result; + ^ + +Make it return -ENODEV here, as in the related failure cases. +gcc has a known bug in underreporting some of these warnings +when it has already eliminated the assignment of the return code +based on some earlier optimization step. + +Reviewed-by: Nathan Chancellor +Signed-off-by: Arnd Bergmann +Signed-off-by: Julian Wiedmann +Signed-off-by: David S. Miller +Acked-by: Miroslav Franc +--- + drivers/s390/net/ctcm_main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c +index 7617d21cb296..f63c5c871d3d 100644 +--- a/drivers/s390/net/ctcm_main.c ++++ b/drivers/s390/net/ctcm_main.c +@@ -1595,6 +1595,7 @@ static int ctcm_new_device(struct ccwgroup_device *cgdev) + if (priv->channel[direction] == NULL) { + if (direction == CTCM_WRITE) + channel_free(priv->channel[CTCM_READ]); ++ result = -ENODEV; + goto out_dev; + } + priv->channel[direction]->netdev = dev; + diff --git a/patches.suse/s390-dasd-correct-numa_node-in-dasd_alloc_queue.patch b/patches.suse/s390-dasd-correct-numa_node-in-dasd_alloc_queue.patch new file mode 100644 index 0000000..b2a9756 --- /dev/null +++ b/patches.suse/s390-dasd-correct-numa_node-in-dasd_alloc_queue.patch @@ -0,0 +1,32 @@ +From: Vasily Gorbik +Date: Sun, 24 Jun 2018 09:21:59 +0200 +Subject: s390/dasd: correct numa_node in dasd_alloc_queue +Git-commit: b17e3abb0af404cb62ad4ef1a5962f58b06e2b78 +Patch-mainline: v4.19-rc1 +References: git-fixes bsc#1211362 + +The numa_node field of the tag_set struct has to be explicitly +initialized, otherwise it stays as 0, which is a valid numa node id and +cause memory allocation failure if node 0 is offline. + +Acked-by: Stefan Haberland +Signed-off-by: Vasily Gorbik +Signed-off-by: Martin Schwidefsky +Acked-by: Miroslav Franc +--- + drivers/s390/block/dasd.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c +index d3a38c421503..7c3dddeb781c 100644 +--- a/drivers/s390/block/dasd.c ++++ b/drivers/s390/block/dasd.c +@@ -3120,6 +3120,7 @@ static int dasd_alloc_queue(struct dasd_block *block) + block->tag_set.nr_hw_queues = nr_hw_queues; + block->tag_set.queue_depth = queue_depth; + block->tag_set.flags = BLK_MQ_F_SHOULD_MERGE; ++ block->tag_set.numa_node = NUMA_NO_NODE; + + rc = blk_mq_alloc_tag_set(&block->tag_set); + if (rc) + diff --git a/patches.suse/s390-extmem-fix-gcc-8-stringop-overflow-warning.patch b/patches.suse/s390-extmem-fix-gcc-8-stringop-overflow-warning.patch new file mode 100644 index 0000000..eb7a665 --- /dev/null +++ b/patches.suse/s390-extmem-fix-gcc-8-stringop-overflow-warning.patch @@ -0,0 +1,52 @@ +From: Vasily Gorbik +Date: Sun, 17 Jun 2018 00:30:43 +0200 +Subject: s390/extmem: fix gcc 8 stringop-overflow warning +Git-commit: 6b2ddf33baec23dace85bd647e3fc4ac070963e8 +Patch-mainline: v4.19-rc1 +References: git-fixes bsc#1211363 + +arch/s390/mm/extmem.c: In function '__segment_load': +arch/s390/mm/extmem.c:436:2: warning: 'strncat' specified bound 7 equals +source length [-Wstringop-overflow=] + strncat(seg->res_name, " (DCSS)", 7); + +What gcc complains about here is the misuse of strncat function, which +in this case does not limit a number of bytes taken from "src", so it is +in the end the same as strcat(seg->res_name, " (DCSS)"); + +Keeping in mind that a res_name is 15 bytes, strncat in this case +would overflow the buffer and write 0 into alignment byte between the +fields in the struct. To avoid that increasing res_name size to 16, +and reusing strlcat. + +Reviewed-by: Heiko Carstens +Signed-off-by: Vasily Gorbik +Signed-off-by: Martin Schwidefsky +Acked-by: Miroslav Franc +--- + arch/s390/mm/extmem.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/s390/mm/extmem.c b/arch/s390/mm/extmem.c +index 6ad15d3fab81..84111a43ea29 100644 +--- a/arch/s390/mm/extmem.c ++++ b/arch/s390/mm/extmem.c +@@ -80,7 +80,7 @@ struct qin64 { + struct dcss_segment { + struct list_head list; + char dcss_name[8]; +- char res_name[15]; ++ char res_name[16]; + unsigned long start_addr; + unsigned long end; + atomic_t ref_count; +@@ -433,7 +433,7 @@ __segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long + memcpy(&seg->res_name, seg->dcss_name, 8); + EBCASC(seg->res_name, 8); + seg->res_name[8] = '\0'; +- strncat(seg->res_name, " (DCSS)", 7); ++ strlcat(seg->res_name, " (DCSS)", sizeof(seg->res_name)); + seg->res->name = seg->res_name; + rc = seg->vm_segtype; + if (rc == SEG_TYPE_SC || + diff --git a/patches.suse/s390-kasan-fix-early-pgm-check-handler-execution.patch b/patches.suse/s390-kasan-fix-early-pgm-check-handler-execution.patch new file mode 100644 index 0000000..fa90017 --- /dev/null +++ b/patches.suse/s390-kasan-fix-early-pgm-check-handler-execution.patch @@ -0,0 +1,38 @@ +From: Vasily Gorbik +Date: Wed, 17 Jun 2020 15:05:49 +0200 +Subject: s390/kasan: fix early pgm check handler execution +Git-commit: 998f5bbe3dbdab81c1cfb1aef7c3892f5d24f6c7 +Patch-mainline: v5.8-rc3 +References: git-fixes bsc#1211360 + +Currently if early_pgm_check_handler is called it ends up in pgm check +loop. The problem is that early_pgm_check_handler is instrumented by +KASAN but executed without DAT flag enabled which leads to addressing +exception when KASAN checks try to access shadow memory. + +Fix that by executing early handlers with DAT flag on under KASAN as +expected. + +Reported-and-tested-by: Alexander Egorenkov +Reviewed-by: Heiko Carstens +Signed-off-by: Vasily Gorbik +Signed-off-by: Heiko Carstens +Acked-by: Miroslav Franc +--- + arch/s390/kernel/early.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c +index cd241ee66eff..078277231858 100644 +--- a/arch/s390/kernel/early.c ++++ b/arch/s390/kernel/early.c +@@ -170,6 +170,8 @@ static noinline __init void setup_lowcore_early(void) + psw_t psw; + + psw.mask = PSW_MASK_BASE | PSW_DEFAULT_KEY | PSW_MASK_EA | PSW_MASK_BA; ++ if (IS_ENABLED(CONFIG_KASAN)) ++ psw.mask |= PSW_MASK_DAT; + psw.addr = (unsigned long) s390_base_ext_handler; + S390_lowcore.external_new_psw = psw; + psw.addr = (unsigned long) s390_base_pgm_handler; + diff --git a/patches.suse/s390-pci-fix-sleeping-in-atomic-during-hotplug.patch b/patches.suse/s390-pci-fix-sleeping-in-atomic-during-hotplug.patch new file mode 100644 index 0000000..27288e0 --- /dev/null +++ b/patches.suse/s390-pci-fix-sleeping-in-atomic-during-hotplug.patch @@ -0,0 +1,39 @@ +From: Sebastian Ott +Date: Thu, 18 Oct 2018 11:11:08 +0200 +Subject: s390/pci: fix sleeping in atomic during hotplug +Git-commit: 98dfd32620e970eb576ebce5ea39d905cb005e72 +Patch-mainline: v5.0-rc1 +References: git-fixes bsc#1211364 + +When triggered by pci hotplug (PEC 0x306) clp_get_state is called +with spinlocks held resulting in the following warning: + +zpci: n/a: Event 0x306 reconfigured PCI function 0x0 +BUG: sleeping function called from invalid context at mm/page_alloc.c:4324 +in_atomic(): 1, irqs_disabled(): 0, pid: 98, name: kmcheck +2 locks held by kmcheck/98: + +Change the allocation to use GFP_ATOMIC. + +Cc: stable@vger.kernel.org # 4.13+ +Signed-off-by: Sebastian Ott +Signed-off-by: Martin Schwidefsky +Acked-by: Miroslav Franc +--- + arch/s390/pci/pci_clp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/s390/pci/pci_clp.c b/arch/s390/pci/pci_clp.c +index 19b2d2a9b43d..eeb7450db18c 100644 +--- a/arch/s390/pci/pci_clp.c ++++ b/arch/s390/pci/pci_clp.c +@@ -436,7 +436,7 @@ int clp_get_state(u32 fid, enum zpci_state *state) + struct clp_state_data sd = {fid, ZPCI_FN_STATE_RESERVED}; + int rc; + +- rrb = clp_alloc_block(GFP_KERNEL); ++ rrb = clp_alloc_block(GFP_ATOMIC); + if (!rrb) + return -ENOMEM; + + diff --git a/patches.suse/s390-scm_blk-correct-numa_node-in-scm_blk_dev_setup.patch b/patches.suse/s390-scm_blk-correct-numa_node-in-scm_blk_dev_setup.patch new file mode 100644 index 0000000..fd25c97 --- /dev/null +++ b/patches.suse/s390-scm_blk-correct-numa_node-in-scm_blk_dev_setup.patch @@ -0,0 +1,32 @@ +From: Vasily Gorbik +Date: Mon, 25 Jun 2018 14:30:42 +0200 +Subject: s390/scm_blk: correct numa_node in scm_blk_dev_setup +Git-commit: d642d6262f4fcfa5d200ec6e218c17f0c15b3390 +Patch-mainline: v4.19-rc1 +References: git-fixes bsc#1211365 + +The numa_node field of the tag_set struct has to be explicitly +initialized, otherwise it stays as 0, which is a valid numa node id and +cause memory allocation failure if node 0 is offline. + +Acked-by: Sebastian Ott +Signed-off-by: Vasily Gorbik +Signed-off-by: Martin Schwidefsky +Acked-by: Miroslav Franc +--- + drivers/s390/block/scm_blk.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c +index b1fcb76dd272..98f66b7b6794 100644 +--- a/drivers/s390/block/scm_blk.c ++++ b/drivers/s390/block/scm_blk.c +@@ -455,6 +455,7 @@ int scm_blk_dev_setup(struct scm_blk_dev *bdev, struct scm_device *scmdev) + bdev->tag_set.nr_hw_queues = nr_requests; + bdev->tag_set.queue_depth = nr_requests_per_io * nr_requests; + bdev->tag_set.flags = BLK_MQ_F_SHOULD_MERGE; ++ bdev->tag_set.numa_node = NUMA_NO_NODE; + + ret = blk_mq_alloc_tag_set(&bdev->tag_set); + if (ret) + diff --git a/patches.suse/s390-sysinfo-add-missing-ifdef-CONFIG_PROC_FS.patch b/patches.suse/s390-sysinfo-add-missing-ifdef-CONFIG_PROC_FS.patch new file mode 100644 index 0000000..45b3d09 --- /dev/null +++ b/patches.suse/s390-sysinfo-add-missing-ifdef-CONFIG_PROC_FS.patch @@ -0,0 +1,43 @@ +From: Heiko Carstens +Date: Mon, 2 Jul 2018 10:54:02 +0200 +Subject: s390/sysinfo: add missing #ifdef CONFIG_PROC_FS +Git-commit: 9f35b818a2f90fb6cb291aa0c9f835d4f0974a9a +Patch-mainline: v4.19-rc1 +References: git-fixes bsc#1211366 + +Get rid of this compile warning for !PROC_FS: + + CC arch/s390/kernel/sysinfo.o +arch/s390/kernel/sysinfo.c:275:12: warning: 'sysinfo_show' defined but not used [-Wunused-function] + static int sysinfo_show(struct seq_file *m, void *v) + +Signed-off-by: Heiko Carstens +Signed-off-by: Martin Schwidefsky +Acked-by: Miroslav Franc +--- + arch/s390/kernel/sysinfo.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c +index 54f5496913fa..12f80d1f0415 100644 +--- a/arch/s390/kernel/sysinfo.c ++++ b/arch/s390/kernel/sysinfo.c +@@ -59,6 +59,8 @@ int stsi(void *sysinfo, int fc, int sel1, int sel2) + } + EXPORT_SYMBOL(stsi); + ++#ifdef CONFIG_PROC_FS ++ + static bool convert_ext_name(unsigned char encoding, char *name, size_t len) + { + switch (encoding) { +@@ -301,6 +303,8 @@ static int __init sysinfo_create_proc(void) + } + device_initcall(sysinfo_create_proc); + ++#endif /* CONFIG_PROC_FS */ ++ + /* + * Service levels interface. + */ + diff --git a/series.conf b/series.conf index 64f125e..8604288 100644 --- a/series.conf +++ b/series.conf @@ -36251,7 +36251,11 @@ patches.suse/s390-sles15sp1-00-03-04-zcrypt-Review-inline-assembler-constraints.patch patches.suse/s390-sles15sp1-00-03-05-zcrypt-Show-load-of-cards-and-queues-in-sysfs.patch patches.suse/s390-sles15sp1-00-03-06-zcrypt-Integrate-ap_asm.h-into-include-asm-ap.h.patch + patches.suse/s390-dasd-correct-numa_node-in-dasd_alloc_queue.patch + patches.suse/s390-scm_blk-correct-numa_node-in-scm_blk_dev_setup.patch + patches.suse/s390-extmem-fix-gcc-8-stringop-overflow-warning.patch patches.suse/s390-sles15sp1-00-03-07-zcrypt-add-copy_from_user-length-plausibility-c.patch + patches.suse/s390-sysinfo-add-missing-ifdef-CONFIG_PROC_FS.patch patches.suse/0085-RAID-s390-Remove-VLA-usage.patch patches.suse/s390-mm-correct-allocate_pgste-proc_handler-callback.patch patches.suse/s390-sles15-16-01-kvm-fix-deadlock-when-killed-by-oom.patch @@ -46352,6 +46356,7 @@ patches.suse/cred-allow-get_cred-and-put_cred-to-be-given-NULL.patch patches.suse/NFS-nfs_compare_mount_options-always-compare-auth-fl.patch patches.suse/sunrpc-handle-ENOMEM-in-rpcb_getport_async.patch + patches.suse/s390-pci-fix-sleeping-in-atomic-during-hotplug.patch patches.suse/clk-imx8qxp-make-the-name-of-clock-id-generic.patch patches.suse/drbd-narrow-rcu_read_lock-in-drbd_sync_handshake.patch patches.suse/drbd-ignore-all-zero-peer-volume-sizes-in-handshake.patch @@ -48938,6 +48943,7 @@ patches.suse/sunrpc-don-t-mark-uninitialised-items-as-VALID.patch patches.suse/nfsd-Don-t-release-the-callback-slot-unless-it-was-a.patch patches.suse/ipv4-set-the-tcp_min_rtt_wlen-range-from-0-to-one-da.patch + patches.suse/s390-ctcm-fix-ctcm_new_device-error-return-code.patch patches.suse/mlxsw-spectrum-Put-MC-TCs-into-DWRR-mode.patch patches.suse/mlxsw-pci-Reincrease-PCI-reset-timeout.patch patches.suse/mlxsw-spectrum-Fix-autoneg-status-in-ethtool.patch @@ -57076,6 +57082,7 @@ patches.suse/0010-ALSA-usb-audio-Add-registration-quirk-for-Kingston-H.patch patches.suse/ALSA-usb-audio-add-quirk-for-Samsung-USBC-Headset-AK.patch patches.suse/ALSA-usb-audio-Fix-OOB-access-of-mixer-element-list.patch + patches.suse/s390-kasan-fix-early-pgm-check-handler-execution.patch patches.suse/RDMA-efa-Set-maximum-pkeys-device-attribute.patch patches.suse/RDMA-qedr-Fix-KASAN-use-after-free-in-ucma_event_han.patch patches.suse/RDMA-cma-Protect-bind_list-and-listen_list-while-fin.patch