Commit Graph

99 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Hauke Mehrtens 6062d85892 kernel: Update kernel 4.19 to version 4.19.131
Fixes:
- CVE-2020-10757

The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was
backported which needed some adaptations to other code.

Run tested: ath79
Build tested: ath79

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Hauke Mehrtens 4bb5e331a7 kernel: Fix ath79 DSP exception at bootup
This resolves a hazard between a mtc0 and a mfc0 instruction after
activating the DSP support. Without this fix the CPU could use the old
value again and the DSP support would not be active.

Fixes: FS#2928, FS#2899
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ath79/tl-wdr3600; ath79/tl-wdr4300]
Tested-by: David Bauer <mail@david-bauer.net> [ocedo_koala/ocedo_raccoon]
4 years ago
Koen Vandeputte d503492857 kernel: bump 4.19 to 4.19.123
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 7dd2d7289a kernel: bump 4.19 to 4.19.122
Refreshed all patches.

Remove upstreamed:
- 551-loop-Better-discard-support-for-block-devices.patch

Fixed:
- CVE-2020-11884
- CVE-2020-12114
- CVE-2019-3016
- CVE-2020-11669

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Thibaut VARÈNE 1dcc2249cd generic: mikrotik platform build bits
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Thibaut VARÈNE 2976e423dc generic: routerboot partition build bits
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years ago
Adrian Schmutzler 5f92349841 kernel: fix include of myloader.o since kernel 5.4
Between 4.19 and 5.4, mtd parsers have been moved to "parsers"
subdirectory. Based on this, the selection of myloader.o in OpenWrt
was also moved to that subdirectory, while the Kconfig and our local
myloader.c file remained in /drivers/mtd.

This resulted in linking errors like the following (on ath25@5.4):

make[8]: *** No rule to make target 'drivers/mtd/parsers/myloader.o', ...
   needed by 'drivers/mtd/parsers/built-in.a'.  Stop.
make[7]: *** [scripts/Makefile.build:500: drivers/mtd/parsers] Error 2
make[6]: *** [scripts/Makefile.build:500: drivers/mtd] Error 2

Since myloader.c is not too big, this patch moves it to the kernel patches,
allowing to adjust the path for kernel 5.4 and keeping Makefiles and
file paths better in sync.

Other patches have been refreshed accordingly.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Koen Vandeputte 3c3825436e kernel: bump 4.19 to 4.19.115
Refreshed all patches.

Remove upstreamed:
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8647
- CVE-2020-8648 (potentially)
- CVE-2020-8649

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Jo-Philipp Wich 93294b516e generic: drop 616-net_optimize_xfrm_calls.patch
The conditional check introduced by this patch may trigger a NULL pointer
dereference in case the result of dev_net() is NULL.

Since the purpose of this patch is neither sufficiently explained and since
this patch apparently has never been submitted upstream despite it being in
the pending-* patch directory, I propose to drop it without replacement.

If the performance implications of dropping this patch are found to be
significiant, it should be reintroduced with proper description and
benchmark results.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2943
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years ago
Pawel Dembicki aff965a415 generic: backport Wistron Neweb D19Q1 patches
Backport patches which adds suport for the Wistron Neweb D19Q1 3G/4G modem,
used in D-Link DWR-960.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years ago
John Crispin 6786dc26a2 generic: fix flow table hw offload
Make the driver work with recent upstream changes.

Signed-off-by: John Crispin <john@phrozen.org>
4 years ago
Robert Marko 3ef988caf3 generic: 4.19: Add 4B_OPCODES flag to w25q256
This patch backports the upstream patch that adds the 4B_OPCODES flag to w25q256 under 4.19 kernel.
This is needed for ipq40xx and ramips.

Signed-off-by: Robert Marko <robimarko@gmail.com>
4 years ago
Koen Vandeputte e64564920a kernel: bump 4.19 to 4.19.108
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Rafał Miłecki 5cc0493c2b kernel: backport mtd partition address fix sent upstream
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
4 years ago
Koen Vandeputte 7ae2523323 kernel: bump 4.19 to 4.19.106
Refreshed all patches.

Remove upstreamed:
- 950-0786-leds-pca963x-Fix-open-drain-initialization.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Aleksander Jan Bajkowski c6e33b7cb4 generic: refresh patches
just run: make target/linux/refresh V=s

Fixes: 6e315de0f4

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years ago
Daniel Golle 6f10aa737e kernel: remove duplicate flash chip definition
XTX XT25F128A shares it's chip ID with XM25QH128A which got identical
features. Hence there it makes no sense to add it to the driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Koen Vandeputte 6e315de0f4 kernel: add support for GD25D05 SPI NOR
This chip is used on newer RB912UAG-5HPnD r2 boards:

Before:

[    0.642553] m25p80 spi0.0: unrecognized JEDEC id bytes: c8, 40, 10
[    0.649381] NAND flash driver for the RouterBOARD 91x series

After:

[    0.641714] m25p80 spi0.0: found gd25d05, expected m25p80
[    0.649916] m25p80 spi0.0: gd25d05 (64 Kbytes)
[    0.655122] Creating 4 MTD partitions on "spi0.0":
[    0.660164] 0x000000000000-0x00000000c000 : "routerboot"
[    0.667782] 0x00000000c000-0x00000000d000 : "hard_config"
[    0.675073] 0x00000000d000-0x00000000e000 : "bios"
[    0.682613] 0x00000000e000-0x00000000f000 : "soft_config"
[    0.690304] NAND flash driver for the RouterBOARD 91x series

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 20b5a4ca01 kernel: bump 4.19 to 4.19.101
Refreshed all patches.

Fixes:
- CVE-2019-14896
- CVE-2019-14897

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch
- 950-0202-staging-bcm2835-camera-fix-module-autoloading.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>
4 years ago
Daniel Golle 6015659e2b kernel: add support for XTX xt25f128 SPI-NOR flash chips
This fixes support for Teltonika RUT9xx which in recent versions of
the device uses xt25f128b flash.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Scott Roberts a461f984c4 kernel: sfp: add Nokia SFP fix from net-next
Add Nokia GPON ONT SFP fix for tx_fault in net-next.

Signed-off-by: Scott Roberts <ttocsr@gmail.com>
4 years ago
Koen Vandeputte 40842167d2 kernel: bump 4.19 to 4.19.98
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
David Bauer 5f4f269ce1 generic at803x: remove unneeded patches
- Remove the "RGMII TX delay fixup" hack and the associated
   DT-property. It was never used in a DT-based platform and
   solved a problem which can be mitigated by using correct
   delays on the MAC side.

 - Remove the patch to enable platform-data support for the
   at803x driver. It was only used by ar71xx which does not
   (and never will) support kernel 4.19 or later.

 - Remove the SmartEEE DT-configuration patch. As explained
   previously, this patch never disabled the Atheros SmartEEE
   implementation, but rather "standard" EEE. This can be done
   on device-tree compatible platforms by adding the
   "eee-broken-1000t" or "eee-broken-100tx" properties to the PHY
   node. As all usages of the old properties are migrated, this
   patch can be removed.

Signed-off-by: David Bauer <mail@david-bauer.net>
Acked-by: Christian Lamparter <chunkeey@gmail.com>
4 years ago
Jonas Gorski 947163b9d2 kernel: sfp: re-attempt probing for phy
Add patches retrying to probe the PHY to restore support for PHYs taking
longer to initialize without breaking modules without PHYs.

Patches taken from http://git.armlinux.org.uk/cgit/linux-arm.git/log/?h=phy

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
4 years ago
Jonas Gorski 10b12b5d68 kernel: sfp: add two fixes submitted to upstream
Add two small fixes for SFP that were submitted upstream.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
4 years ago
Russell King a1358fc7ae kernel: add SFP support for Methode DM7052 NBASE-T module
Add support for Methode DM7052 NBASE-T module to OpenWRT. These
patches are taken from my "phy" branch, and will be sent for the
next kernel merge window.

Signed-off-by: Russell King <linux@armlinux.org.uk>
[jonas.gorski: move patches to pending, refresh patches]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
4 years ago
Koen Vandeputte 692b91f56b kernel: bump 4.19 to 4.19.95
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Hauke Mehrtens b6cdc042af kernel: bump 4.19 to 4.19.93
Refreshed all patches.

The patch hack-4.19/550-loop-better-discard-for-block-devices.patch was
replaced with an new version of the patch from:
https://lore.kernel.org/patchwork/patch/1153625/
https://lore.kernel.org/patchwork/patch/1153626/

Compile-tested on: ipq40xx, lantiq
Runtime-tested on: ipq40xx, lantiq

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Daniel Golle f64c64a91c generic: fix compiler error in OpenWrt's kexec patch
330-MIPS-kexec-Accept-command-line-parameters-from-users.patch causes
problems when building with -Werror=unused-result.

arch/mips/kernel/machine_kexec.c: In function 'machine_kexec_init_argv':
arch/mips/kernel/machine_kexec.c:76:2: error: ignoring return value of 'copy_from_user', declared with attribute warn_unused_result [-Werror=unused-result]
  copy_from_user(kexec_argv_buf, buf, size);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Fix this by handling the return value in an appropriate way.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years ago
Felix Fietkau b2d10977a8 Revert "kernel: fix kmemleak warnings introduced in 305-mips_module_reloc.patch"
This reverts commit a03afef7f2e8ae363a97357ec75ffbfef372a9ea.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Felix Fietkau 441052f44a kernel: fix kmemleak warnings introduced in 305-mips_module_reloc.patch
Physically allocated memory for modules needs to be registered with kmemleak,
so it can track it as object.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years ago
Hauke Mehrtens f0df0d6a14 kernel: bump 4.19 to 4.19.91
Refreshed all patches.

Compile-tested on: ipq40xx, apm821xx
Runtime-tested on: ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte e115fa478f kernel: bump 4.19 to 4.19.90
Refreshed all patches.

Remove upstreamed:
- 010-dmaengine-dw-dmac-implement-dma-prot.patch
- 950-0148-Increase-firmware-call-buffer-size-to-48-bytes.patch
- 950-0206-Mailbox-firmware-calls-now-use-kmalloc-2749.patch
- 402-leds-trigger-netdev-fix-handling-on-interface-rename.patch

Fixes:
- CVE-2019-19332

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[Add 010-dt-bindings-dmaengine-dw-dmac-add-protection-control.patch]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
4 years ago
Koen Vandeputte 88ca372b5a kernel: bump 4.19 to 4.19.88
Refreshed all patches.

Remove upstreamed:
- 0004-boot-sq201-from-sda1.patch
- 500-v4.20-ubifs-Fix-default-compression-selection-in-ubifs.patch
- 0003-usb-dwc2-use-a-longer-core-rest-timeout-in-dwc2_core.patch

Altered patches:
- 0011-ARM-dts-Fix-up-SQ201-flash-access.patch
- 400-mtd-add-rootfs-split-support.patch
- 0101-pci-mediatek-backport-fix-pcie.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f19e471f32 kernel: bump 4.19 to 4.19.86
Refreshed all patches.

Altered patches:
- 950-0064-mfd-Add-Raspberry-Pi-Sense-HAT-core-driver.patch
- 0005-mtd-physmap_of-Move-custom-initialization.patch

Remove upstreamed:
- 0001-pinctrl-gemini-Mask-and-set-properly.patch
- 0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte e29500eb84 kernel: bump 4.19 to 4.19.85
Refreshed all patches.

Altered patches:
- 080-sata_support.patch

Remove upstreamed:
- 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch
- 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch
- 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 7533087565 kernel: bump 4.19 to 4.19.84
Refreshed all patches.

Altered patches:
- 950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch
- 950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch
- 902-debloat_proc.patch

Remove upstreamed:
- 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch

New symbols:
X86_INTEL_MPX
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO

Compile-tested on: cns3xxx, x86_64
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte e5445333f6 kernel: bump 4.19 to 4.19.79
Refreshed all patches.

Remove upstreamed (superseded):
- 950-0726-can-mcp251x-Allow-more-time-after-a-reset.patch

Compile-tested on: brcm2708, cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 8184429b7b kernel: bump 4.19 to 4.19.78
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 7449a39c0e kernel: bump 4.19 to 4.19.76
Refreshed all patches.

Altered patches:
- 403-mtd_fix_cfi_cmdset_0002_status_check.patch

Compile-tested on: ath79, cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Felix Fietkau c8933ce533 kernel: fix issues with output routing in flow offload
Replace an old cleanup patch that never made it upstream with the proper
upstream fix. This patch was incompatible with the recent changes that
affected the way that the flow tuple dst entry was used.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Koen Vandeputte c5b10c8282 kernel: bump 4.19 to 4.19.74
Refreshed all patches.

Fixes:
- CVE-2019-15504

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte c79cb9fda7 kernel: bump 4.19 to 4.19.73
Refreshed all patches.

Remove upstreamed:
- 840-media-i2c-tda1997x-select-V4L2_FWNODE.patch
- 079-v4.20-ARM-dts-qcom-ipq4019-fix-PCI-range.patch
- 083-ARM-dts-qcom-ipq4019-enlarge-PCIe-BAR-range.patch
- 084-ARM-dts-qcom-ipq4019-Fix-MSI-IRQ-type.patch

Fixes:
- CVE-2019-15030

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
DENG Qingfang 1979af10ca kernel: 4.19: fix crash when setting up spi-gpio
If an spi-gpio was specified with num-chipselects = <0> in dts, kernel
will crash:

 Unable to handle kernel paging request at virtual address 32697073
 pgd = (ptrval)
 [32697073] *pgd=00000000
 Internal error: Oops: 5 [# 1] SMP ARM
 Modules linked in:
 CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.19.72 #0
 Hardware name: Generic DT based system
 PC is at validate_desc+0x28/0x80
 LR is at gpiod_direction_output+0x14/0x128
 ...
 [<c0544db4>] (validate_desc) from [<c0545228>] (gpiod_direction_output+0x14/0x128)
 [<c0545228>] (gpiod_direction_output) from [<c05fa714>] (spi_gpio_setup+0x58/0x64)
 [<c05fa714>] (spi_gpio_setup) from [<c05f7258>] (spi_setup+0x12c/0x148)
 [<c05f7258>] (spi_setup) from [<c05f7330>] (spi_add_device+0xbc/0x12c)
 [<c05f7330>] (spi_add_device) from [<c05f7f74>] (spi_register_controller+0x838/0x924)
 [<c05f7f74>] (spi_register_controller) from [<c05fa494>] (spi_bitbang_start+0x108/0x120)
 [<c05fa494>] (spi_bitbang_start) from [<c05faa34>] (spi_gpio_probe+0x314/0x338)
 [<c05faa34>] (spi_gpio_probe) from [<c05a844c>] (platform_drv_probe+0x34/0x70)

The cause is spi_gpio_setup() did not check if the spi-gpio has
chipselect pins before setting their direction and results in derefing
an invalid pointer.

The bug is spotted in kernel 4.19.72 and does not occur in 4.14.

There is a similar fix upstream in kernel 5.2 in commit 249e2632dcd0
("spi: gpio: Don't request CS GPIO in DT use-case").

Ref: https://patchwork.kernel.org/patch/11150619/
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[use upstream patch, moved from hack to pending dir, commit facelift]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Koen Vandeputte 1cf2495d48 ar71xx: make IRQ fixes target specific
Move the IRQ fix from generic to ar71xx specific.
Other targets like ath79 have specific pathes to delete this code.
This resulted in a build failure on ath79

While at it, wipe the 4.19 version, as ar71xx will never reach this.

Fixes: 530f76708cef ("ar71xx: Fix potentially missed IRQ handling during
dispatch")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 00d48bcac0 ar71xx: Fix potentially missed IRQ handling during dispatch
If both interrupts are set in the current implementation
only the 1st will be handled and the 2nd will be skipped
due to the "if else" condition.

Fix this by using the same approach as done for QCA955x
just below it.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 78c3a18a1e kernel: bump 4.19 to 4.19.72
Refreshed all patches.

Remove upstreamed:
- 390-v5.3-net-sched-fix-action-ipt-crash.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 1bc31e0339 kernel: bump 4.19 to 4.19.68
Refreshed all patches.

Remove upstreamed:
- 950-0307-Revert-pwm-Set-class-for-exported-channels-in-sysfs.patch

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 491eaa898b kernel: bump 4.19 to 4.19.67
Refreshed all patches.

Also add a missing symbol for x86 which got used now in this bump.
- ISCSI_IBFT

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Luka Perkov f4500fde1e kernel: refresh patches
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
5 years ago