From 6052674195d570239d1b7dea225a320e1de5a64f Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Wed, 11 Jul 2018 15:50:36 -0400 Subject: Linux v4.17.6 --- kernel.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel.spec b/kernel.spec index 7ff98c56c..9e3a88172 100644 --- a/kernel.spec +++ b/kernel.spec @@ -54,7 +54,7 @@ Summary: The Linux kernel %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 5 +%define stable_update 6 # Set rpm version accordingly %if 0%{?stable_update} %define stablerev %{stable_update} @@ -1920,6 +1920,9 @@ fi # # %changelog +* Wed Jul 11 2018 Jeremy Cline - 4.17.6-100 +- Linux v4.17.6 + * Wed Jul 11 2018 Jeremy Cline - Add device ID for RTL8822BE in the Asus ROG GL702ZC (rhbz 1599917) diff --git a/sources b/sources index 83f22c937..b72509361 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (linux-4.17.tar.xz) = 4d9de340a26155a89ea8773131c76220cc2057f2b5d031b467b60e8b14c1842518e2d60a863d8c695f0f7640f3f18d43826201984a238dade857b6cef79837db -SHA512 (patch-4.17.5.xz) = 2623f82b4664b5ef6af4f1f9e2758661d7c3b4b7445990fb22b1a93d33006316a7a19c03d7dfccb0c49c7cfc2791c4b0aa6c543730ffc1d095c72402f060dd5c +SHA512 (patch-4.17.6.xz) = 4b791d94db704cbbe3dbf6b340735fe7999957741f116ca14060ced836aece1d4b51d0c3f376af1564e7379fbb9c9132a8e4d021fc74599f3ab037237d718651 -- cgit From 4ca8fe751e3b275f4c7f0700db2d51f0aadddac8 Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Thu, 12 Jul 2018 16:08:40 +0200 Subject: enable HDA sound drivers on PPC --- configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL | 1 - kernel-ppc64-debug.config | 2 +- kernel-ppc64.config | 2 +- kernel-ppc64le-debug.config | 2 +- kernel-ppc64le.config | 2 +- kernel.spec | 3 +++ 6 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL diff --git a/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL b/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL deleted file mode 100644 index 6f057ecfe..000000000 --- a/configs/fedora/generic/powerpc/CONFIG_SND_HDA_INTEL +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_SND_HDA_INTEL is not set diff --git a/kernel-ppc64-debug.config b/kernel-ppc64-debug.config index 5cd21e3f7..1cde78a27 100644 --- a/kernel-ppc64-debug.config +++ b/kernel-ppc64-debug.config @@ -4950,7 +4950,7 @@ CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_I915=y CONFIG_SND_HDA_INPUT_BEEP_MODE=0 CONFIG_SND_HDA_INPUT_BEEP=y -# CONFIG_SND_HDA_INTEL is not set +CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDA_PATCH_LOADER=y CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 CONFIG_SND_HDA_POWER_SAVE=y diff --git a/kernel-ppc64.config b/kernel-ppc64.config index f6a5b6534..4b624119d 100644 --- a/kernel-ppc64.config +++ b/kernel-ppc64.config @@ -4924,7 +4924,7 @@ CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_I915=y CONFIG_SND_HDA_INPUT_BEEP_MODE=0 CONFIG_SND_HDA_INPUT_BEEP=y -# CONFIG_SND_HDA_INTEL is not set +CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDA_PATCH_LOADER=y CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 CONFIG_SND_HDA_POWER_SAVE=y diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index 62704bae6..9bd545f7a 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -4879,7 +4879,7 @@ CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_I915=y CONFIG_SND_HDA_INPUT_BEEP_MODE=0 CONFIG_SND_HDA_INPUT_BEEP=y -# CONFIG_SND_HDA_INTEL is not set +CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDA_PATCH_LOADER=y CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 CONFIG_SND_HDA_POWER_SAVE=y diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index bd76e6841..f8bce2e1d 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -4853,7 +4853,7 @@ CONFIG_SND_HDA_HWDEP=y CONFIG_SND_HDA_I915=y CONFIG_SND_HDA_INPUT_BEEP_MODE=0 CONFIG_SND_HDA_INPUT_BEEP=y -# CONFIG_SND_HDA_INTEL is not set +CONFIG_SND_HDA_INTEL=m CONFIG_SND_HDA_PATCH_LOADER=y CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0 CONFIG_SND_HDA_POWER_SAVE=y diff --git a/kernel.spec b/kernel.spec index 9e3a88172..62104e6fc 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1920,6 +1920,9 @@ fi # # %changelog +* Thu Jul 12 2018 Dan Horák +- Enable HDA sound drivers on PPC + * Wed Jul 11 2018 Jeremy Cline - 4.17.6-100 - Linux v4.17.6 -- cgit From a883cbc71e4ac768361d0c07af8e70691c10e32b Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Thu, 12 Jul 2018 13:17:10 -0400 Subject: Avoid an early WARN_ON in Xen (rhbz 1592976) --- kernel.spec | 6 ++++ ...global-bit-from-__default_kernel_pte_mask.patch | 36 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 xen-remove-global-bit-from-__default_kernel_pte_mask.patch diff --git a/kernel.spec b/kernel.spec index 62104e6fc..615584af2 100644 --- a/kernel.spec +++ b/kernel.spec @@ -671,6 +671,9 @@ Patch523: 0001-xfs-More-robust-inode-extent-count-validation.patch # CVE-2018-13405 rhbz 1599161 1599162 Patch524: CVE-2018-13405.patch +# rhbz 1592976 +Patch 525: xen-remove-global-bit-from-__default_kernel_pte_mask.patch + # END OF PATCH DEFINITIONS %endif @@ -1920,6 +1923,9 @@ fi # # %changelog +* Thu Jul 12 2018 Jeremy Cline +- Avoid an early WARN_ON in Xen (rhbz 1592976) + * Thu Jul 12 2018 Dan Horák - Enable HDA sound drivers on PPC diff --git a/xen-remove-global-bit-from-__default_kernel_pte_mask.patch b/xen-remove-global-bit-from-__default_kernel_pte_mask.patch new file mode 100644 index 000000000..6f9b7f7be --- /dev/null +++ b/xen-remove-global-bit-from-__default_kernel_pte_mask.patch @@ -0,0 +1,36 @@ +From e69b5d308da72cbf4e7911c3979f9a46d28532af Mon Sep 17 00:00:00 2001 +From: Juergen Gross +Date: Mon, 2 Jul 2018 12:00:18 +0200 +Subject: [PATCH] xen: remove global bit from __default_kernel_pte_mask for pv + guests + +When removing the global bit from __supported_pte_mask do the same for +__default_kernel_pte_mask in order to avoid the WARN_ONCE() in +check_pgprot() when setting a kernel pte before having called +init_mem_mapping(). + +Cc: # 4.17 +Reported-by: Michael Young +Signed-off-by: Juergen Gross +Reviewed-by: Boris Ostrovsky +Signed-off-by: Juergen Gross +Signed-off-by: Jeremy Cline +--- + arch/x86/xen/enlighten_pv.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c +index 8d4e2e1ae60b..4816b6f82a9a 100644 +--- a/arch/x86/xen/enlighten_pv.c ++++ b/arch/x86/xen/enlighten_pv.c +@@ -1229,6 +1229,7 @@ asmlinkage __visible void __init xen_start_kernel(void) + + /* Prevent unwanted bits from being set in PTEs. */ + __supported_pte_mask &= ~_PAGE_GLOBAL; ++ __default_kernel_pte_mask &= ~_PAGE_GLOBAL; + + /* + * Prevent page tables from being allocated in highmem, even +-- +2.17.1 + -- cgit From ce14d7838dafab3bfeca407ffa13c6bf43156311 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Fri, 13 Jul 2018 10:27:41 -0400 Subject: Fix perceived dead xhci host (rhbz 1597333) --- kernel.spec | 6 +- ...rceived-dead-host-due-to-runtime-suspend-.patch | 126 +++++++++++++++++++++ 2 files changed, 131 insertions(+), 1 deletion(-) create mode 100644 xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch diff --git a/kernel.spec b/kernel.spec index 615584af2..39b98ba13 100644 --- a/kernel.spec +++ b/kernel.spec @@ -672,7 +672,10 @@ Patch523: 0001-xfs-More-robust-inode-extent-count-validation.patch Patch524: CVE-2018-13405.patch # rhbz 1592976 -Patch 525: xen-remove-global-bit-from-__default_kernel_pte_mask.patch +Patch525: xen-remove-global-bit-from-__default_kernel_pte_mask.patch + +# rhbz 1597333 +Patch526: xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch # END OF PATCH DEFINITIONS @@ -1925,6 +1928,7 @@ fi %changelog * Thu Jul 12 2018 Jeremy Cline - Avoid an early WARN_ON in Xen (rhbz 1592976) +- Fix perceived dead xhci host (rhbz 1597333) * Thu Jul 12 2018 Dan Horák - Enable HDA sound drivers on PPC diff --git a/xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch b/xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch new file mode 100644 index 000000000..b52d783ae --- /dev/null +++ b/xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch @@ -0,0 +1,126 @@ +From 229bc19fd7aca4f37964af06e3583c1c8f36b5d6 Mon Sep 17 00:00:00 2001 +From: Mathias Nyman +Date: Thu, 21 Jun 2018 16:19:41 +0300 +Subject: [PATCH] xhci: Fix perceived dead host due to runtime suspend race + with event handler + +Don't rely on event interrupt (EINT) bit alone to detect pending port +change in resume. If no change event is detected the host may be suspended +again, oterwise roothubs are resumed. + +There is a lag in xHC setting EINT. If we don't notice the pending change +in resume, and the controller is runtime suspeded again, it causes the +event handler to assume host is dead as it will fail to read xHC registers +once PCI puts the controller to D3 state. + +[ 268.520969] xhci_hcd: xhci_resume: starting port polling. +[ 268.520985] xhci_hcd: xhci_hub_status_data: stopping port polling. +[ 268.521030] xhci_hcd: xhci_suspend: stopping port polling. +[ 268.521040] xhci_hcd: // Setting command ring address to 0x349bd001 +[ 268.521139] xhci_hcd: Port Status Change Event for port 3 +[ 268.521149] xhci_hcd: resume root hub +[ 268.521163] xhci_hcd: port resume event for port 3 +[ 268.521168] xhci_hcd: xHC is not running. +[ 268.521174] xhci_hcd: handle_port_status: starting port polling. +[ 268.596322] xhci_hcd: xhci_hc_died: xHCI host controller not responding, assume dead + +The EINT lag is described in a additional note in xhci specs 4.19.2: + +"Due to internal xHC scheduling and system delays, there will be a lag +between a change bit being set and the Port Status Change Event that it +generated being written to the Event Ring. If SW reads the PORTSC and +sees a change bit set, there is no guarantee that the corresponding Port +Status Change Event has already been written into the Event Ring." + +Cc: +Signed-off-by: Mathias Nyman +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Jeremy Cline +--- + drivers/usb/host/xhci.c | 40 +++++++++++++++++++++++++++++++++++++--- + drivers/usb/host/xhci.h | 4 ++++ + 2 files changed, 41 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c +index 8c8da2d657fa..f11ec61bcc7d 100644 +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -908,6 +908,41 @@ static void xhci_disable_port_wake_on_bits(struct xhci_hcd *xhci) + spin_unlock_irqrestore(&xhci->lock, flags); + } + ++static bool xhci_pending_portevent(struct xhci_hcd *xhci) ++{ ++ struct xhci_port **ports; ++ int port_index; ++ u32 status; ++ u32 portsc; ++ ++ status = readl(&xhci->op_regs->status); ++ if (status & STS_EINT) ++ return true; ++ /* ++ * Checking STS_EINT is not enough as there is a lag between a change ++ * bit being set and the Port Status Change Event that it generated ++ * being written to the Event Ring. See note in xhci 1.1 section 4.19.2. ++ */ ++ ++ port_index = xhci->usb2_rhub.num_ports; ++ ports = xhci->usb2_rhub.ports; ++ while (port_index--) { ++ portsc = readl(ports[port_index]->addr); ++ if (portsc & PORT_CHANGE_MASK || ++ (portsc & PORT_PLS_MASK) == XDEV_RESUME) ++ return true; ++ } ++ port_index = xhci->usb3_rhub.num_ports; ++ ports = xhci->usb3_rhub.ports; ++ while (port_index--) { ++ portsc = readl(ports[port_index]->addr); ++ if (portsc & PORT_CHANGE_MASK || ++ (portsc & PORT_PLS_MASK) == XDEV_RESUME) ++ return true; ++ } ++ return false; ++} ++ + /* + * Stop HC (not bus-specific) + * +@@ -1009,7 +1044,7 @@ EXPORT_SYMBOL_GPL(xhci_suspend); + */ + int xhci_resume(struct xhci_hcd *xhci, bool hibernated) + { +- u32 command, temp = 0, status; ++ u32 command, temp = 0; + struct usb_hcd *hcd = xhci_to_hcd(xhci); + struct usb_hcd *secondary_hcd; + int retval = 0; +@@ -1134,8 +1169,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) + done: + if (retval == 0) { + /* Resume root hubs only when have pending events. */ +- status = readl(&xhci->op_regs->status); +- if (status & STS_EINT) { ++ if (xhci_pending_portevent(xhci)) { + usb_hcd_resume_root_hub(xhci->shared_hcd); + usb_hcd_resume_root_hub(hcd); + } +diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h +index 939e2f86b595..841e89ffe2e9 100644 +--- a/drivers/usb/host/xhci.h ++++ b/drivers/usb/host/xhci.h +@@ -382,6 +382,10 @@ struct xhci_op_regs { + #define PORT_PLC (1 << 22) + /* port configure error change - port failed to configure its link partner */ + #define PORT_CEC (1 << 23) ++#define PORT_CHANGE_MASK (PORT_CSC | PORT_PEC | PORT_WRC | PORT_OCC | \ ++ PORT_RC | PORT_PLC | PORT_CEC) ++ ++ + /* Cold Attach Status - xHC can set this bit to report device attached during + * Sx state. Warm port reset should be perfomed to clear this bit and move port + * to connected state. +-- +2.17.1 + -- cgit From 78463b1eb4b532820fe8cdf59913f9c3858b2ea4 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Tue, 17 Jul 2018 09:50:15 -0500 Subject: Linux v4.17.7 --- CVE-2018-13405.patch | 47 ---------------------- kernel.spec | 11 ++--- sources | 2 +- ...global-bit-from-__default_kernel_pte_mask.patch | 36 ----------------- 4 files changed, 5 insertions(+), 91 deletions(-) delete mode 100644 CVE-2018-13405.patch delete mode 100644 xen-remove-global-bit-from-__default_kernel_pte_mask.patch diff --git a/CVE-2018-13405.patch b/CVE-2018-13405.patch deleted file mode 100644 index 489e11f54..000000000 --- a/CVE-2018-13405.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 Mon Sep 17 00:00:00 2001 -From: Linus Torvalds -Date: Tue, 3 Jul 2018 17:10:19 -0700 -Subject: [PATCH] Fix up non-directory creation in SGID directories - -sgid directories have special semantics, making newly created files in -the directory belong to the group of the directory, and newly created -subdirectories will also become sgid. This is historically used for -group-shared directories. - -But group directories writable by non-group members should not imply -that such non-group members can magically join the group, so make sure -to clear the sgid bit on non-directories for non-members (but remember -that sgid without group execute means "mandatory locking", just to -confuse things even more). - -Reported-by: Jann Horn -Cc: Andy Lutomirski -Cc: Al Viro -Signed-off-by: Linus Torvalds -Signed-off-by: Jeremy Cline ---- - fs/inode.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/fs/inode.c b/fs/inode.c -index 2c300e981796..8c86c809ca17 100644 ---- a/fs/inode.c -+++ b/fs/inode.c -@@ -1999,8 +1999,14 @@ void inode_init_owner(struct inode *inode, const struct inode *dir, - inode->i_uid = current_fsuid(); - if (dir && dir->i_mode & S_ISGID) { - inode->i_gid = dir->i_gid; -+ -+ /* Directories are special, and always inherit S_ISGID */ - if (S_ISDIR(mode)) - mode |= S_ISGID; -+ else if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) && -+ !in_group_p(inode->i_gid) && -+ !capable_wrt_inode_uidgid(dir, CAP_FSETID)) -+ mode &= ~S_ISGID; - } else - inode->i_gid = current_fsgid(); - inode->i_mode = mode; --- -2.17.1 - diff --git a/kernel.spec b/kernel.spec index 39b98ba13..6416e2a9f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -54,7 +54,7 @@ Summary: The Linux kernel %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 6 +%define stable_update 7 # Set rpm version accordingly %if 0%{?stable_update} %define stablerev %{stable_update} @@ -668,12 +668,6 @@ Patch522: 0001-xfs-don-t-call-xfs_da_shrink_inode-with-NULL-bp.patch # CVE-2018-13095 rhbz 1597775 1597777 Patch523: 0001-xfs-More-robust-inode-extent-count-validation.patch -# CVE-2018-13405 rhbz 1599161 1599162 -Patch524: CVE-2018-13405.patch - -# rhbz 1592976 -Patch525: xen-remove-global-bit-from-__default_kernel_pte_mask.patch - # rhbz 1597333 Patch526: xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch @@ -1926,6 +1920,9 @@ fi # # %changelog +* Tue Jul 17 2018 Justin M. Forbes - 4.17.7-100 +- Linux v4.17.7 + * Thu Jul 12 2018 Jeremy Cline - Avoid an early WARN_ON in Xen (rhbz 1592976) - Fix perceived dead xhci host (rhbz 1597333) diff --git a/sources b/sources index b72509361..c3220eb6d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (linux-4.17.tar.xz) = 4d9de340a26155a89ea8773131c76220cc2057f2b5d031b467b60e8b14c1842518e2d60a863d8c695f0f7640f3f18d43826201984a238dade857b6cef79837db -SHA512 (patch-4.17.6.xz) = 4b791d94db704cbbe3dbf6b340735fe7999957741f116ca14060ced836aece1d4b51d0c3f376af1564e7379fbb9c9132a8e4d021fc74599f3ab037237d718651 +SHA512 (patch-4.17.7.xz) = 955342b78da2977dbd08ff0acb7e681c646b1dfceef71246a08bdd102e0b2ad41f3eb7c353755ed1da2e1a5d9138476adc7bf11fd732a3033b6f8aac457dac75 diff --git a/xen-remove-global-bit-from-__default_kernel_pte_mask.patch b/xen-remove-global-bit-from-__default_kernel_pte_mask.patch deleted file mode 100644 index 6f9b7f7be..000000000 --- a/xen-remove-global-bit-from-__default_kernel_pte_mask.patch +++ /dev/null @@ -1,36 +0,0 @@ -From e69b5d308da72cbf4e7911c3979f9a46d28532af Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Mon, 2 Jul 2018 12:00:18 +0200 -Subject: [PATCH] xen: remove global bit from __default_kernel_pte_mask for pv - guests - -When removing the global bit from __supported_pte_mask do the same for -__default_kernel_pte_mask in order to avoid the WARN_ONCE() in -check_pgprot() when setting a kernel pte before having called -init_mem_mapping(). - -Cc: # 4.17 -Reported-by: Michael Young -Signed-off-by: Juergen Gross -Reviewed-by: Boris Ostrovsky -Signed-off-by: Juergen Gross -Signed-off-by: Jeremy Cline ---- - arch/x86/xen/enlighten_pv.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c -index 8d4e2e1ae60b..4816b6f82a9a 100644 ---- a/arch/x86/xen/enlighten_pv.c -+++ b/arch/x86/xen/enlighten_pv.c -@@ -1229,6 +1229,7 @@ asmlinkage __visible void __init xen_start_kernel(void) - - /* Prevent unwanted bits from being set in PTEs. */ - __supported_pte_mask &= ~_PAGE_GLOBAL; -+ __default_kernel_pte_mask &= ~_PAGE_GLOBAL; - - /* - * Prevent page tables from being allocated in highmem, even --- -2.17.1 - -- cgit From 8a4538b28573e0b3cf3324d6e395555a2ed8f6d0 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Tue, 17 Jul 2018 10:29:49 -0500 Subject: Fix for i686 that will eventually be 4.17.8 --- kernel.spec | 3 + ...o_resv_unavail-if-memmap-is-not-allocated.patch | 69 ++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 mm-don-t-do-zero_resv_unavail-if-memmap-is-not-allocated.patch diff --git a/kernel.spec b/kernel.spec index 6416e2a9f..837c6d0a0 100644 --- a/kernel.spec +++ b/kernel.spec @@ -671,6 +671,9 @@ Patch523: 0001-xfs-More-robust-inode-extent-count-validation.patch # rhbz 1597333 Patch526: xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch +# i686 patch that will eventually be 4.17.8 +Patch527: mm-don-t-do-zero_resv_unavail-if-memmap-is-not-allocated.patch + # END OF PATCH DEFINITIONS %endif diff --git a/mm-don-t-do-zero_resv_unavail-if-memmap-is-not-allocated.patch b/mm-don-t-do-zero_resv_unavail-if-memmap-is-not-allocated.patch new file mode 100644 index 000000000..f72e111ad --- /dev/null +++ b/mm-don-t-do-zero_resv_unavail-if-memmap-is-not-allocated.patch @@ -0,0 +1,69 @@ +From d1b47a7c9efcf3c3384b70f6e3c8f1423b44d8c7 Mon Sep 17 00:00:00 2001 +From: Pavel Tatashin +Date: Mon, 16 Jul 2018 11:16:30 -0400 +Subject: mm: don't do zero_resv_unavail if memmap is not allocated + +From: Pavel Tatashin + +commit d1b47a7c9efcf3c3384b70f6e3c8f1423b44d8c7 upstream. + +Moving zero_resv_unavail before memmap_init_zone(), caused a regression on +x86-32. + +The cause is that we access struct pages before they are allocated when +CONFIG_FLAT_NODE_MEM_MAP is used. + +free_area_init_nodes() + zero_resv_unavail() + mm_zero_struct_page(pfn_to_page(pfn)); <- struct page is not alloced + free_area_init_node() + if CONFIG_FLAT_NODE_MEM_MAP + alloc_node_mem_map() + memblock_virt_alloc_node_nopanic() <- struct page alloced here + +On the other hand memblock_virt_alloc_node_nopanic() zeroes all the memory +that it returns, so we do not need to do zero_resv_unavail() here. + +Fixes: e181ae0c5db9 ("mm: zero unavailable pages before memmap init") +Signed-off-by: Pavel Tatashin +Tested-by: Matt Hart +Acked-by: Michal Hocko +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/mm.h | 2 +- + mm/page_alloc.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +--- a/include/linux/mm.h ++++ b/include/linux/mm.h +@@ -2081,7 +2081,7 @@ extern int __meminit __early_pfn_to_nid( + struct mminit_pfnnid_cache *state); + #endif + +-#ifdef CONFIG_HAVE_MEMBLOCK ++#if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP) + void zero_resv_unavail(void); + #else + static inline void zero_resv_unavail(void) {} +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -6377,7 +6377,7 @@ void __paginginit free_area_init_node(in + free_area_init_core(pgdat); + } + +-#ifdef CONFIG_HAVE_MEMBLOCK ++#if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP) + /* + * Only struct pages that are backed by physical memory are zeroed and + * initialized by going through __init_single_page(). But, there are some +@@ -6415,7 +6415,7 @@ void __paginginit zero_resv_unavail(void + if (pgcnt) + pr_info("Reserved but unavailable: %lld pages", pgcnt); + } +-#endif /* CONFIG_HAVE_MEMBLOCK */ ++#endif /* CONFIG_HAVE_MEMBLOCK && !CONFIG_FLAT_NODE_MEM_MAP */ + + #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP + -- cgit From 3f53c6d97d6f7adeadd97c7e3c7954514c77dd20 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Tue, 17 Jul 2018 10:52:05 -0500 Subject: Comment out bad xhci patch until I can track down what's really needed --- kernel.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 837c6d0a0..21c72529d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -669,7 +669,7 @@ Patch522: 0001-xfs-don-t-call-xfs_da_shrink_inode-with-NULL-bp.patch Patch523: 0001-xfs-More-robust-inode-extent-count-validation.patch # rhbz 1597333 -Patch526: xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch +# Patch526: xhci-Fix-perceived-dead-host-due-to-runtime-suspend-.patch # i686 patch that will eventually be 4.17.8 Patch527: mm-don-t-do-zero_resv_unavail-if-memmap-is-not-allocated.patch -- cgit