From: Greg Kroah-Hartman Date: Fri, 23 Feb 2018 16:53:17 +0000 (+0100) Subject: 4.15-stable patches X-Git-Tag: v3.18.96~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4aa923493530aa8cace8a035783f0fa1527ddea;p=thirdparty%2Fkernel%2Fstable-queue.git 4.15-stable patches added patches: crypto-s5p-sss-fix-kernel-oops-in-aes-ecb-mode.patch mei-me-add-cannon-point-device-ids-for-4th-device.patch mei-me-add-cannon-point-device-ids.patch vmalloc-fix-__gfp_highmem-usage-for-vmalloc_32-on-32b-systems.patch --- diff --git a/queue-4.15/crypto-s5p-sss-fix-kernel-oops-in-aes-ecb-mode.patch b/queue-4.15/crypto-s5p-sss-fix-kernel-oops-in-aes-ecb-mode.patch new file mode 100644 index 00000000000..ffae0851ad0 --- /dev/null +++ b/queue-4.15/crypto-s5p-sss-fix-kernel-oops-in-aes-ecb-mode.patch @@ -0,0 +1,59 @@ +From c927b080c67e3e97193c81fc1d27f4251bf4e036 Mon Sep 17 00:00:00 2001 +From: Kamil Konieczny +Date: Wed, 7 Feb 2018 16:52:09 +0100 +Subject: crypto: s5p-sss - Fix kernel Oops in AES-ECB mode + +From: Kamil Konieczny + +commit c927b080c67e3e97193c81fc1d27f4251bf4e036 upstream. + +In AES-ECB mode crypt is done with key only, so any use of IV +can cause kernel Oops. Use IV only in AES-CBC and AES-CTR. + +Signed-off-by: Kamil Konieczny +Reported-by: Anand Moon +Reviewed-by: Krzysztof Kozlowski +Tested-by: Anand Moon +Cc: stable@vger.kernel.org # can be applied after commit 8f9702aad138 +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/crypto/s5p-sss.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/drivers/crypto/s5p-sss.c ++++ b/drivers/crypto/s5p-sss.c +@@ -1926,15 +1926,21 @@ static void s5p_aes_crypt_start(struct s + uint32_t aes_control; + unsigned long flags; + int err; ++ u8 *iv; + + aes_control = SSS_AES_KEY_CHANGE_MODE; + if (mode & FLAGS_AES_DECRYPT) + aes_control |= SSS_AES_MODE_DECRYPT; + +- if ((mode & FLAGS_AES_MODE_MASK) == FLAGS_AES_CBC) ++ if ((mode & FLAGS_AES_MODE_MASK) == FLAGS_AES_CBC) { + aes_control |= SSS_AES_CHAIN_MODE_CBC; +- else if ((mode & FLAGS_AES_MODE_MASK) == FLAGS_AES_CTR) ++ iv = req->info; ++ } else if ((mode & FLAGS_AES_MODE_MASK) == FLAGS_AES_CTR) { + aes_control |= SSS_AES_CHAIN_MODE_CTR; ++ iv = req->info; ++ } else { ++ iv = NULL; /* AES_ECB */ ++ } + + if (dev->ctx->keylen == AES_KEYSIZE_192) + aes_control |= SSS_AES_KEY_SIZE_192; +@@ -1965,7 +1971,7 @@ static void s5p_aes_crypt_start(struct s + goto outdata_error; + + SSS_AES_WRITE(dev, AES_CONTROL, aes_control); +- s5p_set_aes(dev, dev->ctx->aes_key, req->info, dev->ctx->keylen); ++ s5p_set_aes(dev, dev->ctx->aes_key, iv, dev->ctx->keylen); + + s5p_set_dma_indata(dev, dev->sg_src); + s5p_set_dma_outdata(dev, dev->sg_dst); diff --git a/queue-4.15/mei-me-add-cannon-point-device-ids-for-4th-device.patch b/queue-4.15/mei-me-add-cannon-point-device-ids-for-4th-device.patch new file mode 100644 index 00000000000..e02a76ea80f --- /dev/null +++ b/queue-4.15/mei-me-add-cannon-point-device-ids-for-4th-device.patch @@ -0,0 +1,44 @@ +From 2a4ac172c2f257d28c47b90c9e381bec31edcc44 Mon Sep 17 00:00:00 2001 +From: Tomas Winkler +Date: Sun, 18 Feb 2018 11:05:16 +0200 +Subject: mei: me: add cannon point device ids for 4th device + +From: Tomas Winkler + +commit 2a4ac172c2f257d28c47b90c9e381bec31edcc44 upstream. + +Add cannon point device ids for 4th (itouch) device. + +Cc: 4.14+ +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/hw-me-regs.h | 2 ++ + drivers/misc/mei/pci-me.c | 2 ++ + 2 files changed, 4 insertions(+) + +--- a/drivers/misc/mei/hw-me-regs.h ++++ b/drivers/misc/mei/hw-me-regs.h +@@ -133,7 +133,9 @@ + #define MEI_DEV_ID_KBP_2 0xA2BB /* Kaby Point 2 */ + + #define MEI_DEV_ID_CNP_LP 0x9DE0 /* Cannon Point LP */ ++#define MEI_DEV_ID_CNP_LP_4 0x9DE4 /* Cannon Point LP 4 (iTouch) */ + #define MEI_DEV_ID_CNP_H 0xA360 /* Cannon Point H */ ++#define MEI_DEV_ID_CNP_H_4 0xA364 /* Cannon Point H 4 (iTouch) */ + + /* + * MEI HW Section +--- a/drivers/misc/mei/pci-me.c ++++ b/drivers/misc/mei/pci-me.c +@@ -99,7 +99,9 @@ static const struct pci_device_id mei_me + {MEI_PCI_DEVICE(MEI_DEV_ID_KBP_2, MEI_ME_PCH8_CFG)}, + + {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_LP, MEI_ME_PCH8_CFG)}, ++ {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_LP_4, MEI_ME_PCH8_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_H, MEI_ME_PCH8_CFG)}, ++ {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_H_4, MEI_ME_PCH8_CFG)}, + + /* required last entry */ + {0, } diff --git a/queue-4.15/mei-me-add-cannon-point-device-ids.patch b/queue-4.15/mei-me-add-cannon-point-device-ids.patch new file mode 100644 index 00000000000..2a77f589e5d --- /dev/null +++ b/queue-4.15/mei-me-add-cannon-point-device-ids.patch @@ -0,0 +1,46 @@ +From f8f4aa68a8ae98ed79c8fee3488c38a2f5d2de8c Mon Sep 17 00:00:00 2001 +From: Alexander Usyskin +Date: Sun, 18 Feb 2018 11:05:15 +0200 +Subject: mei: me: add cannon point device ids + +From: Alexander Usyskin + +commit f8f4aa68a8ae98ed79c8fee3488c38a2f5d2de8c upstream. + +Add CNP LP and CNP H device ids for cannon lake +and coffee lake platforms. + +Cc: 4.14+ +Signed-off-by: Alexander Usyskin +Signed-off-by: Tomas Winkler +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/mei/hw-me-regs.h | 3 +++ + drivers/misc/mei/pci-me.c | 3 +++ + 2 files changed, 6 insertions(+) + +--- a/drivers/misc/mei/hw-me-regs.h ++++ b/drivers/misc/mei/hw-me-regs.h +@@ -132,6 +132,9 @@ + #define MEI_DEV_ID_KBP 0xA2BA /* Kaby Point */ + #define MEI_DEV_ID_KBP_2 0xA2BB /* Kaby Point 2 */ + ++#define MEI_DEV_ID_CNP_LP 0x9DE0 /* Cannon Point LP */ ++#define MEI_DEV_ID_CNP_H 0xA360 /* Cannon Point H */ ++ + /* + * MEI HW Section + */ +--- a/drivers/misc/mei/pci-me.c ++++ b/drivers/misc/mei/pci-me.c +@@ -98,6 +98,9 @@ static const struct pci_device_id mei_me + {MEI_PCI_DEVICE(MEI_DEV_ID_KBP, MEI_ME_PCH8_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_KBP_2, MEI_ME_PCH8_CFG)}, + ++ {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_LP, MEI_ME_PCH8_CFG)}, ++ {MEI_PCI_DEVICE(MEI_DEV_ID_CNP_H, MEI_ME_PCH8_CFG)}, ++ + /* required last entry */ + {0, } + }; diff --git a/queue-4.15/series b/queue-4.15/series index 96edddf291d..c653c8ef59e 100644 --- a/queue-4.15/series +++ b/queue-4.15/series @@ -39,3 +39,7 @@ xhci-fix-xhci-debugfs-devices-node-disappearance-after-hibernation.patch xhci-xhci-debugfs-device-nodes-weren-t-removed-after-device-plugged-out.patch xhci-fix-xhci-debugfs-errors-in-xhci_stop.patch usbip-keep-usbip_device-sockfd-state-in-sync-with-tcp_socket.patch +crypto-s5p-sss-fix-kernel-oops-in-aes-ecb-mode.patch +mei-me-add-cannon-point-device-ids.patch +mei-me-add-cannon-point-device-ids-for-4th-device.patch +vmalloc-fix-__gfp_highmem-usage-for-vmalloc_32-on-32b-systems.patch diff --git a/queue-4.15/vmalloc-fix-__gfp_highmem-usage-for-vmalloc_32-on-32b-systems.patch b/queue-4.15/vmalloc-fix-__gfp_highmem-usage-for-vmalloc_32-on-32b-systems.patch new file mode 100644 index 00000000000..88c041258b2 --- /dev/null +++ b/queue-4.15/vmalloc-fix-__gfp_highmem-usage-for-vmalloc_32-on-32b-systems.patch @@ -0,0 +1,67 @@ +From 698d0831ba87b92ae10b15e8203cfd59f5a59a35 Mon Sep 17 00:00:00 2001 +From: Michal Hocko +Date: Wed, 21 Feb 2018 14:46:01 -0800 +Subject: vmalloc: fix __GFP_HIGHMEM usage for vmalloc_32 on 32b systems +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Michal Hocko + +commit 698d0831ba87b92ae10b15e8203cfd59f5a59a35 upstream. + +Kai Heng Feng has noticed that BUG_ON(PageHighMem(pg)) triggers in +drivers/media/common/saa7146/saa7146_core.c since 19809c2da28a ("mm, +vmalloc: use __GFP_HIGHMEM implicitly"). + +saa7146_vmalloc_build_pgtable uses vmalloc_32 and it is reasonable to +expect that the resulting page is not in highmem. The above commit +aimed to add __GFP_HIGHMEM only for those requests which do not specify +any zone modifier gfp flag. vmalloc_32 relies on GFP_VMALLOC32 which +should do the right thing. Except it has been missed that GFP_VMALLOC32 +is an alias for GFP_KERNEL on 32b architectures. Thanks to Matthew to +notice this. + +Fix the problem by unconditionally setting GFP_DMA32 in GFP_VMALLOC32 +for !64b arches (as a bailout). This should do the right thing and use +ZONE_NORMAL which should be always below 4G on 32b systems. + +Debugged by Matthew Wilcox. + +[akpm@linux-foundation.org: coding-style fixes] +Link: http://lkml.kernel.org/r/20180212095019.GX21609@dhcp22.suse.cz +Fixes: 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) +Signed-off-by: Michal Hocko +Reported-by: Kai Heng Feng +Cc: Matthew Wilcox +Cc: Laura Abbott +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + mm/vmalloc.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/mm/vmalloc.c ++++ b/mm/vmalloc.c +@@ -1943,11 +1943,15 @@ void *vmalloc_exec(unsigned long size) + } + + #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) +-#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL ++#define GFP_VMALLOC32 (GFP_DMA32 | GFP_KERNEL) + #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) +-#define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL ++#define GFP_VMALLOC32 (GFP_DMA | GFP_KERNEL) + #else +-#define GFP_VMALLOC32 GFP_KERNEL ++/* ++ * 64b systems should always have either DMA or DMA32 zones. For others ++ * GFP_DMA32 should do the right thing and use the normal zone. ++ */ ++#define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL + #endif + + /**