This fixes a security problem in ksmbd. It currently has the
ZDI-CAN-18259 ID assigned, but no CVE yet.
Backported from:
8824b7af40cc4f3b5a6a
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Upstream commit [1] included in the Linux kernel version 6.2 was
backported to Linux kernels 6.1.4, 6.0.18. It should be possible that it
is going to be backported even to the 5.15 series, but before it happens,
let's include it here.
It was discovered that on SOC Marvell Armada 3720, which is using e.g.
Turris MOX, and if you are also using it with older ARM Trusted Firmware
v1.5, it is not possible to detect connected USB 3.0 devices, but they
are working just fine when connected with USB 2.0 cable. This patch
fixes it.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/phy/marvell/phy-mvebu-a3700-comphy.c?id=b01d622d76134e9401970ffd3fbbb9a7051f976a
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Michal Hrusecky <michal.hrusecky@turris.com>
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
[improve commit description, added tag to the patch]
Test each target if there are additional changes than target/linux.
This is needed to do wide test with changes to kmods, include/kernel and
changes to the workflow files.
While at it also cleanup and rework the code to drop duplication.
Also drop since_last_remote_commit to better track changes.
Fixes: 04ada8bc41 ("CI: kernel: build only changed targets")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
We've few low spec (make -j3) build workers attached to the 22.03
buildbot instance which from time to time exhibit following build
failure during image generation (shortened for brewity):
+ dd bs=512 if=root.ext4 of=openwrt-22.03...sdcard.img.gz.img
dd: failed to open 'root.ext4': No such file or directory
Thats happening likely due to the fact, that on buildbots we've
`TARGET_PER_DEVICE_ROOTFS=y` which produces differently named filesystem
image in the SD card image target dependency chain:
make_ext4fs -L rootfs ... root.ext4+pkg=68b329da
and that hardcoded `root.ext4` image filename becomes available from
other Make targets in the later stages. So lets fix this issue by using
IMAGE_ROOTFS Make variable which should contain proper path to the root
filesystem image.
Fixing remaining subtargets ommited in commit 5c3679e39b ("at91:
sama7: fix racy SD card image generation").
Fixes: 5c3679e39b ("at91: sama7: fix racy SD card image generation")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
The board is similar to an APU4 except it has an SFP cage for eth0.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [patch refresh]
We've few low spec (make -j3) build workers attached to the 22.03
buildbot instance which from time to time exhibit following build
failure during image generation:
+ dd bs=512 if=root.ext4 of=openwrt-22.03-snapshot-r20028-43d71ad93e-at91-sama7-microchip_sama7g5-ek-ext4-sdcard.img.gz.img seek=135168 conv=notrunc
dd: failed to open 'root.ext4': No such file or directory
Thats likely due to the fact, that on buildbots we've
`TARGET_PER_DEVICE_ROOTFS=y` which produces differently named filesystem
image in the SD card image target dependency chain:
make_ext4fs -L rootfs ... root.ext4+pkg=68b329da
and that hardcoded root.ext4 becomes available from other target in the
later stages. So lets fix this issue by using IMAGE_ROOTFS Make variable
which should contain proper path to the root filesystem image.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Add concurrency limits for pull request test so that on pull request
refresh old jobs are cancelled.
The group is created based on the github ref + workflow name and the
workflow is cancelled only it it comes from a pull_request event.
Push events are not affected by this limit.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Detect changes in commit and build only changed targets.
If a change is related to the generic target, build test each target.
The matrix json is split. For target check patch only the first
subtarget is selected, for build test each target subtarget is built.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
If for whatever reason external toolchain can't be found or downloaded,
fallback to internal toolchain build.
This can be useful when new target are introduced and external toolchain
are not present in openwrt fileserver.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Refresh upstreamed patch with kernel version tag and replace them with
the upstream version.
For krait-cc patch rework them with the upstream changes.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
BSD based OS have different fixup and doesn't require these header.
Limit these Header to Linux based OS.
Fixes: 36bc306ae6 ("prereq-build: add extra check for elfutils required header")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
STAGING_DIR may be provided from command line. We currently hardcoded
STAGING_DIR_HOST and STAGING_DIR_HOSTPKG to the default location but we
currently have some relocatable patch that derive the path from
STAGING_DIR.
Fix this and correctly derive STAGING_DIR_HOST and STAGING_DIR_HOSTPKG
from STAGING_DIR.
The intention is to fix inconsistency from the relocatable patch and the
use of STAGING_DIR_HOST that is always hardcoded.
This with a wrong configuration may end up in broken state with some
host tools expecing a PATH from STAGING_DIR and others using library
from the default staging_dir/host path.
To save downstream project the original implementation is saved while
fixing the inconsistency between patch and .mk.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Use STAGING_DIR_HOST to reference staging host directory instead of
hardcoding it to default path.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Use STAGING_DIR_HOST to reference staging host directory instead of
hardcoding it to default path.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Use STAGING_DIR_HOST to reference the staging dir for host tools instead
of hardcoding it to the default location.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Instead of using STAGING_DIR and then go up one dir with '../' use
directly STAGING_DIR_HOST env variable. This should produce cleaner
symbolic links.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Config evaluation require default with if to be put before the generic
default config with no condition. Putting the default config before any
conditional default results in always selecting the non conditional one.
This results in the version be hardcoded to gcc 12 even if gcc 11 is
selected in the Advanced build options.
Fix this by putting the gcc 12 default option as last after ANY
conditional default config.
Fixes: d9de5252a4 ("toolchain/gcc: switch to version 12 by default")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
While testing tools build on an alpine image it was found that with musl
libc some header are missing for elfutils tool.
Add extra prereq-build check to make sure these header are present in
the system to correctly compile host tools.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Add RequireCHeader helper that will try to compile a fake c program with
the requested header included.
This is useful to check if a specific header is present in the system
without checking for the specific path.
This is a generilized version of the current ncurses test.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The testing kernel has been available since early 2022, and is running
fine for several people. Let's switch to it by default.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Karl Palsson <karlp@etactica.com>
Tested-by: Jan-Niklas Burfeind <openwrt@aiyionpri.me>
While switching qoriq to kernel 5.15, the config for kernel 5.10 was
left behind. Drop it.
Fixes: 230f2fccd1 ("qoriq: switch to kernel 5.15")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
The bpf plugin provides functionality for loading and interacting with
eBPF modules.
It allows loading full modules and pinned maps/programs and supports
interacting with maps and attaching programs as tc classifiers.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
34cfbb922c96 README.md: various spelling and documentation fixes
ff32355ea645 build: make rtnl/nl80211 depend on linux instead of !APPLE
c0e413c21f7b include: add uc_fn_thisval()
1e4d20932646 Merge pull request #134 from nbd168/thisval
Signed-off-by: Felix Fietkau <nbd@nbd.name>
We're currently missing log output in cases where `configure` fails
which returns 77 as its error code:
make[3]: *** [Makefile:118: elfutils-0.188/.configured_889556d2f423f99e091beece9c8d870a] Error 77
So lets adjust the regexps so they can handle multiple digits.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
This was build tested with all core packages on all targets
successfully.
Most packages from the feed are also building fine.
This was run tested on the following systems:
* lantiq/xrx200 musl
* pistachio/generic musl
* sunxi/cortexa53 musl
* x86/64 musl
* x86/64 glibc
* armvirt/64 musl
The size of the images stays more or less the same for MIPS BE and
aarch64. I haven't tested other architectures.
With GCC 11 I got these sizes for lantiq/xrx200:
7,219,848 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin
7,472,208 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin
With GCC 12 I got these sizes for lantiq/xrx200:
7,217,355 openwrt-lantiq-xrx200-tplink_tdw8970-initramfs-kernel.bin
7,406,674 openwrt-lantiq-xrx200-tplink_tdw8970-squashfs-sysupgrade.bin
The sysupgrade image is probably padded. The initramfs image is 0.03% smaller.
With GCC 11 I got these sizes for armvirt/64:
4,143,943 openwrt-armvirt-64-default-rootfs.tar.gz
10,887,176 openwrt-armvirt-64-Image
24,911,880 openwrt-armvirt-64-Image-initramfs
4,141,572 openwrt-armvirt-64-rootfs.cpio.gz
4,255,854 openwrt-armvirt-64-rootfs-ext4.img.gz
3,391,178 openwrt-armvirt-64-rootfs-squashfs.img.gz
With GCC 12 I got these sizes for armvirt/64:
4,142,778 openwrt-armvirt-64-default-rootfs.tar.gz
10,887,176 openwrt-armvirt-64-Image
24,911,880 openwrt-armvirt-64-Image-initramfs
4,138,105 openwrt-armvirt-64-rootfs.cpio.gz
4,255,463 openwrt-armvirt-64-rootfs-ext4.img.gz
3,390,390 openwrt-armvirt-64-rootfs-squashfs.img.gz
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The version check which sets GCC_VERSION_FILE to the correct value only
worked when the advanced options menu was active and not when it was not
active.
Thank you Tony Butler for the fix.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
GCC 12.2.0 shows these error messages:
````
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c: In function 'rtw_mfree_stainfo':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:210:24: error: the comparison will always evaluate as 'true' for the address of 'lock' will never be NULL [-Werror=address]
210 | if(&psta->lock != NULL)
| ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:109,
from rtl8812au-ct-2021-11-07-39df5596/core/rtw_sta_mgt.c:22:
rtl8812au-ct-2021-11-07-39df5596/include/sta_info.h:95:17: note: 'lock' declared here
95 | _lock lock;
| ^~~~
````
````
CC [M] rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.o
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c: In function 'cfg80211_rtw_scan':
rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:2176:32: warning: the comparison will always evaluate as 'true' for the address of 'ssid' will never be NULL [-Waddress]
2176 | if(ssids->ssid != NULL
| ^~
In file included from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service_linux.h:88,
from rtl8812au-ct-2021-11-07-39df5596/include/osdep_service.h:41,
from rtl8812au-ct-2021-11-07-39df5596/include/drv_types.h:32,
from rtl8812au-ct-2021-11-07-39df5596/os_dep/linux/ioctl_cfg80211.c:22:
/home/hauke/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/include/mac80211/net/cfg80211.h:2364:12: note: 'ssid' declared here
2364 | u8 ssid[IEEE80211_MAX_SSID_LEN];
| ^~~~
````
````
CC [M] rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.o
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c: In function 'phydm_cmd_parser':
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:873:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
873 | if(input[i+1]) {
| ^~~~~
rtl8812au-ct-2021-11-07-39df5596/hal/OUTSRC/phydm_debug.c:894:28: warning: the comparison will always evaluate as 'true' for the pointer operand in 'input + ((sizetype)i + 1) * 16' must not be NULL [-Waddress]
894 | if(input[i+1]) {
| ^~~~~
````
This one was only seen on the rockchip/armv8 target:
````
CC [M] rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.o
In function '__nat25_add_pppoe_tag',
inlined from 'nat25_db_handle' at rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:909:10:
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:118:9: error: 'memcpy' reading between 2052 and 9220 bytes from a region of size 40 [-Werror=stringop-overread]
118 | memcpy((unsigned char *)ph->tag, tag, data_len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c: In function 'nat25_db_handle':
rtl8812au-ct-2021-11-07-39df5596/core/rtw_br_ext.c:878:63: note: source object 'tag_buf' of size 40
878 | unsigned char tag_buf[40];
| ^~~~~~~
````
Most of them are looking like real errors to me, but some fixes need a
deeper understanding of the driver and probably bigger changes to the driver.
Ignore these error messages for now. It would be nice if someone would
fix them.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
GCC 12.2.0 shows this false positive error message:
````
uqmi-2022-05-04-56cb2d40/dev.c: In function 'qmi_request_wait':
uqmi-2022-05-04-56cb2d40/dev.c:217:23: error: storing the address of local variable 'complete' in '*req.complete' [-Werror=dangling-pointer=]
217 | req->complete = &complete;
| ~~~~~~~~~~~~~~^~~~~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'complete' declared here
208 | bool complete = false;
| ^~~~~~~~
uqmi-2022-05-04-56cb2d40/dev.c:208:14: note: 'req' declared here
cc1: all warnings being treated as errors
````
and this one:
````
In file included from uqmi-2022-05-04-56cb2d40/commands.c:28:
In function 'blobmsg_close_table',
inlined from 'cmd_nas_get_cell_location_info_cb' at /home/haukeuqmi-2022-05-04-56cb2d40/commands-nas.c:897:4:
/usr/include/libubox/blobmsg.h:256:9: error: 'c' may be used uninitialized [-Werror=maybe-uninitialized]
256 | blob_nest_end(buf, cookie);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from uqmi-2022-05-04-56cb2d40/commands.c:169:
uqmi-2022-05-04-56cb2d40/commands-nas.c: In function 'cmd_nas_get_cell_location_info_cb':
uqmi-2022-05-04-56cb2d40/commands-nas.c:713:15: note: 'c' was declared here
713 | void *c, *t, *cell, *freq;
| ^
cc1: all warnings being treated as errors
````
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
GCC 12.2.0 shows this false positive error message:
````
In function 'bigger_buffer',
inlined from '__libdw_gunzip' at gzip.c:374:12:
gzip.c:96:9: error: pointer may be used after 'realloc' [-Werror=use-after-free]
96 | b = realloc (state->buffer, more -= 1024);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gzip.c:94:13: note: call to 'realloc' here
94 | char *b = realloc (state->buffer, more);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
````
GCC bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The kernel configuration option is now available on kernel 5.10 and
5.15, add it to the config for 5.15 too.
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Make the patches apply cleanly again.
Fixes: 8dfe69cdfc ("kernel: update nvmem subsystem to the latest upstream")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Added the full SFP description for both SFP ports (lan9, 10) on D-Link
DGS-1210-10MP, which enables hot-plug detection of SFP modules.
Added the patch to both kernel 5.10 and 5.15 dts files.
Signed-off-by: Daniel Groth <flygarn12@gmail.com>
The pins of the MT7530 switch that translate to GPIO 0, 3, 6, 9 and 12 has
got a function, by default, which does the same thing as the netdev
trigger. Because of bridge offloading on DSA, the netdev trigger won't see
the frames between the switch ports whilst the default function will.
Do not use the GPIO function on switch pins on devices that fall under this
category.
Keep it for:
mt7621_belkin_rt1800.dts: There's only one LED which is for the wan
interface and there's no bridge offloading between the "wan" interface and
other interfaces.
mt7621_yuncore_ax820.dts: There's no bridge offloading between the "wan"
and "lan" interfaces.
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
The DAP-X1860 is a wall-plug AX1800 repeater.
Specifications:
- MT7621, 256 MiB RAM, 128 MiB SPI NAND
- MT7915 + MT7975 2x2 802.11ax (DBDC)
- Ethernet: 1 port 10/100/1000
- LED RSSI bargraph (2x green, 1x red/orange), status
and RSSI LEDs are incorrectly populated red/orange
(should be red/green according to documentation)
Installation:
- Keep reset button pressed during plug-in
- Web Recovery Updater is at 192.168.0.50
- Upload factory.bin, confirm flashing
(seems to work best with Chromium-based browsers)
Revert to OEM firmware:
- tar -xvf DAP-X1860_RevA_Firmware_101b94.bin
- openssl enc -d -md md5 -aes-256-cbc -in FWImage.st2 \
-out FWImage.st1 -k MB0dBx62oXJXDvt12lETWQ==
- tar -xvf FWImage.st1
- flash kernel_DAP-X1860.bin via Recovery
Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Update busybox to version 1.36.0
* refresh patches (remove the backported upstream fix)
* refresh config
Config refresh:
Refresh commands, run after busybox is first built once:
cd package/utils/busybox/config/
../convert_menuconfig.pl ../../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0
cd ..
./convert_defaults.pl ../../../build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/busybox-default/busybox-1.36.0/.config > Config-defaults.in
Manual edits needed after config refresh:
* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to
BUSYBOX_DEFAULT_FEATURE_IPV6
* Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to
BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)
* Config-defaults.in: OpenWrt logic applied to
BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917)
* Config-defaults.in: correct the default ports that get reset
BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT 80
BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT 23
* config/editors/Config.in: Add USE_GLIBC dependency to
BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)
* config/shell/Config.in: change at "Options common to all shells" the conditional symbol
SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH
(discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
Apparently our script does not see the hidden option while
prepending config options with "BUSYBOX_CONFIG_" which leads to a
missed dependency when the options are later evaluated.)
* Edit a few Config.in files by adding quotes to sourced items in
config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f)
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Changes from versions 4.1.* to version 4.2.0:
- The "fondue savoyarde" release.
- Binary compatible with MPFR 4.0.* and 4.1.*, though some minor changes in
the behavior of the formatted output functions may be visible, regarded
as underspecified behavior or bug fixes (see below).
- New functions mpfr_cosu, mpfr_sinu, mpfr_tanu, mpfr_acosu, mpfr_asinu,
mpfr_atanu and mpfr_atan2u.
- New functions mpfr_cospi, mpfr_sinpi, mpfr_tanpi, mpfr_acospi, mpfr_asinpi,
mpfr_atanpi and mpfr_atan2pi.
- New functions mpfr_log2p1, mpfr_log10p1, mpfr_exp2m1, mpfr_exp10m1 and
mpfr_compound_si.
- New functions mpfr_fmod_ui, mpfr_powr, mpfr_pown, mpfr_pow_uj, mpfr_pow_sj
and mpfr_rootn_si (mpfr_pown is actually a macro defined as an alias for
mpfr_pow_sj).
- Bug fixes.
In particular, for the formatted output functions (mpfr_printf, etc.),
the case where the precision consists only of a period has been fixed
to be like ".0" as specified in the ISO C standard, and the manual has
been corrected and clarified.
The macros of the custom interface have also been fixed: they now behave
like functions (except a minor limitation for mpfr_custom_init_set).
Remove upstreamed:
- 002-Fix-mpfr_custom_get_kind-macro-bug.patch
Refresh patches:
- 001-only_src.patch
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>