Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-08-21 07:01:11 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-08-21 07:01:11 +0200
commita5c4e7b8614bfe9647e087b6240d7f02374047c2 (patch)
treed6321b06f89ef6f5b65b3ce96dfba3dfe1d5e023
parentd066cfaee21df04f37e62c8c92bf0c04c137a389 (diff)
parent3b35ec5faed5dd6dee060797bbf70864b4431f4c (diff)
Merge branch 'SLE15' into SLE12-SP4
-rw-r--r--patches.arch/powerpc-fadump-Do-not-allow-hot-remove-memory-from-f.patch91
-rw-r--r--patches.arch/powerpc-fadump-Reservationless-firmware-assisted-dum.patch300
-rw-r--r--patches.arch/powerpc-fadump-Throw-proper-error-message-on-fadump-.patch79
-rw-r--r--patches.arch/powerpc-fadump-re-register-firmware-assisted-dump-if.patch10
-rw-r--r--patches.arch/powerpc-fadump-use-kstrtoint-to-handle-sysfs-store.patch77
-rw-r--r--patches.drivers/ibmvnic-Unmap-DMA-address-of-TX-descriptor-buffers-a.patch63
-rw-r--r--patches.fixes/0001-USB-CDC-fix-sanity-checks-in-CDC-union-parser.patch45
-rw-r--r--patches.fixes/0001-usb-cdc-acm-make-sure-a-refcount-is-taken-early-enou.patch56
-rw-r--r--patches.fixes/nvme-multipath-revalidate-nvme_ns_head-gendisk-in-nv.patch48
-rw-r--r--patches.fixes/xfs-clear-sb-s_fs_info-on-mount-failure.patch82
-rw-r--r--series.conf9
11 files changed, 855 insertions, 5 deletions
diff --git a/patches.arch/powerpc-fadump-Do-not-allow-hot-remove-memory-from-f.patch b/patches.arch/powerpc-fadump-Do-not-allow-hot-remove-memory-from-f.patch
new file mode 100644
index 0000000000..1fd2475023
--- /dev/null
+++ b/patches.arch/powerpc-fadump-Do-not-allow-hot-remove-memory-from-f.patch
@@ -0,0 +1,91 @@
+From 0db6896ff6332ba694f1e61b93ae3b2640317633 Mon Sep 17 00:00:00 2001
+From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
+Date: Mon, 20 Aug 2018 13:47:32 +0530
+Subject: [PATCH] powerpc/fadump: Do not allow hot-remove memory from fadump
+ reserved area.
+
+References: bsc#1120937, FATE#321840, FATE#325306
+Patch-mainline: v5.0-rc1
+Git-commit: 0db6896ff6332ba694f1e61b93ae3b2640317633
+
+For fadump to work successfully there should not be any holes in reserved
+memory ranges where kernel has asked firmware to move the content of old
+kernel memory in event of crash. Now that fadump uses CMA for reserved
+area, this memory area is now not protected from hot-remove operations
+unless it is cma allocated. Hence, fadump service can fail to re-register
+after the hot-remove operation, if hot-removed memory belongs to fadump
+reserved region. To avoid this make sure that memory from fadump reserved
+area is not hot-removable if fadump is registered.
+
+However, if user still wants to remove that memory, he can do so by
+manually stopping fadump service before hot-remove operation.
+
+Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/include/asm/fadump.h | 2 +-
+ arch/powerpc/kernel/fadump.c | 10 ++++++++--
+ arch/powerpc/platforms/pseries/hotplug-memory.c | 7 +++++--
+ 3 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/arch/powerpc/include/asm/fadump.h b/arch/powerpc/include/asm/fadump.h
+index 0a4e37159276..188776befaf9 100644
+--- a/arch/powerpc/include/asm/fadump.h
++++ b/arch/powerpc/include/asm/fadump.h
+@@ -205,7 +205,7 @@ struct fad_crash_memory_ranges {
+ unsigned long long size;
+ };
+
+-extern int is_fadump_boot_memory_area(u64 addr, ulong size);
++extern int is_fadump_memory_area(u64 addr, ulong size);
+ extern int early_init_dt_scan_fw_dump(unsigned long node,
+ const char *uname, int depth, void *data);
+ extern int fadump_reserve_mem(void);
+diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
+index b7f83d6eb697..45a8d0be1c96 100644
+--- a/arch/powerpc/kernel/fadump.c
++++ b/arch/powerpc/kernel/fadump.c
+@@ -183,13 +183,19 @@ int __init early_init_dt_scan_fw_dump(unsigned long node,
+
+ /*
+ * If fadump is registered, check if the memory provided
+- * falls within boot memory area.
++ * falls within boot memory area and reserved memory area.
+ */
+-int is_fadump_boot_memory_area(u64 addr, ulong size)
++int is_fadump_memory_area(u64 addr, ulong size)
+ {
++ u64 d_start = fw_dump.reserve_dump_area_start;
++ u64 d_end = d_start + fw_dump.reserve_dump_area_size;
++
+ if (!fw_dump.dump_registered)
+ return 0;
+
++ if (((addr + size) > d_start) && (addr <= d_end))
++ return 1;
++
+ return (addr + size) > RMA_START && addr <= fw_dump.boot_memory_size;
+ }
+
+diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
+index 3b881ac66d9a..be8a6db3558e 100644
+--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
++++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
+@@ -353,8 +353,11 @@ static bool lmb_is_removable(struct drmem_lmb *lmb)
+ phys_addr = lmb->base_addr;
+
+ #ifdef CONFIG_FA_DUMP
+- /* Don't hot-remove memory that falls in fadump boot memory area */
+- if (is_fadump_boot_memory_area(phys_addr, block_sz))
++ /*
++ * Don't hot-remove memory that falls in fadump boot memory area
++ * and memory that is reserved for capturing old kernel memory.
++ */
++ if (is_fadump_memory_area(phys_addr, block_sz))
+ return false;
+ #endif
+
+--
+2.19.2
+
diff --git a/patches.arch/powerpc-fadump-Reservationless-firmware-assisted-dum.patch b/patches.arch/powerpc-fadump-Reservationless-firmware-assisted-dum.patch
new file mode 100644
index 0000000000..c2fb00461c
--- /dev/null
+++ b/patches.arch/powerpc-fadump-Reservationless-firmware-assisted-dum.patch
@@ -0,0 +1,300 @@
+From a4e92ce8e4c8275bacfe3529d6ac85d54a233d87 Mon Sep 17 00:00:00 2001
+From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
+Date: Mon, 20 Aug 2018 13:47:17 +0530
+Subject: [PATCH] powerpc/fadump: Reservationless firmware assisted dump
+
+References: bsc#1120937, FATE#321840, FATE#325306
+Patch-mainline: v5.0-rc1
+Git-commit: a4e92ce8e4c8275bacfe3529d6ac85d54a233d87
+
+One of the primary issues with Firmware Assisted Dump (fadump) on Power
+is that it needs a large amount of memory to be reserved. On large
+systems with TeraBytes of memory, this reservation can be quite
+significant.
+
+In some cases, fadump fails if the memory reserved is insufficient, or
+if the reserved memory was DLPAR hot-removed.
+
+In the normal case, post reboot, the preserved memory is filtered to
+extract only relevant areas of interest using the makedumpfile tool.
+While the tool provides flexibility to determine what needs to be part
+of the dump and what memory to filter out, all supported distributions
+default this to "Capture only kernel data and nothing else".
+
+We take advantage of this default and the Linux kernel's Contiguous
+Memory Allocator (CMA) to fundamentally change the memory reservation
+model for fadump.
+
+Instead of setting aside a significant chunk of memory nobody can use,
+this patch uses CMA instead, to reserve a significant chunk of memory
+that the kernel is prevented from using (due to MIGRATE_CMA), but
+applications are free to use it. With this fadump will still be able
+to capture all of the kernel memory and most of the user space memory
+except the user pages that were present in CMA region.
+
+Essentially, on a P9 LPAR with 2 cores, 8GB RAM and current upstream:
+[root@zzxx-yy10 ~]# free -m
+ total used free shared buff/cache available
+Mem: 7557 193 6822 12 541 6725
+Swap: 4095 0 4095
+
+With this patch:
+[root@zzxx-yy10 ~]# free -m
+ total used free shared buff/cache available
+Mem: 8133 194 7464 12 475 7338
+Swap: 4095 0 4095
+
+Changes made here are completely transparent to how fadump has
+traditionally worked.
+
+Thanks to Aneesh Kumar and Anshuman Khandual for helping us understand
+CMA and its usage.
+
+TODO:
+- Handle case where CMA reservation spans nodes.
+
+Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
+Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
+Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ .../powerpc/firmware-assisted-dump.txt | 17 +++-
+ arch/powerpc/include/asm/fadump.h | 5 +
+ arch/powerpc/kernel/fadump.c | 97 +++++++++++++++++--
+ 3 files changed, 108 insertions(+), 11 deletions(-)
+
+diff --git a/Documentation/powerpc/firmware-assisted-dump.txt b/Documentation/powerpc/firmware-assisted-dump.txt
+index bdd344aa18d9..18c5feef2577 100644
+--- a/Documentation/powerpc/firmware-assisted-dump.txt
++++ b/Documentation/powerpc/firmware-assisted-dump.txt
+@@ -113,7 +113,15 @@ header, is usually reserved at an offset greater than boot memory
+ size (see Fig. 1). This area is *not* released: this region will
+ be kept permanently reserved, so that it can act as a receptacle
+ for a copy of the boot memory content in addition to CPU state
+-and HPTE region, in the case a crash does occur.
++and HPTE region, in the case a crash does occur. Since this reserved
++memory area is used only after the system crash, there is no point in
++blocking this significant chunk of memory from production kernel.
++Hence, the implementation uses the Linux kernel's Contiguous Memory
++Allocator (CMA) for memory reservation if CMA is configured for kernel.
++With CMA reservation this memory will be available for applications to
++use it, while kernel is prevented from using it. With this fadump will
++still be able to capture all of the kernel memory and most of the user
++space memory except the user pages that were present in CMA region.
+
+ o Memory Reservation during first kernel
+
+@@ -162,6 +170,9 @@ How to enable firmware-assisted dump (fadump):
+
+ 1. Set config option CONFIG_FA_DUMP=y and build kernel.
+ 2. Boot into linux kernel with 'fadump=on' kernel cmdline option.
++ By default, fadump reserved memory will be initialized as CMA area.
++ Alternatively, user can boot linux kernel with 'fadump=nocma' to
++ prevent fadump to use CMA.
+ 3. Optionally, user can also set 'crashkernel=' kernel cmdline
+ to specify size of the memory to reserve for boot memory dump
+ preservation.
+@@ -172,6 +183,10 @@ NOTE: 1. 'fadump_reserve_mem=' parameter has been deprecated. Instead
+ 2. If firmware-assisted dump fails to reserve memory then it
+ will fallback to existing kdump mechanism if 'crashkernel='
+ option is set at kernel cmdline.
++ 3. if user wants to capture all of user space memory and ok with
++ reserved memory not available to production system, then
++ 'fadump=nocma' kernel parameter can be used to fallback to
++ old behaviour.
+
+ Sysfs/debugfs files:
+ ------------
+diff --git a/arch/powerpc/include/asm/fadump.h b/arch/powerpc/include/asm/fadump.h
+index 1e7a33592e29..0a4e37159276 100644
+--- a/arch/powerpc/include/asm/fadump.h
++++ b/arch/powerpc/include/asm/fadump.h
+@@ -48,6 +48,10 @@
+
+ #define memblock_num_regions(memblock_type) (memblock.memblock_type.cnt)
+
++/* Alignement per CMA requirement. */
++#define FADUMP_CMA_ALIGNMENT (PAGE_SIZE << \
++ max_t(unsigned long, MAX_ORDER - 1, pageblock_order))
++
+ /* Firmware provided dump sections */
+ #define FADUMP_CPU_STATE_DATA 0x0001
+ #define FADUMP_HPTE_REGION 0x0002
+@@ -141,6 +145,7 @@ struct fw_dump {
+ unsigned long fadump_supported:1;
+ unsigned long dump_active:1;
+ unsigned long dump_registered:1;
++ unsigned long nocma:1;
+ };
+
+ /*
+diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
+index 7a0da83bf883..ec937c7deae8 100644
+--- a/arch/powerpc/kernel/fadump.c
++++ b/arch/powerpc/kernel/fadump.c
+@@ -35,6 +35,7 @@
+ #include <linux/kobject.h>
+ #include <linux/sysfs.h>
+ #include <linux/slab.h>
++#include <linux/cma.h>
+
+ #include <asm/debugfs.h>
+ #include <asm/page.h>
+@@ -46,6 +47,9 @@
+ static struct fw_dump fw_dump;
+ static struct fadump_mem_struct fdm;
+ static const struct fadump_mem_struct *fdm_active;
++#ifdef CONFIG_CMA
++static struct cma *fadump_cma;
++#endif
+
+ static DEFINE_MUTEX(fadump_mutex);
+ struct fad_crash_memory_ranges *crash_memory_ranges;
+@@ -53,6 +57,67 @@ int crash_memory_ranges_size;
+ int crash_mem_ranges;
+ int max_crash_mem_ranges;
+
++#ifdef CONFIG_CMA
++/*
++ * fadump_cma_init() - Initialize CMA area from a fadump reserved memory
++ *
++ * This function initializes CMA area from fadump reserved memory.
++ * The total size of fadump reserved memory covers for boot memory size
++ * + cpu data size + hpte size and metadata.
++ * Initialize only the area equivalent to boot memory size for CMA use.
++ * The reamining portion of fadump reserved memory will be not given
++ * to CMA and pages for thoes will stay reserved. boot memory size is
++ * aligned per CMA requirement to satisy cma_init_reserved_mem() call.
++ * But for some reason even if it fails we still have the memory reservation
++ * with us and we can still continue doing fadump.
++ */
++int __init fadump_cma_init(void)
++{
++ unsigned long long base, size;
++ int rc;
++
++ if (!fw_dump.fadump_enabled)
++ return 0;
++
++ /*
++ * Do not use CMA if user has provided fadump=nocma kernel parameter.
++ * Return 1 to continue with fadump old behaviour.
++ */
++ if (fw_dump.nocma)
++ return 1;
++
++ base = fw_dump.reserve_dump_area_start;
++ size = fw_dump.boot_memory_size;
++
++ if (!size)
++ return 0;
++
++ rc = cma_init_reserved_mem(base, size, 0, "fadump_cma", &fadump_cma);
++ if (rc) {
++ pr_err("Failed to init cma area for firmware-assisted dump,%d\n", rc);
++ /*
++ * Though the CMA init has failed we still have memory
++ * reservation with us. The reserved memory will be
++ * blocked from production system usage. Hence return 1,
++ * so that we can continue with fadump.
++ */
++ return 1;
++ }
++
++ /*
++ * So we now have successfully initialized cma area for fadump.
++ */
++ pr_info("Initialized 0x%lx bytes cma area at %ldMB from 0x%lx "
++ "bytes of memory reserved for firmware-assisted dump\n",
++ cma_get_size(fadump_cma),
++ (unsigned long)cma_get_base(fadump_cma) >> 20,
++ fw_dump.reserve_dump_area_size);
++ return 1;
++}
++#else
++static int __init fadump_cma_init(void) { return 1; }
++#endif /* CONFIG_CMA */
++
+ /* Scan the Firmware Assisted dump configuration details. */
+ int __init early_init_dt_scan_fw_dump(unsigned long node,
+ const char *uname, int depth, void *data)
+@@ -378,8 +443,15 @@ int __init fadump_reserve_mem(void)
+ */
+ if (fdm_active)
+ fw_dump.boot_memory_size = be64_to_cpu(fdm_active->rmr_region.source_len);
+- else
++ else {
+ fw_dump.boot_memory_size = fadump_calculate_reserve_size();
++#ifdef CONFIG_CMA
++ if (!fw_dump.nocma)
++ fw_dump.boot_memory_size =
++ ALIGN(fw_dump.boot_memory_size,
++ FADUMP_CMA_ALIGNMENT);
++#endif
++ }
+
+ /*
+ * Calculate the memory boundary.
+@@ -426,8 +498,9 @@ int __init fadump_reserve_mem(void)
+ fw_dump.fadumphdr_addr =
+ be64_to_cpu(fdm_active->rmr_region.destination_address) +
+ be64_to_cpu(fdm_active->rmr_region.source_len);
+- pr_debug("fadumphdr_addr = %p\n",
+- (void *) fw_dump.fadumphdr_addr);
++ pr_debug("fadumphdr_addr = %pa\n", &fw_dump.fadumphdr_addr);
++ fw_dump.reserve_dump_area_start = base;
++ fw_dump.reserve_dump_area_size = size;
+ } else {
+ size = get_fadump_area_size();
+
+@@ -455,10 +528,11 @@ int __init fadump_reserve_mem(void)
+ (unsigned long)(size >> 20),
+ (unsigned long)(base >> 20),
+ (unsigned long)(memblock_phys_mem_size() >> 20));
+- }
+
+- fw_dump.reserve_dump_area_start = base;
+- fw_dump.reserve_dump_area_size = size;
++ fw_dump.reserve_dump_area_start = base;
++ fw_dump.reserve_dump_area_size = size;
++ return fadump_cma_init();
++ }
+ return 1;
+ }
+
+@@ -477,6 +551,10 @@ static int __init early_fadump_param(char *p)
+ fw_dump.fadump_enabled = 1;
+ else if (strncmp(p, "off", 3) == 0)
+ fw_dump.fadump_enabled = 0;
++ else if (strncmp(p, "nocma", 5) == 0) {
++ fw_dump.fadump_enabled = 1;
++ fw_dump.nocma = 1;
++ }
+
+ return 0;
+ }
+@@ -1229,7 +1307,7 @@ static int fadump_unregister_dump(struct fadump_mem_struct *fdm)
+ return 0;
+ }
+
+-static int fadump_invalidate_dump(struct fadump_mem_struct *fdm)
++static int fadump_invalidate_dump(const struct fadump_mem_struct *fdm)
+ {
+ int rc = 0;
+ unsigned int wait_time;
+@@ -1260,9 +1338,8 @@ void fadump_cleanup(void)
+ {
+ /* Invalidate the registration only if dump is active. */
+ if (fw_dump.dump_active) {
+- init_fadump_mem_struct(&fdm,
+- be64_to_cpu(fdm_active->cpu_state_data.destination_address));
+- fadump_invalidate_dump(&fdm);
++ /* pass the same memory dump structure provided by platform */
++ fadump_invalidate_dump(fdm_active);
+ } else if (fw_dump.dump_registered) {
+ /* Un-register Firmware-assisted dump if it was registered. */
+ fadump_unregister_dump(&fdm);
+--
+2.19.2
+
diff --git a/patches.arch/powerpc-fadump-Throw-proper-error-message-on-fadump-.patch b/patches.arch/powerpc-fadump-Throw-proper-error-message-on-fadump-.patch
new file mode 100644
index 0000000000..3e205274d0
--- /dev/null
+++ b/patches.arch/powerpc-fadump-Throw-proper-error-message-on-fadump-.patch
@@ -0,0 +1,79 @@
+From f86593be1e7f5405b980bb4b11640250ac81d7cb Mon Sep 17 00:00:00 2001
+From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
+Date: Mon, 20 Aug 2018 13:47:24 +0530
+Subject: [PATCH] powerpc/fadump: Throw proper error message on fadump
+ registration failure
+
+References: bsc#1120937, FATE#321840, FATE#325306
+Patch-mainline: v5.0-rc1
+Git-commit: f86593be1e7f5405b980bb4b11640250ac81d7cb
+
+fadump fails to register when there are holes in reserved memory area.
+This can happen if user has hot-removed a memory that falls in the
+fadump reserved memory area. Throw a meaningful error message to the
+user in such case.
+
+Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
+[mpe: is_reserved_memory_area_contiguous() returns bool, unsplit string]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/kernel/fadump.c | 35 +++++++++++++++++++++++++++++++++--
+ 1 file changed, 33 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
+index ec937c7deae8..b7f83d6eb697 100644
+--- a/arch/powerpc/kernel/fadump.c
++++ b/arch/powerpc/kernel/fadump.c
+@@ -237,6 +237,35 @@ static int is_boot_memory_area_contiguous(void)
+ return ret;
+ }
+
++/*
++ * Returns true, if there are no holes in reserved memory area,
++ * false otherwise.
++ */
++static bool is_reserved_memory_area_contiguous(void)
++{
++ struct memblock_region *reg;
++ unsigned long start, end;
++ unsigned long d_start = fw_dump.reserve_dump_area_start;
++ unsigned long d_end = d_start + fw_dump.reserve_dump_area_size;
++
++ for_each_memblock(memory, reg) {
++ start = max(d_start, (unsigned long)reg->base);
++ end = min(d_end, (unsigned long)(reg->base + reg->size));
++ if (d_start < end) {
++ /* Memory hole from d_start to start */
++ if (start > d_start)
++ break;
++
++ if (end == d_end)
++ return true;
++
++ d_start = end + 1;
++ }
++ }
++
++ return false;
++}
++
+ /* Print firmware assisted dump configurations for debugging purpose. */
+ static void fadump_show_config(void)
+ {
+@@ -603,8 +632,10 @@ static int register_fw_dump(struct fadump_mem_struct *fdm)
+ break;
+ case -3:
+ if (!is_boot_memory_area_contiguous())
+- pr_err("Can't have holes in boot memory area while "
+- "registering fadump\n");
++ pr_err("Can't have holes in boot memory area while registering fadump\n");
++ else if (!is_reserved_memory_area_contiguous())
++ pr_err("Can't have holes in reserved memory area while"
++ " registering fadump\n");
+
+ printk(KERN_ERR "Failed to register firmware-assisted kernel"
+ " dump. Parameter Error(%d).\n", rc);
+--
+2.19.2
+
diff --git a/patches.arch/powerpc-fadump-re-register-firmware-assisted-dump-if.patch b/patches.arch/powerpc-fadump-re-register-firmware-assisted-dump-if.patch
index 2a99a71cb8..093078a2e2 100644
--- a/patches.arch/powerpc-fadump-re-register-firmware-assisted-dump-if.patch
+++ b/patches.arch/powerpc-fadump-re-register-firmware-assisted-dump-if.patch
@@ -1,4 +1,4 @@
-From f5aa3c72fe11280467d94e8d420b009b7acb074c Mon Sep 17 00:00:00 2001
+From 0823c68b054bca9dc321adea829af5cf36afb30b Mon Sep 17 00:00:00 2001
From: Hari Bathini <hbathini@linux.ibm.com>
Date: Fri, 14 Sep 2018 19:36:02 +0530
Subject: [PATCH] powerpc/fadump: re-register firmware-assisted dump if already
@@ -29,12 +29,12 @@ Acked-by: Michal Suchanek <msuchanek@suse.de>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
-index fa4de264b747..0894ac5519b2 100644
+index a711d22339ea..761b28b1427d 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
-@@ -1435,8 +1435,8 @@ static ssize_t fadump_register_store(struct kobject *kobj,
+@@ -1444,8 +1444,8 @@ static ssize_t fadump_register_store(struct kobject *kobj,
break;
- case '1':
+ case 1:
if (fw_dump.dump_registered == 1) {
- ret = -EEXIST;
- goto unlock_out;
@@ -44,5 +44,5 @@ index fa4de264b747..0894ac5519b2 100644
/* Register Firmware-assisted dump */
ret = register_fadump();
--
-2.13.7
+2.22.0
diff --git a/patches.arch/powerpc-fadump-use-kstrtoint-to-handle-sysfs-store.patch b/patches.arch/powerpc-fadump-use-kstrtoint-to-handle-sysfs-store.patch
new file mode 100644
index 0000000000..57487f9273
--- /dev/null
+++ b/patches.arch/powerpc-fadump-use-kstrtoint-to-handle-sysfs-store.patch
@@ -0,0 +1,77 @@
+From dcdc46794b7bb76733d9792cca2f45871d66881f Mon Sep 17 00:00:00 2001
+From: Michal Suchanek <msuchanek@suse.de>
+Date: Mon, 26 Jun 2017 16:06:01 +0200
+Subject: [PATCH] powerpc/fadump: use kstrtoint to handle sysfs store
+
+References: bsc#1146376
+Patch-mainline: v4.15-rc1
+Git-commit: dcdc46794b7bb76733d9792cca2f45871d66881f
+
+Currently sysfs store handlers in fadump use if buf[0] == 'char'.
+
+This means input "100foo" is interpreted as '1' and "01" as '0'.
+
+Change to kstrtoint so leading zeroes and the like is handled in
+expected way.
+
+Signed-off-by: Michal Suchanek <msuchanek@suse.de>
+Acked-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
+Signed-off-by: Michal Suchanek <a class="moz-txt-link-rfc2396E" href="mailto:msuchanek@suse.de">&lt;msuchanek@suse.de&gt;</a></pre>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+---
+ arch/powerpc/kernel/fadump.c | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
+index e1431800bfb9..04ea5c04fd24 100644
+--- a/arch/powerpc/kernel/fadump.c
++++ b/arch/powerpc/kernel/fadump.c
+@@ -1270,10 +1270,15 @@ static ssize_t fadump_release_memory_store(struct kobject *kobj,
+ struct kobj_attribute *attr,
+ const char *buf, size_t count)
+ {
++ int input = -1;
++
+ if (!fw_dump.dump_active)
+ return -EPERM;
+
+- if (buf[0] == '1') {
++ if (kstrtoint(buf, 0, &input))
++ return -EINVAL;
++
++ if (input == 1) {
+ /*
+ * Take away the '/proc/vmcore'. We are releasing the dump
+ * memory, hence it will not be valid anymore.
+@@ -1307,21 +1312,25 @@ static ssize_t fadump_register_store(struct kobject *kobj,
+ const char *buf, size_t count)
+ {
+ int ret = 0;
++ int input = -1;
+
+ if (!fw_dump.fadump_enabled || fdm_active)
+ return -EPERM;
+
++ if (kstrtoint(buf, 0, &input))
++ return -EINVAL;
++
+ mutex_lock(&fadump_mutex);
+
+- switch (buf[0]) {
+- case '0':
++ switch (input) {
++ case 0:
+ if (fw_dump.dump_registered == 0) {
+ goto unlock_out;
+ }
+ /* Un-register Firmware-assisted dump */
+ fadump_unregister_dump(&fdm);
+ break;
+- case '1':
++ case 1:
+ if (fw_dump.dump_registered == 1) {
+ ret = -EEXIST;
+ goto unlock_out;
+--
+2.22.0
+
diff --git a/patches.drivers/ibmvnic-Unmap-DMA-address-of-TX-descriptor-buffers-a.patch b/patches.drivers/ibmvnic-Unmap-DMA-address-of-TX-descriptor-buffers-a.patch
new file mode 100644
index 0000000000..ddee90a1c9
--- /dev/null
+++ b/patches.drivers/ibmvnic-Unmap-DMA-address-of-TX-descriptor-buffers-a.patch
@@ -0,0 +1,63 @@
+From 80f0fe0934cd3daa13a5e4d48a103f469115b160 Mon Sep 17 00:00:00 2001
+From: Thomas Falcon <tlfalcon@linux.ibm.com>
+Date: Wed, 14 Aug 2019 14:57:05 -0500
+Subject: [PATCH] ibmvnic: Unmap DMA address of TX descriptor buffers after use
+
+References: bsc#1146351 ltc#180726
+Patch-mainline: v5.3 or v5.3-rc6 (next release)
+Git-commit: 80f0fe0934cd3daa13a5e4d48a103f469115b160
+
+There's no need to wait until a completion is received to unmap
+TX descriptor buffers that have been passed to the hypervisor.
+Instead unmap it when the hypervisor call has completed. This patch
+avoids the possibility that a buffer will not be unmapped because
+a TX completion is lost or mishandled.
+
+Reported-by: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
+Tested-by: Devesh K. Singh <devesh_singh@in.ibm.com>
+Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmvnic.c | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
+index 3da680073265..cebd20f3128d 100644
+--- a/drivers/net/ethernet/ibm/ibmvnic.c
++++ b/drivers/net/ethernet/ibm/ibmvnic.c
+@@ -1568,6 +1568,8 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
+ lpar_rc = send_subcrq_indirect(adapter, handle_array[queue_num],
+ (u64)tx_buff->indir_dma,
+ (u64)num_entries);
++ dma_unmap_single(dev, tx_buff->indir_dma,
++ sizeof(tx_buff->indir_arr), DMA_TO_DEVICE);
+ } else {
+ tx_buff->num_entries = num_entries;
+ lpar_rc = send_subcrq(adapter, handle_array[queue_num],
+@@ -2788,7 +2790,6 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
+ union sub_crq *next;
+ int index;
+ int i, j;
+- u8 *first;
+
+ restart_loop:
+ while (pending_scrq(adapter, scrq)) {
+@@ -2818,14 +2819,6 @@ static int ibmvnic_complete_tx(struct ibmvnic_adapter *adapter,
+
+ txbuff->data_dma[j] = 0;
+ }
+- /* if sub_crq was sent indirectly */
+- first = &txbuff->indir_arr[0].generic.first;
+- if (*first == IBMVNIC_CRQ_CMD) {
+- dma_unmap_single(dev, txbuff->indir_dma,
+- sizeof(txbuff->indir_arr),
+- DMA_TO_DEVICE);
+- *first = 0;
+- }
+
+ if (txbuff->last_frag) {
+ dev_kfree_skb_any(txbuff->skb);
+--
+2.22.0
+
diff --git a/patches.fixes/0001-USB-CDC-fix-sanity-checks-in-CDC-union-parser.patch b/patches.fixes/0001-USB-CDC-fix-sanity-checks-in-CDC-union-parser.patch
new file mode 100644
index 0000000000..b3327c93f4
--- /dev/null
+++ b/patches.fixes/0001-USB-CDC-fix-sanity-checks-in-CDC-union-parser.patch
@@ -0,0 +1,45 @@
+From 54364278fb3cabdea51d6398b07c87415065b3fc Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Tue, 13 Aug 2019 11:35:41 +0200
+Subject: [PATCH] USB: CDC: fix sanity checks in CDC union parser
+Git-commit: 54364278fb3cabdea51d6398b07c87415065b3fc
+Patch-mainline: v5.3-rc5
+References: bsc#1142635
+
+A few checks checked for the size of the pointer to a structure
+instead of the structure itself. Copy & paste issue presumably.
+
+Fixes: e4c6fb7794982 ("usbnet: move the CDC parser into USB core")
+Cc: stable <stable@vger.kernel.org>
+Reported-by: syzbot+45a53506b65321c1fe91@syzkaller.appspotmail.com
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Link: https://lore.kernel.org/r/20190813093541.18889-1-oneukum@suse.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/core/message.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
+index e844bb7b5676..5adf489428aa 100644
+--- a/drivers/usb/core/message.c
++++ b/drivers/usb/core/message.c
+@@ -2218,14 +2218,14 @@ int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr,
+ (struct usb_cdc_dmm_desc *)buffer;
+ break;
+ case USB_CDC_MDLM_TYPE:
+- if (elength < sizeof(struct usb_cdc_mdlm_desc *))
++ if (elength < sizeof(struct usb_cdc_mdlm_desc))
+ goto next_desc;
+ if (desc)
+ return -EINVAL;
+ desc = (struct usb_cdc_mdlm_desc *)buffer;
+ break;
+ case USB_CDC_MDLM_DETAIL_TYPE:
+- if (elength < sizeof(struct usb_cdc_mdlm_detail_desc *))
++ if (elength < sizeof(struct usb_cdc_mdlm_detail_desc))
+ goto next_desc;
+ if (detail)
+ return -EINVAL;
+--
+2.16.4
+
diff --git a/patches.fixes/0001-usb-cdc-acm-make-sure-a-refcount-is-taken-early-enou.patch b/patches.fixes/0001-usb-cdc-acm-make-sure-a-refcount-is-taken-early-enou.patch
new file mode 100644
index 0000000000..a57409795f
--- /dev/null
+++ b/patches.fixes/0001-usb-cdc-acm-make-sure-a-refcount-is-taken-early-enou.patch
@@ -0,0 +1,56 @@
+From c52873e5a1ef72f845526d9f6a50704433f9c625 Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Thu, 8 Aug 2019 16:21:19 +0200
+Subject: [PATCH] usb: cdc-acm: make sure a refcount is taken early enough
+Git-commit: c52873e5a1ef72f845526d9f6a50704433f9c625
+Patch-mainline: v5.3-rc5
+References: bsc#1142635
+
+destroy() will decrement the refcount on the interface, so that
+it needs to be taken so early that it never undercounts.
+
+Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)")
+Cc: stable <stable@vger.kernel.org>
+Reported-and-tested-by: syzbot+1b2449b7b5dc240d107a@syzkaller.appspotmail.com
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Link: https://lore.kernel.org/r/20190808142119.7998-1-oneukum@suse.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/class/cdc-acm.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/class/cdc-acm.c
++++ b/drivers/usb/class/cdc-acm.c
+@@ -1342,10 +1342,6 @@ made_compressed_probe:
+ if (acm == NULL)
+ goto alloc_fail;
+
+- minor = acm_alloc_minor(acm);
+- if (minor < 0)
+- goto alloc_fail1;
+-
+ ctrlsize = usb_endpoint_maxp(epctrl);
+ readsize = usb_endpoint_maxp(epread) *
+ (quirks == SINGLE_RX_URB ? 1 : 2);
+@@ -1353,6 +1349,13 @@ made_compressed_probe:
+ acm->writesize = usb_endpoint_maxp(epwrite) * 20;
+ acm->control = control_interface;
+ acm->data = data_interface;
++
++ usb_get_intf(acm->control); /* undone in destruct() */
++
++ minor = acm_alloc_minor(acm);
++ if (minor < 0)
++ goto alloc_fail1;
++
+ acm->minor = minor;
+ acm->dev = usb_dev;
+ if (h.usb_cdc_acm_descriptor)
+@@ -1501,7 +1504,6 @@ skip_countries:
+ usb_driver_claim_interface(&acm_driver, data_interface, acm);
+ usb_set_intfdata(data_interface, acm);
+
+- usb_get_intf(control_interface);
+ tty_dev = tty_port_register_device(&acm->port, acm_tty_driver, minor,
+ &control_interface->dev);
+ if (IS_ERR(tty_dev)) {
diff --git a/patches.fixes/nvme-multipath-revalidate-nvme_ns_head-gendisk-in-nv.patch b/patches.fixes/nvme-multipath-revalidate-nvme_ns_head-gendisk-in-nv.patch
new file mode 100644
index 0000000000..53a501574d
--- /dev/null
+++ b/patches.fixes/nvme-multipath-revalidate-nvme_ns_head-gendisk-in-nv.patch
@@ -0,0 +1,48 @@
+From fab7772bfbcfe8fb8e3e352a6a8fcaf044cded17 Mon Sep 17 00:00:00 2001
+From: Anthony Iliopoulos <ailiopoulos@suse.com>
+Date: Mon, 29 Jul 2019 14:40:40 +0200
+Subject: [PATCH] nvme-multipath: revalidate nvme_ns_head gendisk in
+ nvme_validate_ns
+Git-commit: fab7772bfbcfe8fb8e3e352a6a8fcaf044cded17
+Patch-mainline: v5.3-rc5
+References: bsc#1120876
+
+When CONFIG_NVME_MULTIPATH is set, only the hidden gendisk associated
+with the per-controller ns is run through revalidate_disk when a
+rescan is triggered, while the visible blockdev never gets its size
+(bdev->bd_inode->i_size) updated to reflect any capacity changes that
+may have occurred.
+
+This prevents online resizing of nvme block devices and in extension of
+any filesystems atop that will are unable to expand while mounted, as
+userspace relies on the blockdev size for obtaining the disk capacity
+(via BLKGETSIZE/64 ioctls).
+
+Fix this by explicitly revalidating the actual namespace gendisk in
+addition to the per-controller gendisk, when multipath is enabled.
+
+Signed-off-by: Anthony Iliopoulos <ailiopoulos@suse.com>
+Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Acked-by: Anthony Iliopoulos <ailiopoulos@suse.com>
+
+---
+ drivers/nvme/host/core.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
+index 8f3fbe5ca937..80c7a7ee240b 100644
+--- a/drivers/nvme/host/core.c
++++ b/drivers/nvme/host/core.c
+@@ -1715,6 +1715,7 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
+ if (ns->head->disk) {
+ nvme_update_disk_info(ns->head->disk, ns, id);
+ blk_queue_stack_limits(ns->head->disk->queue, ns->queue);
++ revalidate_disk(ns->head->disk);
+ }
+ #endif
+ }
+--
+2.16.4
+
diff --git a/patches.fixes/xfs-clear-sb-s_fs_info-on-mount-failure.patch b/patches.fixes/xfs-clear-sb-s_fs_info-on-mount-failure.patch
new file mode 100644
index 0000000000..555a0f1f71
--- /dev/null
+++ b/patches.fixes/xfs-clear-sb-s_fs_info-on-mount-failure.patch
@@ -0,0 +1,82 @@
+From c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 Mon Sep 17 00:00:00 2001
+From: Dave Chinner <dchinner@redhat.com>
+Date: Thu, 10 May 2018 21:50:23 -0700
+Subject: [PATCH] xfs: clear sb->s_fs_info on mount failure
+Git-commit: c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82
+Patch-mainline: v4.18-rc1
+References: bsc#1146285, CVE-2018-20976
+
+We recently had an oops reported on a 4.14 kernel in
+xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage
+and so the m_perag_tree lookup walked into lala land.
+
+Essentially, the machine was under memory pressure when the mount
+was being run, xfs_fs_fill_super() failed after allocating the
+xfs_mount and attaching it to sb->s_fs_info. It then cleaned up and
+freed the xfs_mount, but the sb->s_fs_info field still pointed to
+the freed memory. Hence when the superblock shrinker then ran
+it fell off the bad pointer.
+
+With the superblock shrinker problem fixed at teh VFS level, this
+stale s_fs_info pointer is still a problem - we use it
+unconditionally in ->put_super when the superblock is being torn
+down, and hence we can still trip over it after a ->fill_super
+call failure. Hence we need to clear s_fs_info if
+xfs-fs_fill_super() fails, and we need to check if it's valid in
+the places it can potentially be dereferenced after a ->fill_super
+failure.
+
+Signed-off-by: Dave Chinner <dchinner@redhat.com>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Acked-by: Anthony Iliopoulos <ailiopoulos@suse.com>
+
+---
+ fs/xfs/xfs_super.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
+index f19fe291356e..39e5ec3d407f 100644
+--- a/fs/xfs/xfs_super.c
++++ b/fs/xfs/xfs_super.c
+@@ -1772,6 +1772,7 @@ xfs_fs_fill_super(
+ out_close_devices:
+ xfs_close_devices(mp);
+ out_free_fsname:
++ sb->s_fs_info = NULL;
+ xfs_free_fsname(mp);
+ kfree(mp);
+ out:
+@@ -1789,6 +1790,10 @@ xfs_fs_put_super(
+ {
+ struct xfs_mount *mp = XFS_M(sb);
+
++ /* if ->fill_super failed, we have no mount to tear down */
++ if (!sb->s_fs_info)
++ return;
++
+ xfs_notice(mp, "Unmounting Filesystem");
+ xfs_filestream_unmount(mp);
+ xfs_unmountfs(mp);
+@@ -1798,6 +1803,8 @@ xfs_fs_put_super(
+ xfs_destroy_percpu_counters(mp);
+ xfs_destroy_mount_workqueues(mp);
+ xfs_close_devices(mp);
++
++ sb->s_fs_info = NULL;
+ xfs_free_fsname(mp);
+ kfree(mp);
+ }
+@@ -1817,6 +1824,9 @@ xfs_fs_nr_cached_objects(
+ struct super_block *sb,
+ struct shrink_control *sc)
+ {
++ /* Paranoia: catch incorrect calls during mount setup or teardown */
++ if (WARN_ON_ONCE(!sb->s_fs_info))
++ return 0;
+ return xfs_reclaim_inodes_count(XFS_M(sb));
+ }
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 7fc10c82c1..36aee46d82 100644
--- a/series.conf
+++ b/series.conf
@@ -10145,6 +10145,7 @@
patches.arch/powerpc-powernv-idle-Round-up-latency-and-residency-.patch
patches.arch/powerpc-powernv-npu-Use-flush_all_mm-instead-of-flus.patch
patches.arch/powerpc-powernv-npu-Don-t-explicitly-flush-nmmu-tlb.patch
+ patches.arch/powerpc-fadump-use-kstrtoint-to-handle-sysfs-store.patch
patches.arch/powerpc-signal-Properly-handle-return-value-from-upr.patch
patches.arch/powerpc-Fix-DABR-match-on-hash-based-systems.patch
patches.arch/powerpc-64s-hash-Fix-512T-hint-detection-to-use-128T.patch
@@ -16775,6 +16776,7 @@
patches.fixes/ext4-bubble-errors-from-ext4_find_inline_data_nolock.patch
patches.fixes/ext4-fix-fencepost-error-in-check-for-inode-count-ov.patch
patches.suse/xfs-validate-cached-inodes-are-free-when-allocated.patch
+ patches.fixes/xfs-clear-sb-s_fs_info-on-mount-failure.patch
patches.fixes/fs-allow-per-device-dax-status-checking-for-filesystems.patch
patches.fixes/dax-change-bdev_dax_supported-to-support-boolean-ret.patch
patches.drivers/crypto-caam-fix-DMA-mapping-dir-for-generated-IV
@@ -21065,6 +21067,9 @@
patches.arch/powerpc-perf-Remove-l2-bus-events-from-HW-cache-even.patch
patches.arch/powerpc-fsl-Fix-spectre_v2-mitigations-reporting.patch
patches.arch/powerpc-powernv-ioda-Allocate-indirect-TCE-levels-of.patch
+ patches.arch/powerpc-fadump-Reservationless-firmware-assisted-dum.patch
+ patches.arch/powerpc-fadump-Throw-proper-error-message-on-fadump-.patch
+ patches.arch/powerpc-fadump-Do-not-allow-hot-remove-memory-from-f.patch
patches.arch/powerpc-tm-Set-MSR-TS-just-prior-to-recheckpoint.patch
patches.arch/powerpc-tm-Save-MSR-to-PACA-before-RFID.patch
patches.arch/powerpc-tm-Print-scratch-value.patch
@@ -23689,6 +23694,10 @@
patches.drivers/ALSA-hda-Add-a-generic-reboot_notify.patch
patches.drivers/ALSA-usb-audio-Fix-an-OOB-bug-in-parse_audio_mixer_u.patch
patches.drivers/ALSA-usb-audio-Fix-a-stack-buffer-overflow-bug-in-ch.patch
+ patches.fixes/nvme-multipath-revalidate-nvme_ns_head-gendisk-in-nv.patch
+ patches.fixes/0001-usb-cdc-acm-make-sure-a-refcount-is-taken-early-enou.patch
+ patches.fixes/0001-USB-CDC-fix-sanity-checks-in-CDC-union-parser.patch
+ patches.drivers/ibmvnic-Unmap-DMA-address-of-TX-descriptor-buffers-a.patch
# dhowells/linux-fs keys-uefi
patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch