Go to file
Masahiro Yamada 223f497f05 bpfilter: match bit size of bpfilter_umh to that of the kernel
[ Upstream commit 9371f86ecb ]

bpfilter_umh is built for the default machine bit of the compiler,
which may not match to the bit size of the kernel.

This happens in the scenario below:

You can use biarch GCC that defaults to 64-bit for building the 32-bit
kernel. In this case, Kbuild passes -m32 to teach the compiler to
produce 32-bit kernel space objects. However, it is missing when
building bpfilter_umh. It is built as a 64-bit ELF, and then embedded
into the 32-bit kernel.

The 32-bit kernel and 64-bit umh is a bad combination.

In theory, we can have 32-bit umh running on 64-bit kernel, but we do
not have a good reason to support such a usecase.

The best is to match the bit size between them.

Pass -m32 or -m64 to the umh build command if it is found in
$(KBUILD_CFLAGS). Evaluate CC_CAN_LINK against the kernel bit-size.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Stable-dep-of: 02e9a22cee ("kbuild: hdrcheck: fix cross build with clang")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-17 18:24:51 +02:00
arch arm64/ptrace: Fix stack-out-of-bounds read in regs_get_kernel_stack_nth() 2025-06-27 11:02:58 +01:00
block
certs
crypto
Documentation Revert "x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2" on v6.6 and older 2025-06-27 11:02:56 +01:00
drivers VMCI: fix race between vmci_host_setup_notify and vmci_ctx_unset_notify 2025-07-17 18:24:51 +02:00
fs ovl: Check for NULL d_inode() in ovl_dentry_upper() 2025-07-17 18:24:51 +02:00
include erofs: remove unused trace event erofs_destroy_inode 2025-06-27 11:02:57 +01:00
init bpfilter: match bit size of bpfilter_umh to that of the kernel 2025-07-17 18:24:51 +02:00
ipc
kernel perf: Fix sample vs do_exit() 2025-06-27 11:02:58 +01:00
lib
LICENSES
mm mm/huge_memory: fix dereferencing invalid pmd migration entry 2025-06-27 11:02:58 +01:00
net bpfilter: match bit size of bpfilter_umh to that of the kernel 2025-07-17 18:24:51 +02:00
samples
scripts kbuild: use -MMD instead of -MD to exclude system headers from dependency 2025-07-17 18:24:51 +02:00
security selinux: fix selinux_xfrm_alloc_user() to set correct ctx_len 2025-06-27 11:02:56 +01:00
sound ALSA: hda: Ignore unsol events for cards being shut down 2025-07-17 18:24:50 +02:00
tools
usr bpfilter: match bit size of bpfilter_umh to that of the kernel 2025-07-17 18:24:51 +02:00
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS platform: Add Surface platform directory 2025-06-27 11:02:56 +01:00
Makefile Linux 5.4.295 2025-06-27 11:02:58 +01:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.