Commit Graph

146 Commits

Author SHA1 Message Date
Tianling Shen
f6a1194762
kernel: add missing Kconfig symbol
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2024-03-15 18:30:24 +08:00
Tianling Shen
01bf2bdda1
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2024-03-09 13:53:56 +08:00
Qingfang Deng
a646e4f697 kernel: enable KASAN option for more architectures
KASAN has supported more architectures, such as ARM, PPC32 and RISC-V 64.
Enable KASAN option for those architectures.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-03-08 16:07:48 +08:00
Tianling Shen
c5048f245b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-02-04 15:56:19 +08:00
Felix Fietkau
e772b75d5d broadcom-wl: remove package
Also remove remaining wireless extension support, since this package
was the only in-tree user of it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-02-03 16:16:36 +01:00
Tianling Shen
a97a7d4575
qualcommax: disable BTF by default
The newly added device Linksys MX4200, however, has limited kernel
partition and it's too small to place BTF kernel there.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-01-11 10:40:42 +08:00
Tianling Shen
31f2c18a35
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-10 13:02:09 +08:00
Rafał Miłecki
4fb8e68bc4 kernel: provide better control & help for SLUB configuration
Allow selecting KERNEL_SLUB_DEBUG and KERNEL_SLUB_DEBUG_ON manually and
provide detailed help for both.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-09 21:23:01 +01:00
Tianling Shen
2f82b4d83f
Config-kernel: enable BTF for ipq806x/chromium by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-11-03 19:04:25 +08:00
Tianling Shen
3077a06278
kernel: xdp-sockets-diag: adjust dependency
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-17 21:31:54 +08:00
Tianling Shen
a37b79d082
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-16 14:36:05 +08:00
Mathew McBride
76d4a7c84a kernel: default ARM_PMU on for armsr/armv8
CONFIG_ARM_PMU (Arm Performance Monitor Unit) is a requirement
to use KVM (virtualization) from Linux 5.11+, as the virtualised
guest has virtualized PMU access.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-08-15 15:55:00 +02:00
Tianling Shen
772e135630
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-08-11 08:33:22 +08:00
Zhen XIN
d2af5ab850 build: Add option KERNEL_KASAN_SW_TAGS and HW_TAGS
Currently KASAN is supported but only the generic one. SW-tag and HW-tag
based KASAN have less impact on memory footprint or performance, and are
worth supporting.

Add choice menu for software and hardware Tag-Based KASAN, in addition
to the generic one.

Signed-off-by: Zhen XIN <zhen.xin@nokia-sbell.com>
[Restructure commit message]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-08-10 23:09:37 +02:00
Tianling Shen
1abf539b41
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-07-08 16:21:58 +08:00
Tianling Shen
06e64f9b36 kernel: modules: add xdp-sockets-diag support
Support for PF_XDP sockets monitoring interface used by the ss tool.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-07-05 20:02:12 +02:00
Tianling Shen
94812e90ec
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-07-05 20:40:39 +08:00
Petr Štetiar
ce8c639a6c
kernel: introduce KERNEL_WERROR config option
In commit b2d1eb717b ("generic: 5.15: enable Werror by default for
kernel compile") CONFIG_WERROR=y was enabled and all warnings/errors
reported with GCC 12 were fixed.

Keeping this in sync with past/future GCC versions is going to be uphill
battle, so lets introduce new KERNEL_WERROR config option, enable it by
default only for tested/known working combinations and on buildbots.

References: #12687
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-07-04 07:14:22 +02:00
Tianling Shen
c47fe16af0
kernel: disable BTF for sifiveu and 32bit x86 by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-27 16:01:37 +08:00
Tianling Shen
b0063446b8
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-17 14:19:10 +08:00
Tianling Shen
3810066f16
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-15 00:50:02 +08:00
Tianling Shen
9f0e1eb555
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-11 13:16:13 +08:00
Tianling Shen
3495f95618
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-06 23:19:38 +08:00
Tianling Shen
95d86d92c9
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-06-02 19:52:24 +08:00
Hauke Mehrtens
16a20512d8
kernel: Set CONFIG_FRAME_WARN depending on target
This set the CONFIG_FRAME_WARN option depending on some target settings.
It will use the default from the upstream kernel and not the hard coded
value of 1024 now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-02 11:19:32 +02:00
Tianling Shen
90719e02f0 kernel: add option for BPF_STREAM_PARSER and XDP_SOCKETS_DIAG
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-23 15:44:27 +08:00
Tianling Shen
c07038da27 kernel: add MODULE_ALLOW_BTF_MISMATCH option
BTF mismatch can occur for a separately-built module even when the ABI
is otherwise compatible and nothing else would prevent successfully
loading. Add a new config to control how mismatches are handled. By
default, preserve the current behavior of refusing to load the
module. If MODULE_ALLOW_BTF_MISMATCH is enabled, load the module but
ignore its BTF information.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-18 16:17:52 +02:00
Tianling Shen
73e56799fe
kernel: allow loading modules with non-matching BTF type info by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-16 12:39:58 +08:00
Tianling Shen
85d11b468b
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-12 19:20:08 +08:00
Nick Hainke
047361dee4
treewide: cleanup kernel symbol references
We only use 5.15 kernel. So remove all those unnecessary symbols
referencing 5.10 or 5.15 kernel.

Can be found with:
  git grep -E 'LINUX_5_1(0|5)'

Note that we remove the dependency from "sound-soc-chipdip-dac" instead
of removing the complete kernel package. The 5.15 version bump forgot to
delete the "@LINUX_5_10" dependency. The kernel package is still needed
in 5.15 kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-12 13:02:44 +02:00
Tianling Shen
963553fef9
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-05-05 19:43:20 +08:00
Tony Ambardar
3d66f55161 kernel: improve handling of CONFIG_IO_URING
Kernel setting CONFIG_IO_URING supports high-performance I/O for file
access and servers, generally for more performant platforms, and adds
~45 KB to kernel sizes. The need for this on less "beefy" devices is
questionable, as is the size cost considering many platforms have kernel
size limits which require tricky repartitioning if outgrown. The size
cost is also large relative to the ~180 KB bump expected between major
OpenWRT kernel releases.

No OpenWrt packages have hard dependencies on this; samba4 and mariadb
can take advantage if available (+KERNEL_IO_URING:liburing) but
otherwise build and work fine.

Since CONFIG_IO_URING is already managed via the KERNEL_IO_URING setting
in Config-kernel.in (default Y), remove it from those target configs
which unconditionally enable it, and update the defaults to enable it
conditionally only on more powerful 64-bit x86 and arm devices. It may
still be manually enabled as needed for high-performance custom builds.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-05-03 10:26:17 -07:00
Tianling Shen
62b1521045
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-28 15:51:22 +08:00
Tianling Shen
7ee0b160bd
kernel: refine BTF targets
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-27 22:10:24 +08:00
Tianling Shen
0b394ff960
Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-21 23:04:47 +08:00
Tianling Shen
a3bf13ded1
kernel: enable KERNEL_BPF_EVENTS by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-21 16:16:22 +08:00
Hauke Mehrtens
b844716158 kernel: Add CONFIG_KERNEL_HARDLOCKUP_DETECTOR
Make it possible to change the kernel configuration option
CONFIG_HARDLOCKUP_DETECTOR from OpenWrt.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2023-03-19 18:44:46 +01:00
Tianling Shen
dcc8c8beaf
kernel: disable BTF for arm/mt7622 by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-15 13:22:04 +08:00
Tianling Shen
19c154ecba
kernel: enable BTF support for ARM/x86 devices by default
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2023-03-14 16:58:06 +08:00
Stijn Tintel
4448b27930 kernel: set default for KERNEL_BPF_KPROBE_OVERRIDE
Without the default value this still causes a missing symbol. Disable by
default as it depends on FUNCTION_ERROR_INJECTION, which is disabled in
the generic config and we don't have a build symbol to enable that.

Fixes: 500c37c56f ("kernel: add missing symbol")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-03-05 18:36:01 +02:00
Robert Marko
721206a1b1 kernel: set default values for ARM low level debugging symbols
Set default values for KERNEL_DEBUG_LL and KERNEL_DEBUG_LL_UART_NONE again
as both of these symbols are non visible if KERNEL_EARLY_PRINTK is not
selected and KConfig wont write their value to .config.

This usually is the intended behaviour, but in OpenWrt we are relying on
the KConfig to set these and disable the debug console settings that
multiple targets like mvebu have set in their kernel config.
This was the behaviour before removing all of the "default n" settings
as KConfig by default considers symbols disabled but they are not visible
anymore and thus their value is not set in .config and build system then
later does not override the values from target kernel config.

So, to restore the behaviour to the previous one lets a default value for
KERNEL_DEBUG_LL and KERNEL_DEBUG_LL_UART_NONE.

Fixes: 8bc72ea7be ("treewide: strip useless default n Kconfig lines")
Tested-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-02-08 16:21:05 +01:00
Tony Butler
8bc72ea7be treewide: strip useless default n Kconfig lines
Kconfig docs say:
> The default value deliberately defaults to 'n' in order to avoid
> bloating the build.

Apply this rule everywhere, to avoid more cloning of bad examples

Signed-off-by: Tony Butler <spudz76@gmail.com>
2023-02-03 12:50:15 +01:00
Felix Fietkau
d02d455678 kernel: make it possible for packages to select page pool support
Will be used by the next mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-29 10:08:21 +01:00
Tony Butler
7e83cdf3f7 build: config: cleanup impossible dependency logic
some config `depends on` lines contained outdated kernel version checks
that can no longer happen and had become non-operational; clean them up

cosmetic change with no functional effect

Signed-off-by: Tony Butler <spudz76@gmail.com>
2022-12-03 20:45:55 +01:00
Felix Fietkau
6eeb5d4564 kernel: disable wireless extensions only when needed
They are only needed by a few very old drivers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-22 15:26:58 +02:00
Florian Fainelli
e7ec2d7399 kernel: add KERNEL_DEBUG_VIRTUAL
This option allows turning on CONFIG_DEBUG_VIRTUAL which is useful to
debug incorrect uses of the virtual to physical and physical to virtual
translations functions.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2022-07-07 15:07:16 -07:00
Stijn Tintel
8f5c9a7d94 kernel: add KERNEL_BPF_EVENTS config option
This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY
for sending data from BPF programs to user-space for post-processing
or logging.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-05-18 13:32:06 +03:00
Tony Ambardar
531e0399cd build: add option KERNEL_DEBUG_INFO_BTF
Generate BTF (BPF Type Format) information from DWARF debug info. This is
embedded in the kernel and exported via sysfs as /sys/kernel/btf/vmlinux.
BTF data enhances kernel portability and introspection for BPF programs.

Selecting this also enables the dwarves host package which provides the
pahole tool used for BTF encoding.

Test using: "bpftool btf dump file /sys/kernel/btf/vmlinux format c"

This needs to depend on KERNEL_DEBUG_INFO_REDUCED not being set,
otherwise we can enable both KERNEL_DEBUG_INFO_BTF and
KERNEL_DEBUG_INFO_REDUCED, which will result in undefined behaviour.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
[split DEBUG_INFO_REDUCED into separate commit, add dependency]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-05-18 13:32:06 +03:00
Stijn Tintel
44bcad24b6 kernel: add DEBUG_INFO_REDUCED config option
Add DEBUG_INFO_REDUCED as a kernel config option and remove it from the
kernel configs. This is in preparation of the upcoming option to enable
BTF typeinfo, which is incompatible with DEBUG_INFO_REDUCED.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-05-18 13:32:06 +03:00
Stijn Tintel
d5dc6cdc53 kernel: add missing dependency to KERNEL_RPI_AXIPERF
This symbol is added by the bcm27xx target patches so it should depend
on that target.

Fixes: efd9463dcf ("kernel: add missing symbol for bcm27xx")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-05-18 13:31:05 +03:00