Commit Graph

51342 Commits

Author SHA1 Message Date
Rafał Miłecki 4a1d8ef55c bcm53xx: refresh kernel config
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-06 13:29:45 +01:00
Rafał Miłecki c31872bad8 bcm53xx: backport 1 more late DT patch accepted for v6.7
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 732ae343ff)
2023-10-26 13:43:33 +02:00
Rafał Miłecki 754dfab01c bcm53xx: disable unused switch ports in downstream patch
This makes Linux use correct switch ports again.

Fixes: fff279f4a7 ("bcm53xx: backport DT changes from v6.5")
Fixes: https://github.com/openwrt/openwrt/issues/13548
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a912ee74d6)
2023-10-26 13:43:33 +02:00
Rafał Miłecki 74212e7be3 bcm53xx: backport DT changes queued for v6.7
Among other changes this commit makes Linux use correct switch ports
again.

Fixes: fff279f4a7 ("bcm53xx: backport DT changes from v6.5")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a67af19bc8)
2023-10-26 13:43:33 +02:00
Rafał Miłecki ded99ab483 bcm53xx: simplify patch adding switch ports
We now have all raw ports defined in bcm-ns.dtsi. Leave only lables in
custom device files.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 08ce0c76d7)
2023-10-26 13:43:33 +02:00
Rani Hod c5cb4287b8 bcm53xx: build a single device per profile
So far every build of a single bcm53xx Target Profile (it means: when
NOT using CONFIG_TARGET_MULTI_PROFILE) resulted in all target devices
images being built. Now it only builds the one matching selected
profile.

Fixes: #13572

Suggested-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Rani Hod <rani.hod@gmail.com>
[rmilecki: update commit subject + body & move PROFILES line]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 802a5f5cb4)
2023-10-26 13:43:33 +02:00
Arınç ÜNAL 66c2715a56 bcm53xx: add support for ASUS RT-AC3100
ASUS RT-AC3100 is ASUS RT-AC88U without the external switch.

OpenWrt forum users effortless and ktmakwana have confirmed that there are
revisions with either 4366b1 or 4366c0 wireless chips.

Therefore, include firmware for 4366b1 along with 4366c0. This way, all
hardware revisions of the router will be supported by having brcmfmac use
the firmware file for the wireless chip it detects.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit 2214bab350)
2023-10-26 13:43:33 +02:00
Arınç ÜNAL b3baba3854 bcm53xx: backport DT changes for ASUS RT-AC3100 queued for v6.6
Backport the patch that adds the DT for ASUS RT-AC3100.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit b7ee8c9f83)
2023-10-26 13:07:30 +02:00
Koen Vandeputte 18f12e6f69 ipq40xx: switch to performance governor by default
Doing a simple ping to my device shows this:

64 bytes from 10.0.253.101: icmp_seq=1 ttl=64 time=2.00 ms
64 bytes from 10.0.253.101: icmp_seq=2 ttl=64 time=2.02 ms
64 bytes from 10.0.253.101: icmp_seq=3 ttl=64 time=1.68 ms
64 bytes from 10.0.253.101: icmp_seq=4 ttl=64 time=1.91 ms
64 bytes from 10.0.253.101: icmp_seq=5 ttl=64 time=1.92 ms
64 bytes from 10.0.253.101: icmp_seq=6 ttl=64 time=2.04 ms

Some users even report higher values on older kernels:

64 bytes from 192.168.1.10: seq=0 ttl=64 time=0.612 ms
64 bytes from 192.168.1.10: seq=1 ttl=64 time=2.852 ms
64 bytes from 192.168.1.10: seq=2 ttl=64 time=2.719 ms
64 bytes from 192.168.1.10: seq=3 ttl=64 time=2.741 ms
64 bytes from 192.168.1.10: seq=4 ttl=64 time=2.808 ms

The problem is that the governor is set to Ondemand, which causes
the CPU to clock all the way down to 48MHz in some cases.

Switching to performance governor:

64 bytes from 10.0.253.101: icmp_seq=1 ttl=64 time=0.528 ms
64 bytes from 10.0.253.101: icmp_seq=2 ttl=64 time=0.561 ms
64 bytes from 10.0.253.101: icmp_seq=3 ttl=64 time=0.633 ms
64 bytes from 10.0.253.101: icmp_seq=4 ttl=64 time=0.526 ms

In theory, using the Performance governor should increase power draw,
but it looks like it really does not matter for this soc.

Using a calibrated precision DC power supply (cpu idle):

Ondemand
24.00V * 0.134A = 3.216 Watts
48.00V * 0.096A = 4.608 Watts

Performance
24.00V * 0.135A = 3.240 Watts
48.00V * 0.096A = 4.608 Watts

Let's simply switch to the Performance governor by default
to fix the general jittery behaviour on devices using this soc.

Tested on: MikroTik wAP ac

Fixes: #13649
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
(cherry picked from commit b8e52852bd)
2023-10-20 15:24:48 +02:00
Koen Vandeputte 42374bcee6 ath79: wpj563: enable 2nd USB controller
The compex WPJ563 actually has both usb controllers wired:

usb0 --> pci-e slot
usb1 --> pin header

As the board exposes it for generic use, enable this controller too.

fixes: #13650
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
(cherry picked from commit 9188c77cbe)
2023-10-13 18:02:25 +02:00
Hauke Mehrtens f24a029c3e openssl: bump to 1.1.1v
Major changes between OpenSSL 1.1.1u and OpenSSL 1.1.1v [1 Aug 2023]

    o Fix excessive time spent checking DH q parameter value (CVE-2023-3817)
    o Fix DH_check() excessive time with over sized modulus (CVE-2023-3446)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit de29f15af1)
2023-09-29 12:05:05 +02:00
Hauke Mehrtens ed68908f58 openssl: bump to 1.1.1u
Major changes between OpenSSL 1.1.1t and OpenSSL 1.1.1u [30 May 2023]

    o Mitigate for very slow `OBJ_obj2txt()` performance with gigantic
      OBJECT IDENTIFIER sub-identities.  (CVE-2023-2650)
    o Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466)
    o Fixed handling of invalid certificate policies in leaf certificates
      (CVE-2023-0465)
    o Limited the number of nodes created in a policy tree ([CVE-2023-0464])

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit afb4422702)
2023-09-29 12:04:21 +02:00
Hauke Mehrtens c5dc0e01df
treewide: Add extra CPE identifier
This adds some Common Platform Enumerations (CPE) identifiers which I
found.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-09-27 22:16:36 +02:00
Arne Zachlod 41d3d25142 toolchain: musl: add PKG_CPE_ID
Vulnerabilities of musl libc are tracked as
cpe:/a:musl-libc:musl

Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
2023-09-27 17:25:40 +02:00
Alexander Couzens 0ab1007528 toolchain: assign PKG_CPE_ID
The PKG_CPE_ID links to NIST CPE version 2.2.
Assign PKG_CPE_ID to all remaining package which have a CPE ID.
Not every package has a CPE id.

Related: https://github.com/openwrt/packages/issues/8534
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2023-09-27 17:24:47 +02:00
Alexander Couzens ddc361f1a6 tools: assign PKG_CPE_ID
The PKG_CPE_ID links to NIST CPE version 2.2.
Assign PKG_CPE_ID to all remaining tools which have a CPE ID.
Not every tool has CPE id.

Related: https://github.com/openwrt/packages/issues/8534
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2023-09-27 17:23:27 +02:00
Alexander Couzens 9431f3625b packages: assign PKG_CPE_ID for all missing packages
The PKG_CPE_ID links to NIST CPE version 2.2.
Assign PKG_CPE_ID to all remaining package which have a CPE ID.
Not every package has CPE id.

Related: https://github.com/openwrt/packages/issues/8534
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2023-09-27 17:21:26 +02:00
Jonas Gorski ac52e2013a x86: geode: fix hwrng register accesses
When the membase and pci_dev pointer were moved to a new struct in priv,
the actual membase users were left untouched, and they started reading
out arbitrary memory behind the struct instead of registers. This
unfortunately turned the RNG into a constant number generator, depending
on the content of what was at that offset.

To fix this, update geode_rng_data_{read,present}() to also get the
membase via amd_geode_priv, and properly read from the right addresses
again.

Closes #13417.

Reported-by: Timur I. Davletshin <timur.davletshin@gmail.com>
Tested-by: Timur I. Davletshin <timur.davletshin@gmail.com>
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(cherry picked from commit 09d13cd8d8)
2023-09-14 11:36:57 +02:00
Rafał Miłecki 383ae905a2 urngd: update to the latest master
7aefb47 jitterentropy-rngd: update to the v1.2.0

What's interesting about jitterentropy-rngd v1.2.0 release is that it
bumps its copy of jitterentropy-library from v2.2.0 to the v3.0.0. That
bump includes a relevant commit 3130cd9 ("replace LSFR with SHA-3 256").

When initializing entropy jent calculates time delta. Time values are
obtained using clock_gettime() + CLOCK_REALTIME. There is no guarantee
from CLOCK_REALTIME of unique values and slow devices often return
duplicated ones.

A switch from jent_lfsr_time() to jent_hash_time() resulted in many less
cases of zero delta and avoids ECOARSETIME.

Long story short: on some system this fixes:
[    6.722725] urngd: jent-rng init failed, err: 2

This is important change for BCM53573 which doesn't include hwrng and
seems to have arch_timer running at 36,8 Hz.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit c74b5e09e6)
2023-09-01 16:10:22 +02:00
Rafał Miłecki 170d9e447d bcm53xx: backport more DT changes queued for v6.6
Those sort out BCM53573 Ethernet info finally.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ca8868a511)
2023-07-29 21:00:07 +02:00
Rafał Miłecki 4ceaf439a5 bcm53xx: add BCM53573 Ethernet fix sent upstream for v6.6
It seems that DSA-based b53 driver never worked with BCM53573 SoCs and
BCM53125.

In case of swconfig-based b53 this fixes a regression. Switching bgmac
from using mdiobus_register() to of_mdiobus_register() resulted in MDIO
device (BCM53125) having of_node set (see of_mdiobus_register_phy()).
That made downstream b53 driver read invalid data from DT and broke
Ethernet support.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 79fd3e62b4)
2023-07-29 21:00:07 +02:00
Tomasz Maciej Nowak 47054075e2 sdk: rename README + update Makefile
'help' target fails not finding a file, so follow up on a change[2] made
as a fix for main README[1].

1. d0113711a3 ("README: port to 21st century")
2. 751486b31f ("build: fix README.md reference after rename")

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(cherry picked from commit 2d5f7035cf)
(cherry picked from commit e9911f10e4)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-07-20 11:31:08 +02:00
Tomasz Maciej Nowak 04ee513ede ib: split out processing user provided packages
Some device recipes remove default target packages. If user tries to add
them back they will be ignored, since packages list is processed in one
go. Process the device recipe packages first and do user ones later, so
additions won't get filtered out.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(cherry picked from commit e40b9a7fa0)
2023-07-20 11:31:08 +02:00
Rafał Miłecki f5fbde4c11 bcm53xx: backport DT changes queued for v6.6
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 37ff916af7)
2023-07-14 14:56:51 +02:00
Rafał Miłecki fff279f4a7 bcm53xx: backport DT changes from v6.5
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 8674b41c0d)
2023-07-11 13:38:09 +02:00
Rafał Miłecki 7f06e5f7f2 kernel: bgmac: fix regressed support for BCM53573 SoCs
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit d54f3b2cfd)
2023-07-10 18:47:41 +02:00
Rafał Miłecki 64261da739 kernel: fix bgmac support for BCM5358
Fix two long-standing regressions.

Fixes: https://github.com/openwrt/openwrt/issues/8278
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 5e48c534f7)
2023-07-10 18:47:41 +02:00
Rafał Miłecki 1d206bcd71 bcm47xx: fix bgmac regression present in 5.4 kernel
This fixes:
[    2.548098] bgmac_bcma bcma0:1: Failed to register fixed PHY device
[    2.554584] bgmac_bcma bcma0:1: Cannot connect to phy
and downstream (swconfig-based) b53 driver failing to load.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 6cdac99401)
2023-07-10 18:47:41 +02:00
Rafał Miłecki 18a5301858 kernel: backport bgmac upstream commits from 5.15 / for 5.16
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit fd71ef34b7)
2023-07-10 18:47:41 +02:00
Álvaro Fernández Rojas eb8cae5391 bcm63xx: fix NETGEAR DGND3700v2 boot loop
The DGND3700v2 renames the cferam bootloader from cferam to cfeXXX, where XXX
is the number of firmware upgrades performed by the bootloader. Other bcm63xx
devices rename cferam.000 to cferam.XXX, but this device is special because
the cferam name isn't changed on the first firmware flashing but it's changed
on the subsequent ones.
Therefore, we need to look for "cfe" instead of "cferam" to properly detect
the cferam partition and fix the bootlop.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit cdfcac6e24)
2023-06-15 12:01:32 +02:00
Álvaro Fernández Rojas 39c00a9bdd kernel: mtd: bcm-wfi: add cferam name support
Some devices rename cferam bootloader using specific patterns and don't follow
broadcom standards for renaming cferam files. This requires supporting
different cferam file names.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 8813edd8d9)
2023-06-15 12:01:07 +02:00
Paul Spooren 491b784141 build: generate index.json
The index.json file lies next to Packages index files and contains a
json dict with the package architecture and a dict of package names and
versions.

This can be used for downstream project to know what packages in which
versions are available.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 218ce40cd7)
2023-05-11 13:15:02 +02:00
Hauke Mehrtens 6a12ecbd6d OpenWrt v21.02.7: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-04-27 23:08:19 +02:00
Hauke Mehrtens 57a6d97ddf OpenWrt v21.02.7: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-04-27 23:08:10 +02:00
Eneas U de Queiroz f8282da11e
openssl: fix CVE-2023-464 and CVE-2023-465
Apply two patches fixing low-severity vulnerabilities related to
certificate policies validation:

- Excessive Resource Usage Verifying X.509 Policy Constraints
  (CVE-2023-0464)
  Severity: Low
  A security vulnerability has been identified in all supported versions
  of OpenSSL related to the verification of X.509 certificate chains
  that include policy constraints.  Attackers may be able to exploit
  this vulnerability by creating a malicious certificate chain that
  triggers exponential use of computational resources, leading to a
  denial-of-service (DoS) attack on affected systems.
  Policy processing is disabled by default but can be enabled by passing
  the `-policy' argument to the command line utilities or by calling the
  `X509_VERIFY_PARAM_set1_policies()' function.

- Invalid certificate policies in leaf certificates are silently ignored
  (CVE-2023-0465)
  Severity: Low
  Applications that use a non-default option when verifying certificates
  may be vulnerable to an attack from a malicious CA to circumvent
  certain checks.
  Invalid certificate policies in leaf certificates are silently ignored
  by OpenSSL and other certificate policy checks are skipped for that
  certificate.  A malicious CA could use this to deliberately assert
  invalid certificate policies in order to circumvent policy checking on
  the certificate altogether.
  Policy processing is disabled by default but can be enabled by passing
  the `-policy' argument to the command line utilities or by calling the
  `X509_VERIFY_PARAM_set1_policies()' function.

Note: OpenSSL also released a fix for low-severity security advisory
CVE-2023-466.  It is not included here because the fix only changes the
documentation, which is not built nor included in any OpenWrt package.

Due to the low-severity of these issues, there will be not be an
immediate new release of OpenSSL.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2023-04-17 10:15:36 -03:00
Daniel Golle 34d2883b9d kernel: backport fix for recently introduced UBI bug
Import commit "ubi: Fix failure attaching when vid_hdr offset equals to
(sub)page size" which did not yet make it to stable upstream Linux trees.

Fixes: #12232
Fixes: #12339
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit aad34818b5)
2023-04-15 03:34:22 +01:00
Matthias Schiffer e63b8443ab
uclient: update to Git version 2023-04-13
007d94546749 uclient: cancel state change timeout in uclient_disconnect()
644d3c7e13c6 ci: improve wolfSSL test coverage
dc54d2b544a1 tests: add certificate check against letsencrypt.org

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
(cherry picked from commit 4f1c2e8dee)
2023-04-13 20:55:09 +02:00
Daniel Golle f6a41570a5 OpenWrt v21.02.6: revert to branch defaults
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-09 23:38:42 +01:00
Daniel Golle 9f213a85e2 OpenWrt v21.02.6: adjust config defaults
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-09 23:38:36 +01:00
Paul Spooren bc99ce5b22 imagebuilder: allow to specific ROOTFS_PARTSIZE
Setting this options modifies the rootfs size of created images. When
installing a large number of packages it may become necessary to
increase the size to have enough storage.

This option is only useful for supported devices, i.e. with an attached
SD Card or installed on a hard drive.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 7b7edd25a5)
2023-04-09 14:28:16 +02:00
Felix Fietkau cbe73ea33d kernel: remove obsolete netfilter tcp window size check bypass patch
On any currently supported hardware, the performance impact should not
matter anymore.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 75e78bcaab)
2023-03-30 14:18:04 +02:00
Felix Fietkau 32621086c3 mac80211, mt76: add fixes for recently discovered security issues
Fixes CVE-2022-47522

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d54c91bd9a)
2023-03-30 12:24:52 +02:00
Daniel González Cabanelas 2541ca616d ipq40xx: Linksys MR8300: fix the USB port power
The USB port on the MR8300 randomly fails to feed bus-powered devices.

This is caused by a misconfigured pinmux. The GPIO68 should be used to
enable the USB power (active low), but it's inside the NAND pinmux.

This GPIO pin was found in the original firmware at a startup script in
both MR8300 and EA8300. Therefore apply the fix for both boards.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit ed64c33235)
Signed-off-by: Steffen Scheib <steffen@scheib.me>
2023-03-29 22:19:27 +02:00
Hauke Mehrtens 5e69c097f7 kernel: bump 5.4 to 5.4.238
Compile-tested: armvirt/64, lantiq/xrx200
Run-tested: armvirt/64, lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-29 16:31:21 +02:00
Mathias Kresin 8e12360fcf lantiq: ltq-tapi: add kernel 5.10 compatiblity
Due to SCHED_FIFO being a broken scheduler model, all users of
sched_setscheduler() are converted to sched_set_fifo_low() upstream and
sched_setscheduler() is no longer exported.

The callback handling of the tasklet API was redesigned and the macros
using the old syntax renamed to _OLD.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(cherry picked from commit 31f3f79700)
[Add DECLARE_TASKLET handling for kernel 5.4.235 too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-29 16:31:21 +02:00
Mathias Kresin 3d93d2cea5 ltq-atm/ltq-ptm: add kernel 5.10 compatiblity
The callback handling of the tasklet API was redesigned and the macros
using the old syntax renamed to _OLD.

The stuck queue is now passed to ndo_tx_timeout callback but not used so
far.

Signed-off-by: Mathias Kresin <dev@kresin.me>
(cherry picked from commit 804c541446)
[Add DECLARE_TASKLET handling for kernel 5.4.235 too]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-27 18:42:28 +02:00
John Audia a4f065a646 kernel: tcindex classifier has been retired
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net/sched?h=v5.4.235&id=7a6fb69bbcb21e9ce13bdf18c008c268874f0480

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit fbfec3286e)
2023-03-27 18:42:28 +02:00
Hauke Mehrtens 122e0c7fed kernel: bump 5.4 to 5.4.234
Compile-tested: armvirt/64, lantiq/xrx200
Run-tested: armvirt/64

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-27 18:42:03 +02:00
Rafał Miłecki c874aa40c2 bcm4908: include usbport trigger
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit cb2661844a)
2023-03-27 09:36:04 +02:00
Rafał Miłecki 13bd05efd7 bcm4908: backport v6.4 pending DTS changes
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit ffaabee9b8)
2023-03-27 09:36:01 +02:00