From: Greg Kroah-Hartman Date: Tue, 13 Mar 2018 10:35:36 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.14.27~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d9dd3f817dcf45844e69245ddd849f52f09bbce;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: netfilter-nfnetlink_queue-fix-timestamp-attribute.patch watchdog-hpwdt-check-source-of-nmi.patch watchdog-hpwdt-fix-unused-variable-warning.patch watchdog-hpwdt-smbios-check.patch --- diff --git a/queue-4.4/netfilter-nfnetlink_queue-fix-timestamp-attribute.patch b/queue-4.4/netfilter-nfnetlink_queue-fix-timestamp-attribute.patch new file mode 100644 index 00000000000..06d527f6907 --- /dev/null +++ b/queue-4.4/netfilter-nfnetlink_queue-fix-timestamp-attribute.patch @@ -0,0 +1,32 @@ +From a7f1884554b81bd68cd435d72f09a3527629ac43 Mon Sep 17 00:00:00 2001 +From: Florian Westphal +Date: Thu, 12 May 2016 14:43:54 +0200 +Subject: netfilter: nfnetlink_queue: fix timestamp attribute + +From: Florian Westphal + +commit a7f1884554b81bd68cd435d72f09a3527629ac43 upstream. + +Since 4.4 we erronously use timestamp of the netlink skb (which is zero). + +Bugzilla: https://bugzilla.netfilter.org/show_bug.cgi?id=1066 +Fixes: b28b1e826f818c30ea7 ("netfilter: nfnetlink_queue: use y2038 safe timestamp") +Signed-off-by: Florian Westphal +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Greg Kroah-Hartman + +--- + net/netfilter/nfnetlink_queue.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/netfilter/nfnetlink_queue.c ++++ b/net/netfilter/nfnetlink_queue.c +@@ -501,7 +501,7 @@ nfqnl_build_packet_message(struct net *n + + if (entskb->tstamp.tv64) { + struct nfqnl_msg_packet_timestamp ts; +- struct timespec64 kts = ktime_to_timespec64(skb->tstamp); ++ struct timespec64 kts = ktime_to_timespec64(entskb->tstamp); + + ts.sec = cpu_to_be64(kts.tv_sec); + ts.usec = cpu_to_be64(kts.tv_nsec / NSEC_PER_USEC); diff --git a/queue-4.4/series b/queue-4.4/series index bd4fefd24a0..8e1165acb54 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -24,3 +24,7 @@ alsa-seq-more-protection-for-concurrent-write-and-ioctl-races.patch alsa-hda-add-dock-and-led-support-for-hp-elitebook-820-g3.patch alsa-hda-add-dock-and-led-support-for-hp-probook-640-g2.patch nospec-include-asm-barrier.h-dependency.patch +watchdog-hpwdt-smbios-check.patch +watchdog-hpwdt-check-source-of-nmi.patch +watchdog-hpwdt-fix-unused-variable-warning.patch +netfilter-nfnetlink_queue-fix-timestamp-attribute.patch diff --git a/queue-4.4/watchdog-hpwdt-check-source-of-nmi.patch b/queue-4.4/watchdog-hpwdt-check-source-of-nmi.patch new file mode 100644 index 00000000000..099d5daafb0 --- /dev/null +++ b/queue-4.4/watchdog-hpwdt-check-source-of-nmi.patch @@ -0,0 +1,62 @@ +From 838534e50e2e5c1e644e30ab6cb28da88eb31368 Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Mon, 23 Oct 2017 16:46:17 -0600 +Subject: watchdog: hpwdt: Check source of NMI + +From: Jerry Hoemann + +commit 838534e50e2e5c1e644e30ab6cb28da88eb31368 upstream. + +Do not claim the NMI (i.e. return NMI_DONE) if the source of +the NMI isn't the iLO watchdog or debug. + +Signed-off-by: Jerry Hoemann +Reviewed-by: Guenter Roeck +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/watchdog/hpwdt.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/watchdog/hpwdt.c ++++ b/drivers/watchdog/hpwdt.c +@@ -51,6 +51,7 @@ static char expect_release; + static unsigned long hpwdt_is_open; + + static void __iomem *pci_mem_addr; /* the PCI-memory address */ ++static unsigned long __iomem *hpwdt_nmistat; + static unsigned long __iomem *hpwdt_timer_reg; + static unsigned long __iomem *hpwdt_timer_con; + +@@ -473,6 +474,11 @@ static int hpwdt_time_left(void) + return TICKS_TO_SECS(ioread16(hpwdt_timer_reg)); + } + ++static int hpwdt_my_nmi(void) ++{ ++ return ioread8(hpwdt_nmistat) & 0x6; ++} ++ + #ifdef CONFIG_HPWDT_NMI_DECODING + /* + * NMI Handler +@@ -485,6 +491,9 @@ static int hpwdt_pretimeout(unsigned int + if (!hpwdt_nmi_decoding) + goto out; + ++ if ((ulReason == NMI_UNKNOWN) && !hpwdt_my_nmi()) ++ return NMI_DONE; ++ + spin_lock_irqsave(&rom_lock, rom_pl); + if (!die_nmi_called && !is_icru && !is_uefi) + asminline_call(&cmn_regs, cru_rom_addr); +@@ -840,6 +849,7 @@ static int hpwdt_init_one(struct pci_dev + retval = -ENOMEM; + goto error_pci_iomap; + } ++ hpwdt_nmistat = pci_mem_addr + 0x6e; + hpwdt_timer_reg = pci_mem_addr + 0x70; + hpwdt_timer_con = pci_mem_addr + 0x72; + diff --git a/queue-4.4/watchdog-hpwdt-fix-unused-variable-warning.patch b/queue-4.4/watchdog-hpwdt-fix-unused-variable-warning.patch new file mode 100644 index 00000000000..76efe41974b --- /dev/null +++ b/queue-4.4/watchdog-hpwdt-fix-unused-variable-warning.patch @@ -0,0 +1,45 @@ +From aeebc6ba88ba3758ad95467ff6191fabf2074c13 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Wed, 6 Dec 2017 22:02:37 +0100 +Subject: watchdog: hpwdt: fix unused variable warning + +From: Arnd Bergmann + +commit aeebc6ba88ba3758ad95467ff6191fabf2074c13 upstream. + +The new hpwdt_my_nmi() function is used conditionally, which produces +a harmless warning in some configurations: + +drivers/watchdog/hpwdt.c:478:12: error: 'hpwdt_my_nmi' defined but not used [-Werror=unused-function] + +This moves it inside of the #ifdef that protects its caller, to silence +the warning. + +Fixes: 621174a92851 ("watchdog: hpwdt: Check source of NMI") +Signed-off-by: Arnd Bergmann +Reviewed-by: Jerry Hoemann +Reviewed-by: Guenter Roeck +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/watchdog/hpwdt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/watchdog/hpwdt.c ++++ b/drivers/watchdog/hpwdt.c +@@ -474,12 +474,12 @@ static int hpwdt_time_left(void) + return TICKS_TO_SECS(ioread16(hpwdt_timer_reg)); + } + ++#ifdef CONFIG_HPWDT_NMI_DECODING + static int hpwdt_my_nmi(void) + { + return ioread8(hpwdt_nmistat) & 0x6; + } + +-#ifdef CONFIG_HPWDT_NMI_DECODING + /* + * NMI Handler + */ diff --git a/queue-4.4/watchdog-hpwdt-smbios-check.patch b/queue-4.4/watchdog-hpwdt-smbios-check.patch new file mode 100644 index 00000000000..13f76bb85d6 --- /dev/null +++ b/queue-4.4/watchdog-hpwdt-smbios-check.patch @@ -0,0 +1,44 @@ +From c42cbe41727a138905a28f8e0b00c147be77ee93 Mon Sep 17 00:00:00 2001 +From: Jerry Hoemann +Date: Mon, 23 Oct 2017 16:46:16 -0600 +Subject: watchdog: hpwdt: SMBIOS check + +From: Jerry Hoemann + +commit c42cbe41727a138905a28f8e0b00c147be77ee93 upstream. + +This corrects: +commit cce78da76601 ("watchdog: hpwdt: Add check for UEFI bits") + +The test on HPE SMBIOS extension type 219 record "Misc Features" +bits for UEFI support is incorrect. The definition of the Misc Features +bits in the HPE SMBIOS OEM Extensions specification (and related +firmware) was changed to use a different pair of bits to +represent UEFI supported. Howerver, a corresponding change +to Linux was missed. + +Current code/platform work because the iCRU test is working. +But purpose of cce78da766 is to ensure correct functionality +on future systems where iCRU isn't supported. + +Signed-off-by: Jerry Hoemann +Reviewed-by: Guenter Roeck +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/watchdog/hpwdt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/watchdog/hpwdt.c ++++ b/drivers/watchdog/hpwdt.c +@@ -700,7 +700,7 @@ static void dmi_find_icru(const struct d + smbios_proliant_ptr = (struct smbios_proliant_info *) dm; + if (smbios_proliant_ptr->misc_features & 0x01) + is_icru = 1; +- if (smbios_proliant_ptr->misc_features & 0x408) ++ if (smbios_proliant_ptr->misc_features & 0x1400) + is_uefi = 1; + } + }