Refreshed all patches. Fixes: - CVE-2019-14896 - CVE-2019-14897 Remove upstreamed: - 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch - 001-4.22-01-MIPS-BCM63XX-drop-unused-and-broken-DSP-platform-dev.patch Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>master
parent
3d1c84d424
commit
eca8a2ee0d
@ -1,39 +0,0 @@ |
||||
From 6e88098ca43a3d80ae86908f7badba683c8a0d84 Mon Sep 17 00:00:00 2001
|
||||
From: Corentin Labbe <clabbe@baylibre.com>
|
||||
Date: Wed, 23 Jan 2019 11:24:18 +0000
|
||||
Subject: [PATCH 07/15] crypto: crypto4xx - Fix wrong
|
||||
ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments
|
||||
|
||||
When building without CONFIG_HW_RANDOM_PPC4XX, I hit the following build failure:
|
||||
drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_probe':
|
||||
drivers/crypto/amcc/crypto4xx_core.c:1407:20: error: passing argument 1 of 'ppc4xx_trng_probe' from incompatible pointer type [-Werror=incompatible-pointer-types]
|
||||
In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:
|
||||
drivers/crypto/amcc/crypto4xx_trng.h:28:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *'
|
||||
drivers/crypto/amcc/crypto4xx_core.c: In function 'crypto4xx_remove':
|
||||
drivers/crypto/amcc/crypto4xx_core.c:1434:21: error: passing argument 1 of 'ppc4xx_trng_remove' from incompatible pointer type [-Werror=incompatible-pointer-types]
|
||||
In file included from drivers/crypto/amcc/crypto4xx_core.c:50:0:
|
||||
drivers/crypto/amcc/crypto4xx_trng.h:30:20: note: expected 'struct crypto4xx_device *' but argument is of type 'struct crypto4xx_core_device *'
|
||||
|
||||
This patch fix the needed argument of ppc4xx_trng_probe()/ppc4xx_trng_remove() in that case.
|
||||
|
||||
Fixes: 5343e674f32f ("crypto4xx: integrate ppc4xx-rng into crypto4xx")
|
||||
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
---
|
||||
drivers/crypto/amcc/crypto4xx_trng.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/crypto/amcc/crypto4xx_trng.h
|
||||
+++ b/drivers/crypto/amcc/crypto4xx_trng.h
|
||||
@@ -26,9 +26,9 @@ void ppc4xx_trng_probe(struct crypto4xx_
|
||||
void ppc4xx_trng_remove(struct crypto4xx_core_device *core_dev);
|
||||
#else
|
||||
static inline void ppc4xx_trng_probe(
|
||||
- struct crypto4xx_device *dev __maybe_unused) { }
|
||||
+ struct crypto4xx_core_device *dev __maybe_unused) { }
|
||||
static inline void ppc4xx_trng_remove(
|
||||
- struct crypto4xx_device *dev __maybe_unused) { }
|
||||
+ struct crypto4xx_core_device *dev __maybe_unused) { }
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,203 +0,0 @@ |
||||
From 51559154375fff4a94bbbc249fdd9248a80827b3 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
Date: Tue, 18 Dec 2018 10:19:02 +0100
|
||||
Subject: [PATCH] MIPS: BCM63XX: drop unused and broken DSP platform device
|
||||
|
||||
Trying to register the DSP platform device results in a null pointer
|
||||
access:
|
||||
|
||||
[ 0.124184] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804e305c, ra == 804e6f20
|
||||
[ 0.135208] Oops[#1]:
|
||||
[ 0.137514] CPU: 0 PID: 1 Comm: swapper Not tainted 4.14.87
|
||||
...
|
||||
[ 0.197117] epc : 804e305c bcm63xx_dsp_register+0x80/0xa4
|
||||
[ 0.202838] ra : 804e6f20 board_register_devices+0x258/0x390
|
||||
...
|
||||
|
||||
This happens because it tries to copy the passed platform data over the
|
||||
platform_device's unpopulated platform_data.
|
||||
|
||||
Since this code has been broken since its submission, no driver was ever
|
||||
submitted for it, and apparently nobody was using it, just remove it
|
||||
instead of trying to fix it.
|
||||
|
||||
Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.")
|
||||
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
||||
---
|
||||
arch/mips/bcm63xx/Makefile | 6 +--
|
||||
arch/mips/bcm63xx/boards/board_bcm963xx.c | 20 --------
|
||||
arch/mips/bcm63xx/dev-dsp.c | 56 ----------------------
|
||||
.../include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h | 14 ------
|
||||
.../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 5 --
|
||||
5 files changed, 3 insertions(+), 98 deletions(-)
|
||||
delete mode 100644 arch/mips/bcm63xx/dev-dsp.c
|
||||
delete mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
|
||||
|
||||
--- a/arch/mips/bcm63xx/Makefile
|
||||
+++ b/arch/mips/bcm63xx/Makefile
|
||||
@@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
|
||||
- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
|
||||
- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
|
||||
- dev-wdt.o dev-usb-usbd.o
|
||||
+ setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \
|
||||
+ dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \
|
||||
+ dev-usb-usbd.o
|
||||
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
|
||||
|
||||
obj-y += boards/
|
||||
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <bcm63xx_nvram.h>
|
||||
#include <bcm63xx_dev_pci.h>
|
||||
#include <bcm63xx_dev_enet.h>
|
||||
-#include <bcm63xx_dev_dsp.h>
|
||||
#include <bcm63xx_dev_flash.h>
|
||||
#include <bcm63xx_dev_hsspi.h>
|
||||
#include <bcm63xx_dev_pcmcia.h>
|
||||
@@ -289,14 +288,6 @@ static struct board_info __initdata boar
|
||||
.has_pccard = 1,
|
||||
.has_ehci0 = 1,
|
||||
|
||||
- .has_dsp = 1,
|
||||
- .dsp = {
|
||||
- .gpio_rst = 6,
|
||||
- .gpio_int = 34,
|
||||
- .cs = 2,
|
||||
- .ext_irq = 2,
|
||||
- },
|
||||
-
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
@@ -401,14 +392,6 @@ static struct board_info __initdata boar
|
||||
|
||||
.has_ohci0 = 1,
|
||||
|
||||
- .has_dsp = 1,
|
||||
- .dsp = {
|
||||
- .gpio_rst = 6,
|
||||
- .gpio_int = 34,
|
||||
- .ext_irq = 2,
|
||||
- .cs = 2,
|
||||
- },
|
||||
-
|
||||
.leds = {
|
||||
{
|
||||
.name = "adsl-fail",
|
||||
@@ -898,9 +881,6 @@ int __init board_register_devices(void)
|
||||
if (board.has_usbd)
|
||||
bcm63xx_usbd_register(&board.usbd);
|
||||
|
||||
- if (board.has_dsp)
|
||||
- bcm63xx_dsp_register(&board.dsp);
|
||||
-
|
||||
/* Generate MAC address for WLAN and register our SPROM,
|
||||
* do this after registering enet devices
|
||||
*/
|
||||
--- a/arch/mips/bcm63xx/dev-dsp.c
|
||||
+++ /dev/null
|
||||
@@ -1,56 +0,0 @@
|
||||
-/*
|
||||
- * Broadcom BCM63xx VoIP DSP registration
|
||||
- *
|
||||
- * This file is subject to the terms and conditions of the GNU General Public
|
||||
- * License. See the file "COPYING" in the main directory of this archive
|
||||
- * for more details.
|
||||
- *
|
||||
- * Copyright (C) 2009 Florian Fainelli <florian@openwrt.org>
|
||||
- */
|
||||
-
|
||||
-#include <linux/init.h>
|
||||
-#include <linux/kernel.h>
|
||||
-#include <linux/platform_device.h>
|
||||
-
|
||||
-#include <bcm63xx_cpu.h>
|
||||
-#include <bcm63xx_dev_dsp.h>
|
||||
-#include <bcm63xx_regs.h>
|
||||
-#include <bcm63xx_io.h>
|
||||
-
|
||||
-static struct resource voip_dsp_resources[] = {
|
||||
- {
|
||||
- .start = -1, /* filled at runtime */
|
||||
- .end = -1, /* filled at runtime */
|
||||
- .flags = IORESOURCE_MEM,
|
||||
- },
|
||||
- {
|
||||
- .start = -1, /* filled at runtime */
|
||||
- .flags = IORESOURCE_IRQ,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct platform_device bcm63xx_voip_dsp_device = {
|
||||
- .name = "bcm63xx-voip-dsp",
|
||||
- .id = -1,
|
||||
- .num_resources = ARRAY_SIZE(voip_dsp_resources),
|
||||
- .resource = voip_dsp_resources,
|
||||
-};
|
||||
-
|
||||
-int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd)
|
||||
-{
|
||||
- struct bcm63xx_dsp_platform_data *dpd;
|
||||
- u32 val;
|
||||
-
|
||||
- /* Get the memory window */
|
||||
- val = bcm_mpi_readl(MPI_CSBASE_REG(pd->cs - 1));
|
||||
- val &= MPI_CSBASE_BASE_MASK;
|
||||
- voip_dsp_resources[0].start = val;
|
||||
- voip_dsp_resources[0].end = val + 0xFFFFFFF;
|
||||
- voip_dsp_resources[1].start = pd->ext_irq;
|
||||
-
|
||||
- /* copy given platform data */
|
||||
- dpd = bcm63xx_voip_dsp_device.dev.platform_data;
|
||||
- memcpy(dpd, pd, sizeof (*pd));
|
||||
-
|
||||
- return platform_device_register(&bcm63xx_voip_dsp_device);
|
||||
-}
|
||||
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_dsp.h
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-/* SPDX-License-Identifier: GPL-2.0 */
|
||||
-#ifndef __BCM63XX_DSP_H
|
||||
-#define __BCM63XX_DSP_H
|
||||
-
|
||||
-struct bcm63xx_dsp_platform_data {
|
||||
- unsigned gpio_rst;
|
||||
- unsigned gpio_int;
|
||||
- unsigned cs;
|
||||
- unsigned ext_irq;
|
||||
-};
|
||||
-
|
||||
-int __init bcm63xx_dsp_register(const struct bcm63xx_dsp_platform_data *pd);
|
||||
-
|
||||
-#endif /* __BCM63XX_DSP_H */
|
||||
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
|
||||
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <linux/leds.h>
|
||||
#include <bcm63xx_dev_enet.h>
|
||||
#include <bcm63xx_dev_usb_usbd.h>
|
||||
-#include <bcm63xx_dev_dsp.h>
|
||||
|
||||
/*
|
||||
* flash mapping
|
||||
@@ -31,7 +30,6 @@ struct board_info {
|
||||
unsigned int has_ohci0:1;
|
||||
unsigned int has_ehci0:1;
|
||||
unsigned int has_usbd:1;
|
||||
- unsigned int has_dsp:1;
|
||||
unsigned int has_uart0:1;
|
||||
unsigned int has_uart1:1;
|
||||
|
||||
@@ -43,9 +41,6 @@ struct board_info {
|
||||
/* USB config */
|
||||
struct bcm63xx_usbd_platform_data usbd;
|
||||
|
||||
- /* DSP config */
|
||||
- struct bcm63xx_dsp_platform_data dsp;
|
||||
-
|
||||
/* GPIO LEDs */
|
||||
struct gpio_led leds[5];
|
||||
|
Loading…
Reference in new issue