diff --git a/blacklist.conf b/blacklist.conf index 7d33eac..73553e4 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -2130,3 +2130,6 @@ e9ba4032a2568ef5b360de95eb6e09195a1b2efd # cleanup, not a bugfix 860dafa902595fb5f1d23bbcce1215188c3341e6 # does not apply: vt: Fix character height handling with VT_RESIZEX 3dfac26e2ef29ff2abc2a75aa4cd48fce25a2c4b # does not apply: vgacon: Propagate console boot parameters before calling `vc_resize' 5ada78b26f935f8751852dffa24f6b545b1d2517 # patched code does not exist: backlight: qcom-wled: Fix off-by-one maximum with default num_strings +b1ce45e86b81e8ce354c47a7440d263e4cd5dc56 # Fixes in source code comments +84ff7a09c371bc7417eabfda19bf7f113ec917b6 # Duplicate of 045afc24124d80c6998d9c770844c67912083506; suse-commit: 11424e589f5b7485696599398be75907c7060ad7 +6f496a555d93db7a11d4860b9220d904822f586a # CONFIG_KASAN is not set diff --git a/patches.suse/0001-ARM-9110-1-oabi-compat-fix-oabi-epoll-sparse-warning.patch b/patches.suse/0001-ARM-9110-1-oabi-compat-fix-oabi-epoll-sparse-warning.patch new file mode 100644 index 0000000..3779c6a --- /dev/null +++ b/patches.suse/0001-ARM-9110-1-oabi-compat-fix-oabi-epoll-sparse-warning.patch @@ -0,0 +1,48 @@ +From da0b9ee43c152401f711e522c19b1468c84907bf Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 11 Aug 2021 08:30:27 +0100 +Subject: ARM: 9110/1: oabi-compat: fix oabi epoll sparse warning +Git-commit: da0b9ee43c152401f711e522c19b1468c84907bf +Patch-mainline: v5.15-rc1 +References: bsc#1129770 + +As my patches change the oabi epoll definition, I received a report +from the kernel test robot about a pre-existing issue with a mismatched +__poll_t type. + +The OABI code was correct when it was initially added in linux-2.16, +but a later (also correct) change to the generic __poll_t triggered a +type mismatch warning from sparse. + +As __poll_t is always 32-bit bits wide and otherwise compatible, using +this instead of __u32 in the oabi_epoll_event definition is a valid +workaround. + +Reported-by: kernel test robot +Fixes: 8ced390c2b18 ("define __poll_t, annotate constants") +Fixes: ee219b946e4b ("uapi: turn __poll_t sparse checks on by default") +Fixes: 687ad0191488 ("[ARM] 3109/1: old ABI compat: syscall wrappers for ABI impedance matching") +Acked-by: Christoph Hellwig +Signed-off-by: Arnd Bergmann +Signed-off-by: Russell King (Oracle) +Acked-by: Thomas Zimmermann +--- + arch/arm/kernel/sys_oabi-compat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c +index 223ee46b6e75e..68112c172025c 100644 +--- a/arch/arm/kernel/sys_oabi-compat.c ++++ b/arch/arm/kernel/sys_oabi-compat.c +@@ -274,7 +274,7 @@ asmlinkage long sys_oabi_fcntl64(unsigned int fd, unsigned int cmd, + } + + struct oabi_epoll_event { +- __u32 events; ++ __poll_t events; + __u64 data; + } __attribute__ ((packed,aligned(4))); + +-- +2.36.0 + diff --git a/patches.suse/0002-PCI-Do-not-enable-AtomicOps-on-VFs.patch b/patches.suse/0002-PCI-Do-not-enable-AtomicOps-on-VFs.patch new file mode 100644 index 0000000..3518e31 --- /dev/null +++ b/patches.suse/0002-PCI-Do-not-enable-AtomicOps-on-VFs.patch @@ -0,0 +1,68 @@ +From 5ec0a6fcb60ea430f8ee7e0bec22db9b22f856d3 Mon Sep 17 00:00:00 2001 +From: Selvin Xavier +Date: Sat, 11 Sep 2021 03:03:05 -0700 +Subject: PCI: Do not enable AtomicOps on VFs +Git-commit: 5ec0a6fcb60ea430f8ee7e0bec22db9b22f856d3 +Patch-mainline: v5.16-rc1 +References: bsc#1129770 + +Host crashes when pci_enable_atomic_ops_to_root() is called for VFs with +virtual buses. The virtual buses added to SR-IOV have bus->self set to NULL +and host crashes due to this. + + PID: 4481 TASK: ffff89c6941b0000 CPU: 53 COMMAND: "bash" + ... + #3 [ffff9a9481713808] oops_end at ffffffffb9025cd6 + #4 [ffff9a9481713828] page_fault_oops at ffffffffb906e417 + #5 [ffff9a9481713888] exc_page_fault at ffffffffb9a0ad14 + #6 [ffff9a94817138b0] asm_exc_page_fault at ffffffffb9c00ace + [exception RIP: pcie_capability_read_dword+28] + RIP: ffffffffb952fd5c RSP: ffff9a9481713960 RFLAGS: 00010246 + RAX: 0000000000000001 RBX: ffff89c6b1096000 RCX: 0000000000000000 + RDX: ffff9a9481713990 RSI: 0000000000000024 RDI: 0000000000000000 + RBP: 0000000000000080 R8: 0000000000000008 R9: ffff89c64341a2f8 + R10: 0000000000000002 R11: 0000000000000000 R12: ffff89c648bab000 + R13: 0000000000000000 R14: 0000000000000000 R15: ffff89c648bab0c8 + ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 + #7 [ffff9a9481713988] pci_enable_atomic_ops_to_root at ffffffffb95359a6 + #8 [ffff9a94817139c0] bnxt_qplib_determine_atomics at ffffffffc08c1a33 [bnxt_re] + #9 [ffff9a94817139d0] bnxt_re_dev_init at ffffffffc08ba2d1 [bnxt_re] + +Per PCIe r5.0, sec 9.3.5.10, the AtomicOp Requester Enable bit in Device +Control 2 is reserved for VFs. The PF value applies to all associated VFs. + +Return -EINVAL if pci_enable_atomic_ops_to_root() is called for a VF. + +Link: https://lore.kernel.org/r/1631354585-16597-1-git-send-email-selvin.xavier@broadcom.com +Fixes: 35f5ace5dea4 ("RDMA/bnxt_re: Enable global atomic ops if platform supports") +Fixes: 430a23689dea ("PCI: Add pci_enable_atomic_ops_to_root()") +Signed-off-by: Selvin Xavier +Signed-off-by: Bjorn Helgaas +Reviewed-by: Andy Gospodarek +Acked-by: Thomas Zimmermann +--- + drivers/pci/pci.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c +index c63598c1cdd85..e55d944ff30f1 100644 +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -3719,6 +3719,14 @@ int pci_enable_atomic_ops_to_root(struct pci_dev *dev, u32 cap_mask) + struct pci_dev *bridge; + u32 cap, ctl2; + ++ /* ++ * Per PCIe r5.0, sec 9.3.5.10, the AtomicOp Requester Enable bit ++ * in Device Control 2 is reserved in VFs and the PF value applies ++ * to all associated VFs. ++ */ ++ if (dev->is_virtfn) ++ return -EINVAL; ++ + if (!pci_is_pcie(dev)) + return -EINVAL; + +-- +2.36.0 + diff --git a/patches.suse/0003-video-backlight-Drop-maximum-brightness-override-for.patch b/patches.suse/0003-video-backlight-Drop-maximum-brightness-override-for.patch new file mode 100644 index 0000000..bbe91da --- /dev/null +++ b/patches.suse/0003-video-backlight-Drop-maximum-brightness-override-for.patch @@ -0,0 +1,54 @@ +From 33a5471f8da976bf271a1ebbd6b9d163cb0cb6aa Mon Sep 17 00:00:00 2001 +From: Marek Vasut +Date: Tue, 21 Sep 2021 19:35:06 +0200 +Subject: video: backlight: Drop maximum brightness override for brightness + zero +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: 33a5471f8da976bf271a1ebbd6b9d163cb0cb6aa +Patch-mainline: v5.16-rc1 +References: bsc#1129770 + +The note in c2adda27d202f ("video: backlight: Add of_find_backlight helper +in backlight.c") says that gpio-backlight uses brightness as power state. +This has been fixed since in ec665b756e6f7 ("backlight: gpio-backlight: +Correct initial power state handling") and other backlight drivers do not +require this workaround. Drop the workaround. + +This fixes the case where e.g. pwm-backlight can perfectly well be set to +brightness 0 on boot in DT, which without this patch leads to the display +brightness to be max instead of off. + +Fixes: c2adda27d202f ("video: backlight: Add of_find_backlight helper in backlight.c") +Cc: # 5.4+ +Cc: # 4.19.x: ec665b756e6f7: backlight: gpio-backlight: Correct initial power state handling +Signed-off-by: Marek Vasut +Acked-by: Noralf Trønnes +Reviewed-by: Daniel Thompson +Signed-off-by: Lee Jones +Acked-by: Thomas Zimmermann +--- + drivers/video/backlight/backlight.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c +index 537fe1b376ad7..fc990e576340b 100644 +--- a/drivers/video/backlight/backlight.c ++++ b/drivers/video/backlight/backlight.c +@@ -688,12 +688,6 @@ static struct backlight_device *of_find_backlight(struct device *dev) + of_node_put(np); + if (!bd) + return ERR_PTR(-EPROBE_DEFER); +- /* +- * Note: gpio_backlight uses brightness as +- * power state during probe +- */ +- if (!bd->props.brightness) +- bd->props.brightness = bd->props.max_brightness; + } + } + +-- +2.36.0 + diff --git a/patches.suse/0005-video-hyperv_fb-Fix-validation-of-screen-resolution.patch b/patches.suse/0005-video-hyperv_fb-Fix-validation-of-screen-resolution.patch new file mode 100644 index 0000000..9e16b5b --- /dev/null +++ b/patches.suse/0005-video-hyperv_fb-Fix-validation-of-screen-resolution.patch @@ -0,0 +1,98 @@ +From 9ff5549b1d1d3c3a9d71220d44bd246586160f1d Mon Sep 17 00:00:00 2001 +From: Michael Kelley +Date: Sun, 16 Jan 2022 11:18:31 -0800 +Subject: video: hyperv_fb: Fix validation of screen resolution +Git-commit: 9ff5549b1d1d3c3a9d71220d44bd246586160f1d +Patch-mainline: v5.17-rc2 +References: bsc#1129770 + +In the WIN10 version of the Synthetic Video protocol with Hyper-V, +Hyper-V reports a list of supported resolutions as part of the protocol +negotiation. The driver calculates the maximum width and height from +the list of resolutions, and uses those maximums to validate any screen +resolution specified in the video= option on the kernel boot line. + +This method of validation is incorrect. For example, the list of +supported resolutions could contain 1600x1200 and 1920x1080, both of +which fit in an 8 Mbyte frame buffer. But calculating the max width +and height yields 1920 and 1200, and 1920x1200 resolution does not fit +in an 8 Mbyte frame buffer. Unfortunately, this resolution is accepted, +causing a kernel fault when the driver accesses memory outside the +frame buffer. + +Instead, validate the specified screen resolution by calculating +its size, and comparing against the frame buffer size. Delete the +code for calculating the max width and height from the list of +resolutions, since these max values have no use. Also add the +frame buffer size to the info message to aid in understanding why +a resolution might be rejected. + +Fixes: 67e7cdb4829d ("video: hyperv: hyperv_fb: Obtain screen resolution from Hyper-V host") +Signed-off-by: Michael Kelley +Reviewed-by: Haiyang Zhang +Acked-by: Helge Deller +Link: https://lore.kernel.org/r/1642360711-2335-1-git-send-email-mikelley@microsoft.com +Signed-off-by: Wei Liu +Acked-by: Thomas Zimmermann +--- + drivers/video/fbdev/hyperv_fb.c | 16 +++------------- + 1 file changed, 3 insertions(+), 13 deletions(-) + +diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c +index 23999df527393..c8e0ea27caf1d 100644 +--- a/drivers/video/fbdev/hyperv_fb.c ++++ b/drivers/video/fbdev/hyperv_fb.c +@@ -287,8 +287,6 @@ struct hvfb_par { + + static uint screen_width = HVFB_WIDTH; + static uint screen_height = HVFB_HEIGHT; +-static uint screen_width_max = HVFB_WIDTH; +-static uint screen_height_max = HVFB_HEIGHT; + static uint screen_depth; + static uint screen_fb_size; + static uint dio_fb_size; /* FB size for deferred IO */ +@@ -582,7 +580,6 @@ static int synthvid_get_supported_resolution(struct hv_device *hdev) + int ret = 0; + unsigned long t; + u8 index; +- int i; + + memset(msg, 0, sizeof(struct synthvid_msg)); + msg->vid_hdr.type = SYNTHVID_RESOLUTION_REQUEST; +@@ -613,13 +610,6 @@ static int synthvid_get_supported_resolution(struct hv_device *hdev) + goto out; + } + +- for (i = 0; i < msg->resolution_resp.resolution_count; i++) { +- screen_width_max = max_t(unsigned int, screen_width_max, +- msg->resolution_resp.supported_resolution[i].width); +- screen_height_max = max_t(unsigned int, screen_height_max, +- msg->resolution_resp.supported_resolution[i].height); +- } +- + screen_width = + msg->resolution_resp.supported_resolution[index].width; + screen_height = +@@ -941,7 +931,7 @@ static void hvfb_get_option(struct fb_info *info) + + if (x < HVFB_WIDTH_MIN || y < HVFB_HEIGHT_MIN || + (synthvid_ver_ge(par->synthvid_version, SYNTHVID_VERSION_WIN10) && +- (x > screen_width_max || y > screen_height_max)) || ++ (x * y * screen_depth / 8 > screen_fb_size)) || + (par->synthvid_version == SYNTHVID_VERSION_WIN8 && + x * y * screen_depth / 8 > SYNTHVID_FB_SIZE_WIN8) || + (par->synthvid_version == SYNTHVID_VERSION_WIN7 && +@@ -1194,8 +1184,8 @@ static int hvfb_probe(struct hv_device *hdev, + } + + hvfb_get_option(info); +- pr_info("Screen resolution: %dx%d, Color depth: %d\n", +- screen_width, screen_height, screen_depth); ++ pr_info("Screen resolution: %dx%d, Color depth: %d, Frame buffer size: %d\n", ++ screen_width, screen_height, screen_depth, screen_fb_size); + + ret = hvfb_getmem(hdev, info); + if (ret) { +-- +2.36.0 + diff --git a/patches.suse/0006-drm-fb-helper-Mark-screen-buffers-in-system-memory-w.patch b/patches.suse/0006-drm-fb-helper-Mark-screen-buffers-in-system-memory-w.patch new file mode 100644 index 0000000..408f90b --- /dev/null +++ b/patches.suse/0006-drm-fb-helper-Mark-screen-buffers-in-system-memory-w.patch @@ -0,0 +1,50 @@ +From cd9f7f7ac5932129fe81b4c7559cfcb226ec7c5c Mon Sep 17 00:00:00 2001 +From: Thomas Zimmermann +Date: Tue, 1 Feb 2022 12:53:05 +0100 +Subject: drm/fb-helper: Mark screen buffers in system memory with + FBINFO_VIRTFB +Git-commit: cd9f7f7ac5932129fe81b4c7559cfcb226ec7c5c +Patch-mainline: v5.18-rc1 +References: bsc#1129770 + +Mark screen buffers in system memory with FBINFO_VIRTFB. Otherwise, fbdev +deferred I/O marks mmap'ed areas of system memory with VM_IO. (There's an +inverse relationship between the two flags.) + +For shadow buffers, also set the FBINFO_READS_FAST hint. + +v3: + * change FB_ to FBINFO_ in commit description +v2: + * updated commit description (Daniel) + * added Fixes tag + +Signed-off-by: Thomas Zimmermann +Fixes: d536540f304c ("drm/fb-helper: Add generic fbdev emulation .fb_probe function") +Reviewed-by: Daniel Vetter +Cc: dri-devel@lists.freedesktop.org +Cc: # v4.19+ +Link: https://patchwork.freedesktop.org/patch/msgid/20220201115305.9333-1-tzimmermann@suse.de +Acked-by: Thomas Zimmermann +--- + drivers/gpu/drm/drm_fb_helper.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/drm_fb_helper.c ++++ b/drivers/gpu/drm/drm_fb_helper.c +@@ -3083,6 +3083,7 @@ int drm_fb_helper_generic_probe(struct d + fbi->fix.smem_len = fbi->screen_size; + fbi->screen_buffer = buffer->vaddr; + strcpy(fbi->fix.id, "DRM emulated"); ++ fbi->flags = FBINFO_DEFAULT; + + drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->format->depth); + drm_fb_helper_fill_var(fbi, fb_helper, sizes->fb_width, sizes->fb_height); +@@ -3106,6 +3107,7 @@ int drm_fb_helper_generic_probe(struct d + *fbops = *fbi->fbops; + fbi->fbops = fbops; + fbi->screen_buffer = shadow; ++ fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST; + fbi->fbdefio = &drm_fbdev_defio; + + fb_deferred_io_init(fbi); diff --git a/patches.suse/arm64-Clear-OSDLR_EL1-on-CPU-boot.patch b/patches.suse/arm64-Clear-OSDLR_EL1-on-CPU-boot.patch new file mode 100644 index 0000000..532fa53 --- /dev/null +++ b/patches.suse/arm64-Clear-OSDLR_EL1-on-CPU-boot.patch @@ -0,0 +1,28 @@ +From: Jean-Philippe Brucker +Date: Mon, 8 Apr 2019 18:17:18 +0100 +Subject: arm64: Clear OSDLR_EL1 on CPU boot +Git-commit: 6fda41bf12615ee7c3ddac88155099b1a8cf8d00 +Patch-mainline: v5.2-rc1 +References: git-fixes + +Some firmwares may reboot CPUs with OS Double Lock set. Make sure that +it is unlocked, in order to use debug exceptions. + +Cc: +Signed-off-by: Jean-Philippe Brucker +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/kernel/debug-monitors.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm64/kernel/debug-monitors.c ++++ b/arch/arm64/kernel/debug-monitors.c +@@ -134,6 +134,7 @@ NOKPROBE_SYMBOL(disable_debug_monitors); + */ + static int clear_os_lock(unsigned int cpu) + { ++ write_sysreg(0, osdlr_el1); + write_sysreg(0, oslar_el1); + isb(); + return 0; diff --git a/patches.suse/arm64-Fix-HCR.TGE-status-for-NMI-contexts.patch b/patches.suse/arm64-Fix-HCR.TGE-status-for-NMI-contexts.patch new file mode 100644 index 0000000..bb078f9 --- /dev/null +++ b/patches.suse/arm64-Fix-HCR.TGE-status-for-NMI-contexts.patch @@ -0,0 +1,123 @@ +From: Julien Thierry +Date: Thu, 31 Jan 2019 14:58:39 +0000 +Subject: arm64: Fix HCR.TGE status for NMI contexts +Git-commit: 5870970b9a828d8693aa6d15742573289d7dbcd0 +Patch-mainline: v5.1-rc1 +References: git-fixes + +When using VHE, the host needs to clear HCR_EL2.TGE bit in order +to interact with guest TLBs, switching from EL2&0 translation regime +to EL1&0. + +However, some non-maskable asynchronous event could happen while TGE is +cleared like SDEI. Because of this address translation operations +relying on EL2&0 translation regime could fail (tlb invalidation, +userspace access, ...). + +Fix this by properly setting HCR_EL2.TGE when entering NMI context and +clear it if necessary when returning to the interrupted context. + +Signed-off-by: Julien Thierry +Suggested-by: Marc Zyngier +Reviewed-by: Marc Zyngier +Reviewed-by: James Morse +Cc: Arnd Bergmann +Cc: Will Deacon +Cc: Marc Zyngier +Cc: James Morse +Cc: linux-arch@vger.kernel.org +Cc: stable@vger.kernel.org +Signed-off-by: Catalin Marinas +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/hardirq.h | 31 +++++++++++++++++++++++++++++++ + arch/arm64/kernel/irq.c | 3 +++ + include/linux/hardirq.h | 7 +++++++ + 3 files changed, 41 insertions(+) + +--- a/arch/arm64/include/asm/hardirq.h ++++ b/arch/arm64/include/asm/hardirq.h +@@ -17,8 +17,12 @@ + #define __ASM_HARDIRQ_H + + #include ++#include + #include ++#include + #include ++#include ++#include + + #define NR_IPI 7 + +@@ -37,6 +41,33 @@ u64 smp_irq_stat_cpu(unsigned int cpu); + + #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 + ++struct nmi_ctx { ++ u64 hcr; ++}; ++ ++DECLARE_PER_CPU(struct nmi_ctx, nmi_contexts); ++ ++#define arch_nmi_enter() \ ++ do { \ ++ if (is_kernel_in_hyp_mode()) { \ ++ struct nmi_ctx *nmi_ctx = this_cpu_ptr(&nmi_contexts); \ ++ nmi_ctx->hcr = read_sysreg(hcr_el2); \ ++ if (!(nmi_ctx->hcr & HCR_TGE)) { \ ++ write_sysreg(nmi_ctx->hcr | HCR_TGE, hcr_el2); \ ++ isb(); \ ++ } \ ++ } \ ++ } while (0) ++ ++#define arch_nmi_exit() \ ++ do { \ ++ if (is_kernel_in_hyp_mode()) { \ ++ struct nmi_ctx *nmi_ctx = this_cpu_ptr(&nmi_contexts); \ ++ if (!(nmi_ctx->hcr & HCR_TGE)) \ ++ write_sysreg(nmi_ctx->hcr, hcr_el2); \ ++ } \ ++ } while (0) ++ + static inline void ack_bad_irq(unsigned int irq) + { + extern unsigned long irq_err_count; +--- a/arch/arm64/kernel/irq.c ++++ b/arch/arm64/kernel/irq.c +@@ -33,6 +33,9 @@ + + unsigned long irq_err_count; + ++/* Only access this in an NMI enter/exit */ ++DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts); ++ + DEFINE_PER_CPU(unsigned long *, irq_stack_ptr); + + int arch_show_interrupts(struct seq_file *p, int prec) +--- a/include/linux/hardirq.h ++++ b/include/linux/hardirq.h +@@ -59,8 +59,14 @@ extern void irq_enter(void); + */ + extern void irq_exit(void); + ++#ifndef arch_nmi_enter ++#define arch_nmi_enter() do { } while (0) ++#define arch_nmi_exit() do { } while (0) ++#endif ++ + #define nmi_enter() \ + do { \ ++ arch_nmi_enter(); \ + printk_nmi_enter(); \ + lockdep_off(); \ + ftrace_nmi_enter(); \ +@@ -79,6 +85,7 @@ extern void irq_exit(void); + ftrace_nmi_exit(); \ + lockdep_on(); \ + printk_nmi_exit(); \ ++ arch_nmi_exit(); \ + } while (0) + + #endif /* LINUX_HARDIRQ_H */ diff --git a/patches.suse/arm64-Fix-size-of-__early_cpu_boot_status.patch b/patches.suse/arm64-Fix-size-of-__early_cpu_boot_status.patch new file mode 100644 index 0000000..92ce3ea --- /dev/null +++ b/patches.suse/arm64-Fix-size-of-__early_cpu_boot_status.patch @@ -0,0 +1,29 @@ +From: Arun KS +Date: Tue, 30 Apr 2019 16:05:04 +0530 +Subject: arm64: Fix size of __early_cpu_boot_status +Git-commit: 61cf61d81e326163ce1557ceccfca76e11d0e57c +Patch-mainline: v5.2-rc1 +References: git-fixes + +__early_cpu_boot_status is of type long. Use quad +assembler directive to allocate proper size. + +Acked-by: Mark Rutland +Signed-off-by: Arun KS +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/kernel/head.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/kernel/head.S ++++ b/arch/arm64/kernel/head.S +@@ -613,7 +613,7 @@ ENTRY(__boot_cpu_mode) + * with MMU turned off. + */ + ENTRY(__early_cpu_boot_status) +- .long 0 ++ .quad 0 + + .popsection + diff --git a/patches.suse/arm64-Relax-GIC-version-check-during-early-boot.patch b/patches.suse/arm64-Relax-GIC-version-check-during-early-boot.patch new file mode 100644 index 0000000..99ee5ea --- /dev/null +++ b/patches.suse/arm64-Relax-GIC-version-check-during-early-boot.patch @@ -0,0 +1,35 @@ +From: Vladimir Murzin +Date: Wed, 20 Feb 2019 11:43:05 +0000 +Subject: arm64: Relax GIC version check during early boot +Git-commit: 74698f6971f25d045301139413578865fc2bd8f9 +Patch-mainline: v5.0-rc8 +References: git-fixes + +Updates to the GIC architecture allow ID_AA64PFR0_EL1.GIC to have +values other than 0 or 1. At the moment, Linux is quite strict in the +way it handles this field at early boot stage (cpufeature is fine) and +will refuse to use the system register CPU interface if it doesn't +find the value 1. + +Fixes: 021f653791ad17e03f98aaa7fb933816ae16f161 ("irqchip: gic-v3: Initial support for GICv3") +Reported-by: Chase Conklin +Reviewed-by: Marc Zyngier +Signed-off-by: Vladimir Murzin +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/kernel/head.S | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/arm64/kernel/head.S ++++ b/arch/arm64/kernel/head.S +@@ -475,8 +475,7 @@ set_hcr: + /* GICv3 system register access */ + mrs x0, id_aa64pfr0_el1 + ubfx x0, x0, #24, #4 +- cmp x0, #1 +- b.ne 3f ++ cbz x0, 3f + + mrs_s x0, SYS_ICC_SRE_EL2 + orr x0, x0, #ICC_SRE_EL2_SRE // Set ICC_SRE_EL2.SRE==1 diff --git a/patches.suse/arm64-Save-and-restore-OSDLR_EL1-across-suspend-resume.patch b/patches.suse/arm64-Save-and-restore-OSDLR_EL1-across-suspend-resume.patch new file mode 100644 index 0000000..cd392b9 --- /dev/null +++ b/patches.suse/arm64-Save-and-restore-OSDLR_EL1-across-suspend-resume.patch @@ -0,0 +1,80 @@ +From: Jean-Philippe Brucker +Date: Mon, 8 Apr 2019 18:17:19 +0100 +Subject: arm64: Save and restore OSDLR_EL1 across suspend/resume +Git-commit: 827a108e354db633698f0b4a10c1ffd2b1f8d1d0 +Patch-mainline: v5.2-rc1 +References: git-fixes + +When the CPU comes out of suspend, the firmware may have modified the OS +Double Lock Register. Save it in an unused slot of cpu_suspend_ctx, and +restore it on resume. + +Cc: +Signed-off-by: Jean-Philippe Brucker +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/mm/proc.S | 34 ++++++++++++++++++---------------- + 1 file changed, 18 insertions(+), 16 deletions(-) + +--- a/arch/arm64/mm/proc.S ++++ b/arch/arm64/mm/proc.S +@@ -64,24 +64,25 @@ ENTRY(cpu_do_suspend) + mrs x2, tpidr_el0 + mrs x3, tpidrro_el0 + mrs x4, contextidr_el1 +- mrs x5, cpacr_el1 +- mrs x6, tcr_el1 +- mrs x7, vbar_el1 +- mrs x8, mdscr_el1 +- mrs x9, oslsr_el1 +- mrs x10, sctlr_el1 ++ mrs x5, osdlr_el1 ++ mrs x6, cpacr_el1 ++ mrs x7, tcr_el1 ++ mrs x8, vbar_el1 ++ mrs x9, mdscr_el1 ++ mrs x10, oslsr_el1 ++ mrs x11, sctlr_el1 + alternative_if_not ARM64_HAS_VIRT_HOST_EXTN +- mrs x11, tpidr_el1 ++ mrs x12, tpidr_el1 + alternative_else +- mrs x11, tpidr_el2 ++ mrs x12, tpidr_el2 + alternative_endif +- mrs x12, sp_el0 ++ mrs x13, sp_el0 + stp x2, x3, [x0] +- stp x4, xzr, [x0, #16] +- stp x5, x6, [x0, #32] +- stp x7, x8, [x0, #48] +- stp x9, x10, [x0, #64] +- stp x11, x12, [x0, #80] ++ stp x4, x5, [x0, #16] ++ stp x6, x7, [x0, #32] ++ stp x8, x9, [x0, #48] ++ stp x10, x11, [x0, #64] ++ stp x12, x13, [x0, #80] + ret + ENDPROC(cpu_do_suspend) + +@@ -104,8 +105,8 @@ ENTRY(cpu_do_resume) + msr cpacr_el1, x6 + + /* Don't change t0sz here, mask those bits when restoring */ +- mrs x5, tcr_el1 +- bfi x8, x5, TCR_T0SZ_OFFSET, TCR_TxSZ_WIDTH ++ mrs x7, tcr_el1 ++ bfi x8, x7, TCR_T0SZ_OFFSET, TCR_TxSZ_WIDTH + + msr tcr_el1, x8 + msr vbar_el1, x9 +@@ -129,6 +130,7 @@ alternative_endif + /* + * Restore oslsr_el1 by writing oslar_el1 + */ ++ msr osdlr_el1, x5 + ubfx x11, x11, #1, #1 + msr oslar_el1, x11 + reset_pmuserenr_el0 x0 // Disable PMU access from EL0 diff --git a/patches.suse/arm64-compat-Allow-single-byte-watchpoints-on-all-addresses.patch b/patches.suse/arm64-compat-Allow-single-byte-watchpoints-on-all-addresses.patch new file mode 100644 index 0000000..6539e73 --- /dev/null +++ b/patches.suse/arm64-compat-Allow-single-byte-watchpoints-on-all-addresses.patch @@ -0,0 +1,32 @@ +From: Will Deacon +Date: Mon, 29 Jul 2019 11:06:17 +0100 +Subject: arm64: compat: Allow single-byte watchpoints on all addresses +Git-commit: 849adec41203ac5837c40c2d7e08490ffdef3c2c +Patch-mainline: v5.3-rc3 +References: git-fixes + +Commit d968d2b801d8 ("ARM: 7497/1: hw_breakpoint: allow single-byte +watchpoints on all addresses") changed the validation requirements for +hardware watchpoints on arch/arm/. Update our compat layer to implement +the same relaxation. + +Cc: +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/kernel/hw_breakpoint.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arm64/kernel/hw_breakpoint.c ++++ b/arch/arm64/kernel/hw_breakpoint.c +@@ -555,6 +555,10 @@ int arch_validate_hwbkpt_settings(struct + /* Allow halfword watchpoints and breakpoints. */ + if (info->ctrl.len == ARM_BREAKPOINT_LEN_2) + break; ++ case 3: ++ /* Allow single byte watchpoint. */ ++ if (info->ctrl.len == ARM_BREAKPOINT_LEN_1) ++ break; + default: + return -EINVAL; + } diff --git a/patches.suse/arm64-compat-Reduce-address-limit.patch b/patches.suse/arm64-compat-Reduce-address-limit.patch new file mode 100644 index 0000000..1576253 --- /dev/null +++ b/patches.suse/arm64-compat-Reduce-address-limit.patch @@ -0,0 +1,49 @@ +From: Vincenzo Frascino +Date: Mon, 1 Apr 2019 12:30:14 +0100 +Subject: arm64: compat: Reduce address limit +Git-commit: d263119387de9975d2acba1dfd3392f7c5979c18 +Patch-mainline: v5.2-rc1 +References: git-fixes + +Currently, compat tasks running on arm64 can allocate memory up to +TASK_SIZE_32 (UL(0x100000000)). + +This means that mmap() allocations, if we treat them as returning an +array, are not compliant with the sections 6.5.8 of the C standard +(C99) which states that: "If the expression P points to an element of +an array object and the expression Q points to the last element of the +same array object, the pointer expression Q+1 compares greater than P". + +Redefine TASK_SIZE_32 to address the issue. + +Cc: Catalin Marinas +Cc: Will Deacon +Cc: Jann Horn +Cc: +Reported-by: Jann Horn +Signed-off-by: Vincenzo Frascino +[will: fixed typo in comment] +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/processor.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/arch/arm64/include/asm/processor.h ++++ b/arch/arm64/include/asm/processor.h +@@ -51,7 +51,15 @@ + * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. + */ + #ifdef CONFIG_COMPAT ++#ifdef CONFIG_ARM64_64K_PAGES ++/* ++ * With CONFIG_ARM64_64K_PAGES enabled, the last page is occupied ++ * by the compat vectors page. ++ */ + #define TASK_SIZE_32 UL(0x100000000) ++#else ++#define TASK_SIZE_32 (UL(0x100000000) - PAGE_SIZE) ++#endif /* CONFIG_ARM64_64K_PAGES */ + #define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ + TASK_SIZE_32 : TASK_SIZE_64) + #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ diff --git a/patches.suse/arm64-cpufeature-Fix-feature-comparison-for-CTR_EL0.-CWG-ERG.patch b/patches.suse/arm64-cpufeature-Fix-feature-comparison-for-CTR_EL0.-CWG-ERG.patch new file mode 100644 index 0000000..fa5d7b5 --- /dev/null +++ b/patches.suse/arm64-cpufeature-Fix-feature-comparison-for-CTR_EL0.-CWG-ERG.patch @@ -0,0 +1,67 @@ +From: Will Deacon +Date: Tue, 30 Jul 2019 15:40:20 +0100 +Subject: arm64: cpufeature: Fix feature comparison for CTR_EL0.{CWG,ERG} +Git-commit: 147b9635e6347104b91f48ca9dca61eb0fbf2a54 +Patch-mainline: v5.3-rc3 +References: git-fixes + +If CTR_EL0.{CWG,ERG} are 0b0000 then they must be interpreted to have +their architecturally maximum values, which defeats the use of +FTR_HIGHER_SAFE when sanitising CPU ID registers on heterogeneous +machines. + +Introduce FTR_HIGHER_OR_ZERO_SAFE so that these fields effectively +saturate at zero. + +Fixes: 3c739b571084 ("arm64: Keep track of CPU feature registers") +Cc: # 4.4.x- +Reviewed-by: Suzuki K Poulose +Acked-by: Mark Rutland +Signed-off-by: Will Deacon +Signed-off-by: Catalin Marinas +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/cpufeature.h | 7 ++++--- + arch/arm64/kernel/cpufeature.c | 8 ++++++-- + 2 files changed, 10 insertions(+), 5 deletions(-) + +--- a/arch/arm64/include/asm/cpufeature.h ++++ b/arch/arm64/include/asm/cpufeature.h +@@ -47,9 +47,10 @@ + */ + + enum ftr_type { +- FTR_EXACT, /* Use a predefined safe value */ +- FTR_LOWER_SAFE, /* Smaller value is safe */ +- FTR_HIGHER_SAFE,/* Bigger value is safe */ ++ FTR_EXACT, /* Use a predefined safe value */ ++ FTR_LOWER_SAFE, /* Smaller value is safe */ ++ FTR_HIGHER_SAFE, /* Bigger value is safe */ ++ FTR_HIGHER_OR_ZERO_SAFE, /* Bigger value is safe, but 0 is biggest */ + }; + + #define FTR_STRICT true /* SANITY check strict matching required */ +--- a/arch/arm64/kernel/cpufeature.c ++++ b/arch/arm64/kernel/cpufeature.c +@@ -213,8 +213,8 @@ static const struct arm64_ftr_bits ftr_c + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_EXACT, 31, 1, 1), /* RES1 */ + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, CTR_DIC_SHIFT, 1, 1), + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, CTR_IDC_SHIFT, 1, 1), +- ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_HIGHER_SAFE, CTR_CWG_SHIFT, 4, 0), +- ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_HIGHER_SAFE, CTR_ERG_SHIFT, 4, 0), ++ ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_HIGHER_OR_ZERO_SAFE, CTR_CWG_SHIFT, 4, 0), ++ ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_HIGHER_OR_ZERO_SAFE, CTR_ERG_SHIFT, 4, 0), + ARM64_FTR_BITS(FTR_VISIBLE, FTR_STRICT, FTR_LOWER_SAFE, CTR_DMINLINE_SHIFT, 4, 1), + /* + * Linux can handle differing I-cache policies. Userspace JITs will +@@ -456,6 +456,10 @@ static s64 arm64_ftr_safe_value(const st + case FTR_LOWER_SAFE: + ret = new < cur ? new : cur; + break; ++ case FTR_HIGHER_OR_ZERO_SAFE: ++ if (!cur || !new) ++ break; ++ /* Fallthrough */ + case FTR_HIGHER_SAFE: + ret = new > cur ? new : cur; + break; diff --git a/patches.suse/arm64-debug-Don-t-propagate-UNKNOWN-FAR-into-si_code-for-debug-signals.patch b/patches.suse/arm64-debug-Don-t-propagate-UNKNOWN-FAR-into-si_code-for-debug-signals.patch new file mode 100644 index 0000000..7977df0 --- /dev/null +++ b/patches.suse/arm64-debug-Don-t-propagate-UNKNOWN-FAR-into-si_code-for-debug-signals.patch @@ -0,0 +1,61 @@ +From: Will Deacon +Date: Fri, 1 Mar 2019 13:28:00 +0000 +Subject: arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug + signals +Git-commit: b9a4b9d084d978f80eb9210727c81804588b42ff +Patch-mainline: v5.1-rc1 +References: git-fixes + +FAR_EL1 is UNKNOWN for all debug exceptions other than those caused by +taking a hardware watchpoint. Unfortunately, if a debug handler returns +a non-zero value, then we will propagate the UNKNOWN FAR value to +userspace via the si_addr field of the SIGTRAP siginfo_t. + +Instead, let's set si_addr to take on the PC of the faulting instruction, +which we have available in the current pt_regs. + +Cc: +Reviewed-by: Mark Rutland +Signed-off-by: Will Deacon +Signed-off-by: Catalin Marinas +Acked-by: Ivan T. Ivanov +--- + arch/arm64/mm/fault.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/arch/arm64/mm/fault.c ++++ b/arch/arm64/mm/fault.c +@@ -776,11 +776,12 @@ void __init hook_debug_fault_code(int nr + debug_fault_info[nr].name = name; + } + +-asmlinkage int __exception do_debug_exception(unsigned long addr, ++asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint, + unsigned int esr, + struct pt_regs *regs) + { + const struct fault_info *inf = debug_fault_info + DBG_ESR_EVT(esr); ++ unsigned long pc = instruction_pointer(regs); + struct siginfo info; + int rv; + +@@ -794,16 +795,16 @@ asmlinkage int __exception do_debug_exce + if (user_mode(regs) && instruction_pointer(regs) > TASK_SIZE) + arm64_apply_bp_hardening(); + +- if (!inf->fn(addr, esr, regs)) { ++ if (!inf->fn(addr_if_watchpoint, esr, regs)) { + rv = 1; + } else { + pr_alert("Unhandled debug exception: %s (0x%08x) at 0x%016lx\n", +- inf->name, esr, addr); ++ inf->name, esr, pc); + + info.si_signo = inf->sig; + info.si_errno = 0; + info.si_code = inf->code; +- info.si_addr = (void __user *)addr; ++ info.si_addr = (void __user *)pc; + arm64_notify_die("", regs, &info, 0); + rv = 0; + } diff --git a/patches.suse/arm64-debug-Ensure-debug-handlers-check-triggering-exception-level.patch b/patches.suse/arm64-debug-Ensure-debug-handlers-check-triggering-exception-level.patch new file mode 100644 index 0000000..729e13e --- /dev/null +++ b/patches.suse/arm64-debug-Ensure-debug-handlers-check-triggering-exception-level.patch @@ -0,0 +1,90 @@ +From: Will Deacon +Date: Fri, 1 Mar 2019 13:28:01 +0000 +Subject: arm64: debug: Ensure debug handlers check triggering exception level +Git-commit: 6bd288569b50bc89fa5513031086746968f585cb +Patch-mainline: v5.1-rc1 +References: git-fixes + +Debug exception handlers may be called for exceptions generated both by +user and kernel code. In many cases, this is checked explicitly, but +in other cases things either happen to work by happy accident or they +go slightly wrong. For example, executing 'brk #4' from userspace will +enter the kprobes code and be ignored, but the instruction will be +retried forever in userspace instead of delivering a SIGTRAP. + +Fix this issue in the most stable-friendly fashion by simply adding +explicit checks of the triggering exception level to all of our debug +exception handlers. + +Cc: +Reviewed-by: Mark Rutland +Signed-off-by: Will Deacon +Signed-off-by: Catalin Marinas +Acked-by: Ivan T. Ivanov +--- + arch/arm64/kernel/kgdb.c | 14 ++++++++++---- + arch/arm64/kernel/probes/kprobes.c | 6 ++++++ + 2 files changed, 16 insertions(+), 4 deletions(-) + +--- a/arch/arm64/kernel/kgdb.c ++++ b/arch/arm64/kernel/kgdb.c +@@ -233,27 +233,33 @@ int kgdb_arch_handle_exception(int excep + + static int kgdb_brk_fn(struct pt_regs *regs, unsigned int esr) + { ++ if (user_mode(regs)) ++ return DBG_HOOK_ERROR; ++ + kgdb_handle_exception(1, SIGTRAP, 0, regs); +- return 0; ++ return DBG_HOOK_HANDLED; + } + NOKPROBE_SYMBOL(kgdb_brk_fn) + + static int kgdb_compiled_brk_fn(struct pt_regs *regs, unsigned int esr) + { ++ if (user_mode(regs)) ++ return DBG_HOOK_ERROR; ++ + compiled_break = 1; + kgdb_handle_exception(1, SIGTRAP, 0, regs); + +- return 0; ++ return DBG_HOOK_HANDLED; + } + NOKPROBE_SYMBOL(kgdb_compiled_brk_fn); + + static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr) + { +- if (!kgdb_single_step) ++ if (user_mode(regs) || !kgdb_single_step) + return DBG_HOOK_ERROR; + + kgdb_handle_exception(1, SIGTRAP, 0, regs); +- return 0; ++ return DBG_HOOK_HANDLED; + } + NOKPROBE_SYMBOL(kgdb_step_brk_fn); + +--- a/arch/arm64/kernel/probes/kprobes.c ++++ b/arch/arm64/kernel/probes/kprobes.c +@@ -445,6 +445,9 @@ kprobe_single_step_handler(struct pt_reg + struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); + int retval; + ++ if (user_mode(regs)) ++ return DBG_HOOK_ERROR; ++ + /* return error if this is not our step */ + retval = kprobe_ss_hit(kcb, instruction_pointer(regs)); + +@@ -461,6 +464,9 @@ kprobe_single_step_handler(struct pt_reg + int __kprobes + kprobe_breakpoint_handler(struct pt_regs *regs, unsigned int esr) + { ++ if (user_mode(regs)) ++ return DBG_HOOK_ERROR; ++ + kprobe_handler(regs); + return DBG_HOOK_HANDLED; + } diff --git a/patches.suse/arm64-dts-marvell-Fix-A37xx-UART0-register-size.patch b/patches.suse/arm64-dts-marvell-Fix-A37xx-UART0-register-size.patch new file mode 100644 index 0000000..b1e82da --- /dev/null +++ b/patches.suse/arm64-dts-marvell-Fix-A37xx-UART0-register-size.patch @@ -0,0 +1,42 @@ +From: allen yan +Date: Thu, 7 Sep 2017 15:04:53 +0200 +Subject: arm64: dts: marvell: Fix A37xx UART0 register size +Git-commit: c737abc193d16e62e23e2fb585b8b7398ab380d8 +Patch-mainline: v4.15-rc1 +References: git-fixes + +Armada-37xx UART0 registers are 0x200 bytes wide. Right next to them are +the UART1 registers that should not be declared in this node. + +Update the example in DT bindings document accordingly. + +Signed-off-by: allen yan +Signed-off-by: Miquel Raynal +Signed-off-by: Gregory CLEMENT +Acked-by: Ivan T. Ivanov +--- + Documentation/devicetree/bindings/serial/mvebu-uart.txt | 2 +- + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/Documentation/devicetree/bindings/serial/mvebu-uart.txt ++++ b/Documentation/devicetree/bindings/serial/mvebu-uart.txt +@@ -8,6 +8,6 @@ Required properties: + Example: + serial@12000 { + compatible = "marvell,armada-3700-uart"; +- reg = <0x12000 0x400>; ++ reg = <0x12000 0x200>; + interrupts = <43>; + }; +--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi ++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +@@ -129,7 +129,7 @@ + + uart0: serial@12000 { + compatible = "marvell,armada-3700-uart"; +- reg = <0x12000 0x400>; ++ reg = <0x12000 0x200>; + interrupts = ; + status = "disabled"; + }; diff --git a/patches.suse/arm64-entry-SP-Alignment-Fault-doesn-t-write-to-FAR_EL1.patch b/patches.suse/arm64-entry-SP-Alignment-Fault-doesn-t-write-to-FAR_EL1.patch new file mode 100644 index 0000000..75dc5f2 --- /dev/null +++ b/patches.suse/arm64-entry-SP-Alignment-Fault-doesn-t-write-to-FAR_EL1.patch @@ -0,0 +1,98 @@ +From: James Morse +Date: Mon, 22 Jul 2019 16:11:48 +0100 +Subject: arm64: entry: SP Alignment Fault doesn't write to FAR_EL1 +Git-commit: 40ca0ce56d4bb889dc43b455c55398468115569a +Patch-mainline: v5.3-rc2 +References: git-fixes + +Comparing the arm-arm's pseudocode for AArch64.PCAlignmentFault() with +AArch64.SPAlignmentFault() shows that SP faults don't copy the faulty-SP +to FAR_EL1, but this is where we read from, and the address we provide +to user-space with the BUS_ADRALN signal. + +For user-space this value will be UNKNOWN due to the previous ERET to +user-space. If the last value is preserved, on systems with KASLR or KPTI +this will be the user-space link-register left in FAR_EL1 by tramp_exit(). +Fix this to retrieve the original sp_el0 value, and pass this to +do_sp_pc_fault(). + +SP alignment faults from EL1 will cause us to take the fault again when +trying to store the pt_regs. This eventually takes us to the overflow +stack. Remove the ESR_ELx_EC_SP_ALIGN check as we will never make it +this far. + +Fixes: 60ffc30d5652 ("arm64: Exception handling") +Signed-off-by: James Morse +[will: change label name and fleshed out comment] +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/kernel/entry.S | 22 +++++++++++++--------- + 1 file changed, 13 insertions(+), 9 deletions(-) + +--- a/arch/arm64/kernel/entry.S ++++ b/arch/arm64/kernel/entry.S +@@ -568,10 +568,8 @@ el1_sync: + b.eq el1_ia + cmp x24, #ESR_ELx_EC_SYS64 // configurable trap + b.eq el1_undef +- cmp x24, #ESR_ELx_EC_SP_ALIGN // stack alignment exception +- b.eq el1_sp_pc + cmp x24, #ESR_ELx_EC_PC_ALIGN // pc alignment exception +- b.eq el1_sp_pc ++ b.eq el1_pc + cmp x24, #ESR_ELx_EC_UNKNOWN // unknown exception in EL1 + b.eq el1_undef + cmp x24, #ESR_ELx_EC_BREAKPT_CUR // debug exception in EL1 +@@ -593,9 +591,11 @@ el1_da: + bl do_mem_abort + + kernel_exit 1 +-el1_sp_pc: ++el1_pc: + /* +- * Stack or PC alignment exception handling ++ * PC alignment exception handling. We don't handle SP alignment faults, ++ * since we will have hit a recursive exception when trying to push the ++ * initial pt_regs. + */ + mrs x0, far_el1 + inherit_daif pstate=x23, tmp=x2 +@@ -687,9 +687,9 @@ el0_sync: + cmp x24, #ESR_ELx_EC_SYS64 // configurable trap + b.eq el0_sys + cmp x24, #ESR_ELx_EC_SP_ALIGN // stack alignment exception +- b.eq el0_sp_pc ++ b.eq el0_sp + cmp x24, #ESR_ELx_EC_PC_ALIGN // pc alignment exception +- b.eq el0_sp_pc ++ b.eq el0_pc + cmp x24, #ESR_ELx_EC_UNKNOWN // unknown exception in EL0 + b.eq el0_undef + cmp x24, #ESR_ELx_EC_BREAKPT_LOW // debug exception in EL0 +@@ -713,7 +713,7 @@ el0_sync_compat: + cmp x24, #ESR_ELx_EC_FP_EXC32 // FP/ASIMD exception + b.eq el0_fpsimd_exc + cmp x24, #ESR_ELx_EC_PC_ALIGN // pc alignment exception +- b.eq el0_sp_pc ++ b.eq el0_pc + cmp x24, #ESR_ELx_EC_UNKNOWN // unknown exception in EL0 + b.eq el0_undef + cmp x24, #ESR_ELx_EC_CP15_32 // CP15 MRC/MCR trap +@@ -817,11 +817,15 @@ el0_fpsimd_exc: + mov x1, sp + bl do_fpsimd_exc + b ret_to_user ++el0_sp: ++ ldr x26, [sp, #S_SP] ++ b el0_sp_pc ++el0_pc: ++ mrs x26, far_el1 + el0_sp_pc: + /* + * Stack or PC alignment exception handling + */ +- mrs x26, far_el1 + enable_da_f + #ifdef CONFIG_TRACE_IRQFLAGS + bl trace_hardirqs_off diff --git a/patches.suse/arm64-futex-Avoid-copying-out-uninitialised-stack-in-failed-cmpxchg.patch b/patches.suse/arm64-futex-Avoid-copying-out-uninitialised-stack-in-failed-cmpxchg.patch new file mode 100644 index 0000000..aa9f16a --- /dev/null +++ b/patches.suse/arm64-futex-Avoid-copying-out-uninitialised-stack-in-failed-cmpxchg.patch @@ -0,0 +1,33 @@ +From: Will Deacon +Date: Wed, 10 Apr 2019 11:49:11 +0100 +Subject: arm64: futex: Avoid copying out uninitialised stack in failed + cmpxchg() +Git-commit: 8e4e0ac02b449297b86498ac24db5786ddd9f647 +Patch-mainline: v5.2-rc1 +References: git-fixes + +Returning an error code from futex_atomic_cmpxchg_inatomic() indicates +that the caller should not make any use of *uval, and should instead act +upon on the value of the error code. Although this is implemented +correctly in our futex code, we needlessly copy uninitialised stack to +*uval in the error case, which can easily be avoided. + +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/futex.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/arch/arm64/include/asm/futex.h ++++ b/arch/arm64/include/asm/futex.h +@@ -134,7 +134,9 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, + : "memory"); + uaccess_disable(); + +- *uval = val; ++ if (!ret) ++ *uval = val; ++ + return ret; + } + diff --git a/patches.suse/arm64-futex-Bound-number-of-LDXR-STXR-loops-in-FUTEX_WAKE_OP.patch b/patches.suse/arm64-futex-Bound-number-of-LDXR-STXR-loops-in-FUTEX_WAKE_OP.patch new file mode 100644 index 0000000..b9976f6 --- /dev/null +++ b/patches.suse/arm64-futex-Bound-number-of-LDXR-STXR-loops-in-FUTEX_WAKE_OP.patch @@ -0,0 +1,139 @@ +From: Will Deacon +Date: Mon, 8 Apr 2019 14:23:17 +0100 +Subject: arm64: futex: Bound number of LDXR/STXR loops in FUTEX_WAKE_OP +Git-commit: 03110a5cb2161690ae5ac04994d47ed0cd6cef75 +Patch-mainline: v5.2-rc1 +References: git-fixes + +Our futex implementation makes use of LDXR/STXR loops to perform atomic +updates to user memory from atomic context. This can lead to latency +problems if we end up spinning around the LL/SC sequence at the expense +of doing something useful. + +Rework our futex atomic operations so that we return -EAGAIN if we fail +to update the futex word after 128 attempts. The core futex code will +reschedule if necessary and we'll try again later. + +Cc: +Fixes: 6170a97460db ("arm64: Atomic operations") +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/futex.h | 55 +++++++++++++++++++++++++---------------- + 1 file changed, 34 insertions(+), 21 deletions(-) + +--- a/arch/arm64/include/asm/futex.h ++++ b/arch/arm64/include/asm/futex.h +@@ -23,26 +23,34 @@ + + #include + ++#define FUTEX_MAX_LOOPS 128 /* What's the largest number you can think of? */ ++ + #define __futex_atomic_op(insn, ret, oldval, uaddr, tmp, oparg) \ + do { \ ++ unsigned int loops = FUTEX_MAX_LOOPS; \ ++ \ + uaccess_enable(); \ + asm volatile( \ + " prfm pstl1strm, %2\n" \ + "1: ldxr %w1, %2\n" \ + insn "\n" \ + "2: stlxr %w0, %w3, %2\n" \ +-" cbnz %w0, 1b\n" \ +-" dmb ish\n" \ ++" cbz %w0, 3f\n" \ ++" sub %w4, %w4, %w0\n" \ ++" cbnz %w4, 1b\n" \ ++" mov %w0, %w7\n" \ + "3:\n" \ ++" dmb ish\n" \ + " .pushsection .fixup,\"ax\"\n" \ + " .align 2\n" \ +-"4: mov %w0, %w5\n" \ ++"4: mov %w0, %w6\n" \ + " b 3b\n" \ + " .popsection\n" \ + _ASM_EXTABLE(1b, 4b) \ + _ASM_EXTABLE(2b, 4b) \ +- : "=&r" (ret), "=&r" (oldval), "+Q" (*uaddr), "=&r" (tmp) \ +- : "r" (oparg), "Ir" (-EFAULT) \ ++ : "=&r" (ret), "=&r" (oldval), "+Q" (*uaddr), "=&r" (tmp), \ ++ "+r" (loops) \ ++ : "r" (oparg), "Ir" (-EFAULT), "Ir" (-EAGAIN) \ + : "memory"); \ + uaccess_disable(); \ + } while (0) +@@ -57,23 +65,23 @@ arch_futex_atomic_op_inuser(int op, int + + switch (op) { + case FUTEX_OP_SET: +- __futex_atomic_op("mov %w3, %w4", ++ __futex_atomic_op("mov %w3, %w5", + ret, oldval, uaddr, tmp, oparg); + break; + case FUTEX_OP_ADD: +- __futex_atomic_op("add %w3, %w1, %w4", ++ __futex_atomic_op("add %w3, %w1, %w5", + ret, oldval, uaddr, tmp, oparg); + break; + case FUTEX_OP_OR: +- __futex_atomic_op("orr %w3, %w1, %w4", ++ __futex_atomic_op("orr %w3, %w1, %w5", + ret, oldval, uaddr, tmp, oparg); + break; + case FUTEX_OP_ANDN: +- __futex_atomic_op("and %w3, %w1, %w4", ++ __futex_atomic_op("and %w3, %w1, %w5", + ret, oldval, uaddr, tmp, ~oparg); + break; + case FUTEX_OP_XOR: +- __futex_atomic_op("eor %w3, %w1, %w4", ++ __futex_atomic_op("eor %w3, %w1, %w5", + ret, oldval, uaddr, tmp, oparg); + break; + default: +@@ -93,6 +101,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, + u32 oldval, u32 newval) + { + int ret = 0; ++ unsigned int loops = FUTEX_MAX_LOOPS; + u32 val, tmp; + u32 __user *uaddr; + +@@ -104,20 +113,24 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, + asm volatile("// futex_atomic_cmpxchg_inatomic\n" + " prfm pstl1strm, %2\n" + "1: ldxr %w1, %2\n" +-" sub %w3, %w1, %w4\n" +-" cbnz %w3, 3f\n" +-"2: stlxr %w3, %w5, %2\n" +-" cbnz %w3, 1b\n" +-" dmb ish\n" ++" sub %w3, %w1, %w5\n" ++" cbnz %w3, 4f\n" ++"2: stlxr %w3, %w6, %2\n" ++" cbz %w3, 3f\n" ++" sub %w4, %w4, %w3\n" ++" cbnz %w4, 1b\n" ++" mov %w0, %w8\n" + "3:\n" ++" dmb ish\n" ++"4:\n" + " .pushsection .fixup,\"ax\"\n" +-"4: mov %w0, %w6\n" +-" b 3b\n" ++"5: mov %w0, %w7\n" ++" b 4b\n" + " .popsection\n" +- _ASM_EXTABLE(1b, 4b) +- _ASM_EXTABLE(2b, 4b) +- : "+r" (ret), "=&r" (val), "+Q" (*uaddr), "=&r" (tmp) +- : "r" (oldval), "r" (newval), "Ir" (-EFAULT) ++ _ASM_EXTABLE(1b, 5b) ++ _ASM_EXTABLE(2b, 5b) ++ : "+r" (ret), "=&r" (val), "+Q" (*uaddr), "=&r" (tmp), "+r" (loops) ++ : "r" (oldval), "r" (newval), "Ir" (-EFAULT), "Ir" (-EAGAIN) + : "memory"); + uaccess_disable(); + diff --git a/patches.suse/arm64-futex-Fix-FUTEX_WAKE_OP-atomic-ops-with-non-zero-result-value.patch b/patches.suse/arm64-futex-Fix-FUTEX_WAKE_OP-atomic-ops-with-non-zero-result-value.patch new file mode 100644 index 0000000..db12e1b --- /dev/null +++ b/patches.suse/arm64-futex-Fix-FUTEX_WAKE_OP-atomic-ops-with-non-zero-result-value.patch @@ -0,0 +1,89 @@ +From: Will Deacon +Date: Mon, 8 Apr 2019 12:45:09 +0100 +Subject: arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value +Git-commit: 045afc24124d80c6998d9c770844c67912083506 +Patch-mainline: v5.1-rc5 +References: git-fixes + +Rather embarrassingly, our futex() FUTEX_WAKE_OP implementation doesn't +explicitly set the return value on the non-faulting path and instead +leaves it holding the result of the underlying atomic operation. This +means that any FUTEX_WAKE_OP atomic operation which computes a non-zero +value will be reported as having failed. Regrettably, I wrote the buggy +code back in 2011 and it was upstreamed as part of the initial arm64 +support in 2012. + +The reasons we appear to get away with this are: + + 1. FUTEX_WAKE_OP is rarely used and therefore doesn't appear to get + exercised by futex() test applications + + 2. If the result of the atomic operation is zero, the system call + behaves correctly + + 3. Prior to version 2.25, the only operation used by GLIBC set the + futex to zero, and therefore worked as expected. From 2.25 onwards, + FUTEX_WAKE_OP is not used by GLIBC at all. + +Fix the implementation by ensuring that the return value is either 0 +to indicate that the atomic operation completed successfully, or -EFAULT +if we encountered a fault when accessing the user mapping. + +Cc: +Fixes: 6170a97460db ("arm64: Atomic operations") +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/futex.h | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/arch/arm64/include/asm/futex.h ++++ b/arch/arm64/include/asm/futex.h +@@ -30,8 +30,8 @@ do { \ + " prfm pstl1strm, %2\n" \ + "1: ldxr %w1, %2\n" \ + insn "\n" \ +-"2: stlxr %w3, %w0, %2\n" \ +-" cbnz %w3, 1b\n" \ ++"2: stlxr %w0, %w3, %2\n" \ ++" cbnz %w0, 1b\n" \ + " dmb ish\n" \ + "3:\n" \ + " .pushsection .fixup,\"ax\"\n" \ +@@ -50,30 +50,30 @@ do { \ + static inline int + arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *_uaddr) + { +- int oldval = 0, ret, tmp; ++ int oldval, ret, tmp; + u32 __user *uaddr = __uaccess_mask_ptr(_uaddr); + + pagefault_disable(); + + switch (op) { + case FUTEX_OP_SET: +- __futex_atomic_op("mov %w0, %w4", ++ __futex_atomic_op("mov %w3, %w4", + ret, oldval, uaddr, tmp, oparg); + break; + case FUTEX_OP_ADD: +- __futex_atomic_op("add %w0, %w1, %w4", ++ __futex_atomic_op("add %w3, %w1, %w4", + ret, oldval, uaddr, tmp, oparg); + break; + case FUTEX_OP_OR: +- __futex_atomic_op("orr %w0, %w1, %w4", ++ __futex_atomic_op("orr %w3, %w1, %w4", + ret, oldval, uaddr, tmp, oparg); + break; + case FUTEX_OP_ANDN: +- __futex_atomic_op("and %w0, %w1, %w4", ++ __futex_atomic_op("and %w3, %w1, %w4", + ret, oldval, uaddr, tmp, ~oparg); + break; + case FUTEX_OP_XOR: +- __futex_atomic_op("eor %w0, %w1, %w4", ++ __futex_atomic_op("eor %w3, %w1, %w4", + ret, oldval, uaddr, tmp, oparg); + break; + default: diff --git a/patches.suse/arm64-iommu-handle-non-remapped-addresses-in-mmap-and-get_sgtable.patch b/patches.suse/arm64-iommu-handle-non-remapped-addresses-in-mmap-and-get_sgtable.patch new file mode 100644 index 0000000..03476c4 --- /dev/null +++ b/patches.suse/arm64-iommu-handle-non-remapped-addresses-in-mmap-and-get_sgtable.patch @@ -0,0 +1,49 @@ +From: Christoph Hellwig +Date: Tue, 30 Apr 2019 06:51:50 -0400 +Subject: arm64/iommu: handle non-remapped addresses in ->mmap and + ->get_sgtable +Git-commit: a98d9ae937d256ed679a935fc82d9deaa710d98e +Patch-mainline: v5.2-rc2 +References: git-fixes + +DMA allocations that can't sleep may return non-remapped addresses, but +we do not properly handle them in the mmap and get_sgtable methods. +Resolve non-vmalloc addresses using virt_to_page to handle this corner +case. + +Cc: +Acked-by: Catalin Marinas +Reviewed-by: Robin Murphy +Signed-off-by: Christoph Hellwig +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/mm/dma-mapping.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm64/mm/dma-mapping.c ++++ b/arch/arm64/mm/dma-mapping.c +@@ -720,6 +720,11 @@ static int __iommu_mmap_attrs(struct dev + if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret)) + return ret; + ++ if (!is_vmalloc_addr(cpu_addr)) { ++ unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr)); ++ return __swiotlb_mmap_pfn(vma, pfn, size); ++ } ++ + if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) { + /* + * DMA_ATTR_FORCE_CONTIGUOUS allocations are always remapped, +@@ -743,6 +748,11 @@ static int __iommu_get_sgtable(struct de + unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; + struct vm_struct *area = find_vm_area(cpu_addr); + ++ if (!is_vmalloc_addr(cpu_addr)) { ++ struct page *page = virt_to_page(cpu_addr); ++ return __swiotlb_get_sgtable_page(sgt, page, size); ++ } ++ + if (attrs & DMA_ATTR_FORCE_CONTIGUOUS) { + /* + * DMA_ATTR_FORCE_CONTIGUOUS allocations are always remapped, diff --git a/patches.suse/arm64-kprobes-Recover-pstate.D-in-single-step-exception-handler.patch b/patches.suse/arm64-kprobes-Recover-pstate.D-in-single-step-exception-handler.patch new file mode 100644 index 0000000..20d84f4 --- /dev/null +++ b/patches.suse/arm64-kprobes-Recover-pstate.D-in-single-step-exception-handler.patch @@ -0,0 +1,130 @@ +From: Masami Hiramatsu +Date: Thu, 1 Aug 2019 23:25:49 +0900 +Subject: arm64: kprobes: Recover pstate.D in single-step exception handler +Git-commit: b3980e48528c4d2a9e70b145a5bba328b73a0f93 +Patch-mainline: v5.3-rc3 +References: git-fixes + +kprobes manipulates the interrupted PSTATE for single step, and +doesn't restore it. Thus, if we put a kprobe where the pstate.D +(debug) masked, the mask will be cleared after the kprobe hits. + +Moreover, in the most complicated case, this can lead a kernel +crash with below message when a nested kprobe hits. + +[ 152.118921] Unexpected kernel single-step exception at EL1 + +When the 1st kprobe hits, do_debug_exception() will be called. +At this point, debug exception (= pstate.D) must be masked (=1). +But if another kprobes hits before single-step of the first kprobe +(e.g. inside user pre_handler), it unmask the debug exception +(pstate.D = 0) and return. +Then, when the 1st kprobe setting up single-step, it saves current +DAIF, mask DAIF, enable single-step, and restore DAIF. +However, since "D" flag in DAIF is cleared by the 2nd kprobe, the +single-step exception happens soon after restoring DAIF. + +This has been introduced by commit 7419333fa15e ("arm64: kprobe: +Always clear pstate.D in breakpoint exception handler") + +To solve this issue, this stores all DAIF bits and restore it +after single stepping. + +Reported-by: Naresh Kamboju +Fixes: 7419333fa15e ("arm64: kprobe: Always clear pstate.D in breakpoint exception handler") +Reviewed-by: James Morse +Tested-by: James Morse +Signed-off-by: Masami Hiramatsu +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/include/asm/daifflags.h | 1 + arch/arm64/kernel/probes/kprobes.c | 40 +++++-------------------------------- + 2 files changed, 7 insertions(+), 34 deletions(-) + +--- a/arch/arm64/include/asm/daifflags.h ++++ b/arch/arm64/include/asm/daifflags.h +@@ -20,6 +20,7 @@ + + #define DAIF_PROCCTX 0 + #define DAIF_PROCCTX_NOIRQ PSR_I_BIT ++#define DAIF_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT) + + /* mask/save/unmask/restore all exceptions, including interrupts. */ + static inline void local_daif_mask(void) +--- a/arch/arm64/kernel/probes/kprobes.c ++++ b/arch/arm64/kernel/probes/kprobes.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -167,33 +168,6 @@ static void __kprobes set_current_kprobe + } + + /* +- * When PSTATE.D is set (masked), then software step exceptions can not be +- * generated. +- * SPSR's D bit shows the value of PSTATE.D immediately before the +- * exception was taken. PSTATE.D is set while entering into any exception +- * mode, however software clears it for any normal (none-debug-exception) +- * mode in the exception entry. Therefore, when we are entering into kprobe +- * breakpoint handler from any normal mode then SPSR.D bit is already +- * cleared, however it is set when we are entering from any debug exception +- * mode. +- * Since we always need to generate single step exception after a kprobe +- * breakpoint exception therefore we need to clear it unconditionally, when +- * we become sure that the current breakpoint exception is for kprobe. +- */ +-static void __kprobes +-spsr_set_debug_flag(struct pt_regs *regs, int mask) +-{ +- unsigned long spsr = regs->pstate; +- +- if (mask) +- spsr |= PSR_D_BIT; +- else +- spsr &= ~PSR_D_BIT; +- +- regs->pstate = spsr; +-} +- +-/* + * Interrupts need to be disabled before single-step mode is set, and not + * reenabled until after single-step mode ends. + * Without disabling interrupt on local CPU, there is a chance of +@@ -204,17 +178,17 @@ spsr_set_debug_flag(struct pt_regs *regs + static void __kprobes kprobes_save_local_irqflag(struct kprobe_ctlblk *kcb, + struct pt_regs *regs) + { +- kcb->saved_irqflag = regs->pstate; ++ kcb->saved_irqflag = regs->pstate & DAIF_MASK; + regs->pstate |= PSR_I_BIT; ++ /* Unmask PSTATE.D for enabling software step exceptions. */ ++ regs->pstate &= ~PSR_D_BIT; + } + + static void __kprobes kprobes_restore_local_irqflag(struct kprobe_ctlblk *kcb, + struct pt_regs *regs) + { +- if (kcb->saved_irqflag & PSR_I_BIT) +- regs->pstate |= PSR_I_BIT; +- else +- regs->pstate &= ~PSR_I_BIT; ++ regs->pstate &= ~DAIF_MASK; ++ regs->pstate |= kcb->saved_irqflag; + } + + static void __kprobes +@@ -251,8 +225,6 @@ static void __kprobes setup_singlestep(s + + set_ss_context(kcb, slot); /* mark pending ss */ + +- spsr_set_debug_flag(regs, 0); +- + /* IRQs and single stepping do not mix well. */ + kprobes_save_local_irqflag(kcb, regs); + kernel_enable_single_step(regs); diff --git a/patches.suse/arm64-map-FDT-as-RW-for-early_init_dt_scan.patch b/patches.suse/arm64-map-FDT-as-RW-for-early_init_dt_scan.patch index 0a1ad5d..62ea844 100644 --- a/patches.suse/arm64-map-FDT-as-RW-for-early_init_dt_scan.patch +++ b/patches.suse/arm64-map-FDT-as-RW-for-early_init_dt_scan.patch @@ -25,7 +25,7 @@ Signed-off-by: Mian Yousaf Kaukab --- a/arch/arm64/include/asm/mmu.h +++ b/arch/arm64/include/asm/mmu.h -@@ -85,7 +85,7 @@ extern void init_mem_pgprot(void); +@@ -129,7 +129,7 @@ extern void init_mem_pgprot(void); extern void create_pgd_mapping(struct mm_struct *mm, phys_addr_t phys, unsigned long virt, phys_addr_t size, pgprot_t prot, bool page_mappings_only); @@ -36,7 +36,7 @@ Signed-off-by: Mian Yousaf Kaukab #endif /* !__ASSEMBLY__ */ --- a/arch/arm64/kernel/kaslr.c +++ b/arch/arm64/kernel/kaslr.c -@@ -64,9 +64,6 @@ out: +@@ -65,9 +65,6 @@ out: return default_cmdline; } @@ -46,7 +46,7 @@ Signed-off-by: Mian Yousaf Kaukab /* * This routine will be executed with the kernel mapped at its default virtual * address, and if it returns successfully, the kernel will be remapped, and -@@ -94,7 +91,7 @@ u64 __init kaslr_early_init(u64 dt_phys) +@@ -96,7 +93,7 @@ u64 __init kaslr_early_init(u64 dt_phys) * attempt at mapping the FDT in setup_machine() */ early_fixmap_init(); @@ -112,4 +112,4 @@ Signed-off-by: Mian Yousaf Kaukab - int __init arch_ioremap_pud_supported(void) { - /* only 4k granule supports level 1 block mappings */ + /* diff --git a/patches.suse/arm64-mm-Inhibit-huge-vmap-with-ptdump.patch b/patches.suse/arm64-mm-Inhibit-huge-vmap-with-ptdump.patch new file mode 100644 index 0000000..f31df5b --- /dev/null +++ b/patches.suse/arm64-mm-Inhibit-huge-vmap-with-ptdump.patch @@ -0,0 +1,71 @@ +From: Mark Rutland +Date: Tue, 14 May 2019 14:30:06 +0530 +Subject: arm64/mm: Inhibit huge-vmap with ptdump +Git-commit: 7ba36eccb3f83983a651efd570b4f933ecad1b5c +Patch-mainline: v5.2-rc2 +References: git-fixes + +The arm64 ptdump code can race with concurrent modification of the +kernel page tables. At the time this was added, this was sound as: + +* Modifications to leaf entries could result in stale information being + logged, but would not result in a functional problem. + +* Boot time modifications to non-leaf entries (e.g. freeing of initmem) + were performed when the ptdump code cannot be invoked. + +* At runtime, modifications to non-leaf entries only occurred in the + vmalloc region, and these were strictly additive, as intermediate + entries were never freed. + +However, since commit: + + commit 324420bf91f6 ("arm64: add support for ioremap() block mappings") + +... it has been possible to create huge mappings in the vmalloc area at +runtime, and as part of this existing intermediate levels of table my be +removed and freed. + +It's possible for the ptdump code to race with this, and continue to +walk tables which have been freed (and potentially poisoned or +reallocated). As a result of this, the ptdump code may dereference bogus +addresses, which could be fatal. + +Since huge-vmap is a TLB and memory optimization, we can disable it when +the runtime ptdump code is in use to avoid this problem. + +Cc: Catalin Marinas +Fixes: 324420bf91f60582 ("arm64: add support for ioremap() block mappings") +Acked-by: Ard Biesheuvel +Signed-off-by: Mark Rutland +Signed-off-by: Anshuman Khandual +Signed-off-by: Will Deacon +Acked-by: Ivan T. Ivanov +--- + arch/arm64/mm/mmu.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +--- a/arch/arm64/mm/mmu.c ++++ b/arch/arm64/mm/mmu.c +@@ -900,13 +900,18 @@ void *__init fixmap_remap_fdt(phys_addr_ + + int __init arch_ioremap_pud_supported(void) + { +- /* only 4k granule supports level 1 block mappings */ +- return IS_ENABLED(CONFIG_ARM64_4K_PAGES); ++ /* ++ * Only 4k granule supports level 1 block mappings. ++ * SW table walks can't handle removal of intermediate entries. ++ */ ++ return IS_ENABLED(CONFIG_ARM64_4K_PAGES) && ++ !IS_ENABLED(CONFIG_ARM64_PTDUMP_DEBUGFS); + } + + int __init arch_ioremap_pmd_supported(void) + { +- return 1; ++ /* See arch_ioremap_pud_supported() */ ++ return !IS_ENABLED(CONFIG_ARM64_PTDUMP_DEBUGFS); + } + + int pud_set_huge(pud_t *pud, phys_addr_t phys, pgprot_t prot) diff --git a/patches.suse/bonding-pair-enable_port-with-slave_arr_updates.patch b/patches.suse/bonding-pair-enable_port-with-slave_arr_updates.patch new file mode 100644 index 0000000..db9ceec --- /dev/null +++ b/patches.suse/bonding-pair-enable_port-with-slave_arr_updates.patch @@ -0,0 +1,54 @@ +From 1c9e6fb6adff458df2916c581526aa4ca3bcbe56 Mon Sep 17 00:00:00 2001 +From: Mahesh Bandewar +Date: Mon, 7 Feb 2022 14:29:01 -0800 +Subject: [PATCH 1/8] bonding: pair enable_port with slave_arr_updates +Git-commit: 23de0d7b6f0e3f9a6283a882594c479949da1120 +Patch-mainline: v5.17-rc4 +References: git-fixes + +When 803.2ad mode enables a participating port, it should update +the slave-array. I have observed that the member links are participating +and are part of the active aggregator while the traffic is egressing via +only one member link (in a case where two links are participating). Via +kprobes I discovered that slave-arr has only one link added while +the other participating link wasn't part of the slave-arr. + +I couldn't see what caused that situation but the simple code-walk +through provided me hints that the enable_port wasn't always associated +with the slave-array update. + +Fixes: ee6377147409 ("bonding: Simplify the xmit function for modes that use xmit_hash") +Signed-off-by: Mahesh Bandewar +Acked-by: Jay Vosburgh +Link: https://lore.kernel.org/r/20220207222901.1795287-1-maheshb@google.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Denis Kirjanov +--- + drivers/net/bonding/bond_3ad.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c +index 69b4eaca8956..e08d479f4d07 100644 +--- a/drivers/net/bonding/bond_3ad.c ++++ b/drivers/net/bonding/bond_3ad.c +@@ -1007,8 +1007,8 @@ static void ad_mux_machine(struct port *port, bool *update_slave_arr) + if (port->aggregator && + port->aggregator->is_active && + !__port_is_enabled(port)) { +- + __enable_port(port); ++ *update_slave_arr = true; + } + } + break; +@@ -1755,6 +1755,7 @@ static void ad_agg_selection_logic(struct aggregator *agg, + port = port->next_port_in_aggregator) { + __enable_port(port); + } ++ *update_slave_arr = true; + } + } + +-- +2.16.4 + diff --git a/patches.suse/crypto-arm64-aes-neonbs-don-t-access-already-freed-walk.iv.patch b/patches.suse/crypto-arm64-aes-neonbs-don-t-access-already-freed-walk.iv.patch new file mode 100644 index 0000000..36e7579 --- /dev/null +++ b/patches.suse/crypto-arm64-aes-neonbs-don-t-access-already-freed-walk.iv.patch @@ -0,0 +1,38 @@ +From: Eric Biggers +Date: Tue, 9 Apr 2019 23:46:32 -0700 +Subject: crypto: arm64/aes-neonbs - don't access already-freed walk.iv +Git-commit: 4a8108b70508df0b6c4ffa4a3974dab93dcbe851 +Patch-mainline: v5.2-rc1 +References: git-fixes + +If the user-provided IV needs to be aligned to the algorithm's +alignmask, then skcipher_walk_virt() copies the IV into a new aligned +buffer walk.iv. But skcipher_walk_virt() can fail afterwards, and then +if the caller unconditionally accesses walk.iv, it's a use-after-free. + +xts-aes-neonbs doesn't set an alignmask, so currently it isn't affected +by this despite unconditionally accessing walk.iv. However this is more +subtle than desired, and unconditionally accessing walk.iv has caused a +real problem in other algorithms. Thus, update xts-aes-neonbs to start +checking the return value of skcipher_walk_virt(). + +Fixes: 1abee99eafab ("crypto: arm64/aes - reimplement bit-sliced ARM/NEON implementation for arm64") +Cc: # v4.11+ +Signed-off-by: Eric Biggers +Signed-off-by: Herbert Xu +Acked-by: Ivan T. Ivanov +--- + arch/arm64/crypto/aes-neonbs-glue.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm64/crypto/aes-neonbs-glue.c ++++ b/arch/arm64/crypto/aes-neonbs-glue.c +@@ -307,6 +307,8 @@ static int __xts_crypt(struct skcipher_r + int err; + + err = skcipher_walk_virt(&walk, req, true); ++ if (err) ++ return err; + + kernel_neon_begin(); + diff --git a/patches.suse/drivers-net-xgene-Fix-regression-in-CRC-stripping.patch b/patches.suse/drivers-net-xgene-Fix-regression-in-CRC-stripping.patch new file mode 100644 index 0000000..381ec6c --- /dev/null +++ b/patches.suse/drivers-net-xgene-Fix-regression-in-CRC-stripping.patch @@ -0,0 +1,61 @@ +From e38c4be3b2ef3cc240450b27b6df3f35a4be3d3a Mon Sep 17 00:00:00 2001 +From: Stephane Graber +Date: Tue, 22 Mar 2022 18:42:06 -0400 +Subject: [PATCH 7/8] drivers: net: xgene: Fix regression in CRC stripping +Git-commit: e9e6faeafaa00da1851bcf47912b0f1acae666b4 +Patch-mainline: v5.18-rc1 +References: git-fixes + +All packets on ingress (except for jumbo) are terminated with a 4-bytes +CRC checksum. It's the responsability of the driver to strip those 4 +bytes. Unfortunately a change dating back to March 2017 re-shuffled some +code and made the CRC stripping code effectively dead. + +This change re-orders that part a bit such that the datalen is +immediately altered if needed. + +Fixes: 4902a92270fb ("drivers: net: xgene: Add workaround for errata 10GE_8/ENET_11") +Cc: stable@vger.kernel.org +Signed-off-by: Stephane Graber +Tested-by: Stephane Graber +Link: https://lore.kernel.org/r/20220322224205.752795-1-stgraber@ubuntu.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +index 2123046fd853..4f7ef1dceba5 100644 +--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c ++++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +@@ -710,6 +710,12 @@ static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring, + buf_pool->rx_skb[skb_index] = NULL; + + datalen = xgene_enet_get_data_len(le64_to_cpu(raw_desc->m1)); ++ ++ /* strip off CRC as HW isn't doing this */ ++ nv = GET_VAL(NV, le64_to_cpu(raw_desc->m0)); ++ if (!nv) ++ datalen -= 4; ++ + skb_put(skb, datalen); + prefetch(skb->data - NET_IP_ALIGN); + skb->protocol = eth_type_trans(skb, ndev); +@@ -731,12 +737,8 @@ static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring, + } + } + +- nv = GET_VAL(NV, le64_to_cpu(raw_desc->m0)); +- if (!nv) { +- /* strip off CRC as HW isn't doing this */ +- datalen -= 4; ++ if (!nv) + goto skip_jumbo; +- } + + slots = page_pool->slots - 1; + head = page_pool->head; +-- +2.16.4 + diff --git a/patches.suse/msft-hv-2514-net-mana-Use-struct_size-helper-in-mana_gd_create_dm.patch b/patches.suse/msft-hv-2514-net-mana-Use-struct_size-helper-in-mana_gd_create_dm.patch new file mode 100644 index 0000000..9f23eed --- /dev/null +++ b/patches.suse/msft-hv-2514-net-mana-Use-struct_size-helper-in-mana_gd_create_dm.patch @@ -0,0 +1,44 @@ +From: "Gustavo A. R. Silva" +Date: Mon, 24 Jan 2022 15:43:47 -0600 +Patch-mainline: v5.18-rc1 +Subject: net: mana: Use struct_size() helper in mana_gd_create_dma_region() +Git-commit: 10cdc794dae890fb3149e90854e8440cf5bf615e +References: bsc#1195651 + +Make use of the struct_size() helper instead of an open-coded version, +in order to avoid any potential type mistakes or integer overflows that, +in the worst scenario, could lead to heap overflows. + +Also, address the following sparse warnings: +drivers/net/ethernet/microsoft/mana/gdma_main.c:677:24: warning: using sizeof on a flexible structure + +Link: https://github.com/KSPP/linux/issues/174 +Signed-off-by: Gustavo A. R. Silva +Reviewed-by: Dexuan Cui +Signed-off-by: David S. Miller +Acked-by: Olaf Hering +--- + drivers/net/ethernet/microsoft/mana/gdma_main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c +--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c ++++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c +@@ -663,7 +663,7 @@ static int mana_gd_create_dma_region(struct gdma_dev *gd, + struct gdma_context *gc = gd->gdma_context; + struct hw_channel_context *hwc; + u32 length = gmi->length; +- u32 req_msg_size; ++ size_t req_msg_size; + int err; + int i; + +@@ -674,7 +674,7 @@ static int mana_gd_create_dma_region(struct gdma_dev *gd, + return -EINVAL; + + hwc = gc->hwc.driver_data; +- req_msg_size = sizeof(*req) + num_page * sizeof(u64); ++ req_msg_size = struct_size(req, page_addr_list, num_page); + if (req_msg_size > hwc->max_req_msg_size) + return -EINVAL; + diff --git a/patches.suse/msft-hv-2516-net-mana-Add-counter-for-packet-dropped-by-XDP.patch b/patches.suse/msft-hv-2516-net-mana-Add-counter-for-packet-dropped-by-XDP.patch new file mode 100644 index 0000000..4f10422 --- /dev/null +++ b/patches.suse/msft-hv-2516-net-mana-Add-counter-for-packet-dropped-by-XDP.patch @@ -0,0 +1,221 @@ +From: Haiyang Zhang +Date: Fri, 28 Jan 2022 18:03:36 -0800 +Patch-mainline: v5.18-rc1 +Subject: net: mana: Add counter for packet dropped by XDP +Git-commit: f90f84201edde2bca25a73226ff0ebe765273890 +References: bsc#1195651 + +This counter will show up in ethtool stat data. + +Signed-off-by: Haiyang Zhang +Signed-off-by: David S. Miller +Acked-by: Olaf Hering +--- + drivers/net/ethernet/microsoft/mana/mana.h | 13 ++++++-- + drivers/net/ethernet/microsoft/mana/mana_en.c | 35 +++++++++++++--------- + drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 30 +++++++++++-------- + 3 files changed, 49 insertions(+), 29 deletions(-) + +diff --git a/drivers/net/ethernet/microsoft/mana/mana.h b/drivers/net/ethernet/microsoft/mana/mana.h +--- a/drivers/net/ethernet/microsoft/mana/mana.h ++++ b/drivers/net/ethernet/microsoft/mana/mana.h +@@ -48,7 +48,14 @@ enum TRI_STATE { + + #define MAX_PORTS_IN_MANA_DEV 256 + +-struct mana_stats { ++struct mana_stats_rx { ++ u64 packets; ++ u64 bytes; ++ u64 xdp_drop; ++ struct u64_stats_sync syncp; ++}; ++ ++struct mana_stats_tx { + u64 packets; + u64 bytes; + struct u64_stats_sync syncp; +@@ -76,7 +83,7 @@ struct mana_txq { + + atomic_t pending_sends; + +- struct mana_stats stats; ++ struct mana_stats_tx stats; + }; + + /* skb data and frags dma mappings */ +@@ -298,7 +305,7 @@ struct mana_rxq { + + u32 buf_index; + +- struct mana_stats stats; ++ struct mana_stats_rx stats; + + struct bpf_prog __rcu *bpf_prog; + struct xdp_rxq_info xdp_rxq; +diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c +--- a/drivers/net/ethernet/microsoft/mana/mana_en.c ++++ b/drivers/net/ethernet/microsoft/mana/mana_en.c +@@ -136,7 +136,7 @@ int mana_start_xmit(struct sk_buff *skb, struct net_device *ndev) + bool ipv4 = false, ipv6 = false; + struct mana_tx_package pkg = {}; + struct netdev_queue *net_txq; +- struct mana_stats *tx_stats; ++ struct mana_stats_tx *tx_stats; + struct gdma_queue *gdma_sq; + unsigned int csum_type; + struct mana_txq *txq; +@@ -299,7 +299,8 @@ static void mana_get_stats64(struct net_device *ndev, + { + struct mana_port_context *apc = netdev_priv(ndev); + unsigned int num_queues = apc->num_queues; +- struct mana_stats *stats; ++ struct mana_stats_rx *rx_stats; ++ struct mana_stats_tx *tx_stats; + unsigned int start; + u64 packets, bytes; + int q; +@@ -310,26 +311,26 @@ static void mana_get_stats64(struct net_device *ndev, + netdev_stats_to_stats64(st, &ndev->stats); + + for (q = 0; q < num_queues; q++) { +- stats = &apc->rxqs[q]->stats; ++ rx_stats = &apc->rxqs[q]->stats; + + do { +- start = u64_stats_fetch_begin_irq(&stats->syncp); +- packets = stats->packets; +- bytes = stats->bytes; +- } while (u64_stats_fetch_retry_irq(&stats->syncp, start)); ++ start = u64_stats_fetch_begin_irq(&rx_stats->syncp); ++ packets = rx_stats->packets; ++ bytes = rx_stats->bytes; ++ } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start)); + + st->rx_packets += packets; + st->rx_bytes += bytes; + } + + for (q = 0; q < num_queues; q++) { +- stats = &apc->tx_qp[q].txq.stats; ++ tx_stats = &apc->tx_qp[q].txq.stats; + + do { +- start = u64_stats_fetch_begin_irq(&stats->syncp); +- packets = stats->packets; +- bytes = stats->bytes; +- } while (u64_stats_fetch_retry_irq(&stats->syncp, start)); ++ start = u64_stats_fetch_begin_irq(&tx_stats->syncp); ++ packets = tx_stats->packets; ++ bytes = tx_stats->bytes; ++ } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start)); + + st->tx_packets += packets; + st->tx_bytes += bytes; +@@ -986,7 +987,7 @@ static struct sk_buff *mana_build_skb(void *buf_va, uint pkt_len, + static void mana_rx_skb(void *buf_va, struct mana_rxcomp_oob *cqe, + struct mana_rxq *rxq) + { +- struct mana_stats *rx_stats = &rxq->stats; ++ struct mana_stats_rx *rx_stats = &rxq->stats; + struct net_device *ndev = rxq->ndev; + uint pkt_len = cqe->ppi[0].pkt_len; + u16 rxq_idx = rxq->rxq_idx; +@@ -1007,7 +1008,7 @@ static void mana_rx_skb(void *buf_va, struct mana_rxcomp_oob *cqe, + act = mana_run_xdp(ndev, rxq, &xdp, buf_va, pkt_len); + + if (act != XDP_PASS && act != XDP_TX) +- goto drop; ++ goto drop_xdp; + + skb = mana_build_skb(buf_va, pkt_len, &xdp); + +@@ -1048,9 +1049,15 @@ static void mana_rx_skb(void *buf_va, struct mana_rxcomp_oob *cqe, + u64_stats_update_end(&rx_stats->syncp); + return; + ++drop_xdp: ++ u64_stats_update_begin(&rx_stats->syncp); ++ rx_stats->xdp_drop++; ++ u64_stats_update_end(&rx_stats->syncp); ++ + drop: + free_page((unsigned long)buf_va); + ++ndev->stats.rx_dropped; ++ + return; + } + +diff --git a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c +--- a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c ++++ b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c +@@ -23,7 +23,7 @@ static int mana_get_sset_count(struct net_device *ndev, int stringset) + if (stringset != ETH_SS_STATS) + return -EINVAL; + +- return ARRAY_SIZE(mana_eth_stats) + num_queues * 4; ++ return ARRAY_SIZE(mana_eth_stats) + num_queues * 5; + } + + static void mana_get_strings(struct net_device *ndev, u32 stringset, u8 *data) +@@ -46,6 +46,8 @@ static void mana_get_strings(struct net_device *ndev, u32 stringset, u8 *data) + p += ETH_GSTRING_LEN; + sprintf(p, "rx_%d_bytes", i); + p += ETH_GSTRING_LEN; ++ sprintf(p, "rx_%d_xdp_drop", i); ++ p += ETH_GSTRING_LEN; + } + + for (i = 0; i < num_queues; i++) { +@@ -62,9 +64,11 @@ static void mana_get_ethtool_stats(struct net_device *ndev, + struct mana_port_context *apc = netdev_priv(ndev); + unsigned int num_queues = apc->num_queues; + void *eth_stats = &apc->eth_stats; +- struct mana_stats *stats; ++ struct mana_stats_rx *rx_stats; ++ struct mana_stats_tx *tx_stats; + unsigned int start; + u64 packets, bytes; ++ u64 xdp_drop; + int q, i = 0; + + if (!apc->port_is_up) +@@ -74,26 +78,28 @@ static void mana_get_ethtool_stats(struct net_device *ndev, + data[i++] = *(u64 *)(eth_stats + mana_eth_stats[q].offset); + + for (q = 0; q < num_queues; q++) { +- stats = &apc->rxqs[q]->stats; ++ rx_stats = &apc->rxqs[q]->stats; + + do { +- start = u64_stats_fetch_begin_irq(&stats->syncp); +- packets = stats->packets; +- bytes = stats->bytes; +- } while (u64_stats_fetch_retry_irq(&stats->syncp, start)); ++ start = u64_stats_fetch_begin_irq(&rx_stats->syncp); ++ packets = rx_stats->packets; ++ bytes = rx_stats->bytes; ++ xdp_drop = rx_stats->xdp_drop; ++ } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start)); + + data[i++] = packets; + data[i++] = bytes; ++ data[i++] = xdp_drop; + } + + for (q = 0; q < num_queues; q++) { +- stats = &apc->tx_qp[q].txq.stats; ++ tx_stats = &apc->tx_qp[q].txq.stats; + + do { +- start = u64_stats_fetch_begin_irq(&stats->syncp); +- packets = stats->packets; +- bytes = stats->bytes; +- } while (u64_stats_fetch_retry_irq(&stats->syncp, start)); ++ start = u64_stats_fetch_begin_irq(&tx_stats->syncp); ++ packets = tx_stats->packets; ++ bytes = tx_stats->bytes; ++ } while (u64_stats_fetch_retry_irq(&tx_stats->syncp, start)); + + data[i++] = packets; + data[i++] = bytes; diff --git a/patches.suse/msft-hv-2517-net-mana-Add-counter-for-XDP_TX.patch b/patches.suse/msft-hv-2517-net-mana-Add-counter-for-XDP_TX.patch new file mode 100644 index 0000000..aab3335 --- /dev/null +++ b/patches.suse/msft-hv-2517-net-mana-Add-counter-for-XDP_TX.patch @@ -0,0 +1,102 @@ +From: Haiyang Zhang +Date: Fri, 28 Jan 2022 18:03:37 -0800 +Patch-mainline: v5.18-rc1 +Subject: net: mana: Add counter for XDP_TX +Git-commit: d356abb95b9883198b1ba0db678659369701e17d +References: bsc#1195651 + +This counter will show up in ethtool stat. It is the +number of packets received and forwarded by XDP program. + +Signed-off-by: Haiyang Zhang +Signed-off-by: David S. Miller +Acked-by: Olaf Hering +--- + drivers/net/ethernet/microsoft/mana/mana.h | 1 + + drivers/net/ethernet/microsoft/mana/mana_en.c | 12 ++++++++---- + drivers/net/ethernet/microsoft/mana/mana_ethtool.c | 7 ++++++- + 3 files changed, 15 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/ethernet/microsoft/mana/mana.h b/drivers/net/ethernet/microsoft/mana/mana.h +--- a/drivers/net/ethernet/microsoft/mana/mana.h ++++ b/drivers/net/ethernet/microsoft/mana/mana.h +@@ -52,6 +52,7 @@ struct mana_stats_rx { + u64 packets; + u64 bytes; + u64 xdp_drop; ++ u64 xdp_tx; + struct u64_stats_sync syncp; + }; + +diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c +--- a/drivers/net/ethernet/microsoft/mana/mana_en.c ++++ b/drivers/net/ethernet/microsoft/mana/mana_en.c +@@ -1035,6 +1035,14 @@ static void mana_rx_skb(void *buf_va, struct mana_rxcomp_oob *cqe, + skb_set_hash(skb, hash_value, PKT_HASH_TYPE_L3); + } + ++ u64_stats_update_begin(&rx_stats->syncp); ++ rx_stats->packets++; ++ rx_stats->bytes += pkt_len; ++ ++ if (act == XDP_TX) ++ rx_stats->xdp_tx++; ++ u64_stats_update_end(&rx_stats->syncp); ++ + if (act == XDP_TX) { + skb_set_queue_mapping(skb, rxq_idx); + mana_xdp_tx(skb, ndev); +@@ -1043,10 +1051,6 @@ static void mana_rx_skb(void *buf_va, struct mana_rxcomp_oob *cqe, + + napi_gro_receive(napi, skb); + +- u64_stats_update_begin(&rx_stats->syncp); +- rx_stats->packets++; +- rx_stats->bytes += pkt_len; +- u64_stats_update_end(&rx_stats->syncp); + return; + + drop_xdp: +diff --git a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c +--- a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c ++++ b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c +@@ -23,7 +23,7 @@ static int mana_get_sset_count(struct net_device *ndev, int stringset) + if (stringset != ETH_SS_STATS) + return -EINVAL; + +- return ARRAY_SIZE(mana_eth_stats) + num_queues * 5; ++ return ARRAY_SIZE(mana_eth_stats) + num_queues * 6; + } + + static void mana_get_strings(struct net_device *ndev, u32 stringset, u8 *data) +@@ -48,6 +48,8 @@ static void mana_get_strings(struct net_device *ndev, u32 stringset, u8 *data) + p += ETH_GSTRING_LEN; + sprintf(p, "rx_%d_xdp_drop", i); + p += ETH_GSTRING_LEN; ++ sprintf(p, "rx_%d_xdp_tx", i); ++ p += ETH_GSTRING_LEN; + } + + for (i = 0; i < num_queues; i++) { +@@ -69,6 +71,7 @@ static void mana_get_ethtool_stats(struct net_device *ndev, + unsigned int start; + u64 packets, bytes; + u64 xdp_drop; ++ u64 xdp_tx; + int q, i = 0; + + if (!apc->port_is_up) +@@ -85,11 +88,13 @@ static void mana_get_ethtool_stats(struct net_device *ndev, + packets = rx_stats->packets; + bytes = rx_stats->bytes; + xdp_drop = rx_stats->xdp_drop; ++ xdp_tx = rx_stats->xdp_tx; + } while (u64_stats_fetch_retry_irq(&rx_stats->syncp, start)); + + data[i++] = packets; + data[i++] = bytes; + data[i++] = xdp_drop; ++ data[i++] = xdp_tx; + } + + for (q = 0; q < num_queues; q++) { diff --git a/patches.suse/msft-hv-2518-net-mana-Reuse-XDP-dropped-page.patch b/patches.suse/msft-hv-2518-net-mana-Reuse-XDP-dropped-page.patch new file mode 100644 index 0000000..46a3993 --- /dev/null +++ b/patches.suse/msft-hv-2518-net-mana-Reuse-XDP-dropped-page.patch @@ -0,0 +1,68 @@ +From: Haiyang Zhang +Date: Fri, 28 Jan 2022 18:03:38 -0800 +Patch-mainline: v5.18-rc1 +Subject: net: mana: Reuse XDP dropped page +Git-commit: a6bf5703f17bdbd775c0e6837dd2d5b1c344e28c +References: bsc#1195651 + +Reuse the dropped page in RX path to save page allocation +overhead. + +Signed-off-by: Haiyang Zhang +Signed-off-by: David S. Miller +Acked-by: Olaf Hering +--- + drivers/net/ethernet/microsoft/mana/mana.h | 1 + + drivers/net/ethernet/microsoft/mana/mana_en.c | 15 +++++++++++++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/microsoft/mana/mana.h b/drivers/net/ethernet/microsoft/mana/mana.h +--- a/drivers/net/ethernet/microsoft/mana/mana.h ++++ b/drivers/net/ethernet/microsoft/mana/mana.h +@@ -310,6 +310,7 @@ struct mana_rxq { + + struct bpf_prog __rcu *bpf_prog; + struct xdp_rxq_info xdp_rxq; ++ struct page *xdp_save_page; + + /* MUST BE THE LAST MEMBER: + * Each receive buffer has an associated mana_recv_buf_oob. +diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c +--- a/drivers/net/ethernet/microsoft/mana/mana_en.c ++++ b/drivers/net/ethernet/microsoft/mana/mana_en.c +@@ -1059,7 +1059,9 @@ drop_xdp: + u64_stats_update_end(&rx_stats->syncp); + + drop: +- free_page((unsigned long)buf_va); ++ WARN_ON_ONCE(rxq->xdp_save_page); ++ rxq->xdp_save_page = virt_to_page(buf_va); ++ + ++ndev->stats.rx_dropped; + + return; +@@ -1116,7 +1118,13 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, + rxbuf_oob = &rxq->rx_oobs[curr]; + WARN_ON_ONCE(rxbuf_oob->wqe_inf.wqe_size_in_bu != 1); + +- new_page = alloc_page(GFP_ATOMIC); ++ /* Reuse XDP dropped page if available */ ++ if (rxq->xdp_save_page) { ++ new_page = rxq->xdp_save_page; ++ rxq->xdp_save_page = NULL; ++ } else { ++ new_page = alloc_page(GFP_ATOMIC); ++ } + + if (new_page) { + da = dma_map_page(dev, new_page, XDP_PACKET_HEADROOM, rxq->datasize, +@@ -1403,6 +1411,9 @@ static void mana_destroy_rxq(struct mana_port_context *apc, + + mana_deinit_cq(apc, &rxq->rx_cq); + ++ if (rxq->xdp_save_page) ++ __free_page(rxq->xdp_save_page); ++ + for (i = 0; i < rxq->num_rx_buf; i++) { + rx_oob = &rxq->rx_oobs[i]; + diff --git a/patches.suse/msft-hv-2523-net-mana-Add-handling-of-CQE_RX_TRUNCATED.patch b/patches.suse/msft-hv-2523-net-mana-Add-handling-of-CQE_RX_TRUNCATED.patch new file mode 100644 index 0000000..3ab9552 --- /dev/null +++ b/patches.suse/msft-hv-2523-net-mana-Add-handling-of-CQE_RX_TRUNCATED.patch @@ -0,0 +1,42 @@ +From: Haiyang Zhang +Date: Fri, 4 Feb 2022 14:45:44 -0800 +Patch-mainline: v5.18-rc1 +Subject: net: mana: Add handling of CQE_RX_TRUNCATED +Git-commit: e4b7621982d29f26ff4d39af389e5e675a4ffed4 +References: bsc#1195651 + +The proper way to drop this kind of CQE is advancing rxq tail +without indicating the packet to the upper network layer. + +Signed-off-by: Haiyang Zhang +Reviewed-by: Dexuan Cui +Signed-off-by: David S. Miller +Acked-by: Olaf Hering +--- + drivers/net/ethernet/microsoft/mana/mana_en.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c +--- a/drivers/net/ethernet/microsoft/mana/mana_en.c ++++ b/drivers/net/ethernet/microsoft/mana/mana_en.c +@@ -1085,8 +1085,10 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, + break; + + case CQE_RX_TRUNCATED: +- netdev_err(ndev, "Dropped a truncated packet\n"); +- return; ++ ++ndev->stats.rx_dropped; ++ rxbuf_oob = &rxq->rx_oobs[rxq->buf_index]; ++ netdev_warn_once(ndev, "Dropped a truncated packet\n"); ++ goto drop; + + case CQE_RX_COALESCED_4: + netdev_err(ndev, "RX coalescing is unsupported\n"); +@@ -1154,6 +1156,7 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, + + mana_rx_skb(old_buf, oob, rxq); + ++drop: + mana_move_wq_tail(rxq->gdma_rq, rxbuf_oob->wqe_inf.wqe_size_in_bu); + + mana_post_pkt_rxq(rxq); diff --git a/patches.suse/msft-hv-2524-net-mana-Remove-unnecessary-check-of-cqe_type-in-man.patch b/patches.suse/msft-hv-2524-net-mana-Remove-unnecessary-check-of-cqe_type-in-man.patch new file mode 100644 index 0000000..0f544f7 --- /dev/null +++ b/patches.suse/msft-hv-2524-net-mana-Remove-unnecessary-check-of-cqe_type-in-man.patch @@ -0,0 +1,31 @@ +From: Haiyang Zhang +Date: Fri, 4 Feb 2022 14:45:45 -0800 +Patch-mainline: v5.18-rc1 +Subject: net: mana: Remove unnecessary check of cqe_type in mana_process_rx_cqe() +Git-commit: 68f831355052706e1f8498653f6c4d36643c0db8 +References: bsc#1195651 + +The switch statement already ensures cqe_type == CQE_RX_OKAY at that +point. + +Signed-off-by: Haiyang Zhang +Reviewed-by: Dexuan Cui +Signed-off-by: David S. Miller +Acked-by: Olaf Hering +--- + drivers/net/ethernet/microsoft/mana/mana_en.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c +--- a/drivers/net/ethernet/microsoft/mana/mana_en.c ++++ b/drivers/net/ethernet/microsoft/mana/mana_en.c +@@ -1104,9 +1104,6 @@ static void mana_process_rx_cqe(struct mana_rxq *rxq, struct mana_cq *cq, + return; + } + +- if (oob->cqe_hdr.cqe_type != CQE_RX_OKAY) +- return; +- + pktlen = oob->ppi[0].pkt_len; + + if (pktlen == 0) { diff --git a/patches.suse/net-bcmgenet-Don-t-claim-WOL-when-its-not-available.patch b/patches.suse/net-bcmgenet-Don-t-claim-WOL-when-its-not-available.patch new file mode 100644 index 0000000..0062d3c --- /dev/null +++ b/patches.suse/net-bcmgenet-Don-t-claim-WOL-when-its-not-available.patch @@ -0,0 +1,57 @@ +From 82d66836b8ce8749ff0610b1bd4313f876aa4f47 Mon Sep 17 00:00:00 2001 +From: Jeremy Linton +Date: Wed, 9 Mar 2022 22:55:35 -0600 +Subject: [PATCH 4/8] net: bcmgenet: Don't claim WOL when its not available +Git-commit: 00b022f8f876a3a036b0df7f971001bef6398605 +Patch-mainline: v5.17-rc8 +References: git-fixes + +Some of the bcmgenet platforms don't correctly support WOL, yet +ethtool returns: + +"Supports Wake-on: gsf" + +which is false. + +Ideally if there isn't a wol_irq, or there is something else that +keeps the device from being able to wakeup it should display: + +"Supports Wake-on: d" + +This patch checks whether the device can wakup, before using the +hard-coded supported flags. This corrects the ethtool reporting, as +well as the WOL configuration because ethtool verifies that the mode +is supported before attempting it. + +Fixes: c51de7f3976b ("net: bcmgenet: add Wake-on-LAN support code") +Signed-off-by: Jeremy Linton +Tested-by: Peter Robinson +Acked-by: Florian Fainelli +Link: https://lore.kernel.org/r/20220310045535.224450-1-jeremy.linton@arm.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c b/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c +index a5caaf44b61a..a9a83d48b18f 100644 +--- a/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c ++++ b/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c +@@ -44,6 +44,13 @@ + void bcmgenet_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) + { + struct bcmgenet_priv *priv = netdev_priv(dev); ++ struct device *kdev = &priv->pdev->dev; ++ ++ if (!device_can_wakeup(kdev)) { ++ wol->supported = 0; ++ wol->wolopts = 0; ++ return; ++ } + + wol->supported = WAKE_MAGIC | WAKE_MAGICSECURE; + wol->wolopts = priv->wolopts; +-- +2.16.4 + diff --git a/patches.suse/net-qlogic-check-the-return-value-of-dma_alloc_coher.patch b/patches.suse/net-qlogic-check-the-return-value-of-dma_alloc_coher.patch new file mode 100644 index 0000000..e8a1c37 --- /dev/null +++ b/patches.suse/net-qlogic-check-the-return-value-of-dma_alloc_coher.patch @@ -0,0 +1,49 @@ +From cb0d2dc083a1c0c176d52858ca7318bc462cfbee Mon Sep 17 00:00:00 2001 +From: Jia-Ju Bai +Date: Sat, 5 Mar 2022 01:14:11 -0800 +Subject: [PATCH 2/8] net: qlogic: check the return value of + dma_alloc_coherent() in qed_vf_hw_prepare() +Git-commit: e0058f0fa80f6e09c4d363779c241c45a3c56b94 +Patch-mainline: v5.17-rc8 +References: git-fixes + +The function dma_alloc_coherent() in qed_vf_hw_prepare() can fail, so +its return value should be checked. + +Fixes: 1408cc1fa48c ("qed: Introduce VFs") +Reported-by: TOTE Robot +Signed-off-by: Jia-Ju Bai +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/qlogic/qed/qed_vf.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/drivers/net/ethernet/qlogic/qed/qed_vf.c b/drivers/net/ethernet/qlogic/qed/qed_vf.c +index 93a0fbf6a132..e12338abaf0a 100644 +--- a/drivers/net/ethernet/qlogic/qed/qed_vf.c ++++ b/drivers/net/ethernet/qlogic/qed/qed_vf.c +@@ -539,6 +539,9 @@ int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn) + p_iov->bulletin.size, + &p_iov->bulletin.phys, + GFP_KERNEL); ++ if (!p_iov->bulletin.p_virt) ++ goto free_pf2vf_reply; ++ + DP_VERBOSE(p_hwfn, QED_MSG_IOV, + "VF's bulletin Board [%p virt 0x%llx phys 0x%08x bytes]\n", + p_iov->bulletin.p_virt, +@@ -578,6 +581,10 @@ int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn) + + return rc; + ++free_pf2vf_reply: ++ dma_free_coherent(&p_hwfn->cdev->pdev->dev, ++ sizeof(union pfvf_tlvs), ++ p_iov->pf2vf_reply, p_iov->pf2vf_reply_phys); + free_vf2pf_request: + dma_free_coherent(&p_hwfn->cdev->pdev->dev, + sizeof(union vfpf_tlvs), +-- +2.16.4 + diff --git a/patches.suse/qed-display-VF-trust-config.patch b/patches.suse/qed-display-VF-trust-config.patch new file mode 100644 index 0000000..e47ba40 --- /dev/null +++ b/patches.suse/qed-display-VF-trust-config.patch @@ -0,0 +1,36 @@ +From 632111b307cee51528cba551a2a38a5965a489e9 Mon Sep 17 00:00:00 2001 +From: Manish Chopra +Date: Wed, 2 Mar 2022 02:52:21 -0800 +Subject: [PATCH 5/8] qed: display VF trust config +Git-commit: 4e6e6bec7440b9b76f312f28b1f4e944eebb3abc +Patch-mainline: v5.18-rc1 +References: git-fixes + +Driver does support SR-IOV VFs trust configuration but +it does not display it when queried via ip link utility. + +Cc: stable@vger.kernel.org +Fixes: f990c82c385b ("qed*: Add support for ndo_set_vf_trust") +Signed-off-by: Manish Chopra +Signed-off-by: Ariel Elior +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c +index 4cc319a1e1e3..bbc8611c4067 100644 +--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c ++++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c +@@ -4717,6 +4717,7 @@ static int qed_get_vf_config(struct qed_dev *cdev, + tx_rate = vf_info->tx_rate; + ivi->max_tx_rate = tx_rate ? tx_rate : link.speed; + ivi->min_tx_rate = qed_iov_get_vf_min_rate(hwfn, vf_id); ++ ivi->trusted = vf_info->is_trusted_request; + + return 0; + } +-- +2.16.4 + diff --git a/patches.suse/qed-return-status-of-qed_iov_get_link.patch b/patches.suse/qed-return-status-of-qed_iov_get_link.patch new file mode 100644 index 0000000..4424d01 --- /dev/null +++ b/patches.suse/qed-return-status-of-qed_iov_get_link.patch @@ -0,0 +1,86 @@ +From c4075aa54eecb42b16cc9a799b7effdd1b1ad383 Mon Sep 17 00:00:00 2001 +From: Tom Rix +Date: Sat, 5 Mar 2022 07:06:42 -0800 +Subject: [PATCH 3/8] qed: return status of qed_iov_get_link +Git-commit: d9dc0c84ad2d4cc911ba252c973d1bf18d5eb9cf +Patch-mainline: v5.17-rc8 +References: git-fixes + +Clang static analysis reports this issue +qed_sriov.c:4727:19: warning: Assigned value is + garbage or undefined + ivi->max_tx_rate = tx_rate ? tx_rate : link.speed; + ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +link is only sometimes set by the call to qed_iov_get_link() +qed_iov_get_link fails without setting link or returning +status. So change the decl to return status. + +Fixes: 73390ac9d82b ("qed*: support ndo_get_vf_config") +Signed-off-by: Tom Rix +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c +index 7411e23481f2..4cc319a1e1e3 100644 +--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c ++++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c +@@ -3801,11 +3801,11 @@ bool qed_iov_mark_vf_flr(struct qed_hwfn *p_hwfn, u32 *p_disabled_vfs) + return found; + } + +-static void qed_iov_get_link(struct qed_hwfn *p_hwfn, +- u16 vfid, +- struct qed_mcp_link_params *p_params, +- struct qed_mcp_link_state *p_link, +- struct qed_mcp_link_capabilities *p_caps) ++static int qed_iov_get_link(struct qed_hwfn *p_hwfn, ++ u16 vfid, ++ struct qed_mcp_link_params *p_params, ++ struct qed_mcp_link_state *p_link, ++ struct qed_mcp_link_capabilities *p_caps) + { + struct qed_vf_info *p_vf = qed_iov_get_vf_info(p_hwfn, + vfid, +@@ -3813,7 +3813,7 @@ static void qed_iov_get_link(struct qed_hwfn *p_hwfn, + struct qed_bulletin_content *p_bulletin; + + if (!p_vf) +- return; ++ return -EINVAL; + + p_bulletin = p_vf->bulletin.p_virt; + +@@ -3823,6 +3823,7 @@ static void qed_iov_get_link(struct qed_hwfn *p_hwfn, + __qed_vf_get_link_state(p_hwfn, p_link, p_bulletin); + if (p_caps) + __qed_vf_get_link_caps(p_hwfn, p_caps, p_bulletin); ++ return 0; + } + + static int +@@ -4684,6 +4685,7 @@ static int qed_get_vf_config(struct qed_dev *cdev, + struct qed_public_vf_info *vf_info; + struct qed_mcp_link_state link; + u32 tx_rate; ++ int ret; + + /* Sanitize request */ + if (IS_VF(cdev)) +@@ -4697,7 +4699,9 @@ static int qed_get_vf_config(struct qed_dev *cdev, + + vf_info = qed_iov_get_public_vf_info(hwfn, vf_id, true); + +- qed_iov_get_link(hwfn, vf_id, NULL, &link, NULL); ++ ret = qed_iov_get_link(hwfn, vf_id, NULL, &link, NULL); ++ if (ret) ++ return ret; + + /* Fill information about VF */ + ivi->vf = vf_id; +-- +2.16.4 + diff --git a/patches.suse/qed-validate-and-restrict-untrusted-VFs-vlan-promisc.patch b/patches.suse/qed-validate-and-restrict-untrusted-VFs-vlan-promisc.patch new file mode 100644 index 0000000..ad8ec03 --- /dev/null +++ b/patches.suse/qed-validate-and-restrict-untrusted-VFs-vlan-promisc.patch @@ -0,0 +1,115 @@ +From 9209700b1f818bdbcfd9452fc944e6622b22e22e Mon Sep 17 00:00:00 2001 +From: Manish Chopra +Date: Wed, 2 Mar 2022 02:52:22 -0800 +Subject: [PATCH 6/8] qed: validate and restrict untrusted VFs vlan promisc + mode +Git-commit: cbcc44db2cf7b836896733acc0e5ea966136ed22 +Patch-mainline: v5.18-rc1 +References: git-fixes + +Today when VFs are put in promiscuous mode, they can request PF +to configure device for them to receive all VLANs traffic regardless +of what vlan is configured by the PF (via ip link) and PF allows this +config request regardless of whether VF is trusted or not. + +From security POV, when VLAN is configured for VF through PF (via ip link), +honour such config requests from VF only when they are configured to be +trusted, otherwise restrict such VFs vlan promisc mode config. + +Cc: stable@vger.kernel.org +Fixes: f990c82c385b ("qed*: Add support for ndo_set_vf_trust") +Signed-off-by: Manish Chopra +Signed-off-by: Ariel Elior +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 28 ++++++++++++++++++++++++++-- + drivers/net/ethernet/qlogic/qed/qed_sriov.h | 1 + + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c +index bbc8611c4067..40d9939f4997 100644 +--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c ++++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c +@@ -3003,12 +3003,16 @@ static int qed_iov_pre_update_vport(struct qed_hwfn *hwfn, + u8 mask = QED_ACCEPT_UCAST_UNMATCHED | QED_ACCEPT_MCAST_UNMATCHED; + struct qed_filter_accept_flags *flags = ¶ms->accept_flags; + struct qed_public_vf_info *vf_info; ++ u16 tlv_mask; ++ ++ tlv_mask = BIT(QED_IOV_VP_UPDATE_ACCEPT_PARAM) | ++ BIT(QED_IOV_VP_UPDATE_ACCEPT_ANY_VLAN); + + /* Untrusted VFs can't even be trusted to know that fact. + * Simply indicate everything is configured fine, and trace + * configuration 'behind their back'. + */ +- if (!(*tlvs & BIT(QED_IOV_VP_UPDATE_ACCEPT_PARAM))) ++ if (!(*tlvs & tlv_mask)) + return 0; + + vf_info = qed_iov_get_public_vf_info(hwfn, vfid, true); +@@ -3025,6 +3029,13 @@ static int qed_iov_pre_update_vport(struct qed_hwfn *hwfn, + flags->tx_accept_filter &= ~mask; + } + ++ if (params->update_accept_any_vlan_flg) { ++ vf_info->accept_any_vlan = params->accept_any_vlan; ++ ++ if (vf_info->forced_vlan && !vf_info->is_trusted_configured) ++ params->accept_any_vlan = false; ++ } ++ + return 0; + } + +@@ -5148,6 +5159,12 @@ static void qed_iov_handle_trust_change(struct qed_hwfn *hwfn) + + params.update_ctl_frame_check = 1; + params.mac_chk_en = !vf_info->is_trusted_configured; ++ params.update_accept_any_vlan_flg = 0; ++ ++ if (vf_info->accept_any_vlan && vf_info->forced_vlan) { ++ params.update_accept_any_vlan_flg = 1; ++ params.accept_any_vlan = vf_info->accept_any_vlan; ++ } + + if (vf_info->rx_accept_mode & mask) { + flags->update_rx_mode_config = 1; +@@ -5163,13 +5180,20 @@ static void qed_iov_handle_trust_change(struct qed_hwfn *hwfn) + if (!vf_info->is_trusted_configured) { + flags->rx_accept_filter &= ~mask; + flags->tx_accept_filter &= ~mask; ++ params.accept_any_vlan = false; + } + + if (flags->update_rx_mode_config || + flags->update_tx_mode_config || +- params.update_ctl_frame_check) ++ params.update_ctl_frame_check || ++ params.update_accept_any_vlan_flg) { ++ DP_VERBOSE(hwfn, QED_MSG_IOV, ++ "vport update config for %s VF[abs 0x%x rel 0x%x]\n", ++ vf_info->is_trusted_configured ? "trusted" : "untrusted", ++ vf->abs_vf_id, vf->relative_vf_id); + qed_sp_vport_update(hwfn, ¶ms, + QED_SPQ_MODE_EBLOCK, NULL); ++ } + } + } + +diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.h b/drivers/net/ethernet/qlogic/qed/qed_sriov.h +index 9a8fd79611f2..853be06bccdf 100644 +--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.h ++++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.h +@@ -88,6 +88,7 @@ struct qed_public_vf_info { + bool is_trusted_request; + u8 rx_accept_mode; + u8 tx_accept_mode; ++ bool accept_any_vlan; + }; + + struct qed_iov_vf_init_params { +-- +2.16.4 + diff --git a/patches.suse/veth-Ensure-eth-header-is-in-skb-s-linear-part.patch b/patches.suse/veth-Ensure-eth-header-is-in-skb-s-linear-part.patch new file mode 100644 index 0000000..1792c70 --- /dev/null +++ b/patches.suse/veth-Ensure-eth-header-is-in-skb-s-linear-part.patch @@ -0,0 +1,71 @@ +From b6fa694ac2cf0b372afc650855a595784e1d1f75 Mon Sep 17 00:00:00 2001 +From: Guillaume Nault +Date: Wed, 6 Apr 2022 16:18:54 +0200 +Subject: [PATCH 8/8] veth: Ensure eth header is in skb's linear part +Git-commit: 726e2c5929de841fdcef4e2bf995680688ae1b87 +Patch-mainline: v5.18-rc3 +References: git-fixes + +After feeding a decapsulated packet to a veth device with act_mirred, +skb_headlen() may be 0. But veth_xmit() calls __dev_forward_skb(), +which expects at least ETH_HLEN byte of linear data (as +__dev_forward_skb2() calls eth_type_trans(), which pulls ETH_HLEN bytes +unconditionally). + +Use pskb_may_pull() to ensure veth_xmit() respects this constraint. + +kernel BUG at include/linux/skbuff.h:2328! +RIP: 0010:eth_type_trans+0xcf/0x140 +Call Trace: + + __dev_forward_skb2+0xe3/0x160 + veth_xmit+0x6e/0x250 [veth] + dev_hard_start_xmit+0xc7/0x200 + __dev_queue_xmit+0x47f/0x520 + ? skb_ensure_writable+0x85/0xa0 + ? skb_mpls_pop+0x98/0x1c0 + tcf_mirred_act+0x442/0x47e [act_mirred] + tcf_action_exec+0x86/0x140 + fl_classify+0x1d8/0x1e0 [cls_flower] + ? dma_pte_clear_level+0x129/0x1a0 + ? dma_pte_clear_level+0x129/0x1a0 + ? prb_fill_curr_block+0x2f/0xc0 + ? skb_copy_bits+0x11a/0x220 + __tcf_classify+0x58/0x110 + tcf_classify_ingress+0x6b/0x140 + __netif_receive_skb_core.constprop.0+0x47d/0xfd0 + ? __iommu_dma_unmap_swiotlb+0x44/0x90 + __netif_receive_skb_one_core+0x3d/0xa0 + netif_receive_skb+0x116/0x170 + be_process_rx+0x22f/0x330 [be2net] + be_poll+0x13c/0x370 [be2net] + __napi_poll+0x2a/0x170 + net_rx_action+0x22f/0x2f0 + __do_softirq+0xca/0x2a8 + __irq_exit_rcu+0xc1/0xe0 + common_interrupt+0x83/0xa0 + +Fixes: e314dbdc1c0d ("[NET]: Virtual ethernet device driver.") +Signed-off-by: Guillaume Nault +Signed-off-by: David S. Miller +Signed-off-by: Denis Kirjanov +--- + drivers/net/veth.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/veth.c b/drivers/net/veth.c +index 287f996e7095..f1c402cd4e99 100644 +--- a/drivers/net/veth.c ++++ b/drivers/net/veth.c +@@ -195,7 +195,7 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) + + rcu_read_lock(); + rcv = rcu_dereference(priv->peer); +- if (unlikely(!rcv)) { ++ if (unlikely(!rcv) || !pskb_may_pull(skb, ETH_HLEN)) { + kfree_skb(skb); + goto drop; + } +-- +2.16.4 + diff --git a/series.conf b/series.conf index 99eec03..b5e984b 100644 --- a/series.conf +++ b/series.conf @@ -16493,6 +16493,7 @@ patches.suse/ARM-DRA722-remove-redundant-definition-of-1.0-device.patch patches.suse/dt-bindings-add-compatible-string-for-allwinner-v3s-soc.patch patches.suse/ARM-sunxi-fix-the-core-number-of-V3s-in-sunxi-README.patch + patches.suse/arm64-dts-marvell-Fix-A37xx-UART0-register-size.patch patches.suse/0130-soc-fsl-qman-Sleep-instead-of-stuck-hacking-jiffies.patch patches.suse/0131-soc-fsl-guts-Add-compatible-string-for-LS1088.patch patches.suse/0132-soc-fsl-qbman-Add-common-routine-for-QBMan-private-a.patch @@ -46815,6 +46816,7 @@ patches.suse/mm-page_alloc-fix-a-division-by-zero-error-when-boosting-watermarks-v2.patch patches.suse/tmpfs-fix-link-accounting-when-a-tmpfile-is-linked-i.patch patches.suse/arm64-fix-SSBS-sanitization.patch + patches.suse/arm64-Relax-GIC-version-check-during-early-boot.patch patches.suse/libceph-handle-an-empty-authorize-reply.patch patches.suse/ceph-avoid-repeatedly-adding-inode-to-mdsc-snap_flush_list.patch patches.suse/clk-sunxi-ng-v3s-Fix-TCON-reset-de-assert-bit.patch @@ -47837,7 +47839,10 @@ patches.suse/scsi-cxgb4i-validate-tcp-sequence-number-only-if-chip-version-t5 patches.suse/dm-fix-to_sector-for-32bit.patch patches.suse/dm-integrity-limit-the-rate-of-error-messages.patch + patches.suse/arm64-Fix-HCR.TGE-status-for-NMI-contexts.patch patches.suse/0002-lib-raid6-use-vdupq_n_u8-to-avoid-endianness-warning.patch + patches.suse/arm64-debug-Don-t-propagate-UNKNOWN-FAR-into-si_code-for-debug-signals.patch + patches.suse/arm64-debug-Ensure-debug-handlers-check-triggering-exception-level.patch patches.suse/iommu-vt-d-check-identity-map-for-hot-added-devices patches.suse/iommu-vt-d-disable-ats-support-on-untrusted-devices patches.suse/iommu-vt-d-fix-null-pointer-reference-in-intel_svm_bind_mm @@ -48486,6 +48491,7 @@ patches.suse/x86-perf-amd-remove-need-to-check-running-bit-in-nmi-handler.patch patches.suse/sched-do-not-re-read-h_load_next-during-hierarchical-load-calculation.patch patches.suse/arm64-backtrace-Don-t-bother-trying-to-unwind-the-us.patch + patches.suse/arm64-futex-Fix-FUTEX_WAKE_OP-atomic-ops-with-non-zero-result-value.patch patches.suse/powerpc-vdso32-fix-CLOCK_MONOTONIC-on-PPC64.patch patches.suse/PCI-Add-function-1-DMA-alias-quirk-for-Marvell-9170-.patch patches.suse/0001-PCI-pciehp-Ignore-Link-State-Changes-after-powering-.patch @@ -48769,7 +48775,13 @@ patches.suse/s390-enable-processes-for-mio-instructions patches.suse/s390-unwind-introduce-stack-unwind-api.patch patches.suse/s390-ftrace-use-have_function_graph_ret_addr_ptr.patch + patches.suse/arm64-Clear-OSDLR_EL1-on-CPU-boot.patch + patches.suse/arm64-Save-and-restore-OSDLR_EL1-across-suspend-resume.patch + patches.suse/arm64-compat-Reduce-address-limit.patch + patches.suse/arm64-Fix-size-of-__early_cpu_boot_status.patch patches.suse/0001-locking-futex-Allow-low-level-atomic-operations-to-r.patch + patches.suse/arm64-futex-Bound-number-of-LDXR-STXR-loops-in-FUTEX_WAKE_OP.patch + patches.suse/arm64-futex-Avoid-copying-out-uninitialised-stack-in-failed-cmpxchg.patch patches.suse/arm64-Provide-a-command-line-to-disable-spectre_v2-m.patch patches.suse/arm64-Add-sysfs-vulnerability-show-for-spectre-v1.patch patches.suse/arm64-add-sysfs-vulnerability-show-for-meltdown.patch @@ -48827,6 +48839,7 @@ patches.suse/hwrng-stm32-fix-unbalanced-pm_runtime_enable.patch patches.suse/crypto-ccp-Do-not-free-psp_master-when-PLATFORM_INIT.patch patches.suse/crypto-arm-aes-neonbs-don-t-access-already-freed-wal.patch + patches.suse/crypto-arm64-aes-neonbs-don-t-access-already-freed-walk.iv.patch patches.suse/crypto-vmx-return-correct-error-code-on-failed-setke.patch patches.suse/crypto-gcm-fix-incompatibility-between-gcm-and-gcm_b.patch patches.suse/crypto-ccm-fix-incompatibility-between-ccm-and-ccm_b.patch @@ -50028,7 +50041,9 @@ patches.suse/usbnet-ipheth-fix-racing-condition.patch patches.suse/ipv6-Consider-sk_bound_dev_if-when-binding-a-raw-soc.patch patches.suse/usbnet-fix-kernel-crash-after-disconnect.patch + patches.suse/arm64-iommu-handle-non-remapped-addresses-in-mmap-and-get_sgtable.patch patches.suse/drivers-perf-arm_spe-don-t-error-on-high-order-pages-for-aux-buf.patch + patches.suse/arm64-mm-Inhibit-huge-vmap-with-ptdump.patch patches.suse/drm-vmwgfx-Don-t-send-drm-sysfs-hotplug-events-on-in.patch patches.suse/0001-drm-vmwgfx-NULL-pointer-dereference-from-vmw_cmd_dx_.patch patches.suse/drm-vmwgfx-integer-underflow-in-vmw_cmd_dx_set_shade.patch @@ -51448,6 +51463,7 @@ patches.suse/nvme-fix-multipath-crash-when-ANA-is-deactivated.patch patches.suse/btrfs-fix-extent_state-leak-in-btrfs_lock_and_flush_.patch patches.suse/arm64-Force-SSBS-on-context-switch.patch + patches.suse/arm64-entry-SP-Alignment-Fault-doesn-t-write-to-FAR_EL1.patch patches.suse/ACPI-IORT-Fix-off-by-one-check-in-iort_dev_find_its_.patch patches.suse/drm-msm-stop-abusing-dma_map-unmap-for-cache.patch patches.suse/drm-silence-variable-conn-set-but-not-used.patch @@ -51513,6 +51529,9 @@ patches.suse/s390-dasd-fix-endless-loop-after-read-unit-address-c.patch patches.suse/scsi-mpt3sas-Use-63-bit-DMA-addressing-on-SAS35-HBA.patch patches.suse/scsi-qla2xxx-Fix-possible-fcport-null-pointer-derefe.patch + patches.suse/arm64-compat-Allow-single-byte-watchpoints-on-all-addresses.patch + patches.suse/arm64-cpufeature-Fix-feature-comparison-for-CTR_EL0.-CWG-ERG.patch + patches.suse/arm64-kprobes-Recover-pstate.D-in-single-step-exception-handler.patch patches.suse/0001-xen-swiotlb-fix-condition-for-calling-xen_destroy_co.patch patches.suse/drm-i915-perf-fix-ICL-perf-register-offsets.patch patches.suse/drm-i915-perf-ensure-we-keep-a-reference-on-the-driv.patch @@ -60508,6 +60527,7 @@ patches.suse/SUNRPC-improve-error-response-to-over-size-gss-crede.patch patches.suse/mm-hugetlb-initialize-hugetlb_usage-in-mm_init.patch patches.suse/s390-unwind-use-current_frame_address-to-unwind-current-task.patch + patches.suse/0001-ARM-9110-1-oabi-compat-fix-oabi-epoll-sparse-warning.patch patches.suse/0003-fbmem-don-t-allow-too-huge-resolutions.patch patches.suse/cifs-properly-invalidate-cached-root-handle-when-closing-it.patch patches.suse/time-Handle-negative-seconds-correctly-in-timespec64.patch @@ -60719,12 +60739,14 @@ patches.suse/scsi-lpfc-Allow-fabric-node-recovery-if-recovery-is-.patch patches.suse/scsi-lpfc-Update-lpfc-version-to-14.0.0.3.patch patches.suse/ocfs2-do-not-zero-pages-beyond-i_size.patch + patches.suse/0002-PCI-Do-not-enable-AtomicOps-on-VFs.patch patches.suse/s390-cio-make-ccw_device_dma_-more-robust patches.suse/s390-pci-add-s390_iommu_aperture-kernel-parameter patches.suse/quota-check-block-number-when-reading-the-block-in-q.patch patches.suse/quota-correct-error-number-in-free_dqentry.patch patches.suse/isofs-Fix-out-of-bound-access-for-corrupted-isofs-im.patch patches.suse/cifs-To-match-file-servers-make-sure-the-server-hostname-matches.patch + patches.suse/0003-video-backlight-Drop-maximum-brightness-override-for.patch patches.suse/fuse-annotate-lock-in-fuse_reverse_inval_entry.patch patches.suse/fuse-fix-page-stealing.patch patches.suse/xen-pciback-Fix-return-in-pm_ctrl_init.patch @@ -60950,6 +60972,7 @@ patches.suse/udf-Fix-NULL-ptr-deref-when-converting-from-inline-f.patch patches.suse/udf-Restore-i_lenAlloc-when-inode-expansion-fails.patch patches.suse/s390-hypfs-include-z-VM-guests-with-access-control-group-set + patches.suse/0005-video-hyperv_fb-Fix-validation-of-screen-resolution.patch patches.suse/scsi-zfcp-Fix-failed-recovery-on-gone-remote-port-with-non-NPIV-FCP-devices patches.suse/scsi-bnx2fc-Flush-destroy_work-queue-before-calling-bnx2fc_interface_put patches.suse/usb-typec-tcpm-Do-not-disconnect-while-receiving-VBU.patch @@ -60973,6 +60996,7 @@ patches.suse/tipc-improve-size-validations-for-received-domain-re.patch patches.suse/ixgbevf-Require-large-buffers-for-build_skb-on-82599.patch patches.suse/gve-Recording-rx-queue-before-sending-to-napi.patch + patches.suse/bonding-pair-enable_port-with-slave_arr_updates.patch patches.suse/usb-ulpi-Move-of_node_put-to-ulpi_dev_release.patch patches.suse/usb-ulpi-Call-of_node_put-correctly.patch patches.suse/net-usb-ax88179_178a-Fix-out-of-bounds-accesses-in-R.patch @@ -61027,7 +61051,10 @@ patches.suse/xen-9p-use-alloc-free_pages_exact.patch patches.suse/xen-gnttab-fix-gnttab_end_foreign_access-without-pag.patch patches.suse/xen-netfront-react-properly-to-failing-gnttab_end_fo.patch + patches.suse/net-qlogic-check-the-return-value-of-dma_alloc_coher.patch + patches.suse/qed-return-status-of-qed_iov_get_link.patch patches.suse/esp-Fix-possible-buffer-overflow-in-ESP-transformati.patch + patches.suse/net-bcmgenet-Don-t-claim-WOL-when-its-not-available.patch patches.suse/af_key-add-__GFP_ZERO-flag-for-compose_sadb_supporte.patch patches.suse/hwrng-cavium-HW_RANDOM_CAVIUM-should-depend-on-ARCH_.patch patches.suse/hwrng-atmel-disable-trng-on-failure-path.patch @@ -61044,10 +61071,20 @@ patches.suse/ALSA-pcm-Fix-races-among-concurrent-read-write-and-b.patch patches.suse/ALSA-pcm-Fix-races-among-concurrent-prepare-and-hw_p.patch patches.suse/ALSA-pcm-Fix-races-among-concurrent-prealloc-proc-wr.patch + patches.suse/msft-hv-2514-net-mana-Use-struct_size-helper-in-mana_gd_create_dm.patch + patches.suse/msft-hv-2516-net-mana-Add-counter-for-packet-dropped-by-XDP.patch + patches.suse/msft-hv-2517-net-mana-Add-counter-for-XDP_TX.patch + patches.suse/msft-hv-2518-net-mana-Reuse-XDP-dropped-page.patch + patches.suse/msft-hv-2523-net-mana-Add-handling-of-CQE_RX_TRUNCATED.patch + patches.suse/msft-hv-2524-net-mana-Remove-unnecessary-check-of-cqe_type-in-man.patch patches.suse/net-asix-add-proper-error-handling-of-usb-read-error.patch patches.suse/net-ibmvnic-Cleanup-workaround-doing-an-EOI-after-pa.patch + patches.suse/qed-display-VF-trust-config.patch + patches.suse/qed-validate-and-restrict-untrusted-VFs-vlan-promisc.patch + patches.suse/drivers-net-xgene-Fix-regression-in-CRC-stripping.patch patches.suse/llc-fix-netdevice-reference-leaks-in-llc_ui_bind.patch patches.suse/netfilter-nf_tables-initialize-registers-in-nft_do_c.patch + patches.suse/0006-drm-fb-helper-Mark-screen-buffers-in-system-memory-w.patch patches.suse/scsi-qla2xxx-Refactor-asynchronous-command-initializ.patch patches.suse/scsi-qla2xxx-Implement-ref-count-for-SRB.patch patches.suse/scsi-qla2xxx-Fix-stuck-session-in-gpdb.patch @@ -61094,22 +61131,6 @@ patches.suse/scsi-lpfc-Fix-typos-in-comments.patch patches.suse/scsi-qla2xxx-Fix-typos-in-comments.patch patches.suse/scsi-lpfc-Use-kcalloc.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-lpfc_iocbq.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-fast-and-slow-path.patch - patches.suse/scsi-lpfc-SLI-path-split-Introduce-lpfc_prep_wqe.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-base-ELS-paths-and.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-PLOGI-PRLI-ADISC-L.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-the-RSCN-SCR-RDF-E.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-LS_ACC-paths.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-LS_RJT-paths.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-FDISC-paths.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-misc-ELS-paths.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-CT-paths.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-SCSI-paths.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-Abort-paths.patch - patches.suse/scsi-lpfc-SLI-path-split-Refactor-BSG-paths.patch - patches.suse/scsi-lpfc-Update-lpfc-version-to-14.2.0.0.patch - patches.suse/scsi-lpfc-Copyright-updates-for-14.2.0.0-patches.patch patches.suse/powerpc-add-link-stack-flush-mitigation-status-in-de.patch patches.suse/powerpc-pseries-read-the-lpar-name-from-the-firmware.patch patches.suse/rpadlpar_io-Add-MODULE_DESCRIPTION-entries-to-kernel.patch @@ -61142,6 +61163,7 @@ patches.suse/Revert-NFSv4-Handle-the-special-Linux-file-open-acce.patch patches.suse/NFSv4-fix-open-failure-with-O_ACCMODE-flag.patch patches.suse/SUNRPC-Handle-low-memory-situations-in-call_status.patch + patches.suse/veth-Ensure-eth-header-is-in-skb-s-linear-part.patch patches.suse/powerpc-perf-Fix-power9-event-alternatives.patch patches.suse/0014-video-fbdev-udlfb-properly-check-endpoint-type.patch patches.suse/bnx2x-fix-napi-API-usage-sequence.patch @@ -61182,12 +61204,30 @@ ######################################################## # mkp/scsi staging - patches.suse/scsi-lpfc-improve-pci-eeh-error-and-recovery-handling.patch - patches.suse/scsi-lpfc-fix-unload-hang-after-back-to-back-pci-eeh-faults.patch - patches.suse/scsi-lpfc-fix-queue-failures-when-recovering-from-pci-parity-error.patch - patches.suse/scsi-lpfc-update-lpfc-version-to-14.2.0.1.patch - patches.suse/scsi-lpfc-fix-broken-sli4-abort-path.patch - patches.suse/scsi-lpfc-fix-locking-for-lpfc_sli_iocbq_lookup.patch + # mwilck: series-sort.py doesn't like guards in the sorted section + # moved lpfc 14.2.0.x patches down here ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-lpfc_iocbq.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-fast-and-slow-path.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Introduce-lpfc_prep_wqe.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-base-ELS-paths-and.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-PLOGI-PRLI-ADISC-L.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-the-RSCN-SCR-RDF-E.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-LS_ACC-paths.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-LS_RJT-paths.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-FDISC-paths.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-misc-ELS-paths.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-CT-paths.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-SCSI-paths.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-Abort-paths.patch ++dwagner patches.suse/scsi-lpfc-SLI-path-split-Refactor-BSG-paths.patch ++dwagner patches.suse/scsi-lpfc-Update-lpfc-version-to-14.2.0.0.patch ++dwagner patches.suse/scsi-lpfc-Copyright-updates-for-14.2.0.0-patches.patch ++dwagner patches.suse/scsi-lpfc-improve-pci-eeh-error-and-recovery-handling.patch ++dwagner patches.suse/scsi-lpfc-fix-unload-hang-after-back-to-back-pci-eeh-faults.patch ++dwagner patches.suse/scsi-lpfc-fix-queue-failures-when-recovering-from-pci-parity-error.patch ++dwagner patches.suse/scsi-lpfc-update-lpfc-version-to-14.2.0.1.patch ++dwagner patches.suse/scsi-lpfc-fix-broken-sli4-abort-path.patch ++dwagner patches.suse/scsi-lpfc-fix-locking-for-lpfc_sli_iocbq_lookup.patch ######################################################## # upstream patches broken after a merge