Commit Graph

112 Commits

Author SHA1 Message Date
Sven Eckelmann 9f2a40c72f kernel: mtd: parser: cmdline: Fix parsing of part-names with colons
Some devices (especially QCA ones) are already using hardcoded partition
names with colons in it. The OpenMesh A62 for example provides following
mtd relevant information via cmdline:

  root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait

The change to split only on the last colon between mtd-id and partitions
will cause newpart to see following string for the first partition:

  KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive)

Such a partition list cannot be parsed and thus the device fails to boot.

Avoid this behavior by making sure that the start of the first part-name
("(") will also be the last byte the mtd-id split algorithm is using for
its colon search.

Fixes: 5d01d05608 ("kernel: Update kernel 4.14 to version 4.14.202")
Fixes: edda06c7b4 ("kernel: Update kernel 4.9 to version 4.9.240")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
(backported from commit 223eec7e81)
2020-11-24 10:03:27 +01:00
Hauke Mehrtens 3a8cfabe0c kernel: Update kernel 4.9 to version 4.9.243
Compile and runtime tested on lantiq/xrx200.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-11-11 00:49:38 +01:00
Hauke Mehrtens edda06c7b4 kernel: Update kernel 4.9 to version 4.9.240
Compile and runtime tested on ar71xx/generic.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-18 00:32:15 +02:00
Hauke Mehrtens f402571b49 kernel: Update kernel 4.9 to version 4.9.237
Compile and runtime tested on lantiq/xrx200 + ar71xx/generic.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-09-28 00:37:00 +02:00
Hauke Mehrtens 3ad44fcd12 kernel: Update kernel 4.9 to version 4.9.234
Compile and runtime tested on lantiq/xrx200.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-27 00:19:53 +02:00
Hauke Mehrtens f9ffdf8825 kernel: update kernel 4.9 to version 4.9.232
821-usb-Remove-annoying-warning-about-bogus-URB.patch does not apply any
more and was also deleted in master and nobody complained. ;-)

Compile and runtime tested on lantiq/xrx200.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-08 17:20:43 +02:00
Hauke Mehrtens 0f07496f52 kernel: Update kernel 4.9 to version 4.9.229
Fixes:
- CVE-2020-10757

Run tested: ar71xx
Build tested: ar71xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-05 15:02:47 +02:00
Koen Vandeputte 82c8170cd0 kernel: bump 4.9 to 4.9.219
Refreshed all patches.

Altered patches:
- 0026-NET-multi-phy-support.patch

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

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-04-16 13:24:54 +02:00
Koen Vandeputte c236071859 kernel: bump 4.9 to 4.9.212
Refreshed all patches.

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

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-04 18:12:19 +01:00
Hauke Mehrtens 8c6668f088 kernel: bump 4.9 to 4.9.208
Refreshed all patches.

Compile-tested on: lantiq
Runtime-tested on: lantiq

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-01-05 00:03:22 +01:00
Hauke Mehrtens 83ce31d3d8 kernel: bump 4.9 to 4.9.207
Refreshed all patches.

Compile-tested on: lantiq
Runtime-tested on: none

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-12-26 14:02:32 +01:00
Koen Vandeputte 361b555672 kernel: bump 4.9 to 4.9.206
Refreshed all patches.

Altered patches:
- 400-mtd-add-rootfs-split-support.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-12-10 09:54:20 +01:00
Koen Vandeputte bd3b8480ab kernel: bump 4.9 to 4.9.205
Refreshed all patches.

Altered patches:
- 402-mtd-support-layerscape.patch

Fixes:
- CVE-2019-18660

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-11-29 17:07:58 +01:00
Koen Vandeputte b9e685eed5 kernel: bump 4.9 to 4.9.202
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch
- 817-usb-support-layerscape.patch

New symbols:
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-11-19 15:03:17 +01:00
Koen Vandeputte d513f28351 kernel: bump 4.9 to 4.9.195
Refreshed all patches.

Altered patches:
- 403-mtd_fix_cfi_cmdset_0002_status_check.patch

Compile-tested on: ar71xx
Compile-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-10-08 12:46:02 +02:00
Koen Vandeputte 3699327da3 kernel: bump 4.9 to 4.9.194
Refreshed all patches.

Fixes:
- CVE-2019-14814
- CVE-2019-14815
- CVE-2019-14816
- CVE-2019-14821

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-09-24 12:53:40 +02:00
Koen Vandeputte 745292ba10 kernel: bump 4.9 to 4.9.193
Refreshed all patches.

Fixes:
- CVE-2019-15030

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-09-20 13:17:20 +02:00
Koen Vandeputte e545808e89 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>
2019-09-13 16:04:00 +02:00
Koen Vandeputte 8bc800aa56 kernel: bump 4.9 to 4.9.190
Refreshed all patches.

Fixes:
- CVE-2019-3900

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-08-28 13:10:08 +02:00
Koen Vandeputte e058fb3658 kernel: bump 4.9 to 4.9.189
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-08-14 18:24:41 +02:00
Koen Vandeputte 349714a491 kernel: bump 4.9 to 4.9.188
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-08-09 18:34:08 +02:00
Koen Vandeputte 2807f84b62 kernel: bump 4.9 to 4.9.187
Refreshed all patches.

Altered patches:
- 021-bridge-multicast-to-unicast.patch

Remove upstreamed:
- 001-um-Allow-building-and-running-on-older-hosts.patch
- 003-um-Fix-check-for-_xstate-for-older-hosts.patch

Fixes:
- CVE-2019-10207
- CVE-2019-13648

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-08-06 11:56:18 +02:00
Koen Vandeputte 76d1e8a0c2 kernel: bump 4.9 to 4.9.186
Refreshed all patches.

Fixes:
- CVE-2019-3846

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-07-31 16:54:50 +02:00
Koen Vandeputte 6c1bef833d kernel: bump 4.9 to 4.9.183
Refreshed all patches.

Remove upstreamed:
- 010-revert-staging-vc04_services-prevent-integer-overflow-in-create_pagelist.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-06-24 16:44:13 +02:00
Chen Minqiang 5dbac47426 kernel: re-add bridge allow reception on disabled port
The "bridge allow reception on disabled port" implementation
was broken after these commits:

b765f4be40 ("kernel: bump 4.14 to 4.14.114")
456f486b53 ("kernel: bump 4.9 to 4.9.171")

This leads to issues when for example WDS is used, tied to a bridge:

[ 96.503771] wlan1: send auth to d4:5f:25:eb:09:82 (try 1/3)
[ 96.517956] wlan1: authenticated
[ 96.526209] wlan1: associate with d4:5f:25:eb:09:82 (try 1/3)
[ 97.086156] wlan1: associate with d4:5f:25:eb:09:82 (try 2/3)
[ 97.200919] wlan1: RX AssocResp from d4:5f:25:eb:09:82 (capab=0x11 status=0 aid=1)
[ 97.208706] wlan1: associated
[ 101.312913] wlan1: deauthenticated from d4:5f:25:eb:09:82 (Reason: 2=PREV_AUTH_NOT_VALID)

It seems upstream introduced a new patch, [1]
so we have to reimplement these patches properly:

target/linux/generic/pending-4.9/150-bridge_allow_receiption_on_disabled_port.patch
target/linux/generic/pending-4.14/150-bridge_allow_receiption_on_disabled_port.patch

[1] https://lkml.org/lkml/2019/4/24/1228

Fixes: b765f4be40 ("kernel: bump 4.14 to 4.14.114")
Fixes: 456f486b53 ("kernel: bump 4.9 to 4.9.171")
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
[updated commit message and title]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-06-07 18:24:08 +02:00
Koen Vandeputte e3408d09b0 kernel: bump 4.9 to 4.9.179
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-06-03 12:43:17 +02:00
Hauke Mehrtens e6928e6b29 kernel: Fix arc kernel build
This fixes a patch for the ARC architecture.

This was found by the build bot.

Fixes: 5183df0dbf ("kernel: bump 4.9 to 4.9.161")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-05-17 22:04:21 +02:00
Koen Vandeputte f053a8ce41 kernel: bump 4.9 to 4.9.175
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-05-15 11:28:40 +02:00
Koen Vandeputte 2faceb1a39 kernel: bump 4.9 to 4.9.171
Refreshed all patches.

Altered patches:
- 150-bridge_allow_receiption_on_disabled_port.patch
- 201-extra_optimization.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-05-02 13:00:26 +02:00
Koen Vandeputte a5c62c933b kernel: bump 4.9 to 4.9.170
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-04-23 13:23:22 +02:00
Koen Vandeputte 5183df0dbf kernel: bump 4.9 to 4.9.161
Refreshed all patches.

Altered patches:
- 332-arc-add-OWRTDTB-section.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-03-06 12:51:52 +01:00
Koen Vandeputte 72870cc108 kernel: bump 4.9 to 4.9.155
Refreshed all patches.

Remove upstreamed:
- 100-arm-cns3xxx-fix-writing-to-wrong-PCI-registers-after.patch

Altered patches:
- 721-phy_packets.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-02-13 10:30:04 +01:00
Koen Vandeputte 21762fe9d6 kernel: bump 4.9 to 4.9.154
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-02-01 11:41:39 +01:00
Koen Vandeputte 1f1f421af6 kernel: bump 4.9 to 4.9.153
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-01-31 15:35:22 +01:00
Koen Vandeputte cae263227f kernel: bump 4.9 to 4.9.150
Refreshed all patches.

Remove upstreamed:
- 510-f2fs-fix-sanity_check_raw_super-on-big-endian-machines.patch

Altered patches:
- 024-7-net-reorganize-struct-sock-for-better-data-locality.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-01-15 13:58:36 +01:00
Koen Vandeputte b9dcf2de5f kernel: bump 4.9 to 4.9.148
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2019-01-08 13:13:16 +01:00
Christian Lamparter afcdf099b7 kernel: fix f2fs on big endian machines
The WD MyBook Live SquashFS images didn't work anymore due to
a upstream regression in f2fs commit: 0cfe75c5b01199
("f2fs: enhance sanity_check_raw_super() to avoid potential overflows")
that got backported to 4.14.86 and 4.9.144.

by Martin Blumenstingl:
|Treat "block_count" from struct f2fs_super_block as 64-bit little endian
|value in sanity_check_raw_super() because struct f2fs_super_block
|declares "block_count" as "__le64".
|
|This fixes a bug where the superblock validation fails on big endian
|devices with the following error:
|  F2FS-fs (sda1): Wrong segment_count / block_count (61439 > 0)
|  F2FS-fs (sda1): Can't find valid F2FS filesystem in 1th superblock
|  F2FS-fs (sda1): Wrong segment_count / block_count (61439 > 0)
|  F2FS-fs (sda1): Can't find valid F2FS filesystem in 2th superblock
|As result of this the partition cannot be mounted.
|
|With this patch applied the superblock validation works fine and the
|partition can be mounted again:
|  F2FS-fs (sda1): Mounted with checkpoint version = 7c84
|
|My little endian x86-64 hardware was able to mount the partition without
|this fix.
|To confirm that mounting f2fs filesystems works on big endian machines
|again I tested this on a 32-bit MIPS big endian (lantiq) device.

Hopefully, this will do until Martin's patch moved through upstream
to -stable.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2019-01-01 02:51:43 +01:00
Felix Fietkau 0439280c2f kernel: support gcc-optimized inlining on all architectures
Optimized inlining was disabled by default when gcc 4 was still
relatively new. By now, all gcc versions handle this well and there
seems to be no real reason to keep it x86-only.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(backported from 1e8882585c)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-18 17:22:04 +01:00
Hauke Mehrtens 217219ee1d kernel: Activate VDSO on MIPS again
The cache coloring problem on MIPS CPUs was fixed with kernel 4.9.129 of
the kernel 4.9 branch. Activate VDSO support for MIPS again.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(backported from 91a71804f8)
2018-12-18 11:28:15 +01:00
Mathias Kresin 031d5cf248 kernel: don't auto attach ubi on read error
With a10a204aab ("kernel: make ubi auto-attach check for a tar file
magic") the check for the magic was added without considering a failing
mtd_read(). If the read fails, no check is done and the mount code is
called straight away.

Failing with an error message for such cases seems to me the cleaner way,
as it would allow to spot hidden/workaround issues.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 3716b5e4e6)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-18 09:50:54 +01:00
Mathias Kresin e694526264 kernel: handle bad blocks in ubi auto attach code
The first block(s) of the ubi mtd device might be bad. We need to take
care on our own to skip the bad block(s) and read the next one(s).

Don't treat recoverable read errors as fatal and check for the UBI magic
if the data of a block could be recovered using ECC or similar.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 0ac91d82ed)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-18 09:50:51 +01:00
Mathias Kresin edc2af2be9 kernel: improve ubi auto attach code readability
Move the put_mtd_device() called on multiple error conditions to a goto
label to use it later for more error conditions.

The early return on failed open of the mtd device and mismatching mtd
type allows to get rid of one level of indentation. By jumping to the
cleanup code, a refcount bug is fixed for the wrong flash type condition.

While at it, make clear that we only check for the UBI magic if the read
from flash was successful.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from fdf6760cda)
(rebased patches)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-18 09:50:47 +01:00
Koen Vandeputte 85f42a74d3 kernel: bump 4.9 to 4.9.145
Refreshed all patches.

Fixes CVE:
- CVE-2018-14625

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-14 13:04:54 +01:00
Koen Vandeputte bcd7644007 kernel: bump 4.9 to 4.9.143
Refreshed all patches.

Altered patches:
- 950-0063-Improve-__copy_to_user-and-__copy_from_user-performa.patch
- 950-0149-Update-vfpmodule.c.patch
- 201-extra_optimization.patch

New symbol:
- CONFIG_HARDEN_BRANCH_PREDICTOR

Compile-tested on: ar71xx, ar7, arc770, at91, brcm2708, brcm63xx, ixp4xx, lantiq, layerscape, mpc85xx, orion, rb532, uml
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-12-13 13:28:41 +01:00
Koen Vandeputte 07ef8b70b8 kernel: bump 4.9 to 4.9.138
Refreshed all patches.

Compile-tested: ar71xx, layerscape
Runtime-tested: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-11-22 10:51:27 +01:00
Koen Vandeputte 6f388adef8 kernel: bump 4.9 to 4.9.137
Refreshed all patches.

Removed upstreamed hunks:
- 703-phy-support-layerscape.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-11-14 16:27:43 +01:00
Baptiste Jonglez aa0aa47aa1 kernel: Add support for Winbond w25q128jv SPI NOR flash
Newer batches of several Mikrotik boards contain this yet-unsupported
flash chip, for instance:

- rb941-2nd (hAP lite)
- rb952ui-5ac2nd (hAP ac lite)
- RBM33G

and probably other Mikrotik boards need this patch as well.

The patch was submitted upstream by Robert Marko: https://patchwork.ozlabs.org/patch/934181/

Closes: FS#1715
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Cc: Robert Marko <robimarko@gmail.com>
[Rebased + refreshed on current kernels]
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-11-07 11:41:59 +01:00
Koen Vandeputte dbd067013d kernel: bump 4.9 to 4.9.134
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-10-19 10:00:48 +02:00
Koen Vandeputte 2e946ca366 kernel: bump 4.9 to 4.9.129
Refreshed all patches.

Removed upstreamed:
- 203-MIPS-ath79-fix-restart.patch

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-09-26 15:55:23 +02:00
Koen Vandeputte 5fde931d60 kernel: bump 4.9 to 4.9.124
Refreshed all patches.

Compile-tested on: ar71xx
Runtime-tested on: ar71xx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2018-08-28 23:06:47 +02:00