Compare commits

...

103 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
0e25552dd8 OpenWrt v18.06.9: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-11-17 23:17:09 +01:00
Hauke Mehrtens
8df5312a77 OpenWrt v18.06.9: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-11-17 23:16:57 +01:00
Hauke Mehrtens
7cbbab7246 mac80211: Fix brcmfmac compile on layerscape/armv8_64b
DMI_PRODUCT_SKU is only available with kernel >= 4.18.

Fixes: 2cd234d96b ("mac80211: brcmfmac: backport important fixes from kernel 5.2")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-11-11 21:09:58 +01:00
Adrian Schmutzler
28a85b8c2b layerscape: update kernel patch to fix build
The target heavily modifies caamalg.c, so changes introduced in
kernel commit 7b930def8ef6 ("crypto: caam - limit output IV to CBC
to work around CTR mode DMA issue") have broken build.

This adjusts the upstream changes to match the rest of our local
patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-11-11 18:14:13 +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
9cdc02be88 kernel: Update kernel 4.14 to version 4.14.206
Compile and runtime tested on x86/64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-11-11 00:49:32 +01:00
Hauke Mehrtens
5625f5bc36 uci: Backport security fixes
This packports two security fixes from master.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f9005d4f80)
2020-10-28 00:28:08 +01:00
Adrian Schmutzler
d94c59f7eb oxnas: fix qc_prep return in sata driver after kernel 4.14.200
This fixes a regression after a kernel change in 4.14.200 [1] that
led to build failure on oxnas/ox820:

  drivers/ata/sata_oxnas.c:2238:13: error: initialization of
  'enum ata_completion_errors (*)(struct ata_queued_cmd *)'
  from incompatible pointer type
  'void (*)(struct ata_queued_cmd *)' [-Werror=incompatible-pointer-types]
    .qc_prep = sata_oxnas_qc_prep,
               ^~~~~~~~~~~~~~~~~~
  drivers/ata/sata_oxnas.c:2238:13: note:
  (near initialization for 'sata_oxnas_ops.qc_prep')

Our local driver is changed the same way as prototyped in the
kernel patch, i.e. return type is changed and AC_ERR_OK return
value is added.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=306a1c5b5683c1d37565e575386139a64bdbec6f

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit f6ca57e4f4)
2020-10-19 21:19:10 +02:00
Thibaut VARÈNE
ac56d25361 ar71xx: mikrotik: bypass id check in __rb_get_wlan_data()
The id parameter in __rb_get_wlan_data() was incorrectly used on the
assumption that id "0" would always be tied to ath9k with RLE encoding
and positive id (in fact, only id "1" was valid) would always be tied to
("external") ath10k with LZO encoding.

Newer hardware revisions of supported devices prove this assumption to
be invalid, with ath9k caldata being now wrapped in MAGIC_ERD and LZO
compressed, so disable this check to allow newer hardware to correctly
decode caldata for ath9k.

Note: this patch assumes that ath9k caldata is never stored with the new
"LZOR" encoding scheme found on some ath10k devices.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit 1c6990fe6d)
[keep publishing ath10k caldata in sysfs: it's the way it's done on 18.06]
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
Tested-by: Baptiste Jonglez <git@bitsofnetworks.org> [Mikrotik RB941-2nD r3]
2020-10-18 00:32:44 +02:00
Hauke Mehrtens
5d01d05608 kernel: Update kernel 4.14 to version 4.14.202
Compile and runtime tested on x86/64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-18 00:32:31 +02: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
27677af27c firewall: options: fix parsing of boolean attributes
Boolean attributes were parsed the same way as string attributes,
so a value of { "bool_attr": "true" } would be parsed correctly, but
{ "bool_attr": true } (without quotes) was parsed as false.

Fixes FS#3284

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 7f676b5ed6)
2020-10-16 21:38:02 +02:00
Baptiste Jonglez
6d94a6eca4 scripts: getver.sh: fix version based on stable branch
When building from a local branch based off the "openwrt-18.06" branch,
version computation is wrong, for instance:

    r6907+1154-7e15e21766

The number of local commits (1154 in this case) is wrong because it is
computed against master.  As a result, it wrongly counts *all* commits
since the beginning of the openwrt-18.06 branch as local commits.

The fix is to compare to the openwrt-18.06 branch instead, which gives the
expected result such as:

    r8060+1-1238a22316

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
[shorten commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-07 23:15:10 +02:00
Magnus Kroken
3d771602e9 mbedtls: update to 2.16.8
This release of Mbed TLS provides bug fixes and minor enhancements. This
release includes fixes for security issues and the most notable of them
are described in more detail in the security advisories.

* Local side channel attack on RSA and static Diffie-Hellman
* Local side channel attack on classical CBC decryption in (D)TLS
* When checking X.509 CRLs, a certificate was only considered as revoked
if its revocationDate was in the past according to the local clock if
available.

Full release announcement:
https://github.com/ARMmbed/mbedtls/releases/tag/v2.16.8

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
(cherry picked from commit 66893063ab)
2020-09-28 00:37:50 +02:00
Liangbin Lian
910ac641cc tools/squashfs4: fix bugs of xz compress options
lzma_xz_dump_options never return NULL,
should compare real options with default options

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2020-09-28 00:37:50 +02:00
Liangbin Lian
e6bcfdfdba fstools: backport: fix ntfs uuid
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2020-09-28 00:37:50 +02:00
Liangbin Lian
bf78cd3514 lua: lnum: fix strtoul based number parsing
Lua's LNUM patch currently doesn't parse properly certain numbers as
it's visible from the following simple tests.

On x86_64 host (stock Lua 5.1.5, expected output):

 $ /usr/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  2147483648
  8796093022208
  4294967296

On x86_64 host:

 $ staging_dir/hostpkg/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On x86_64 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On ath79 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  8796093022208
  4294967296

It's caused by two issues fixed in this patch, first issue is caused by
unhadled strtoul overflow and second one is caused by the cast of
unsigned to signed Lua integer when parsing from hex literal.

Run tested on:

 * Zidoo Z9S with RTD1296 CPU (aarch64_cortex-a53)
 * qemu/x86_64
 * qemu/armvirt_64
 * ath79

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
[commit subject/message touches, fixed From to match SOB, fixed another
 unhandled case in luaO_str2i, host Lua, package bump]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 4bb9af48ca)
2020-09-28 00:37:50 +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
1da8cc1bbc kernel: Update kernel 4.14 to version 4.14.199
Compile and runtime tested on x86/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-09-28 00:36:22 +02:00
Hauke Mehrtens
1238a22316 mac80211: Fix potential endless loop
Backport a fix from kernel 5.8.3.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit ca5ee6eba3)
2020-08-31 00:09:27 +02:00
Hauke Mehrtens
8e89e1c337 mac80211: Backport fixes for Kr00k vulnerabilities
This backports some fixes from kernel 5.6 and 4.14.175.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-By: Baptiste Jonglez <git@bitsofnetworks.org>
2020-08-31 00:09:18 +02:00
Magnus Kroken
fec2888ae5 mbedtls: update to 2.16.7
Mbed TLS 2.16.7 is a maintenance release of the Mbed TLS 2.16 branch,
and provides bug fixes and minor enhancements. This release includes
fixes for security issues and the most severe one is described in more
detail in a security advisory:
https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2020-07

* Fix a side channel vulnerability in modular exponentiation that could
reveal an RSA private key used in a secure enclave.
* Fix side channel in mbedtls_ecp_check_pub_priv() and
mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a private
key that didn't include the uncompressed public key), as well as
mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
f_rng argument. An attacker with access to precise enough timing and
memory access information (typically an untrusted operating system
attacking a secure enclave) could fully recover the ECC private key.
* Fix issue in Lucky 13 counter-measure that could make it ineffective when
hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
macros).

Due to Mbed TLS moving from ARMmbed to the Trusted Firmware project, some
changes to the download URLs are required. For the time being, the
ARMmbed/mbedtls Github repository is the canonical source for Mbed TLS.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
[Use https://codeload.github.com and new tar.gz file]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de
(cherry picked from commit 201d6776a0)
2020-08-27 00:20:02 +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
b8336ebab9 kernel: Update kernel 4.14 to version 4.14.195
Compile and runtime tested on x86/64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-27 00:19:34 +02:00
Hauke Mehrtens
0c25ece262 x86: Add CONFIG_EFI_CUSTOM_SSDT_OVERLAYS
The CONFIG_EFI_CUSTOM_SSDT_OVERLAYS option was added in kernel 4.14.188,
set it for the x86/generic target.

This fixes a build problem in the x86/generic target.

Fixes: 35e9edc3df ("kernel: Update kernel 4.14 to version 4.14.193")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-11 22:17:39 +02:00
Christoph Krapp
2628ec9b37 ar71xx: fix ZyXEL NBG6616 wifi switch
The device uses a rf-kill switch instead of a button. Furthermore the
GPIO is active high.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
(cherry picked from commit 0af656e978)
2020-08-11 01:18:04 +02:00
Piotr Stefaniak
95dc2f5257 tools/cmake: fix typo in parallel make patch
The variable in the case argument was mistyped, so the case always
checked against an empty string and never matched.

Fix the variable name. Add a PKG_RELEASE to Makefile so we can bump it.

Fixes: d6de31310c ("cmake: restore parallel build support for bootstrap")

Signed-off-by: Piotr Stefaniak <pstef@freebsd.org>
[add commit message, add PKG_RELEASE, fix commit title, add Fixes:]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit e27fbae63c)
2020-08-11 01:18:04 +02:00
Christoph Krapp
3667693830 uboot-envtools: ar71xx: add ZyXEL NBG6616 uboot env support
This adds support for ZyXEL NBG6616 uboot-env access

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
[add "ar71xx" to commit title]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit eb95ca3b5c)
2020-08-11 01:18:04 +02:00
Christoph Krapp
5af87620af ar71xx: change u-boot-env to read-write for ZyXEL NBG6616
As the ath79 port of this device uses a combined kernel + root
partition the uboot bootcmd variable needs to be changed. As using
cli/luci is more convenient than opening up the case and using a uart
connection, lets unlock the uboot-env partition for write access.

Signed-off-by: Christoph Krapp <achterin@googlemail.com>
(cherry picked from commit 982c1f6e42)
2020-08-11 01:18:04 +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
35e9edc3df kernel: Update kernel 4.14 to version 4.14.193
Compile and runtime tested on x86/64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-08 17:20:37 +02:00
Sungbo Eo
b18e3eae94 ar71xx: enable ethernet LED of Arduino Yun
Commit 05d73a2a73 enabled GPIO on ethernet LED, but proper LED setup was
not added then. This commit fixes it by reverting the change on the LED.

Fixes: 05d73a2a73 ("ar71xx: Arduino Yun board 'WLAN RST' button support")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit a5e404d192)
2020-08-02 18:19:19 +02:00
Sungbo Eo
dd79314de4 ar71xx: fix sysupgrade for Arduino Yun
Commit bb46b635df changed its partition scheme, but sysupgrade image
validation still uses the old format. This commit fixes it so that
force flag is not needed for sysupgrade.

Fixes: bb46b635df ("ar71xx: move Arduino Yun to generic building code")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit 58dc1d0637)
2020-08-02 18:19:12 +02:00
Alexey Dobrovolsky
f4b3c35e03 ramips: add kmod-usb-dwc2 to ZyXEL Keenetic image
ZyXEL Keenetic has a USB port. Thus, DWC2 USB controller driver should
be in the default image for this device.

Fixes: a7cbf59e0e ("ramips: add new device ZyXEL Keenetic as kn")
Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
[fixed whitespace issue]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(backported from commit 0a182fcba6)
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-02 13:49:26 +02:00
Alexey Dobrovolsky
526c1dd7ff ramips: remove patches for USB-dwc2
In FS#2738 we can see that patch first introduced in
e8ebcff ("ramips: add a explicit reset to dwc2")
breaks USB functionality since 18.06. Thus, this patch should be removed.

Removed:
- 0032-USB-dwc2-add-device_reset.patch

Fixes: FS#2738
Fixes: FS#2964

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
(cherry picked from commit ab841b4393)
2020-08-02 13:49:26 +02:00
Yousong Zhou
7bd437cc9f firewall: backport patch for mss clamping in both directions
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2020-07-26 22:34:49 +08:00
Hauke Mehrtens
2ba95d287e ar71xx: Fix mikrotik NAND compile problem
This fixes the following compile error:
drivers/mtd/nand/rb91x_nand.c: In function 'rb91x_nand_remove':
drivers/mtd/nand/rb91x_nand.c:445:16: error: 'rbni' undeclared (first use in this function)
  nand_release(&rbni->chip);

Fixes: 0f07496f52 ("kernel: Update kernel 4.9 to version 4.9.229")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 66e04abbb6)
2020-07-07 23:44:48 +02:00
Hauke Mehrtens
030fe10a41 ar71xx: Fix mikrotik NAND compile problem
There is one closing bracket too much.

Fixes: 0f07496f52 ("kernel: Update kernel 4.9 to version 4.9.229")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 014d3f593a)
2020-07-06 00:14:33 +02:00
Stijn Segers
8ae74cca9a wireguard: bump to 1.0.20200611
This bump fixes breakage introduced by kernel commit 8ab8786f78c3fc930f9abf6d6d85e95567de4e1f,
which is part of the 4.14.181 kernel bump, and backported ip6_dst_lookup_flow to 4.14.
This breaks the older WireGuard version currently in 19.07.

For reference, the compilation error is the one below:

build_dir/target-x86_64_musl/linux-x86_64/wireguard-linux-compat-1.0.20200506/src/compat/compat.h:104:42: error: 'const struct ipv6_stub' has no member named 'ipv6_dst_lookup'; did you mean 'ipv6_dst_lookup_flow'?
 #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + (void *)0 ?: dst

Changelogs below taken from the official release announcements.

== Changes since v1.0.20200506 ==

  This release aligns with the changes I sent to DaveM for 5.7-rc7 and were
  pushed to net.git about 45 minutes ago.

  * qemu: use newer iproute2 for gcc-10
  * qemu: add -fcommon for compiling ping with gcc-10

  These enable the test suite to compile with gcc-10.

  * noise: read preshared key while taking lock

  Matt noticed a benign data race when porting the Linux code to OpenBSD.

  * queueing: preserve flow hash across packet scrubbing
  * noise: separate receive counter from send counter

  WireGuard now works with fq_codel, cake, and other qdiscs that make use of
  skb->hash. This should significantly improve latency spikes related to
  buffer bloat. Here's a before and after graph from some data Toke measured:
  https://data.zx2c4.com/removal-of-buffer-bloat-in-wireguard.png

  * compat: support RHEL 8 as 8.2, drop 8.1 support
  * compat: support CentOS 8 explicitly
  * compat: RHEL7 backported the skb hash renamings

  The usual RHEL churn.

  * compat: backport renamed/missing skb hash members

  The new support for fq_codel and friends meant more backporting work.

  * compat: ip6_dst_lookup_flow was backported to 4.14, 4.9, and 4.4

== Changes since v1.0.20200611 ==

  * qemu: always use cbuild gcc rather than system gcc
  * qemu: remove -Werror in order to build ancient kernels better
  * qemu: patch kernels that rely on ancient make
  * qemu: force 2MB pages for binutils 2.31
  * qemu: use cbuild gcc for avx512 exclusion
  * qemu: add extra fill in idt handler for newer binutils
  * qemu: support fetching kernels for arbitrary URLs
  * qemu: patch in UTS_UBUNTU_RELEASE_ABI for Ubuntu detection
  * qemu: work around broken centos8 kernel
  * qemu: mark per_cpu_load_addr as static for gcc-10

  Our qemu test suite can now handle more kernels and more compilers. Scroll
  down to the bottom of https://www.wireguard.com/build-status/ to see the
  expanded array of kernels we now test against, including some distro kernels.

  * compat: widen breadth of integer constants
  * compat: widen breadth of memzero_explicit backport
  * compat: backport skb_scrub_packet to 3.11
  * compat: widen breadth of prandom_u32_max backport
  * compat: narrow the breadth of iptunnel_xmit backport
  * compat: backport iptunnel_xmit to 3.11

  With the expanded qemu test suite, it was possible to expand our list of
  mainline kernels, so the backport compat layer is now more precise.

  * compat: ubuntu appears to have backported ipv6_dst_lookup_flow
  * compat: bionic-hwe-5.0/disco kernel backported skb_reset_redirect and ipv6 flow

  Ubuntu kernels changed recently, so this ensures we can compile with the
  latest Ubuntu releases.

  * compat: remove stale suse support

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
(cherry picked from commit 1fd1f5e8cff18f97675ce303b05d411136b99fb0)
2020-07-05 15:02:47 +02:00
Baptiste Jonglez
2dcf46b079 libubox: backport additional length-checking fixes
Fixes: FS#3177
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2020-07-05 15:02:47 +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
Hauke Mehrtens
1f8d9f70c2 kernel: Update kernel 4.14 to version 4.14.187
Fixes:
- CVE-2020-10757

Run tested: x86
Build tested: x86

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-05 15:02:47 +02:00
Daniel González Cabanelas
d37f8a60f0 bcm63xx: a226m-fwb: fix linux partition offset
The Pirelli A226M-FWB has a wrong linux partition offset, caused
by a copy-paste error. As of result of this, OpenWrt is currently
broken in this unit.

Fix it.

While at it, also use generic node names and fix the addresses
there as well.

Fixes: a27d59bb42 ("brcm63xx: switch to new partition layout
specification")

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
[also fix/update node names, extend commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit d64d5ed142)
2020-06-15 21:01:44 +02:00
Sven Eckelmann
d6bbfc8b52 ipq40xx: essedma: Disable TCP segmentation offload for IPv6
It was noticed that the the whole MAC can hang when transferring data from
one ar40xx port (WAN ports) to the CPU and from the CPU back to another
ar40xx port (LAN ports). The CPU was doing only NATing in that process.

Usually, the problem first starts with a simple data corruption:

  $ wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.4.0-amd64-netinst.iso -O /dev/null
  ...
  Connecting to saimei.ftp.acc.umu.se (saimei.ftp.acc.umu.se)|2001:6b0:19::138|:443... connected.
  ...
  Read  error at byte 48807936/352321536 (Decryption has failed.). Retrying.

But after a short while, the whole MAC will stop to react. No traffic can
be transported anymore from the CPU port from/to the AR40xx PHY/switch and
the MAC has to be resetted.

The whole problem can be avoided by disabling the TSO for IPv6 for this
ethernet MAC driver.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: John Crispin <john@phrozen.org>
(backported from commit 6785695056,
with updated commit message)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-06-13 17:41:57 +02:00
Christian Lamparter
b98bfd4e9b ca-certificates: update to version 20200601
This patch updates the ca-certificates and ca-bundle package.
This version changed the files directory again, to work/, so
PKG_BUILD_DIR was brought back.

A list of changes from Debian's change-log entry for 20200601 [0]:

  * mozilla/{certdata.txt,nssckbi.h}:
    Update Mozilla certificate authority bundle to version 2.40.
    Closes: #956411, #955038
  * mozilla/blacklist.txt
    Add distrusted Symantec CA list to blacklist for explicit removal.
    Closes: #911289
    Blacklist expired root certificate, "AddTrust External Root"
    Closes: #961907
    The following certificate authorities were added (+):
    + "Certigna Root CA"
    + "emSign ECC Root CA - C3"
    + "emSign ECC Root CA - G3"
    + "emSign Root CA - C1"
    + "emSign Root CA - G1"
    + "Entrust Root Certification Authority - G4"
    + "GTS Root R1"
    + "GTS Root R2"
    + "GTS Root R3"
    + "GTS Root R4"
    + "Hongkong Post Root CA 3"
    + "UCA Extended Validation Root"
    + "UCA Global G2 Root"
    The following certificate authorities were removed (-):
    - "AddTrust External Root"
    - "Certinomis - Root CA"
    - "Certplus Class 2 Primary CA"
    - "Deutsche Telekom Root CA 2"
    - "GeoTrust Global CA"
    - "GeoTrust Primary Certification Authority"
    - "GeoTrust Primary Certification Authority - G2"
    - "GeoTrust Primary Certification Authority - G3"
    - "GeoTrust Universal CA"
    - "thawte Primary Root CA"
    - "thawte Primary Root CA - G2"
    - "thawte Primary Root CA - G3"
    - "VeriSign Class 3 Public Primary Certification Authority - G4"
    - "VeriSign Class 3 Public Primary Certification Authority - G5"
    - "VeriSign Universal Root Certification Authority"

[0] <https://metadata.ftp-master.debian.org/changelogs//main/c/ca-certificates/ca-certificates_20200601_changelog>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit f611b014a7)
2020-06-10 00:31:21 +02:00
Matthias Schiffer
b20a95f181 musl: fix locking synchronization bug
Import proposed upstream fix [2] for the critical locking
synchronization bug recently found in musl [1].

This affects all programs that are temporarily multithreaded, but then
return to single-threaded operation.

[1] https://www.openwall.com/lists/musl/2020/05/22/3
[2] https://www.openwall.com/lists/musl/2020/05/22/10

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit 10c211031c)
2020-05-26 23:50:37 +02:00
Jo-Philipp Wich
ff6c312000 rpcd: update to latest openwrt-18.06 Git HEAD
7be1f17 file: exec: properly free memory on error
313964c file: avoid closing stdio descriptors in rpc_file_exec_run
cd09c5f file: patch process stdin to /dev/null
efbcedb file: remove unused members from struct rpc_file_exec_context
71b00ab file: rpc_file_exec_run: fix potential memory leak and integer overflow
c7bb956 plugin: fix double free in finish callback
16de3fa plugin: do not free method name separately
29c9c11 exec: properly free memory on rpc_exec() error
5cd4f4e plugin: exec: properly free memory on parse error
d80f70e plugin: fix leaking invoked method name for exec plugins
53a0952 session: deny access if password login is disabled
662d034 uci: reset uci_ptr flags when merging options during section add
dd46d6d uci: free configs list memory on return
abbc302 uci: reset uci_ptr flags when merging set operations

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-26 16:26:28 +02:00
Matthias Schiffer
aba01f7350 usign: update to latest git HEAD
f1f65026a941 Always pad fingerprints to 16 characters

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit e35e40ad82)
2020-05-24 17:03:43 +02:00
Hauke Mehrtens
2ed25124f6 usign: update to latest Git HEAD
f34a383 main: fix some resource leaks

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 81e93fff7d)
2020-05-24 17:03:35 +02:00
Hauke Mehrtens
6b1f2e6058 squashfs: Fix compile with GCC 10
Fixes the following build error with GCC 10:
	/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here
And a compile warning.

Fixes: FS#3104, FS#3119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1bbc1aa884)
2020-05-24 14:43:25 +02:00
Kevin Darbyshire-Bryant
7b3ada8c6d build: prereq: tidy gcc version checks
There is a restriction in the number of parameters(10)  that may be passed to
the SetupHostCommand macro so continually adding explicit gcc'n' version
checks ends up breaking the compiler check for the later versions and
oddballs like Darwin as was done in 835d1c68a0 which added gcc10.

Drop all the explicitly specified gcc version checks.  If a suitable gcc
compiler is not found, it may be specified at the dependency checking
stage after which that version will be symlinked into the build staging
host directory.

eg. 'CC=gccfoo CXX=g++foo make prereq'

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Acked-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1fb3c003d6)
2020-05-24 14:43:08 +02:00
Robert Marko
e1d4612e0a build: add GCC 10 version detection
Lets add GCC 10 detection to the build system as distributions like Fedora 32 have started shipping with it.
Some tools like mtd-utils need work to compile under GCC10, but that will be next step.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit 835d1c68a0)
2020-05-24 14:43:07 +02:00
Felix Fietkau
401fe1a599 build: adjust gcc/g++ version checks for newer apple compilers
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 46a129194d)
2020-05-24 14:42:52 +02:00
Adrian Schmutzler
6ee6496d07 ramips: drop non-existant ralink,port-map for Ravpower WD03
The property "ralink,port-map" has been obsolete long before
this device was added, and the device is a one-port anyway.
Just remove it.

Fixes: 5ef79af4f8 ("ramips: add support for Ravpower WD03")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit c00b2df6c8)
2020-05-19 11:36:53 +02:00
Álvaro Fernández Rojas
a7e915975f bcm63xx: mask interrupts on init
Fixes BCM6348/BCM6358 hangs while booting:
https://bugs.openwrt.org/index.php?do=details&task_id=2202

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 13c33f3f12)
2020-05-18 11:06:05 +02:00
Álvaro Fernández Rojas
8e2201ea50 bcm63xx: ext_intc: fix warning
In file included from ./arch/mips/include/asm/io.h:34,
                 from ./arch/mips/include/asm/mmiowb.h:5,
                 from ./include/linux/spinlock.h:60,
                 from ./include/linux/irq.h:14,
                 from drivers/irqchip/irq-bcm6345-ext.c:10:
drivers/irqchip/irq-bcm6345-ext.c: In function 'bcm6345_ext_intc_of_init':
./arch/mips/include/asm/mach-bcm63xx/ioremap.h:48:9: warning: 'base' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return is_bcm63xx_internal_registers((unsigned long)addr);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-bcm6345-ext.c:255:16: note: 'base' was declared here
  void __iomem *base;
                ^~~~

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 29c3bb5f41)
2020-05-18 10:55:06 +02:00
Álvaro Fernández Rojas
183e9843e1 bcm63xx: periph_intc: fix warning
drivers/irqchip/irq-bcm6345-periph.c: In function 'bcm6345_periph_irq_handle':
drivers/irqchip/irq-bcm6345-periph.c:55:21: warning: 'block' may be used uninitialized in this function [-Wmaybe-uninitialized]
  struct intc_block *block;
                     ^~~~~

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f2f2cf07a6)
2020-05-18 10:55:06 +02:00
Álvaro Fernández Rojas
a9eebf69f3 bcm63xx: redboot: fix warning
drivers/mtd/parsers/redboot.c: In function 'parse_redboot_partitions':
drivers/mtd/parsers/redboot.c:194:59: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
     fis_origin = (buf[i].flash_base & (master->size << 1) - 1);
                                       ~~~~~~~~~~~~~~~~~~~~^~~

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f314cbe54b)
2020-05-18 10:55:06 +02:00
Álvaro Fernández Rojas
b9daff610e bcm63xx: bcm6362: fix pinctrl bug
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit ee6bf7e865)
2020-05-18 10:55:06 +02:00
Álvaro Fernández Rojas
488751e1e5 bcm63xx: refresh kernel config
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-05-18 10:55:06 +02:00
Magnus Kroken
b37a1e428a mbedtls: update to 2.16.6
Security fixes for:
* CVE-2020-10932
* a potentially remotely exploitable buffer overread in a DTLS client
* bug in DTLS handling of new associations with the same parameters

Full release announement:
https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.6-and-2.7.15-released

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
(cherry picked from commit 02fcbe2f3d)
2020-05-16 21:25:55 +02:00
Josef Schlehofer
d3af501317 mbedtls: update to version 2.16.5
Changelog:
https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.5-and-2.7.14-released

Security advisory:
https://tls.mbed.org/tech-updates/security-advisories/mbedtls-security-advisory-2020-02

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 36af1967f5)
2020-05-16 21:25:25 +02:00
Robert Marko
15d73a26b6 libjson-c: backport security fixes
This backports upstream fixes for the out of bounds write vulnerability in json-c.
It was reported and patches in this upstream PR: https://github.com/json-c/json-c/pull/592

Addresses CVE-2020-12762

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
[bump PKG_RELEASE, rebase patches on top of json-c 0.12]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit bc0288b768)
2020-05-16 21:18:50 +02:00
Koen Vandeputte
7b49c0b48a kernel: bump 4.14 to 4.14.180
Refreshed all patches.

Fixed:
- CVE-2020-12114
- CVE-2020-11669

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-12 12:45:57 +02:00
Koen Vandeputte
5faccaf025 kernel: bump 4.9 to 4.9.223
Refreshed all patches.

Fixes:
- CVE-2020-12114

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-12 12:45:57 +02:00
Jason A. Donenfeld
2a9c2c0721 wireguard: bump to 1.0.20200506
* compat: timeconst.h is a generated artifact

Before we were trying to check for timeconst.h by looking in the kernel
source directory. This isn't quite correct on configurations in which
the object directory is separate from the kernel source directory, for
example when using O="elsewhere" as a make option when building the
kernel. The correct fix is to use $(CURDIR), which should point to
where we want.

* compat: use bash instead of bc for HZ-->USEC calculation

This should make packaging somewhat easier, as bash is generally already
available (at least for dkms), whereas bc isn't provided by distros by
default in their build meta packages.

* socket: remove errant restriction on looping to self

It's already possible to create two different interfaces and loop
packets between them. This has always been possible with tunnels in the
kernel, and isn't specific to wireguard. Therefore, the networking stack
already needs to deal with that. At the very least, the packet winds up
exceeding the MTU and is discarded at that point. So, since this is
already something that happens, there's no need to forbid the not very
exceptional case of routing a packet back to the same interface; this
loop is no different than others, and we shouldn't special case it, but
rather rely on generic handling of loops in general. This also makes it
easier to do interesting things with wireguard such as onion routing.
At the same time, we add a selftest for this, ensuring that both onion
routing works and infinite routing loops do not crash the kernel. We
also add a test case for wireguard interfaces nesting packets and
sending traffic between each other, as well as the loop in this case
too. We make sure to send some throughput-heavy traffic for this use
case, to stress out any possible recursion issues with the locks around
workqueues.

* send: cond_resched() when processing tx ringbuffers

Users with pathological hardware reported CPU stalls on CONFIG_
PREEMPT_VOLUNTARY=y, because the ringbuffers would stay full, meaning
these workers would never terminate. That turned out not to be okay on
systems without forced preemption. This commit adds a cond_resched() to
the bottom of each loop iteration, so that these workers don't hog the
core. We don't do this on encryption/decryption because the compat
module here uses simd_relax, which already includes a call to schedule
in preempt_enable.

* selftests: initalize ipv6 members to NULL to squelch clang warning

This fixes a worthless warning from clang.

* send/receive: use explicit unlikely branch instead of implicit coalescing

Some code readibility cleanups.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
(cherry picked from commit 4f6343ffe7)
2020-05-07 13:55:37 +02:00
Jason A. Donenfeld
d5118bb511 wireguard: bump to 20191226
As announced on the mailing list, WireGuard will be in Linux 5.6. As a
result, the wg(8) tool, used by OpenWRT in the same manner as ip(8), is
moving to its own wireguard-tools repo. Meanwhile, the out-of-tree
kernel module for kernels 3.10 - 5.5 moved to its own wireguard-linux-
compat repo. Yesterday, releases were cut out of these repos, so this
commit bumps packages to match. Since wg(8) and the compat kernel module
are versioned and released separately, we create a wireguard-tools
Makefile to contain the source for the new tools repo. Later, when
OpenWRT moves permanently to Linux 5.6, we'll drop the original module
package, leaving only the tools. So this commit shuffles the build
definition around a bit but is basically the same idea as before.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
(cherry picked from commit ea980fb9c6)
2020-05-07 13:54:56 +02:00
Kevin Darbyshire-Bryant
1a30fe1621 relayd: bump to version 2020-04-25
f4d759b dhcp.c: further improve validation

Further improve input validation for CVE-2020-11752

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 9e7d11f3e2)
2020-05-04 16:24:35 +01:00
Kevin Darbyshire-Bryant
b65550e0db relayd: bump to version 2020-04-20
796da66 dhcp.c: improve input validation & length checks

Addresses CVE-2020-11752

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit be172e663f)
2020-05-04 16:24:35 +01:00
Kevin Darbyshire-Bryant
77063bb76e umdns: update to version 2020-04-25
cdac046 dns.c: fix input validation fix

Due to a slight foobar typo, failing to de-reference a pointer, previous
fix not quite as complete as it should have been.

Improve CVE-2020-11750 fix

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 9f7c8ed078)
2020-05-04 16:22:39 +01:00
Kevin Darbyshire-Bryant
b076243426 umdns: update to version 2020-04-20
e74a3f9 dns.c: improve input validation

Addresses CVE-2020-11750

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 533da61ac6)
2020-05-04 16:22:39 +01:00
Kevin Darbyshire-Bryant
cffd5aeb69 umdns: update to the version 2020-04-05
ab7a39a umdns: fix unused error
45c4953 dns: explicitly endian-convert all fields in header and question

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 22ae8bd50e)
2020-05-04 16:22:39 +01:00
Kevin Darbyshire-Bryant
7ebc51a57f umdns: suppress address-of-packed-member warning
gcc 8 & 9 appear to be more picky with regards access alignment to
packed structures, leading to this warning in dns.c:

dns.c:261:2: error: converting a packed ‘struct dns_question’ pointer
(alignment 1) to a ‘uint16_t’ {aka ‘short unsigned int’} pointer
(alignment 2) may result in an unaligned pointer value
[-Werror=address-of-packed-member]

261 |  uint16_t *swap = (uint16_t *) q;

Work around what I think is a false positive by turning the warning off.
Not ideal, but not quite as not ideal as build failure.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 02640f0147)
2020-05-04 16:22:39 +01:00
Sungbo Eo
f77708d4a5 ramips: remove unnecessary DEVICE_PACKAGES for Belkin F7C027
kmod-usb-dwc2 and kmod-usb-ledtrig-usbport are not target default packages, and
Belkin F7C027 does not have a USB port anyway. Just drop it.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit 1dedad2a00)
2020-04-27 22:41:06 +02:00
Sungbo Eo
2051edf381 oxnas: move service file to correct place
This service file has been misplaced from the very beginning.

Fixes: dcc34574ef ("oxnas: bring in new oxnas target")
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
(cherry picked from commit 01961f163d)
2020-04-27 22:40:55 +02:00
Koen Vandeputte
1f0679f54d kernel: bump 4.14 to 4.14.176
Refreshed all patches.

Remove upstreamed:
- 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.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>
2020-04-16 13:24:54 +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
489fc23535 kernel: add missing symbol for Kernel 4.14
Reported by Buildbot:

x86 instruction decoder selftest (X86_DECODER_SELFTEST) [N/y/?] (NEW) aborted!

Fixes: 4eba86820f ("kernel: bump 4.14 to 4.14.169")
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
[rebased onto 18.06]
Signed-off-by: David Bauer <mail@david-bauer.net>
2020-04-15 11:17:11 +02:00
Alexey Dobrovolsky
027950fc78 ramips: use full 8MB flash on ZyXEL Keenetic
ZyXEL Keenetic has 8MB flash, but OpenWrt uses only 4MB.
This commit fixes the problem.

WikiDevi page [1] says that ZyXEL Keenetic has FLA1: 8 MiB, there is
an article with specs [2] (in Russian).

[1] https://wikidevi.wi-cat.ru/ZyXEL_Keenetic
[2] https://3dnews.ru/608774/page-2.html

Fixes: FS#2487
Fixes: a7cbf59e0e ("ramips: add new device ZyXEL Keenetic as kn")

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
(cherry picked from commit fea232ae8f)
2020-04-12 13:48:31 +02:00
Adrian Schmutzler
ad01cb514d Revert "ar71xx: use status led for GL.iNet GL-AR750S"
This reverts commit c3c6cc95ee.

The GL.iNet GL-AR750S is not supported in 18.06.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-03-26 22:23:47 +01:00
Jan Alexander
c3c6cc95ee ar71xx: use status led for GL.iNet GL-AR750S
Use power led for device status.

The status led behavior has already been fixed in af28d8a539
("ath79: add support for GL.iNet GL-AR750S") when porting the
device to ath79. This fixes it for ar71xx as well.

Signed-off-by: Jan Alexander <jan@nalx.net>
[minor commit title/message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit d394c354ee)
2020-03-26 20:01:19 +01:00
Adrian Schmutzler
10c04b4ca3 ar71xx: fix port order on TP-Link Archer C60 v1/v2
The labels on the LAN ports of the TP-Link Archer C60 v1/v2 are
actually inverted compared to the ports of the internal switch.

Add this information to 02_network.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 14a07fa1f0)
2020-03-14 14:43:09 +01:00
Adrian Schmutzler
983125007e ar71xx: remove wrong MAC address adjustment for Archer C60 v2
The adjustment of the MAC address for Archer C60 v2 in 10_fix_wifi_mac
is broken since a "mac" partition is not set up for this device on
ar71xx. Instead, the MAC address is already patched correctly in
11-ath10k-caldata.

Remove the useless adjustment.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit cbdc919024)
2020-03-14 14:42:41 +01:00
Adrian Schmutzler
302170d383 ar71xx: fix swapped LAN/WAN MAC address for Archer C60 v1/v2
The MAC addresses for lan/wan are swapped compared to the vendor
firmware. This adjusts to vendor configuration, which is:

lan   *:7b   label
wan   *:7c   label+1
2.4g  *:7b   label
5g    *:7a   label-1

Only one address is stored in <&mac 0x8>, corresponding to the label.

This has been checked on revisions v1, v2 and v3.

Since ar71xx calculates the ath10k MAC address based on the ethernet
addresses, the number there is adjusted, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit 14eb54938b)
2020-03-14 14:41:35 +01:00
Catrinel Catrinescu
3ef8465cb8 ar71xx: ew-dorin, fix the trigger level for WPS button
Because the WPS button had the wrong trigger level,
the failsafe mode was triggered quite often,
after this commit:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=27f3f493de

Signed-off-by: Catrinel Catrinescu <cc@80211.de>
(cherry picked from commit 3e03b7ac4a)
2020-03-11 11:27:12 +01:00
Rafał Miłecki
08ad7a314d kernel: backport out-of-memory fix for non-Ethernet devices
Doing up & down on non-Ethernet devices (e.g. monitor mode interface)
was consuming memory.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ec8e8e2ef0)
2020-03-11 08:56:02 +01:00
Koen Vandeputte
e38f355569 kernel: bump 4.14 to 4.14.172
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-03-09 20:45:11 +01:00
Koen Vandeputte
4c14dbf5db kernel: bump 4.9 to 4.9.215
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-03-09 20:45:11 +01:00
Jo-Philipp Wich
e884357fa9 OpenWrt v18.06.8: revert to branch defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-27 22:32:58 +01:00
Jo-Philipp Wich
c3bd1321de OpenWrt v18.06.8: adjust config defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-27 22:32:54 +01:00
Jo-Philipp Wich
82fbd85747 libubox: backport blobmsg_check_array() fix
Fixes: FS#2833
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 955634b473)
2020-02-27 22:25:59 +01:00
Petr Štetiar
4c1779ac2c ppp: backport security fixes
8d45443bb5c9 pppd: Ignore received EAP messages when not doing EAP
8d7970b8f3db pppd: Fix bounds check in EAP code
858976b1fc31 radius: Prevent buffer overflow in rc_mksid()

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 215598fd03)
Fixes: CVE-2020-8597
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-26 16:42:06 +01:00
Jo-Philipp Wich
cd262f59cb Revert "ppp: backport security fixes"
This reverts commit cc78f934a9 since it
didn't contain a reference to the CVE it addresses. The next commit
will re-add the commit including a CVE reference in its commit message.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-02-26 16:41:48 +01:00
Jo-Philipp Wich
ed3c3048b8 uhttpd: update to latest Git HEAD
2ee323c file: poke ustream after starting deferred program

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 04069fde19)
2020-02-26 16:23:05 +01:00
Koen Vandeputte
fafe99b62d kernel: bump 4.14 to 4.14.171
Refreshed all patches.

Fixes:
- CVE-2013-1798

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-24 14:21:08 +01:00
Koen Vandeputte
bfee12cec6 kernel: bump 4.9 to 4.9.214
Refreshed all patches.

Fixes:
- CVE-2013-1798

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-24 14:21:08 +01:00
Petr Štetiar
cc78f934a9 ppp: backport security fixes
8d45443bb5c9 pppd: Ignore received EAP messages when not doing EAP
8d7970b8f3db pppd: Fix bounds check in EAP code
858976b1fc31 radius: Prevent buffer overflow in rc_mksid()

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 215598fd03)
2020-02-20 09:39:31 +01:00
Jo-Philipp Wich
05062462f1 hostapd: remove erroneous $(space) redefinition
The $(space) definition in the hostapd Makefile ceased to work with
GNU Make 4.3 and later, leading to syntax errors in the generated
Kconfig files.

Drop the superfluous redefinition and reuse the working $(space)
declaration from rules.mk to fix this issue.

Fixes: GH#2713
Ref: https://github.com/openwrt/openwrt/pull/2713#issuecomment-583722469
Reported-by: Karel Kočí <cynerd@email.cz>
Suggested-by: Jonas Gorski <jonas.gorski@gmail.com>
Tested-by: Shaleen Jain <shaleen@jain.sh>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 766e778226)
2020-02-08 11:54:23 +01:00
Koen Vandeputte
6b10354b3c 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>
2020-02-04 18:12:19 +01:00
Koen Vandeputte
4eba86820f kernel: bump 4.14 to 4.14.169
Refreshed all patches.

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

Remove upstreamed:
- 023-0007-crypto-crypto4xx-Fix-wrong-ppc4xx_trng_probe-ppc4xx_.patch

Altered patches:
- 102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch
- 105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch
- 106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch
- 108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch
- 207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch
- 350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch
- 356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch
- 390-MIPS-BCM63XX-do-not-register-SPI-controllers.patch
- 391-MIPS-BCM63XX-do-not-register-uart.patch
- 392-MIPS-BCM63XX-remove-leds-and-buttons.patch
- 416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
- 422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
-

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-02-04 18:12:19 +01: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
Jo-Philipp Wich
6bfde67581 OpenWrt v18.06.7: revert to branch defaults
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-29 17:13:25 +01:00
435 changed files with 2813 additions and 1626 deletions

View File

@@ -1,4 +1,4 @@
src-git packages https://git.openwrt.org/feed/packages.git^925068d4f8366240d2aeb2d69b3df12382320ec3
src-git luci https://git.openwrt.org/project/luci.git^41e2258d6dc1ebe8d3874ae6d6b13db49cff2c5c
src-git routing https://git.openwrt.org/feed/routing.git^0e63ef9276bf41c0d4176127f9f047343b8ffe32
src-git telephony https://git.openwrt.org/feed/telephony.git^8ecbdabc7c5cadbe571eb947f5cd333a5a785010
src-git packages https://git.openwrt.org/feed/packages.git;openwrt-18.06
src-git luci https://git.openwrt.org/project/luci.git;openwrt-18.06
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-18.06
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-18.06

View File

@@ -2,11 +2,11 @@
LINUX_RELEASE?=1
LINUX_VERSION-4.9 = .211
LINUX_VERSION-4.14 = .167
LINUX_VERSION-4.9 = .243
LINUX_VERSION-4.14 = .206
LINUX_KERNEL_HASH-4.9.211 = 2597608d5d974cfdc015eaf6a4197b36f19d722b8a309b57e741fb02e311b1be
LINUX_KERNEL_HASH-4.14.167 = 2bb78fc7a902faf4f5dad47fdbc2f4bf3df3cf9b41f408e7260f36656659fe43
LINUX_KERNEL_HASH-4.9.243 = d3aa189ca7fcc6e52d6c0333a0d7acd8789e9a492b32dbf9476e926ffaa73984
LINUX_KERNEL_HASH-4.14.206 = 1c233efaa5063983293a02d4692acc9ced9c03e18857364855d4f612347086ac
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@@ -28,16 +28,9 @@ $(eval $(call TestHostCommand,proper-umask, \
$(eval $(call SetupHostCommand,gcc, \
Please install the GNU C Compiler (gcc) 4.8 or later, \
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
gcc48 --version | grep gcc, \
gcc49 --version | grep gcc, \
gcc5 --version | grep gcc, \
gcc6 --version | grep gcc, \
gcc7 --version | grep gcc, \
gcc8 --version | grep gcc, \
gcc9 --version | grep gcc, \
gcc --version | grep Apple.LLVM ))
$(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
gcc --version | grep -E 'Apple.(LLVM|clang)' ))
$(eval $(call TestHostCommand,working-gcc, \
\nPlease reinstall the GNU C Compiler (4.8 or later) - \
@@ -47,16 +40,9 @@ $(eval $(call TestHostCommand,working-gcc, \
$(eval $(call SetupHostCommand,g++, \
Please install the GNU C++ Compiler (g++) 4.8 or later, \
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?)', \
g++48 --version | grep g++, \
g++49 --version | grep g++, \
g++5 --version | grep g++, \
g++6 --version | grep g++, \
g++7 --version | grep g++, \
g++8 --version | grep g++, \
g++9 --version | grep g++, \
g++ --version | grep Apple.LLVM ))
$(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
g++ --version | grep -E 'Apple.(LLVM|clang)' ))
$(eval $(call TestHostCommand,working-g++, \
\nPlease reinstall the GNU C++ Compiler (4.8 or later) - \

View File

@@ -26,13 +26,13 @@ PKG_CONFIG_DEPENDS += \
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),18.06.7)
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),18.06-SNAPSHOT)
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r7976-ca47026b7d)
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/18.06.7)
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/releases/18.06-SNAPSHOT)
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)

View File

@@ -183,7 +183,7 @@ if VERSIONOPT
config VERSION_REPO
string
prompt "Release repository"
default "http://downloads.openwrt.org/releases/18.06.7"
default "http://downloads.openwrt.org/releases/18.06-SNAPSHOT"
help
This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following placeholders:
@@ -259,7 +259,7 @@ if VERSIONOPT
config VERSION_CODE_FILENAMES
bool
prompt "Revision code in filenames"
default n
default y
help
Enable this to include the revision identifier or the configured
version code into the firmware image, SDK- and Image Builder archive

View File

@@ -46,6 +46,7 @@ mr600v2|\
mr900|\
mr900v2|\
n5q|\
nbg6616|\
nbg6716|\
om5p|\
om5p-ac|\

View File

@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=2017-11-01
PKG_RELEASE:=10
PKG_RELEASE:=11
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_HASH:=8437ab7886b988c8152e7a4db30b7f41009e49a3b2cb863edd05da1ecd7eb05a

View File

@@ -0,0 +1,22 @@
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/dmi.c
@@ -53,7 +53,9 @@ static const struct dmi_system_id dmi_pl
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+#if LINUX_VERSION_IS_GEQ(4,18,0)
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),
+#endif
/* also match on somewhat unique bios-version */
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
},
@@ -64,7 +66,9 @@ static const struct dmi_system_id dmi_pl
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+#if LINUX_VERSION_IS_GEQ(4,18,0)
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T11"),
+#endif
/* also match on somewhat unique bios-version */
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
},

View File

@@ -0,0 +1,42 @@
From 1ec47ff0525c4a530dc7783cb28044179334a4cc Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Thu, 26 Mar 2020 15:51:35 +0100
Subject: [PATCH] mac80211: mark station unauthorized before key removal
commit b16798f5b907733966fd1a558fca823b3c67e4a1 upstream.
If a station is still marked as authorized, mark it as no longer
so before removing its keys. This allows frames transmitted to it
to be rejected, providing additional protection against leaking
plain text data during the disconnection flow.
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200326155133.ccb4fb0bb356.If48f0f0504efdcf16b8921f48c6d3bb2cb763c99@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/mac80211/sta_info.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -3,6 +3,7 @@
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
* Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2015 - 2017 Intel Deutschland GmbH
+ * Copyright (C) 2018-2020 Intel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -976,6 +977,11 @@ static void __sta_info_destroy_part2(str
might_sleep();
lockdep_assert_held(&local->sta_mtx);
+ while (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
+ ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
+ WARN_ON_ONCE(ret);
+ }
+
/* now keys can no longer be reached */
ieee80211_free_sta_keys(local, sta);

View File

@@ -0,0 +1,54 @@
From 07dc42ff9b9c38eae221b36acda7134ab8670af8 Mon Sep 17 00:00:00 2001
From: Jouni Malinen <jouni@codeaurora.org>
Date: Thu, 26 Mar 2020 15:51:34 +0100
Subject: [PATCH] mac80211: Check port authorization in the
ieee80211_tx_dequeue() case
commit ce2e1ca703071723ca2dd94d492a5ab6d15050da upstream.
mac80211 used to check port authorization in the Data frame enqueue case
when going through start_xmit(). However, that authorization status may
change while the frame is waiting in a queue. Add a similar check in the
dequeue case to avoid sending previously accepted frames after
authorization change. This provides additional protection against
potential leaking of frames after a station has been disconnected and
the keys for it are being removed.
Cc: stable@vger.kernel.org
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Link: https://lore.kernel.org/r/20200326155133.ced84317ea29.I34d4c47cd8cc8a4042b38a76f16a601fbcbfd9b3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/mac80211/tx.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3496,8 +3496,25 @@ begin:
tx.sdata = vif_to_sdata(info->control.vif);
tx.hdrlen = ieee80211_padded_hdrlen(hw, hdr->frame_control);
- if (txq->sta)
+ if (txq->sta) {
tx.sta = container_of(txq->sta, struct sta_info, sta);
+ /*
+ * Drop unicast frames to unauthorised stations unless they are
+ * EAPOL frames from the local station.
+ */
+ if (unlikely(!ieee80211_vif_is_mesh(&tx.sdata->vif) &&
+ tx.sdata->vif.type != NL80211_IFTYPE_OCB &&
+ !is_multicast_ether_addr(hdr->addr1) &&
+ !test_sta_flag(tx.sta, WLAN_STA_AUTHORIZED) &&
+ (!(info->control.flags &
+ IEEE80211_TX_CTRL_PORT_CTRL_PROTO) ||
+ !ether_addr_equal(tx.sdata->vif.addr,
+ hdr->addr2)))) {
+ I802_DEBUG_INC(local->tx_handlers_drop_unauth_port);
+ ieee80211_free_txskb(&local->hw, skb);
+ goto begin;
+ }
+ }
/*
* The key can be removed while the packet was queued, so need to call

View File

@@ -0,0 +1,34 @@
From 8ad73f9e86bdb079043868e3543d302b57068b80 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Sun, 29 Mar 2020 22:50:06 +0200
Subject: [PATCH] mac80211: fix authentication with iwlwifi/mvm
commit be8c827f50a0bcd56361b31ada11dc0a3c2fd240 upstream.
The original patch didn't copy the ieee80211_is_data() condition
because on most drivers the management frames don't go through
this path. However, they do on iwlwifi/mvm, so we do need to keep
the condition here.
Cc: stable@vger.kernel.org
Fixes: ce2e1ca70307 ("mac80211: Check port authorization in the ieee80211_tx_dequeue() case")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Woody Suwalski <terraluna977@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/mac80211/tx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -3502,7 +3502,8 @@ begin:
* Drop unicast frames to unauthorised stations unless they are
* EAPOL frames from the local station.
*/
- if (unlikely(!ieee80211_vif_is_mesh(&tx.sdata->vif) &&
+ if (unlikely(ieee80211_is_data(hdr->frame_control) &&
+ !ieee80211_vif_is_mesh(&tx.sdata->vif) &&
tx.sdata->vif.type != NL80211_IFTYPE_OCB &&
!is_multicast_ether_addr(hdr->addr1) &&
!test_sta_flag(tx.sta, WLAN_STA_AUTHORIZED) &&

View File

@@ -0,0 +1,31 @@
From 5981fe5b0529ba25d95f37d7faa434183ad618c5 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Mon, 3 Aug 2020 11:02:10 +0200
Subject: [PATCH] mac80211: fix misplaced while instead of if
This never was intended to be a 'while' loop, it should've
just been an 'if' instead of 'while'. Fix this.
I noticed this while applying another patch from Ben that
intended to fix a busy loop at this spot.
Cc: stable@vger.kernel.org
Fixes: b16798f5b907 ("mac80211: mark station unauthorized before key removal")
Reported-by: Ben Greear <greearb@candelatech.com>
Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/sta_info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -977,7 +977,7 @@ static void __sta_info_destroy_part2(str
might_sleep();
lockdep_assert_held(&local->sta_mtx);
- while (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
+ if (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
WARN_ON_ONCE(ret);
}

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=json-c
PKG_VERSION:=0.12.1
PKG_RELEASE:=2
PKG_RELEASE:=2.1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/

View File

@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
@@ -43,12 +43,6 @@
@@ -43,12 +43,6 @@ AC_FUNC_MEMCMP
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)

View File

@@ -0,0 +1,32 @@
From 77d935b7ae7871a1940cd827e850e6063044ec45 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Mon, 4 May 2020 19:46:45 +0200
Subject: [PATCH 2/2] Prevent division by zero in linkhash.
If a linkhash with a size of zero is created, then modulo operations
are prone to division by zero operations.
Purely protective measure against bad usage.
---
linkhash.c | 3 +++
1 file changed, 3 insertions(+)
--- a/linkhash.c
+++ b/linkhash.c
@@ -10,6 +10,7 @@
*
*/
+#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -431,6 +432,8 @@ struct lh_table* lh_table_new(int size,
int i;
struct lh_table *t;
+ /* Allocate space for elements to avoid divisions by zero. */
+ assert(size > 0);
t = (struct lh_table*)calloc(1, sizeof(struct lh_table));
if(!t) lh_abort("lh_table_new: calloc failed\n");
t->count = 0;

View File

@@ -0,0 +1,83 @@
From d07b91014986900a3a75f306d302e13e005e9d67 Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Mon, 4 May 2020 19:47:25 +0200
Subject: [PATCH] Fix integer overflows.
The data structures linkhash and printbuf are limited to 2 GB in size
due to a signed integer being used to track their current size.
If too much data is added, then size variable can overflow, which is
an undefined behaviour in C programming language.
Assuming that a signed int overflow just leads to a negative value,
like it happens on many sytems (Linux i686/amd64 with gcc), then
printbuf is vulnerable to an out of boundary write on 64 bit systems.
---
linkhash.c | 7 +++++--
printbuf.c | 19 ++++++++++++++++---
2 files changed, 21 insertions(+), 5 deletions(-)
--- a/linkhash.c
+++ b/linkhash.c
@@ -498,7 +498,12 @@ int lh_table_insert(struct lh_table *t,
unsigned long h, n;
t->inserts++;
- if(t->count >= t->size * LH_LOAD_FACTOR) lh_table_resize(t, t->size * 2);
+ if(t->count >= t->size * LH_LOAD_FACTOR) {
+ /* Avoid signed integer overflow with large tables. */
+ int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2);
+ if (t->size != INT_MAX)
+ lh_table_resize(t, new_size);
+ }
h = t->hash_fn(k);
n = h % t->size;
--- a/printbuf.c
+++ b/printbuf.c
@@ -15,6 +15,7 @@
#include "config.h"
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -63,7 +64,16 @@ static int printbuf_extend(struct printb
if (p->size >= min_size)
return 0;
- new_size = json_max(p->size * 2, min_size + 8);
+ /* Prevent signed integer overflows with large buffers. */
+ if (min_size > INT_MAX - 8)
+ return -1;
+ if (p->size > INT_MAX / 2)
+ new_size = min_size + 8;
+ else {
+ new_size = p->size * 2;
+ if (new_size < min_size + 8)
+ new_size = min_size + 8;
+ }
#ifdef PRINTBUF_DEBUG
MC_DEBUG("printbuf_memappend: realloc "
"bpos=%d min_size=%d old_size=%d new_size=%d\n",
@@ -78,6 +88,9 @@ static int printbuf_extend(struct printb
int printbuf_memappend(struct printbuf *p, const char *buf, int size)
{
+ /* Prevent signed integer overflows with large buffers. */
+ if (size > INT_MAX - p->bpos - 1)
+ return -1;
if (p->size <= p->bpos + size + 1) {
if (printbuf_extend(p, p->bpos + size + 1) < 0)
return -1;
@@ -94,6 +107,9 @@ int printbuf_memset(struct printbuf *pb,
if (offset == -1)
offset = pb->bpos;
+ /* Prevent signed integer overflows with large buffers. */
+ if (len > INT_MAX - offset)
+ return -1;
size_needed = offset + len;
if (pb->size < size_needed)
{

View File

@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libubox
PKG_RELEASE=3
PKG_RELEASE=5
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git

View File

@@ -0,0 +1,33 @@
From 75e300aeec25e032a9778bea34c713969960d1f0 Mon Sep 17 00:00:00 2001
From: Chris Nisbet <nischris@gmail.com>
Date: Wed, 12 Feb 2020 21:00:31 +1300
Subject: [PATCH] blobmsg: fix wrong payload len passed from
blobmsg_check_array
Fix incorrect use of blobmsg_len() on passed blobmsg to
blobmsg_check_array_len() introduced in commit 379cd33d1992
("fix wrong payload len passed from blobmsg_check_array") by using correct
blob_len().
By using blobmsg_len() a value too small was passed to blobmsg_check_array()
which could lead to this function returning an error when there is none.
Fixes: 379cd33d1992 ("fix wrong payload len passed from blobmsg_check_array")
Signed-off-by: Chris Nisbet <nischris@gmail.com>
[add fixes tag, rewrap commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
---
blobmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -120,7 +120,7 @@ bool blobmsg_check_attr_len(const struct
int blobmsg_check_array(const struct blob_attr *attr, int type)
{
- return blobmsg_check_array_len(attr, type, blobmsg_len(attr));
+ return blobmsg_check_array_len(attr, type, blob_len(attr));
}
int blobmsg_check_array_len(const struct blob_attr *attr, int type, size_t len)

View File

@@ -0,0 +1,73 @@
From 5e75160f48785464f9213c6bc8c72b9372c5318b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sat, 23 May 2020 13:18:51 +0200
Subject: [PATCH] blobmsg: fix attrs iteration in the blobmsg_check_array_len()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Starting with 75e300aeec25 ("blobmsg: fix wrong payload len passed from
blobmsg_check_array") blobmsg_check_array_len() gets *blob* length
passed as argument. It cannot be used with __blobmsg_for_each_attr()
which expects *data* length.
Use blobmsg_for_each_attr() which calculates *data* length on its own.
The same bug was already reported in the past and there was fix attempt
in the commit cd75136b1342 ("blobmsg: fix wrong payload len passed from
blobmsg_check_array"). That change made blobmsg_check_attr_len() calls
fail however.
This is hopefully the correct & complete fix:
1. blobmsg_check_array_len() gets *blob* length
2. It calls blobmsg_check_attr_len() which requires *blob* length
3. It uses blobmsg_for_each_attr() which gets *data* length
This fixes iterating over random memory treated as attrs. That was
resulting in check failing randomly for totally correct blobs. It's
critical e.g. for procd project with its instance_fill_array() failing
and procd not starting services.
Fixes: 75e300aeec25 ("blobmsg: fix wrong payload len passed from blobmsg_check_array")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
blobmsg.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -123,16 +123,18 @@ int blobmsg_check_array(const struct blo
return blobmsg_check_array_len(attr, type, blob_len(attr));
}
-int blobmsg_check_array_len(const struct blob_attr *attr, int type, size_t len)
+int blobmsg_check_array_len(const struct blob_attr *attr, int type,
+ size_t blob_len)
{
struct blob_attr *cur;
+ size_t rem;
bool name;
int size = 0;
if (type > BLOBMSG_TYPE_LAST)
return -1;
- if (!blobmsg_check_attr_len(attr, false, len))
+ if (!blobmsg_check_attr_len(attr, false, blob_len))
return -1;
switch (blobmsg_type(attr)) {
@@ -146,11 +148,11 @@ int blobmsg_check_array_len(const struct
return -1;
}
- __blobmsg_for_each_attr(cur, attr, len) {
+ blobmsg_for_each_attr(cur, attr, rem) {
if (type != BLOBMSG_TYPE_UNSPEC && blobmsg_type(cur) != type)
return -1;
- if (!blobmsg_check_attr_len(cur, name, len))
+ if (!blobmsg_check_attr_len(cur, name, rem))
return -1;
size++;

View File

@@ -0,0 +1,26 @@
From c2fc622b771f679e8f55060ac60cfe02b9a80995 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 25 May 2020 13:44:20 +0200
Subject: [PATCH] blobmsg: fix length in blobmsg_check_array
blobmsg_check_array_len expects the length of the full attribute buffer,
not just the data length.
Due to other missing length checks (fixed in the next commit), this did
not show up as a test failure
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
blobmsg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -120,7 +120,7 @@ bool blobmsg_check_attr_len(const struct
int blobmsg_check_array(const struct blob_attr *attr, int type)
{
- return blobmsg_check_array_len(attr, type, blob_len(attr));
+ return blobmsg_check_array_len(attr, type, blob_raw_len(attr));
}
int blobmsg_check_array_len(const struct blob_attr *attr, int type,

View File

@@ -0,0 +1,47 @@
From 639c29d19717616b809d9a1e9042461ab8024370 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 25 May 2020 14:49:35 +0200
Subject: [PATCH] blobmsg: simplify and fix name length checks in
blobmsg_check_name
blobmsg_hdr_valid_namelen was omitted when name==false
The blob_len vs blobmsg_namelen changes were not taking into account
potential padding between name and data
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
blobmsg.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -54,8 +54,8 @@ static bool blobmsg_hdr_valid_namelen(co
static bool blobmsg_check_name(const struct blob_attr *attr, size_t len, bool name)
{
- char *limit = (char *) attr + len;
const struct blobmsg_hdr *hdr;
+ uint16_t namelen;
hdr = blobmsg_hdr_from_blob(attr, len);
if (!hdr)
@@ -64,16 +64,11 @@ static bool blobmsg_check_name(const str
if (name && !hdr->namelen)
return false;
- if (name && !blobmsg_hdr_valid_namelen(hdr, len))
+ namelen = blobmsg_namelen(hdr);
+ if (blob_len(attr) < (size_t)blobmsg_hdrlen(namelen))
return false;
- if ((char *) hdr->name + blobmsg_namelen(hdr) + 1 > limit)
- return false;
-
- if (blobmsg_namelen(hdr) > (blob_len(attr) - sizeof(struct blobmsg_hdr)))
- return false;
-
- if (hdr->name[blobmsg_namelen(hdr)] != 0)
+ if (hdr->name[namelen] != 0)
return false;
return true;

View File

@@ -0,0 +1,137 @@
From 66195aee50424cbda0c2d858014e4cc58a2dc029 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@nbd.name>
Date: Mon, 25 May 2020 12:40:04 +0200
Subject: [PATCH] blobmsg: fix missing length checks
blobmsg_check_attr_len was calling blobmsg_check_data for some, but not all
attribute types. These checks was missing for arrays and tables.
Additionally, the length check in blobmsg_check_data was a bit off, since
it was comparing the blobmsg data length against the raw blob attr length.
Fix this by checking the raw blob length against the buffer length in
blobmsg_hdr_from_blob
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
blobmsg.c | 66 +++++++++++++++++--------------------------------------
1 file changed, 20 insertions(+), 46 deletions(-)
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -36,31 +36,18 @@ bool blobmsg_check_attr(const struct blo
return blobmsg_check_attr_len(attr, name, blob_raw_len(attr));
}
-static const struct blobmsg_hdr* blobmsg_hdr_from_blob(const struct blob_attr *attr, size_t len)
-{
- if (len < sizeof(struct blob_attr) + sizeof(struct blobmsg_hdr))
- return NULL;
-
- return blob_data(attr);
-}
-
-static bool blobmsg_hdr_valid_namelen(const struct blobmsg_hdr *hdr, size_t len)
-{
- if (len < sizeof(struct blob_attr) + sizeof(struct blobmsg_hdr) + blobmsg_namelen(hdr) + 1)
- return false;
-
- return true;
-}
-
-static bool blobmsg_check_name(const struct blob_attr *attr, size_t len, bool name)
+static bool blobmsg_check_name(const struct blob_attr *attr, bool name)
{
const struct blobmsg_hdr *hdr;
uint16_t namelen;
- hdr = blobmsg_hdr_from_blob(attr, len);
- if (!hdr)
+ if (!blob_is_extended(attr))
+ return !name;
+
+ if (blob_len(attr) < sizeof(struct blobmsg_hdr))
return false;
+ hdr = (const struct blobmsg_hdr *)blob_data(attr);
if (name && !hdr->namelen)
return false;
@@ -74,29 +61,20 @@ static bool blobmsg_check_name(const str
return true;
}
-static const char* blobmsg_check_data(const struct blob_attr *attr, size_t len, size_t *data_len)
-{
- char *limit = (char *) attr + len;
- const char *data;
-
- *data_len = blobmsg_data_len(attr);
- if (*data_len > blob_raw_len(attr))
- return NULL;
-
- data = blobmsg_data(attr);
- if (data + *data_len > limit)
- return NULL;
-
- return data;
-}
-
bool blobmsg_check_attr_len(const struct blob_attr *attr, bool name, size_t len)
{
const char *data;
size_t data_len;
int id;
- if (!blobmsg_check_name(attr, len, name))
+ if (len < sizeof(struct blob_attr))
+ return false;
+
+ data_len = blob_raw_len(attr);
+ if (data_len < sizeof(struct blob_attr) || data_len > len)
+ return false;
+
+ if (!blobmsg_check_name(attr, name))
return false;
id = blob_id(attr);
@@ -106,9 +84,8 @@ bool blobmsg_check_attr_len(const struct
if (!blob_type[id])
return true;
- data = blobmsg_check_data(attr, len, &data_len);
- if (!data)
- return false;
+ data = blobmsg_data(attr);
+ data_len = blobmsg_data_len(attr);
return blob_check_type(data, data_len, blob_type[id]);
}
@@ -212,13 +189,13 @@ int blobmsg_parse(const struct blobmsg_p
}
__blob_for_each_attr(attr, data, len) {
- hdr = blobmsg_hdr_from_blob(attr, len);
- if (!hdr)
+ if (!blobmsg_check_attr_len(attr, false, len))
return -1;
- if (!blobmsg_hdr_valid_namelen(hdr, len))
- return -1;
+ if (!blob_is_extended(attr))
+ continue;
+ hdr = blob_data(attr);
for (i = 0; i < policy_len; i++) {
if (!policy[i].name)
continue;
@@ -230,9 +207,6 @@ int blobmsg_parse(const struct blobmsg_p
if (blobmsg_namelen(hdr) != pslen[i])
continue;
- if (!blobmsg_check_attr_len(attr, true, len))
- return -1;
-
if (tb[i])
continue;

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mbedtls
PKG_VERSION:=2.16.4
PKG_VERSION:=2.16.8
PKG_RELEASE:=1
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
PKG_SOURCE_URL:=https://tls.mbed.org/download/
PKG_HASH:=5fdb9c43ab43fd9bcc3631508170b089ede7b86dd655253a93cb0ffeb42309f3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=fe9e3b15c3375943bdfebbbb20dd6b4f1147b3b5d926248bd835d73247407430
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPL-2.0+

View File

@@ -1,6 +1,6 @@
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -633,14 +633,14 @@
@@ -692,14 +692,14 @@
*
* Enable Output Feedback mode (OFB) for symmetric ciphers.
*/
@@ -17,7 +17,7 @@
/**
* \def MBEDTLS_CIPHER_NULL_CIPHER
@@ -757,19 +757,19 @@
@@ -816,19 +816,19 @@
*
* Comment macros to disable the curve and functions for it
*/
@@ -46,7 +46,7 @@
/**
* \def MBEDTLS_ECP_NIST_OPTIM
@@ -818,7 +818,7 @@
@@ -899,7 +899,7 @@
*
* Comment this macro to disable deterministic ECDSA.
*/
@@ -55,7 +55,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
@@ -871,7 +871,7 @@
@@ -952,7 +952,7 @@
* See dhm.h for more details.
*
*/
@@ -64,7 +64,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
@@ -891,7 +891,7 @@
@@ -972,7 +972,7 @@
* MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
*/
@@ -73,7 +73,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
@@ -916,7 +916,7 @@
@@ -997,7 +997,7 @@
* MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
* MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
*/
@@ -82,7 +82,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
@@ -1050,7 +1050,7 @@
@@ -1131,7 +1131,7 @@
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
*/
@@ -91,7 +91,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
@@ -1074,7 +1074,7 @@
@@ -1155,7 +1155,7 @@
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
*/
@@ -100,7 +100,7 @@
/**
* \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
@@ -1178,7 +1178,7 @@
@@ -1259,7 +1259,7 @@
* This option is only useful if both MBEDTLS_SHA256_C and
* MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
*/
@@ -109,7 +109,7 @@
/**
* \def MBEDTLS_ENTROPY_NV_SEED
@@ -1273,14 +1273,14 @@
@@ -1354,14 +1354,14 @@
* Uncomment this macro to disable the use of CRT in RSA.
*
*/
@@ -126,7 +126,7 @@
/**
* \def MBEDTLS_SHA256_SMALLER
@@ -1296,7 +1296,7 @@
@@ -1377,7 +1377,7 @@
*
* Uncomment to enable the smaller implementation of SHA256.
*/
@@ -135,7 +135,7 @@
/**
* \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
@@ -1434,7 +1434,7 @@
@@ -1515,7 +1515,7 @@
* configuration of this extension).
*
*/
@@ -144,7 +144,7 @@
/**
* \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
@@ -1609,7 +1609,7 @@
@@ -1690,7 +1690,7 @@
*
* Comment this macro to disable support for SSL session tickets
*/
@@ -153,7 +153,7 @@
/**
* \def MBEDTLS_SSL_EXPORT_KEYS
@@ -1639,7 +1639,7 @@
@@ -1720,7 +1720,7 @@
*
* Comment this macro to disable support for truncated HMAC in SSL
*/
@@ -162,7 +162,7 @@
/**
* \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
@@ -1698,7 +1698,7 @@
@@ -1779,7 +1779,7 @@
*
* Comment this to disable run-time checking and save ROM space
*/
@@ -171,7 +171,7 @@
/**
* \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
@@ -2028,7 +2028,7 @@
@@ -2109,7 +2109,7 @@
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
* MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
*/
@@ -180,7 +180,7 @@
/**
* \def MBEDTLS_ARIA_C
@@ -2094,7 +2094,7 @@
@@ -2175,7 +2175,7 @@
* This module enables the AES-CCM ciphersuites, if other requisites are
* enabled as well.
*/
@@ -189,7 +189,7 @@
/**
* \def MBEDTLS_CERTS_C
@@ -2106,7 +2106,7 @@
@@ -2187,7 +2187,7 @@
*
* This module is used for testing (ssl_client/server).
*/
@@ -198,7 +198,7 @@
/**
* \def MBEDTLS_CHACHA20_C
@@ -2115,7 +2115,7 @@
@@ -2196,7 +2196,7 @@
*
* Module: library/chacha20.c
*/
@@ -207,7 +207,7 @@
/**
* \def MBEDTLS_CHACHAPOLY_C
@@ -2126,7 +2126,7 @@
@@ -2207,7 +2207,7 @@
*
* This module requires: MBEDTLS_CHACHA20_C, MBEDTLS_POLY1305_C
*/
@@ -216,7 +216,7 @@
/**
* \def MBEDTLS_CIPHER_C
@@ -2185,7 +2185,7 @@
@@ -2266,7 +2266,7 @@
*
* This module provides debugging functions.
*/
@@ -225,7 +225,7 @@
/**
* \def MBEDTLS_DES_C
@@ -2214,7 +2214,7 @@
@@ -2295,7 +2295,7 @@
* \warning DES is considered a weak cipher and its use constitutes a
* security risk. We recommend considering stronger ciphers instead.
*/
@@ -234,7 +234,7 @@
/**
* \def MBEDTLS_DHM_C
@@ -2377,7 +2377,7 @@
@@ -2458,7 +2458,7 @@
* This module adds support for the Hashed Message Authentication Code
* (HMAC)-based key derivation function (HKDF).
*/
@@ -243,7 +243,7 @@
/**
* \def MBEDTLS_HMAC_DRBG_C
@@ -2391,7 +2391,7 @@
@@ -2472,7 +2472,7 @@
*
* Uncomment to enable the HMAC_DRBG random number geerator.
*/
@@ -252,7 +252,7 @@
/**
* \def MBEDTLS_NIST_KW_C
@@ -2687,7 +2687,7 @@
@@ -2768,7 +2768,7 @@
*
* This module enables abstraction of common (libc) functions.
*/
@@ -261,7 +261,7 @@
/**
* \def MBEDTLS_POLY1305_C
@@ -2697,7 +2697,7 @@
@@ -2778,7 +2778,7 @@
* Module: library/poly1305.c
* Caller: library/chachapoly.c
*/
@@ -270,7 +270,7 @@
/**
* \def MBEDTLS_RIPEMD160_C
@@ -2708,7 +2708,7 @@
@@ -2789,7 +2789,7 @@
* Caller: library/md.c
*
*/
@@ -279,7 +279,7 @@
/**
* \def MBEDTLS_RSA_C
@@ -2815,7 +2815,7 @@
@@ -2896,7 +2896,7 @@
*
* Requires: MBEDTLS_CIPHER_C
*/
@@ -288,7 +288,7 @@
/**
* \def MBEDTLS_SSL_CLI_C
@@ -2915,7 +2915,7 @@
@@ -2996,7 +2996,7 @@
*
* This module provides run-time version information.
*/
@@ -297,7 +297,7 @@
/**
* \def MBEDTLS_X509_USE_C
@@ -3025,7 +3025,7 @@
@@ -3106,7 +3106,7 @@
* Module: library/xtea.c
* Caller:
*/

View File

@@ -4,8 +4,8 @@
if(USE_SHARED_MBEDTLS_LIBRARY)
add_library(mbedcrypto SHARED ${src_crypto})
- set_target_properties(mbedcrypto PROPERTIES VERSION 2.16.3 SOVERSION 3)
+ set_target_properties(mbedcrypto PROPERTIES VERSION 2.12.0 SOVERSION 1)
- set_target_properties(mbedcrypto PROPERTIES VERSION 2.16.8 SOVERSION 3)
+ set_target_properties(mbedcrypto PROPERTIES VERSION 2.16.8 SOVERSION 1)
target_link_libraries(mbedcrypto ${libs})
add_library(mbedx509 SHARED ${src_x509})
@@ -13,8 +13,8 @@
target_link_libraries(mbedx509 ${libs} mbedcrypto)
add_library(mbedtls SHARED ${src_tls})
- set_target_properties(mbedtls PROPERTIES VERSION 2.16.3 SOVERSION 12)
+ set_target_properties(mbedtls PROPERTIES VERSION 2.12.0 SOVERSION 10)
- set_target_properties(mbedtls PROPERTIES VERSION 2.16.8 SOVERSION 12)
+ set_target_properties(mbedtls PROPERTIES VERSION 2.16.8 SOVERSION 10)
target_link_libraries(mbedtls ${libs} mbedx509)
install(TARGETS mbedtls mbedx509 mbedcrypto

View File

@@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=firewall
PKG_RELEASE:=1
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git

View File

@@ -0,0 +1,33 @@
From c9f48cb3bd0e14fec8ad71c3baef7c280a390b4f Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Fri, 24 Jul 2020 12:52:59 +0800
Subject: [PATCH] zones: apply tcp mss clamping also on ingress path
Fixes FS#3231
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Acked-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e9b90dfac2225927c035f6a76277b850c282dc9a)
---
zones.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/zones.c b/zones.c
index 505ab20..4656f88 100644
--- a/zones.c
+++ b/zones.c
@@ -553,6 +553,14 @@ print_interface_rule(struct fw3_ipt_handle *handle, struct fw3_state *state,
fw3_ipt_rule_target(r, "TCPMSS");
fw3_ipt_rule_addarg(r, false, "--clamp-mss-to-pmtu", NULL);
fw3_ipt_rule_replace(r, "FORWARD");
+
+ r = fw3_ipt_rule_create(handle, &tcp, dev, NULL, sub, NULL);
+ fw3_ipt_rule_addarg(r, false, "--tcp-flags", "SYN,RST");
+ fw3_ipt_rule_addarg(r, false, "SYN", NULL);
+ fw3_ipt_rule_comment(r, "Zone %s MTU fixing", zone->name);
+ fw3_ipt_rule_target(r, "TCPMSS");
+ fw3_ipt_rule_addarg(r, false, "--clamp-mss-to-pmtu", NULL);
+ fw3_ipt_rule_replace(r, "FORWARD");
}
}
else if (handle->table == FW3_TABLE_RAW)

View File

@@ -0,0 +1,38 @@
From 78d52a28c66ad0fd2af250038fdcf4239ad37bf2 Mon Sep 17 00:00:00 2001
From: Remi NGUYEN VAN <remi.nguyenvan+openwrt@gmail.com>
Date: Sat, 15 Aug 2020 13:50:27 +0900
Subject: [PATCH] options: fix parsing of boolean attributes
Boolean attributes were parsed the same way as string attributes,
so a value of { "bool_attr": "true" } would be parsed correctly, but
{ "bool_attr": true } (without quotes) was parsed as false.
Fixes FS#3284
Signed-off-by: Remi NGUYEN VAN <remi.nguyenvan+openwrt@gmail.com>
---
options.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/options.c
+++ b/options.c
@@ -1170,6 +1170,9 @@ fw3_parse_blob_options(void *s, const st
if (blobmsg_type(e) == BLOBMSG_TYPE_INT32) {
snprintf(buf, sizeof(buf), "%d", blobmsg_get_u32(e));
v = buf;
+ } else if (blobmsg_type(o) == BLOBMSG_TYPE_BOOL) {
+ snprintf(buf, sizeof(buf), "%d", blobmsg_get_bool(o));
+ v = buf;
} else {
v = blobmsg_get_string(e);
}
@@ -1189,6 +1192,9 @@ fw3_parse_blob_options(void *s, const st
if (blobmsg_type(o) == BLOBMSG_TYPE_INT32) {
snprintf(buf, sizeof(buf), "%d", blobmsg_get_u32(o));
v = buf;
+ } else if (blobmsg_type(o) == BLOBMSG_TYPE_BOOL) {
+ snprintf(buf, sizeof(buf), "%d", blobmsg_get_bool(o));
+ v = buf;
} else {
v = blobmsg_get_string(o);
}

View File

@@ -88,9 +88,6 @@ DRIVER_MAKEOPTS= \
CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \
CONFIG_DRIVER_WEXT=$(CONFIG_DRIVER_WEXT_SUPPORT) \
space :=
space +=
ifeq ($(LOCAL_VARIANT),full)
DRIVER_MAKEOPTS += CONFIG_IEEE80211W=$(CONFIG_DRIVER_11W_SUPPORT)
endif

View File

@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ppp
PKG_VERSION:=2.4.7
PKG_RELEASE:=12
PKG_RELEASE:=13
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/

View File

@@ -0,0 +1,30 @@
From 858976b1fc3107f1261aae337831959b511b83c2 Mon Sep 17 00:00:00 2001
From: Paul Mackerras <paulus@ozlabs.org>
Date: Sat, 4 Jan 2020 12:01:32 +1100
Subject: [PATCH] radius: Prevent buffer overflow in rc_mksid()
On some systems getpid() can return a value greater than 65535.
Increase the size of buf[] to allow for this, and use slprintf()
to make sure we never overflow it.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
pppd/plugins/radius/util.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pppd/plugins/radius/util.c b/pppd/plugins/radius/util.c
index 6f976a712951..740131e8377c 100644
--- a/pppd/plugins/radius/util.c
+++ b/pppd/plugins/radius/util.c
@@ -73,9 +73,9 @@ void rc_mdelay(int msecs)
char *
rc_mksid (void)
{
- static char buf[15];
+ static char buf[32];
static unsigned short int cnt = 0;
- sprintf (buf, "%08lX%04X%02hX",
+ slprintf(buf, sizeof(buf), "%08lX%04X%02hX",
(unsigned long int) time (NULL),
(unsigned int) getpid (),
cnt & 0xFF);

View File

@@ -0,0 +1,37 @@
From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
From: Paul Mackerras <paulus@ozlabs.org>
Date: Mon, 3 Feb 2020 15:53:28 +1100
Subject: [PATCH] pppd: Fix bounds check in EAP code
Given that we have just checked vallen < len, it can never be the case
that vallen >= len + sizeof(rhostname). This fixes the check so we
actually avoid overflowing the rhostname array.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
pppd/eap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pppd/eap.c b/pppd/eap.c
index 94407f56a336..1b93db01aebd 100644
--- a/pppd/eap.c
+++ b/pppd/eap.c
@@ -1420,7 +1420,7 @@ int len;
}
/* Not so likely to happen. */
- if (vallen >= len + sizeof (rhostname)) {
+ if (len - vallen >= sizeof (rhostname)) {
dbglog("EAP: trimming really long peer name down");
BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
rhostname[sizeof (rhostname) - 1] = '\0';
@@ -1846,7 +1846,7 @@ int len;
}
/* Not so likely to happen. */
- if (vallen >= len + sizeof (rhostname)) {
+ if (len - vallen >= sizeof (rhostname)) {
dbglog("EAP: trimming really long peer name down");
BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
rhostname[sizeof (rhostname) - 1] = '\0';

View File

@@ -0,0 +1,61 @@
From 8d45443bb5c9372b4c6a362ba2f443d41c5636af Mon Sep 17 00:00:00 2001
From: Paul Mackerras <paulus@ozlabs.org>
Date: Mon, 3 Feb 2020 16:31:42 +1100
Subject: [PATCH] pppd: Ignore received EAP messages when not doing EAP
This adds some basic checks to the subroutines of eap_input to check
that we have requested or agreed to doing EAP authentication before
doing any processing on the received packet. The motivation is to
make it harder for a malicious peer to disrupt the operation of pppd
by sending unsolicited EAP packets. Note that eap_success() already
has a check that the EAP client state is reasonable, and does nothing
(apart from possibly printing a debug message) if not.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
---
pppd/eap.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/pppd/eap.c b/pppd/eap.c
index 1b93db01aebd..082e95343120 100644
--- a/pppd/eap.c
+++ b/pppd/eap.c
@@ -1328,6 +1328,12 @@ int len;
int fd;
#endif /* USE_SRP */
+ /*
+ * Ignore requests if we're not open
+ */
+ if (esp->es_client.ea_state <= eapClosed)
+ return;
+
/*
* Note: we update es_client.ea_id *only if* a Response
* message is being generated. Otherwise, we leave it the
@@ -1736,6 +1742,12 @@ int len;
u_char dig[SHA_DIGESTSIZE];
#endif /* USE_SRP */
+ /*
+ * Ignore responses if we're not open
+ */
+ if (esp->es_server.ea_state <= eapClosed)
+ return;
+
if (esp->es_server.ea_id != id) {
dbglog("EAP: discarding Response %d; expected ID %d", id,
esp->es_server.ea_id);
@@ -2047,6 +2059,12 @@ u_char *inp;
int id;
int len;
{
+ /*
+ * Ignore failure messages if we're not open
+ */
+ if (esp->es_client.ea_state <= eapClosed)
+ return;
+
if (!eap_client_active(esp)) {
dbglog("EAP unexpected failure message in state %s (%d)",
eap_state_name(esp->es_client.ea_state),

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=relayd
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_SOURCE_URL=$(PROJECT_GIT)/project/relayd.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2016-02-07
PKG_SOURCE_VERSION:=ad0b25ad74345d367c62311e14b279f5ccb8ef13
PKG_MIRROR_HASH:=8818e9da8cc056961f21f1569e06e63b840965d1453dfcef70a8d84ea76f84d7
PKG_SOURCE_DATE:=2020-04-25
PKG_SOURCE_VERSION:=f4d759be54ceb37714e9a6ca320d5b50c95e9ce9
PKG_MIRROR_HASH:=b1ff6e99072867be0975ba0be52ba9da3a876c8b8da893d68301e8238243a51e
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0

View File

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
PKG_SOURCE_DATE:=2019-12-22
PKG_SOURCE_VERSION:=5f9ae5738372aaa3a6be2f0a278933563d3f191a
PKG_MIRROR_HASH:=16977c2d7e68f6db3241f874df625af9bd3bafa06fe4499ecb3561c825321e5d
PKG_SOURCE_DATE:=2020-02-12
PKG_SOURCE_VERSION:=2ee323c01079248baa9465969df9e25b5fb68cdf
PKG_MIRROR_HASH:=ebec09286cf5f977cac893931a5a4f27ba891db88d5e44a9b0de9446ae431527
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=ISC

View File

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2018-01-02
PKG_SOURCE_VERSION:=78974417e182a3de8f78b7d73366ec0c98396b6c
PKG_MIRROR_HASH:=a60f9eb9428ac3256cd7c3c6d4207c116cedf4d212b82e2f86c1bf7c7898fcbb
PKG_SOURCE_DATE:=2020-04-25
PKG_SOURCE_VERSION:=cdac0460ba50dc45735f0be2e19a5a8efc3dafe1
PKG_MIRROR_HASH:=261cb929dfc03c1f293156cfdec8c2cd1541dcdc57ae42a323f9df5d26e6f7d2
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=LGPL-2.1
@@ -30,7 +30,7 @@ define Package/umdns
DEPENDS:=+libubox +libubus +libblobmsg-json
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -Wno-address-of-packed-member
define Package/umdns/conffiles
/etc/config/umdns

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2016-2018 Jason A. Donenfeld <Jason@zx2c4.com>
# Copyright (C) 2016-2019 Jason A. Donenfeld <Jason@zx2c4.com>
# Copyright (C) 2016 Baptiste Jonglez <openwrt@bitsofnetworks.org>
# Copyright (C) 2016-2017 Dan Luedtke <mail@danrl.com>
#
@@ -11,17 +11,17 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=wireguard
PKG_VERSION:=0.0.20190601
PKG_VERSION:=1.0.20200611
PKG_RELEASE:=1
PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
PKG_HASH:=7528461824a0174bd7d4f15e68d8f0ce9a8ea318411502b80759438e8ef65568
PKG_SOURCE:=wireguard-linux-compat-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-linux-compat/snapshot/
PKG_HASH:=9b0478c3b1f3a7b488916e632e2fcbb1383bb1a2ef294489858ce2ba1da3246d
PKG_LICENSE:=GPL-2.0 Apache-2.0
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/WireGuard-$(PKG_VERSION)
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/wireguard-linux-compat-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
@@ -57,13 +57,8 @@ endef
include $(INCLUDE_DIR)/kernel-defaults.mk
include $(INCLUDE_DIR)/package-defaults.mk
# Used by Build/Compile/Default
MAKE_PATH:=src/tools
MAKE_VARS += PLATFORM=linux
define Build/Compile
$(MAKE) $(KERNEL_MAKEOPTS) M="$(PKG_BUILD_DIR)/src" modules
$(call Build/Compile/Default)
endef
define Package/wireguard/install
@@ -74,27 +69,6 @@ define Package/wireguard/description
$(call Package/wireguard/Default/description)
endef
define Package/wireguard-tools
$(call Package/wireguard/Default)
TITLE:=WireGuard userspace control program (wg)
DEPENDS:=+libmnl +ip
endef
define Package/wireguard-tools/description
$(call Package/wireguard/Default/description)
This package provides the userspace control program for WireGuard,
`wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
endef
define Package/wireguard-tools/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tools/wg $(1)/usr/bin/
$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
$(INSTALL_DIR) $(1)/lib/netifd/proto/
$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
endef
define KernelPackage/wireguard
SECTION:=kernel
CATEGORY:=Kernel modules
@@ -112,5 +86,4 @@ define KernelPackage/wireguard/description
endef
$(eval $(call BuildPackage,wireguard))
$(eval $(call BuildPackage,wireguard-tools))
$(eval $(call KernelPackage,wireguard))

View File

@@ -0,0 +1,54 @@
#
# Copyright (C) 2016-2019 Jason A. Donenfeld <Jason@zx2c4.com>
# Copyright (C) 2016 Baptiste Jonglez <openwrt@bitsofnetworks.org>
# Copyright (C) 2016-2017 Dan Luedtke <mail@danrl.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=wireguard-tools
PKG_VERSION:=1.0.20191226
PKG_RELEASE:=1
PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
PKG_HASH:=aa8af0fdc9872d369d8c890a84dbc2a2466b55795dccd5b47721b2d97644b04f
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/package-defaults.mk
MAKE_PATH:=src
MAKE_VARS += PLATFORM=linux
define Package/wireguard-tools
$(call Package/wireguard/Default)
TITLE:=WireGuard userspace control program (wg)
DEPENDS:=+libmnl +ip
endef
define Package/wireguard-tools/description
$(call Package/wireguard/Default/description)
This package provides the userspace control program for WireGuard,
`wg(8)`, a netifd protocol helper, and a re-resolve watchdog script.
endef
define Package/wireguard-tools/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/wg $(1)/usr/bin/
$(INSTALL_BIN) ./files/wireguard_watchdog $(1)/usr/bin/
$(INSTALL_DIR) $(1)/lib/netifd/proto/
$(INSTALL_BIN) ./files/wireguard.sh $(1)/lib/netifd/proto/
endef
$(eval $(call BuildPackage,wireguard-tools))

View File

@@ -7,14 +7,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ca-certificates
PKG_VERSION:=20190110
PKG_VERSION:=20200601
PKG_RELEASE:=1
PKG_MAINTAINER:=
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
PKG_HASH:=ee4bf0f4c6398005f5b5ca4e0b87b82837ac5c3b0280a1cb3a63c47555c3a675
PKG_HASH:=43766d5a436519503dfd65ab83488ae33ab4d4ca3d0993797b58c92eb9ed4e63
PKG_BUILD_DIR:=$(BUILD_DIR)/work
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fstools
PKG_RELEASE:=5
PKG_RELEASE:=6
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git

View File

@@ -0,0 +1,56 @@
From d05276dc1d6de119da518d62930b9a8ef55ef7e9 Mon Sep 17 00:00:00 2001
From: Yousong Zhou <yszhou4tech@gmail.com>
Date: Fri, 25 Oct 2019 10:48:47 +0000
Subject: [PATCH] libblkid-tiny: ntfs: fix use-after-free
The memory pointed to by ns can be reallocated when checking mft records
Fixes FS#2129
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
---
libblkid-tiny/ntfs.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
--- a/libblkid-tiny/ntfs.c
+++ b/libblkid-tiny/ntfs.c
@@ -88,6 +88,7 @@ static int probe_ntfs(blkid_probe pr, co
uint32_t sectors_per_cluster, mft_record_size;
uint16_t sector_size;
+ uint64_t volume_serial;
uint64_t nr_clusters, off; //, attr_off;
unsigned char *buf_mft;
@@ -148,15 +149,16 @@ static int probe_ntfs(blkid_probe pr, co
return 1;
+ volume_serial = ns->volume_serial;
off = le64_to_cpu(ns->mft_cluster_location) * sector_size *
sectors_per_cluster;
DBG(LOWPROBE, ul_debug("NTFS: sector_size=%"PRIu16", mft_record_size=%"PRIu32", "
"sectors_per_cluster=%"PRIu32", nr_clusters=%"PRIu64" "
- "cluster_offset=%"PRIu64"",
+ "cluster_offset=%"PRIu64", volume_serial=%"PRIu64"",
sector_size, mft_record_size,
sectors_per_cluster, nr_clusters,
- off));
+ off, volume_serial));
buf_mft = blkid_probe_get_buffer(pr, off, mft_record_size);
if (!buf_mft)
@@ -207,9 +209,9 @@ static int probe_ntfs(blkid_probe pr, co
#endif
blkid_probe_sprintf_uuid(pr,
- (unsigned char *) &ns->volume_serial,
- sizeof(ns->volume_serial),
- "%016" PRIX64, le64_to_cpu(ns->volume_serial));
+ (unsigned char *) &volume_serial,
+ sizeof(volume_serial),
+ "%016" PRIX64, le64_to_cpu(volume_serial));
return 0;
}

View File

@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rpcd
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
PKG_SOURCE_DATE:=2018-11-28
PKG_SOURCE_VERSION:=3aa81d0dfae167eccc26203bd0c96f3e3450f253
PKG_SOURCE_DATE:=2020-05-26
PKG_SOURCE_VERSION:=7be1f17138f19d1d7a86e0c27b3662d3643ff296
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_MIRROR_HASH:=1befc5e1793a687e7a37b4f4d611e5f95aef4b79ad4b288c4dcb4c74d212509b
PKG_MIRROR_HASH:=b427b2be8ebd486edbc88f6e789d1890cbdda1b4f04dcfcc8751f568c3a82674
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=

View File

@@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uci
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git
PKG_SOURCE_PROTO:=git

View File

@@ -0,0 +1,51 @@
From a3e650911f5e6f67dcff09974df3775dfd615da6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz@true.cz>
Date: Sat, 3 Oct 2020 01:29:21 +0200
Subject: [PATCH] file: uci_parse_package: fix heap use after free
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes following issue which is caused by usage of pointer which pointed
to a reallocated address:
ERROR: AddressSanitizer: heap-use-after-free on address 0x619000000087 at pc 0x000000509aa7 bp 0x7ffd6b9c3c40 sp 0x7ffd6b9c3400
READ of size 2 at 0x619000000087 thread T0
#0 0x509aa6 in strdup (test-fuzz+0x509aa6)
#1 0x7fc36d2a1636 in uci_strdup util.c:60:8
#2 0x7fc36d29e1ac in uci_alloc_generic list.c:55:13
#3 0x7fc36d29e241 in uci_alloc_package list.c:253:6
#4 0x7fc36d2a0ba3 in uci_switch_config file.c:375:18
#5 0x7fc36d2a09b8 in uci_parse_package file.c:397:2
#6 0x7fc36d2a09b8 in uci_parse_line file.c:513:6
#7 0x7fc36d2a09b8 in uci_import file.c:681:4
0x619000000087 is located 7 bytes inside of 1024-byte region [0x619000000080,0x619000000480)
freed by thread T0 here:
#0 0x51daa9 in realloc (test-fuzz+0x51daa9)
#1 0x7fc36d2a1612 in uci_realloc util.c:49:8
previously allocated by thread T0 here:
#0 0x51daa9 in realloc (test-fuzz+0x51daa9)
#1 0x7fc36d2a1612 in uci_realloc util.c:49:8
Reported-by: Jeremy Galindo <jgalindo@datto.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
file.c | 2 +-
...sig-06,src-000079,time-22005942,op-ext_AO,pos-8 | Bin 0 -> 56 bytes
2 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 tests/fuzz/corpus/id-000000,sig-06,src-000079,time-22005942,op-ext_AO,pos-8
--- a/file.c
+++ b/file.c
@@ -387,8 +387,8 @@ static void uci_parse_package(struct uci
pctx->pos += strlen(pctx_cur_str(pctx)) + 1;
ofs_name = next_arg(ctx, true, true, true);
- name = pctx_str(pctx, ofs_name);
assert_eol(ctx);
+ name = pctx_str(pctx, ofs_name);
if (single)
return;

View File

@@ -0,0 +1,112 @@
From eae126f66663e5c73e5d290b8e3134449489340f Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sun, 4 Oct 2020 17:14:49 +0200
Subject: [PATCH] file: Check buffer size after strtok()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This fixes a heap overflow in the parsing of the uci line.
The line which is parsed and put into pctx->buf is null terminated and
stored on the heap. In the uci_parse_line() function we use strtok() to
split this string in multiple parts after divided by a space or tab.
strtok() replaces these characters with a NULL byte. If the next byte is
NULL we assume that this NULL byte was added by strtok() and try to
parse the string after this NULL byte. If this NULL byte was not added
by strtok(), but by fgets() to mark the end of the string we would read
over this end of the string in uninitialized memory and later over the
allocated buffer.
Fix this problem by storing how long the line we read was and check if
we would read over the end of the string here.
This also adds the input which detected this crash to the corpus of the
fuzzer.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[fixed merge conflict in tests]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
file.c | 19 ++++++++++++++++---
tests/cram/test-san_uci_import.t | 1 +
tests/cram/test_uci_import.t | 1 +
.../2e18ecc3a759dedc9357b1298e9269eccc5c5a6b | 1 +
uci_internal.h | 1 +
5 files changed, 20 insertions(+), 3 deletions(-)
create mode 100644 tests/fuzz/corpus/2e18ecc3a759dedc9357b1298e9269eccc5c5a6b
--- a/file.c
+++ b/file.c
@@ -28,6 +28,7 @@
#include <glob.h>
#include <string.h>
#include <stdlib.h>
+#include <errno.h>
#include "uci.h"
#include "uci_internal.h"
@@ -63,6 +64,7 @@ __private void uci_getln(struct uci_cont
return;
ofs += strlen(p);
+ pctx->buf_filled = ofs;
if (pctx->buf[ofs - 1] == '\n') {
pctx->line++;
return;
@@ -120,6 +122,15 @@ static inline void addc(struct uci_conte
*pos_src += 1;
}
+static int uci_increase_pos(struct uci_parse_context *pctx, size_t add)
+{
+ if (pctx->pos + add > pctx->buf_filled)
+ return -EINVAL;
+
+ pctx->pos += add;
+ return 0;
+}
+
/*
* parse a double quoted string argument from the command line
*/
@@ -384,7 +395,8 @@ static void uci_parse_package(struct uci
char *name;
/* command string null-terminated by strtok */
- pctx->pos += strlen(pctx_cur_str(pctx)) + 1;
+ if (uci_increase_pos(pctx, strlen(pctx_cur_str(pctx)) + 1))
+ uci_parse_error(ctx, "package without name");
ofs_name = next_arg(ctx, true, true, true);
assert_eol(ctx);
@@ -416,7 +428,8 @@ static void uci_parse_config(struct uci_
}
/* command string null-terminated by strtok */
- pctx->pos += strlen(pctx_cur_str(pctx)) + 1;
+ if (uci_increase_pos(pctx, strlen(pctx_cur_str(pctx)) + 1))
+ uci_parse_error(ctx, "config without name");
ofs_type = next_arg(ctx, true, false, false);
type = pctx_str(pctx, ofs_type);
@@ -466,7 +479,8 @@ static void uci_parse_option(struct uci_
uci_parse_error(ctx, "option/list command found before the first section");
/* command string null-terminated by strtok */
- pctx->pos += strlen(pctx_cur_str(pctx)) + 1;
+ if (uci_increase_pos(pctx, strlen(pctx_cur_str(pctx)) + 1))
+ uci_parse_error(ctx, "option without name");
ofs_name = next_arg(ctx, true, true, false);
ofs_value = next_arg(ctx, false, false, false);
--- a/uci_internal.h
+++ b/uci_internal.h
@@ -33,6 +33,7 @@ struct uci_parse_context
const char *name;
char *buf;
int bufsz;
+ size_t buf_filled;
int pos;
};
#define pctx_pos(pctx) ((pctx)->pos)

View File

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/usign.git
PKG_SOURCE_DATE:=2019-08-06
PKG_SOURCE_VERSION:=5a52b379902471cef495687547c7b568142f66d2
PKG_MIRROR_HASH:=9779f6d6718a7f7cd3e28aa7feefc9b3f4b0c7a85cb58ff18afbeb6b4372177a
PKG_SOURCE_DATE:=2020-05-23
PKG_SOURCE_VERSION:=f1f65026a94137c91b5466b149ef3ea3f20091e9
PKG_MIRROR_HASH:=3f6569a5e63fdfd032976ac0f79d736d3935101ac1b97fb370514b013c5e6bb6
CMAKE_INSTALL:=1
PKG_CHECK_FORMAT_SECURITY:=1
PKG_USE_MIPS16:=0

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=lua
PKG_VERSION:=5.1.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.lua.org/ftp/ \

View File

@@ -0,0 +1,48 @@
diff --git a/src/lnum.c b/src/lnum.c
index 1456b6a2ed23..b0632b04c2b7 100644
--- a/src/lnum.c
+++ b/src/lnum.c
@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lua_Integer *res, char **endptr_ref) {
#else
return 0; /* Reject the number */
#endif
+ } else if (v > LUA_INTEGER_MAX) {
+ return TK_NUMBER;
}
} else if ((v > LUA_INTEGER_MAX) || (*endptr && (!isspace(*endptr)))) {
return TK_NUMBER; /* not in signed range, or has '.', 'e' etc. trailing */
@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Integer ib ) {
return 0;
}
+#ifdef LONG_OVERFLOW_LUA_INTEGER
+unsigned LUA_INTEGER lua_str2ul( const char *str, char **endptr, int base ) {
+ unsigned long v= strtoul(str, endptr, base);
+ if ( v > LUA_INTEGER_MAX ) {
+ errno= ERANGE;
+ v= ULONG_MAX;
+ }
+ return (unsigned LUA_INTEGER)v;
+}
+#endif
diff --git a/src/lnum_config.h b/src/lnum_config.h
index 19d7a4231a49..1092eead6629 100644
--- a/src/lnum_config.h
+++ b/src/lnum_config.h
@@ -141,7 +141,12 @@
#endif
#ifndef lua_str2ul
-# define lua_str2ul (unsigned LUA_INTEGER)strtoul
+# if LONG_MAX > LUA_INTEGER_MAX
+# define LONG_OVERFLOW_LUA_INTEGER
+ unsigned LUA_INTEGER lua_str2ul( const char *str, char **endptr, int base );
+# else
+# define lua_str2ul (unsigned LUA_INTEGER)strtoul
+# endif
#endif
#ifndef LUA_INTEGER_MIN
# define LUA_INTEGER_MIN (-LUA_INTEGER_MAX -1) /* -2^16|32 */
--
1.9.1

View File

@@ -0,0 +1,41 @@
--- a/src/lnum.c
+++ b/src/lnum.c
@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lu
#else
return 0; /* Reject the number */
#endif
+ } else if (v > LUA_INTEGER_MAX) {
+ return TK_NUMBER;
}
} else if ((v > LUA_INTEGER_MAX) || (*endptr && (!isspace(*endptr)))) {
return TK_NUMBER; /* not in signed range, or has '.', 'e' etc. trailing */
@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Inte
return 0;
}
+#ifdef LONG_OVERFLOW_LUA_INTEGER
+unsigned LUA_INTEGER lua_str2ul( const char *str, char **endptr, int base ) {
+ unsigned long v= strtoul(str, endptr, base);
+ if ( v > LUA_INTEGER_MAX ) {
+ errno= ERANGE;
+ v= ULONG_MAX;
+ }
+ return (unsigned LUA_INTEGER)v;
+}
+#endif
--- a/src/lnum_config.h
+++ b/src/lnum_config.h
@@ -141,7 +141,12 @@
#endif
#ifndef lua_str2ul
-# define lua_str2ul (unsigned LUA_INTEGER)strtoul
+# if LONG_MAX > LUA_INTEGER_MAX
+# define LONG_OVERFLOW_LUA_INTEGER
+ unsigned LUA_INTEGER lua_str2ul( const char *str, char **endptr, int base );
+# else
+# define lua_str2ul (unsigned LUA_INTEGER)strtoul
+# endif
#endif
#ifndef LUA_INTEGER_MIN
# define LUA_INTEGER_MIN (-LUA_INTEGER_MAX -1) /* -2^16|32 */

View File

@@ -26,7 +26,7 @@ try_git() {
*)
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"
[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"
[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name openwrt-18.06@{u} 2>/dev/null)"
REV="$(git rev-list ${REBOOT}..$GET_REV | wc -l | awk '{print $1}')"
if [ -n "$ORIGIN" ]; then

View File

@@ -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

View File

@@ -1,6 +1,6 @@
--- a/arch/powerpc/platforms/4xx/pci.c
+++ b/arch/powerpc/platforms/4xx/pci.c
@@ -1905,9 +1905,9 @@ static void __init ppc4xx_configure_pcie
@@ -1903,9 +1903,9 @@ static void __init ppc4xx_configure_pcie
* if it works
*/
out_le32(mbase + PECFG_PIM0LAL, 0x00000000);

View File

@@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
#include "xhci.h"
#include "xhci-trace.h"
@@ -266,6 +268,458 @@ static void xhci_pme_acpi_rtd3_enable(st
@@ -276,6 +278,458 @@ static void xhci_pme_acpi_rtd3_enable(st
static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
#endif /* CONFIG_ACPI */
@@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
/* called during probe() after chip reset completes */
static int xhci_pci_setup(struct usb_hcd *hcd)
{
@@ -301,6 +755,22 @@ static int xhci_pci_probe(struct pci_dev
@@ -314,6 +768,22 @@ static int xhci_pci_probe(struct pci_dev
struct hc_driver *driver;
struct usb_hcd *hcd;
@@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
driver = (struct hc_driver *)id->driver_data;
/* For some HW implementation, a XHCI reset is just not enough... */
@@ -365,6 +835,16 @@ static void xhci_pci_remove(struct pci_d
@@ -375,6 +845,16 @@ static void xhci_pci_remove(struct pci_d
{
struct xhci_hcd *xhci;

View File

@@ -13,7 +13,7 @@ produce a noisy warning.
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -219,7 +219,7 @@ static void xhci_pci_quirks(struct devic
@@ -225,7 +225,7 @@ static void xhci_pci_quirks(struct devic
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
pdev->device == 0x0015)

View File

@@ -46,7 +46,7 @@
config ATH25
bool "Atheros AR231x/AR531x SoC support"
@@ -1007,6 +1007,7 @@ config MIPS_PARAVIRT
@@ -1008,6 +1008,7 @@ config MIPS_PARAVIRT
endchoice
source "arch/mips/alchemy/Kconfig"

View File

@@ -237,6 +237,8 @@ ar71xx_setup_interfaces()
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
;;
archer-c25-v1|\
archer-c60-v1|\
archer-c60-v2|\
rb-750-r2|\
rb-750p-pbr2|\
rb-750up-r2|\
@@ -253,12 +255,6 @@ ar71xx_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
;;
archer-c60-v1|\
archer-c60-v2)
ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4"
;;
arduino-yun|\
dir-505-a1|\
tl-wa801nd-v3)

View File

@@ -178,7 +178,7 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 20480 12064
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1)
;;
cf-e385ac)
ath10kcal_extract "art" 20480 12064

View File

@@ -14,8 +14,7 @@ board=$(board_name)
case "$board" in
archer-c58-v1|\
archer-c59-v1|\
archer-c60-v1|\
archer-c60-v2)
archer-c60-v1)
echo $(macaddr_add $(mtd_get_mac_binary mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
;;
*)

View File

@@ -216,6 +216,7 @@ platform_check_image() {
archer-c60-v2|\
archer-c7-v4|\
archer-c7-v5|\
arduino-yun|\
bullet-m|\
c-55|\
carambola2|\
@@ -343,7 +344,6 @@ platform_check_image() {
ap152|\
ap91-5g|\
ap96|\
arduino-yun|\
bhr-4grv2|\
bxu2000n-2-a1|\
db120|\

View File

@@ -157,8 +157,8 @@ static void __init archer_c60_v1_setup(void)
ath79_register_mdio(0, 0x0);
ath79_register_mdio(1, 0x0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
/* WAN port */
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
@@ -199,8 +199,8 @@ static void __init archer_c60_v2_setup(void)
ath79_register_mdio(0, 0x0);
ath79_register_mdio(1, 0x0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
/* WAN port */
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;

View File

@@ -117,8 +117,7 @@ static void __init ds_setup(void)
ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN);
//Disable the Function for some pins to have GPIO functionality active
// GPIO6-7-8 and GPIO11

View File

@@ -47,7 +47,7 @@ static struct gpio_keys_button dorin_gpio_keys[] __initdata = {
.code = KEY_WPS_BUTTON,
.debounce_interval = DORIN_KEYS_DEBOUNCE_INTERVAL,
.gpio = DORIN_GPIO_BTN_JUMPSTART,
.active_low = 1,
.active_low = 0,
},
{
.desc = "reset button",

View File

@@ -198,11 +198,11 @@ static struct gpio_keys_button nbg6616_gpio_keys[] __initdata = {
},
{
.desc = "RFKILL button",
.type = EV_KEY,
.type = EV_SW,
.code = KEY_RFKILL,
.debounce_interval = NBG6716_KEYS_DEBOUNCE_INTERVAL,
.gpio = NBG6716_GPIO_BTN_RFKILL,
.active_low = 1,
.active_low = 0,
},
{
.desc = "WPS button",

View File

@@ -206,10 +206,7 @@ __rb_get_wlan_data(u16 id)
u8 *erd_data;
u16 erd_len;
if (id == 0)
goto err_free;
err = routerboot_find_tag(tag, tag_len, id,
err = routerboot_find_tag(tag, tag_len, 0x1,
&erd_data, &erd_len);
if (err) {
pr_err("no ERD data found for id %u\n", id);
@@ -224,9 +221,6 @@ __rb_get_wlan_data(u16 id)
goto err_free;
}
} else {
if (id != 0)
goto err_free;
err = rle_decode((char *) tag, tag_len, buf, RB_ART_SIZE,
&src_done, &dst_done);
if (err) {

View File

@@ -1562,7 +1562,7 @@ ar934x_nfc_remove(struct platform_device *pdev)
nfc = platform_get_drvdata(pdev);
if (nfc) {
mtd = ar934x_nfc_to_mtd(nfc);
nand_release(mtd);
nand_release(&nfc->nand_chip);
ar934x_nfc_free_buf(nfc);
free_irq(nfc->irq, nfc);
}

View File

@@ -331,7 +331,7 @@ static int rb4xx_nand_probe(struct platform_device *pdev)
return 0;
err_release_nand:
nand_release(mtd);
nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
@@ -352,7 +352,7 @@ static int rb4xx_nand_remove(struct platform_device *pdev)
{
struct rb4xx_nand_info *info = platform_get_drvdata(pdev);
nand_release(rbinfo_to_mtd(info));
nand_release(&info->chip);
platform_set_drvdata(pdev, NULL);
kfree(info);
gpio_free(RB4XX_NAND_GPIO_NCE);

View File

@@ -389,7 +389,7 @@ static int rb750_nand_probe(struct platform_device *pdev)
return 0;
err_release_nand:
nand_release(mtd);
nand_release(&info->chip);
err_set_drvdata:
platform_set_drvdata(pdev, NULL);
err_free_info:
@@ -401,7 +401,7 @@ static int rb750_nand_remove(struct platform_device *pdev)
{
struct rb750_nand_info *info = platform_get_drvdata(pdev);
nand_release(rbinfo_to_mtd(info));
nand_release(&info->chip);
platform_set_drvdata(pdev, NULL);
kfree(info);

View File

@@ -430,7 +430,7 @@ static int rb91x_nand_probe(struct platform_device *pdev)
return 0;
err_release_nand:
nand_release(mtd);
nand_release(&rbni->chip);
return ret;
}
@@ -438,7 +438,7 @@ static int rb91x_nand_remove(struct platform_device *pdev)
{
struct rb91x_nand_info *info = platform_get_drvdata(pdev);
nand_release(rbinfo_to_mtd(info));
nand_release(&info->chip);
return 0;
}

View File

@@ -1084,7 +1084,7 @@ define Device/NBG6616
BOARDNAME := NBG6616
KERNEL_SIZE := 2048k
IMAGE_SIZE := 15323k
MTDPARTS := spi0.0:192k(u-boot)ro,64k(env)ro,64k(RFdata)ro,384k(zyxel_rfsd),384k(romd),64k(header),2048k(kernel),13184k(rootfs),15232k@0x120000(firmware)
MTDPARTS := spi0.0:192k(u-boot)ro,64k(env),64k(RFdata)ro,384k(zyxel_rfsd),384k(romd),64k(header),2048k(kernel),13184k(rootfs),15232k@0x120000(firmware)
CMDLINE += mem=128M
IMAGES := sysupgrade.bin
KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma | jffs2 boot/vmlinux.lzma.uImage

View File

@@ -1,6 +1,6 @@
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1637,7 +1637,7 @@ static int __xipram do_write_oneword(str
@@ -1636,7 +1636,7 @@ static int __xipram do_write_oneword(str
}
if (chip_good(map, adr, datum))
@@ -9,7 +9,7 @@
/* Latency issues. Drop the lock, wait a while and retry */
UDELAY(map, chip, adr, 1);
@@ -1654,6 +1654,8 @@ static int __xipram do_write_oneword(str
@@ -1653,6 +1653,8 @@ static int __xipram do_write_oneword(str
goto retry;
}
}
@@ -18,7 +18,7 @@
xip_enable(map, chip, adr);
op_done:
if (mode == FL_OTP_WRITE)
@@ -2232,7 +2234,6 @@ static int cfi_amdstd_panic_write(struct
@@ -2235,7 +2237,6 @@ static int cfi_amdstd_panic_write(struct
return 0;
}
@@ -26,7 +26,7 @@
/*
* Handle devices with one erase region, that only implement
* the chip erase command.
@@ -2300,7 +2301,7 @@ static int __xipram do_erase_chip(struct
@@ -2303,7 +2304,7 @@ static int __xipram do_erase_chip(struct
}
if (chip_good(map, adr, map_word_ff(map)))
@@ -35,7 +35,7 @@
if (time_after(jiffies, timeo)) {
printk(KERN_WARNING "MTD %s(): software timeout\n",
@@ -2324,6 +2325,7 @@ static int __xipram do_erase_chip(struct
@@ -2327,6 +2328,7 @@ static int __xipram do_erase_chip(struct
}
}
@@ -43,7 +43,7 @@
chip->state = FL_READY;
xip_enable(map, chip, adr);
DISABLE_VPP(map);
@@ -2397,7 +2399,7 @@ static int __xipram do_erase_oneblock(st
@@ -2400,7 +2402,7 @@ static int __xipram do_erase_oneblock(st
if (chip_good(map, adr, map_word_ff(map))) {
xip_enable(map, chip, adr);
@@ -52,7 +52,7 @@
}
if (time_after(jiffies, timeo)) {
@@ -2423,6 +2425,7 @@ static int __xipram do_erase_oneblock(st
@@ -2426,6 +2428,7 @@ static int __xipram do_erase_oneblock(st
}
}

View File

@@ -35,7 +35,7 @@
/* Atmel chips don't use the same PRI format as AMD chips */
static void fixup_convert_atmel_pri(struct mtd_info *mtd)
@@ -1796,6 +1800,7 @@ static int cfi_amdstd_write_words(struct
@@ -1795,6 +1799,7 @@ static int cfi_amdstd_write_words(struct
/*
* FIXME: interleaved mode not tested, and probably not supported!
*/
@@ -43,7 +43,7 @@
static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
unsigned long adr, const u_char *buf,
int len)
@@ -1924,7 +1929,6 @@ static int __xipram do_write_buffer(stru
@@ -1927,7 +1932,6 @@ static int __xipram do_write_buffer(stru
return ret;
}
@@ -51,7 +51,7 @@
static int cfi_amdstd_write_buffers(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
@@ -1999,6 +2003,7 @@ static int cfi_amdstd_write_buffers(stru
@@ -2002,6 +2006,7 @@ static int cfi_amdstd_write_buffers(stru
return 0;
}

View File

@@ -1,6 +1,6 @@
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1214,4 +1214,12 @@ config GPIO_VIPERBOARD
@@ -1215,4 +1215,12 @@ config GPIO_VIPERBOARD
endmenu

View File

@@ -109,7 +109,7 @@
+#endif
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1155,7 +1155,6 @@ menu "SPI GPIO expanders"
@@ -1156,7 +1156,6 @@ menu "SPI GPIO expanders"
config GPIO_74X164
tristate "74x164 serial-in/parallel-out 8-bits shift register"

View File

@@ -1,6 +1,6 @@
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1221,4 +1221,9 @@ config GPIO_NXP_74HC153
@@ -1222,4 +1222,9 @@ config GPIO_NXP_74HC153
Platform driver for NXP 74HC153 Dual 4-input Multiplexer. This
provides a GPIO interface supporting input mode only.

View File

@@ -1,6 +1,6 @@
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -252,6 +252,37 @@ int ehci_reset(struct ehci_hcd *ehci)
@@ -253,6 +253,37 @@ int ehci_reset(struct ehci_hcd *ehci)
command |= CMD_RESET;
dbg_cmd (ehci, "reset", command);
ehci_writel(ehci, command, &ehci->regs->command);

View File

@@ -10,7 +10,7 @@
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1152,6 +1152,9 @@ config MIPS_MSC
@@ -1153,6 +1153,9 @@ config MIPS_MSC
config MIPS_NILE4
bool

View File

@@ -267,7 +267,7 @@
case IPV6_2292HOPOPTS:
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -397,7 +397,7 @@ static void ip6gre_err(struct sk_buff *s
@@ -400,7 +400,7 @@ static void ip6gre_err(struct sk_buff *s
return;
ipv6h = (const struct ipv6hdr *)skb->data;
greh = (const struct gre_base_hdr *)(skb->data + offset);
@@ -316,7 +316,7 @@
for (p = *head; p; p = p->next) {
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -461,7 +461,7 @@ static struct neighbour *ipv4_neigh_look
@@ -460,7 +460,7 @@ static struct neighbour *ipv4_neigh_look
else if (skb)
pkey = &ip_hdr(skb)->daddr;
@@ -795,7 +795,7 @@
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3934,14 +3934,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -3935,14 +3935,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);
@@ -869,7 +869,7 @@
* No flags defined yet.
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -321,8 +321,14 @@ void inet_proto_csum_replace16(__sum16 *
@@ -338,8 +338,14 @@ void inet_proto_csum_replace16(__sum16 *
bool pseudohdr)
{
__be32 diff[] = {
@@ -888,7 +888,7 @@
*sum = csum_fold(csum_partial(diff, sizeof(diff),
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1800,15 +1800,15 @@ static int vxlan_build_skb(struct sk_buf
@@ -1808,15 +1808,15 @@ static int vxlan_build_skb(struct sk_buf
goto out_free;
vxh = (struct vxlanhdr *) __skb_push(skb, sizeof(*vxh));

View File

@@ -39,6 +39,7 @@ CONFIG_CRYPTO_NULL2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_DMADEVICES=y
CONFIG_DTC=y
CONFIG_EDAC_SUPPORT=y
CONFIG_EXT4_FS=y

View File

@@ -212,7 +212,7 @@
+MODULE_ALIAS("platform:" DRIVER_NAME);
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -1646,6 +1646,13 @@ config PIC32_DMT
@@ -1647,6 +1647,13 @@ config PIC32_DMT
To compile this driver as a loadable module, choose M here.
The module will be called pic32-dmt.

View File

@@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1220,6 +1220,18 @@ static const struct flash_info *spi_nor_
@@ -1225,6 +1225,18 @@ static const struct flash_info *spi_nor_
}
dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n",
id[0], id[1], id[2]);

View File

@@ -25,7 +25,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
u32 *data, int in_pm)
{
@@ -1961,7 +1965,8 @@ static int smsc95xx_rx_fixup(struct usbn
@@ -1968,7 +1972,8 @@ static int smsc95xx_rx_fixup(struct usbn
if (dev->net->features & NETIF_F_RXCSUM)
smsc95xx_rx_csum_offload(skb);
skb_trim(skb, skb->len - 4); /* remove fcs */
@@ -35,7 +35,7 @@ Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
return 1;
}
@@ -1979,7 +1984,8 @@ static int smsc95xx_rx_fixup(struct usbn
@@ -1986,7 +1991,8 @@ static int smsc95xx_rx_fixup(struct usbn
if (dev->net->features & NETIF_F_RXCSUM)
smsc95xx_rx_csum_offload(ax_skb);
skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */

View File

@@ -9,7 +9,7 @@ Subject: [PATCH] serial: 8250: Don't crash when nr_uarts is 0
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -509,6 +509,8 @@ static void __init serial8250_isa_init_p
@@ -508,6 +508,8 @@ static void __init serial8250_isa_init_p
if (nr_uarts > UART_NR)
nr_uarts = UART_NR;

View File

@@ -19,7 +19,7 @@ Signed-off-by: Eric Anholt <eric@anholt.net>
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1268,6 +1268,15 @@ static struct clk_hw *bcm2835_register_c
@@ -1270,6 +1270,15 @@ static struct clk_hw *bcm2835_register_c
init.name = data->name;
init.flags = data->flags | CLK_IGNORE_UNUSED;

View File

@@ -13,7 +13,7 @@ Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1909,8 +1909,15 @@ static int bcm2835_clk_probe(struct plat
@@ -1911,8 +1911,15 @@ static int bcm2835_clk_probe(struct plat
if (ret)
return ret;
@@ -30,7 +30,7 @@ Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
}
static const struct of_device_id bcm2835_clk_of_match[] = {
@@ -1927,7 +1934,11 @@ static struct platform_driver bcm2835_cl
@@ -1929,7 +1936,11 @@ static struct platform_driver bcm2835_cl
.probe = bcm2835_clk_probe,
};

View File

@@ -9,7 +9,7 @@ Subject: [PATCH] kbuild: Ignore dtco targets when filtering symbols
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -294,7 +294,7 @@ ksym_dep_filter =
@@ -295,7 +295,7 @@ ksym_dep_filter =
$(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \
as_*_S|cpp_s_S) \
$(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \

View File

@@ -696,7 +696,7 @@ Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
}
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -5096,7 +5096,7 @@ static void port_event(struct usb_hub *h
@@ -5109,7 +5109,7 @@ static void port_event(struct usb_hub *h
if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
u16 status = 0, unused;

View File

@@ -312,7 +312,7 @@ Signed-off-by: Luke Wren <wren6991@gmail.com>
+ if (!ret)
+ return 0;
+
+ nand_release(mtd);
+ nand_release(this);
+ return -EINVAL;
+}
+
@@ -320,7 +320,7 @@ Signed-off-by: Luke Wren <wren6991@gmail.com>
+{
+ struct bcm2835_smi_nand_host *host = platform_get_drvdata(pdev);
+
+ nand_release(&host->mtd);
+ nand_release(&host->nand_chip);
+
+ return 0;
+}

View File

@@ -174,7 +174,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -121,6 +121,11 @@ static void lexical_error(const char *fm
@@ -120,6 +120,11 @@ static void lexical_error(const char *fm
return DT_V1;
}
@@ -629,7 +629,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
} ;
static yy_state_type yy_last_accepting_state;
@@ -662,7 +664,7 @@ static int dts_version = 1;
@@ -661,7 +663,7 @@ static int dts_version = 1;
static void push_input_file(const char *filename);
static bool pop_input_file(void);
static void lexical_error(const char *fmt, ...);
@@ -638,7 +638,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
#define INITIAL 0
#define BYTESTRING 1
@@ -704,7 +706,7 @@ FILE *yyget_out (void );
@@ -703,7 +705,7 @@ FILE *yyget_out (void );
void yyset_out (FILE * out_str );
@@ -647,7 +647,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
char *yyget_text (void );
@@ -853,6 +855,10 @@ YY_DECL
@@ -852,6 +854,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
@@ -658,7 +658,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
if ( !(yy_init) )
{
(yy_init) = 1;
@@ -879,11 +885,6 @@ YY_DECL
@@ -878,11 +884,6 @@ YY_DECL
yy_load_buffer_state( );
}
@@ -670,7 +670,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
while ( 1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
@@ -901,7 +902,7 @@ YY_DECL
@@ -900,7 +901,7 @@ YY_DECL
yy_match:
do
{
@@ -679,7 +679,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
@@ -910,13 +911,13 @@ yy_match:
@@ -909,13 +910,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
@@ -695,7 +695,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
@@ -951,39 +952,31 @@ case 2:
@@ -950,39 +951,31 @@ case 2:
YY_RULE_SETUP
#line 75 "dtc-lexer.l"
{
@@ -749,7 +749,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
if (!pop_input_file()) {
yyterminate();
@@ -993,7 +986,7 @@ case YY_STATE_EOF(V1):
@@ -992,7 +985,7 @@ case YY_STATE_EOF(V1):
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
@@ -758,7 +758,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
DPRINT("String: %s\n", yytext);
yylval.data = data_copy_escape_string(yytext+1,
@@ -1003,7 +996,7 @@ YY_RULE_SETUP
@@ -1002,7 +995,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
@@ -767,7 +767,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
DPRINT("Keyword: /dts-v1/\n");
dts_version = 1;
@@ -1013,25 +1006,33 @@ YY_RULE_SETUP
@@ -1012,25 +1005,33 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
@@ -806,7 +806,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
DPRINT("Keyword: /delete-property/\n");
DPRINT("<PROPNODENAME>\n");
@@ -1039,9 +1040,9 @@ YY_RULE_SETUP
@@ -1038,9 +1039,9 @@ YY_RULE_SETUP
return DT_DEL_PROP;
}
YY_BREAK
@@ -818,7 +818,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
DPRINT("Keyword: /delete-node/\n");
DPRINT("<PROPNODENAME>\n");
@@ -1049,9 +1050,9 @@ YY_RULE_SETUP
@@ -1048,9 +1049,9 @@ YY_RULE_SETUP
return DT_DEL_NODE;
}
YY_BREAK
@@ -830,7 +830,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
DPRINT("Label: %s\n", yytext);
yylval.labelref = xstrdup(yytext);
@@ -1059,9 +1060,9 @@ YY_RULE_SETUP
@@ -1058,9 +1059,9 @@ YY_RULE_SETUP
return DT_LABEL;
}
YY_BREAK
@@ -842,7 +842,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
char *e;
DPRINT("Integer Literal: '%s'\n", yytext);
@@ -1069,10 +1070,7 @@ YY_RULE_SETUP
@@ -1068,10 +1069,7 @@ YY_RULE_SETUP
errno = 0;
yylval.integer = strtoull(yytext, &e, 0);
@@ -854,7 +854,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
if (errno == ERANGE)
lexical_error("Integer literal '%s' out of range",
@@ -1084,10 +1082,10 @@ YY_RULE_SETUP
@@ -1083,10 +1081,10 @@ YY_RULE_SETUP
return DT_LITERAL;
}
YY_BREAK
@@ -868,7 +868,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
struct data d;
DPRINT("Character literal: %s\n", yytext);
@@ -1109,18 +1107,18 @@ YY_RULE_SETUP
@@ -1108,18 +1106,18 @@ YY_RULE_SETUP
return DT_CHAR_LITERAL;
}
YY_BREAK
@@ -891,7 +891,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{ /* new-style path reference */
yytext[yyleng-1] = '\0';
DPRINT("Ref: %s\n", yytext+2);
@@ -1128,27 +1126,27 @@ YY_RULE_SETUP
@@ -1127,27 +1125,27 @@ YY_RULE_SETUP
return DT_REF;
}
YY_BREAK
@@ -925,7 +925,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
DPRINT("PropNodeName: %s\n", yytext);
yylval.propnodename = xstrdup((yytext[0] == '\\') ?
@@ -1157,75 +1155,75 @@ YY_RULE_SETUP
@@ -1156,75 +1154,75 @@ YY_RULE_SETUP
return DT_PROPNODENAME;
}
YY_BREAK
@@ -1030,7 +1030,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
DPRINT("Char: %c (\\x%02x)\n", yytext[0],
(unsigned)yytext[0]);
@@ -1241,12 +1239,12 @@ YY_RULE_SETUP
@@ -1240,12 +1238,12 @@ YY_RULE_SETUP
return yytext[0];
}
YY_BREAK
@@ -1046,7 +1046,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
case YY_END_OF_BUFFER:
{
@@ -1376,7 +1374,6 @@ ECHO;
@@ -1375,7 +1373,6 @@ ECHO;
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
@@ -1054,7 +1054,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
@@ -1432,21 +1429,21 @@ static int yy_get_next_buffer (void)
@@ -1431,21 +1428,21 @@ static int yy_get_next_buffer (void)
else
{
@@ -1079,7 +1079,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1477,7 +1474,7 @@ static int yy_get_next_buffer (void)
@@ -1476,7 +1473,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
@@ -1088,7 +1088,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -1539,7 +1536,7 @@ static int yy_get_next_buffer (void)
@@ -1538,7 +1535,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
@@ -1097,7 +1097,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1567,13 +1564,13 @@ static int yy_get_next_buffer (void)
@@ -1566,13 +1563,13 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
@@ -1114,7 +1114,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
}
#ifndef YY_NO_INPUT
@@ -1600,7 +1597,7 @@ static int yy_get_next_buffer (void)
@@ -1599,7 +1596,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
@@ -1123,7 +1123,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1874,7 +1871,7 @@ void yypop_buffer_state (void)
@@ -1873,7 +1870,7 @@ void yypop_buffer_state (void)
*/
static void yyensure_buffer_stack (void)
{
@@ -1132,7 +1132,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
if (!(yy_buffer_stack)) {
@@ -1971,12 +1968,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst
@@ -1970,12 +1967,12 @@ YY_BUFFER_STATE yy_scan_string (yyconst
*
* @return the newly allocated buffer state object.
*/
@@ -1147,7 +1147,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -2058,7 +2055,7 @@ FILE *yyget_out (void)
@@ -2057,7 +2054,7 @@ FILE *yyget_out (void)
/** Get the length of the current token.
*
*/
@@ -1156,7 +1156,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
{
return yyleng;
}
@@ -2206,7 +2203,7 @@ void yyfree (void * ptr )
@@ -2205,7 +2202,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"

View File

@@ -279,7 +279,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
-ENDPROC(arm_copy_from_user)
+ENDPROC(__copy_from_user_std)
.pushsection .fixup,"ax"
.pushsection .text.fixup,"ax"
.align 0
--- /dev/null
+++ b/arch/arm/lib/exports_rpi.c

View File

@@ -14,7 +14,7 @@ use the same logic.
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2515,7 +2515,12 @@ static int pl011_setup_port(struct devic
@@ -2514,7 +2514,12 @@ static int pl011_setup_port(struct devic
if (IS_ERR(base))
return PTR_ERR(base);

View File

@@ -88,8 +88,8 @@ Signed-off-by: Slawomir Stepien <sst@poczta.fm>
+make sense for developers (since it avoids problems with namespaces).
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -112,4 +112,11 @@ config OF_OVERLAY
config OF_NUMA
@@ -116,4 +116,11 @@ config OF_DMA_DEFAULT_COHERENT
# arches should select this if DMA is coherent by default for OF devices
bool
+config OF_CONFIGFS

View File

@@ -108,7 +108,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
if (rate > best_rate && rate <= req->rate) {
best_parent = parent;
best_prate = prate;
@@ -1277,6 +1329,13 @@ static struct clk_hw *bcm2835_register_c
@@ -1279,6 +1331,13 @@ static struct clk_hw *bcm2835_register_c
if ((cprman_read(cprman, data->ctl_reg) & CM_ENABLE) == 0)
init.flags &= ~CLK_IS_CRITICAL;

View File

@@ -19,7 +19,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1876,7 +1876,12 @@ static const struct bcm2835_clk_desc clk
@@ -1878,7 +1878,12 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_VECCTL,
.div_reg = CM_VECDIV,
.int_bits = 4,

View File

@@ -31,7 +31,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
};
struct bcm2835_clock_data {
@@ -1258,7 +1259,7 @@ bcm2835_register_pll_divider(struct bcm2
@@ -1260,7 +1261,7 @@ bcm2835_register_pll_divider(struct bcm2
init.num_parents = 1;
init.name = divider_name;
init.ops = &bcm2835_pll_divider_clk_ops;
@@ -40,7 +40,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
divider = devm_kzalloc(cprman->dev, sizeof(*divider), GFP_KERNEL);
if (!divider)
@@ -1481,7 +1482,8 @@ static const struct bcm2835_clk_desc clk
@@ -1483,7 +1484,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLA_CORE,
.load_mask = CM_PLLA_LOADCORE,
.hold_mask = CM_PLLA_HOLDCORE,
@@ -50,7 +50,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLA_PER] = REGISTER_PLL_DIV(
.name = "plla_per",
.source_pll = "plla",
@@ -1489,7 +1491,8 @@ static const struct bcm2835_clk_desc clk
@@ -1491,7 +1493,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLA_PER,
.load_mask = CM_PLLA_LOADPER,
.hold_mask = CM_PLLA_HOLDPER,
@@ -60,7 +60,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLA_DSI0] = REGISTER_PLL_DIV(
.name = "plla_dsi0",
.source_pll = "plla",
@@ -1505,7 +1508,8 @@ static const struct bcm2835_clk_desc clk
@@ -1507,7 +1510,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLA_CCP2,
.load_mask = CM_PLLA_LOADCCP2,
.hold_mask = CM_PLLA_HOLDCCP2,
@@ -70,7 +70,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/* PLLB is used for the ARM's clock. */
[BCM2835_PLLB] = REGISTER_PLL(
@@ -1529,7 +1533,8 @@ static const struct bcm2835_clk_desc clk
@@ -1531,7 +1535,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLB_ARM,
.load_mask = CM_PLLB_LOADARM,
.hold_mask = CM_PLLB_HOLDARM,
@@ -80,7 +80,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/*
* PLLC is the core PLL, used to drive the core VPU clock.
@@ -1558,7 +1563,8 @@ static const struct bcm2835_clk_desc clk
@@ -1560,7 +1565,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLC_CORE0,
.load_mask = CM_PLLC_LOADCORE0,
.hold_mask = CM_PLLC_HOLDCORE0,
@@ -90,7 +90,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLC_CORE1] = REGISTER_PLL_DIV(
.name = "pllc_core1",
.source_pll = "pllc",
@@ -1566,7 +1572,8 @@ static const struct bcm2835_clk_desc clk
@@ -1568,7 +1574,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLC_CORE1,
.load_mask = CM_PLLC_LOADCORE1,
.hold_mask = CM_PLLC_HOLDCORE1,
@@ -100,7 +100,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLC_CORE2] = REGISTER_PLL_DIV(
.name = "pllc_core2",
.source_pll = "pllc",
@@ -1574,7 +1581,8 @@ static const struct bcm2835_clk_desc clk
@@ -1576,7 +1583,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLC_CORE2,
.load_mask = CM_PLLC_LOADCORE2,
.hold_mask = CM_PLLC_HOLDCORE2,
@@ -110,7 +110,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLC_PER] = REGISTER_PLL_DIV(
.name = "pllc_per",
.source_pll = "pllc",
@@ -1582,7 +1590,8 @@ static const struct bcm2835_clk_desc clk
@@ -1584,7 +1592,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLC_PER,
.load_mask = CM_PLLC_LOADPER,
.hold_mask = CM_PLLC_HOLDPER,
@@ -120,7 +120,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/*
* PLLD is the display PLL, used to drive DSI display panels.
@@ -1611,7 +1620,8 @@ static const struct bcm2835_clk_desc clk
@@ -1613,7 +1622,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLD_CORE,
.load_mask = CM_PLLD_LOADCORE,
.hold_mask = CM_PLLD_HOLDCORE,
@@ -130,7 +130,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLD_PER] = REGISTER_PLL_DIV(
.name = "plld_per",
.source_pll = "plld",
@@ -1619,7 +1629,8 @@ static const struct bcm2835_clk_desc clk
@@ -1621,7 +1631,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLD_PER,
.load_mask = CM_PLLD_LOADPER,
.hold_mask = CM_PLLD_HOLDPER,
@@ -140,7 +140,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLD_DSI0] = REGISTER_PLL_DIV(
.name = "plld_dsi0",
.source_pll = "plld",
@@ -1664,7 +1675,8 @@ static const struct bcm2835_clk_desc clk
@@ -1666,7 +1677,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLH_RCAL,
.load_mask = CM_PLLH_LOADRCAL,
.hold_mask = 0,
@@ -150,7 +150,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLH_AUX] = REGISTER_PLL_DIV(
.name = "pllh_aux",
.source_pll = "pllh",
@@ -1672,7 +1684,8 @@ static const struct bcm2835_clk_desc clk
@@ -1674,7 +1686,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLH_AUX,
.load_mask = CM_PLLH_LOADAUX,
.hold_mask = 0,
@@ -160,7 +160,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_PLLH_PIX] = REGISTER_PLL_DIV(
.name = "pllh_pix",
.source_pll = "pllh",
@@ -1680,7 +1693,8 @@ static const struct bcm2835_clk_desc clk
@@ -1682,7 +1695,8 @@ static const struct bcm2835_clk_desc clk
.a2w_reg = A2W_PLLH_PIX,
.load_mask = CM_PLLH_LOADPIX,
.hold_mask = 0,

View File

@@ -109,7 +109,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
init.num_parents = 1;
init.name = data->name;
init.ops = &bcm2835_pll_clk_ops;
@@ -1301,18 +1330,22 @@ static struct clk_hw *bcm2835_register_c
@@ -1303,18 +1332,22 @@ static struct clk_hw *bcm2835_register_c
struct bcm2835_clock *clock;
struct clk_init_data init;
const char *parents[1 << CM_SRC_BITS];
@@ -139,7 +139,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
}
memset(&init, 0, sizeof(init));
@@ -1448,6 +1481,47 @@ static const char *const bcm2835_clock_v
@@ -1450,6 +1483,47 @@ static const char *const bcm2835_clock_v
__VA_ARGS__)
/*
@@ -187,7 +187,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
* the real definition of all the pll, pll_dividers and clocks
* these make use of the above REGISTER_* macros
*/
@@ -1910,6 +1984,18 @@ static const struct bcm2835_clk_desc clk
@@ -1912,6 +1986,18 @@ static const struct bcm2835_clk_desc clk
.div_reg = CM_DSI1EDIV,
.int_bits = 4,
.frac_bits = 8),
@@ -206,7 +206,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/* the gates */
@@ -1968,8 +2054,19 @@ static int bcm2835_clk_probe(struct plat
@@ -1970,8 +2056,19 @@ static int bcm2835_clk_probe(struct plat
if (IS_ERR(cprman->regs))
return PTR_ERR(cprman->regs);

View File

@@ -125,7 +125,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
return 0;
}
@@ -1780,7 +1850,8 @@ static const struct bcm2835_clk_desc clk
@@ -1782,7 +1852,8 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_OTPCTL,
.div_reg = CM_OTPDIV,
.int_bits = 4,
@@ -135,7 +135,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/*
* Used for a 1Mhz clock for the system clocksource, and also used
* bythe watchdog timer and the camera pulse generator.
@@ -1814,13 +1885,15 @@ static const struct bcm2835_clk_desc clk
@@ -1816,13 +1887,15 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_H264CTL,
.div_reg = CM_H264DIV,
.int_bits = 4,
@@ -153,7 +153,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/*
* Secondary SDRAM clock. Used for low-voltage modes when the PLL
@@ -1831,13 +1904,15 @@ static const struct bcm2835_clk_desc clk
@@ -1833,13 +1906,15 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_SDCCTL,
.div_reg = CM_SDCDIV,
.int_bits = 6,
@@ -171,7 +171,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/*
* VPU clock. This doesn't have an enable bit, since it drives
* the bus for everything else, and is special so it doesn't need
@@ -1851,7 +1926,8 @@ static const struct bcm2835_clk_desc clk
@@ -1853,7 +1928,8 @@ static const struct bcm2835_clk_desc clk
.int_bits = 12,
.frac_bits = 8,
.flags = CLK_IS_CRITICAL,
@@ -181,7 +181,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/* clocks with per parent mux */
[BCM2835_CLOCK_AVEO] = REGISTER_PER_CLK(
@@ -1859,19 +1935,22 @@ static const struct bcm2835_clk_desc clk
@@ -1861,19 +1937,22 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_AVEOCTL,
.div_reg = CM_AVEODIV,
.int_bits = 4,
@@ -207,7 +207,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_CLOCK_DFT] = REGISTER_PER_CLK(
.name = "dft",
.ctl_reg = CM_DFTCTL,
@@ -1883,7 +1962,8 @@ static const struct bcm2835_clk_desc clk
@@ -1885,7 +1964,8 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_DPICTL,
.div_reg = CM_DPIDIV,
.int_bits = 4,
@@ -217,7 +217,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/* Arasan EMMC clock */
[BCM2835_CLOCK_EMMC] = REGISTER_PER_CLK(
@@ -1891,7 +1971,8 @@ static const struct bcm2835_clk_desc clk
@@ -1893,7 +1973,8 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_EMMCCTL,
.div_reg = CM_EMMCDIV,
.int_bits = 4,
@@ -227,7 +227,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/* General purpose (GPIO) clocks */
[BCM2835_CLOCK_GP0] = REGISTER_PER_CLK(
@@ -1900,7 +1981,8 @@ static const struct bcm2835_clk_desc clk
@@ -1902,7 +1983,8 @@ static const struct bcm2835_clk_desc clk
.div_reg = CM_GP0DIV,
.int_bits = 12,
.frac_bits = 12,
@@ -237,7 +237,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_CLOCK_GP1] = REGISTER_PER_CLK(
.name = "gp1",
.ctl_reg = CM_GP1CTL,
@@ -1908,7 +1990,8 @@ static const struct bcm2835_clk_desc clk
@@ -1910,7 +1992,8 @@ static const struct bcm2835_clk_desc clk
.int_bits = 12,
.frac_bits = 12,
.flags = CLK_IS_CRITICAL,
@@ -247,7 +247,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[BCM2835_CLOCK_GP2] = REGISTER_PER_CLK(
.name = "gp2",
.ctl_reg = CM_GP2CTL,
@@ -1923,40 +2006,46 @@ static const struct bcm2835_clk_desc clk
@@ -1925,40 +2008,46 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_HSMCTL,
.div_reg = CM_HSMDIV,
.int_bits = 4,
@@ -300,7 +300,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/* TV encoder clock. Only operating frequency is 108Mhz. */
[BCM2835_CLOCK_VEC] = REGISTER_PER_CLK(
@@ -1969,7 +2058,8 @@ static const struct bcm2835_clk_desc clk
@@ -1971,7 +2060,8 @@ static const struct bcm2835_clk_desc clk
* Allow rate change propagation only on PLLH_AUX which is
* assigned index 7 in the parent array.
*/
@@ -310,7 +310,7 @@ Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
/* dsi clocks */
[BCM2835_CLOCK_DSI0E] = REGISTER_PER_CLK(
@@ -1977,25 +2067,29 @@ static const struct bcm2835_clk_desc clk
@@ -1979,25 +2069,29 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_DSI0ECTL,
.div_reg = CM_DSI0EDIV,
.int_bits = 4,

View File

@@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1372,6 +1372,11 @@ bcm2835_register_pll_divider(struct bcm2
@@ -1374,6 +1374,11 @@ bcm2835_register_pll_divider(struct bcm2
divider->div.hw.init = &init;
divider->div.table = NULL;

View File

@@ -67,7 +67,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
pll = kzalloc(sizeof(*pll), GFP_KERNEL);
if (!pll)
return NULL;
@@ -1373,8 +1378,10 @@ bcm2835_register_pll_divider(struct bcm2
@@ -1375,8 +1380,10 @@ bcm2835_register_pll_divider(struct bcm2
divider->div.table = NULL;
if (!(cprman_read(cprman, data->cm_reg) & data->hold_mask)) {
@@ -80,7 +80,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
}
divider->cprman = cprman;
@@ -2110,6 +2117,8 @@ static const struct bcm2835_clk_desc clk
@@ -2112,6 +2119,8 @@ static const struct bcm2835_clk_desc clk
.ctl_reg = CM_PERIICTL),
};
@@ -89,7 +89,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
/*
* Permanently take a reference on the parent of the SDRAM clock.
*
@@ -2129,6 +2138,19 @@ static int bcm2835_mark_sdc_parent_criti
@@ -2131,6 +2140,19 @@ static int bcm2835_mark_sdc_parent_criti
return clk_prepare_enable(parent);
}
@@ -109,7 +109,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
static int bcm2835_clk_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -2138,6 +2160,7 @@ static int bcm2835_clk_probe(struct plat
@@ -2140,6 +2162,7 @@ static int bcm2835_clk_probe(struct plat
const struct bcm2835_clk_desc *desc;
const size_t asize = ARRAY_SIZE(clk_desc_array);
size_t i;
@@ -117,7 +117,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
int ret;
cprman = devm_kzalloc(dev, sizeof(*cprman) +
@@ -2153,6 +2176,13 @@ static int bcm2835_clk_probe(struct plat
@@ -2155,6 +2178,13 @@ static int bcm2835_clk_probe(struct plat
if (IS_ERR(cprman->regs))
return PTR_ERR(cprman->regs);

Some files were not shown because too many files have changed in this diff Show More