Skip to content

Commit

Permalink
dkms: depend on pahole
Browse files Browse the repository at this point in the history
CONFIG_DEBUG_INFO_BTF_MODULES is enabled on most/all void kernels, and
thus pahole is used when generating BTF information during compilation of
external modules. on cross-built kernels, the absence of pahole will
remove CONFIG_DEBUG_INFO_BTF_MODULES from
/usr/src/kernel-headers-$version/include/generated/autoconf.h when
the dkms kernel.d hook runs for the first time (because cross-built
kernels have their host tools removed).

When this is removed, part of the module struct in include/linux/module.h
is missing, resulting in a mismatch in the size of the __this_module
struct (.gnu.link_once.this_module section of the .ko) in external
modules of exactly 64 bytes.

	struct module {
	// ...
	#ifdef CONFIG_DEBUG_INFO_BTF_MODULES
	 unsigned int btf_data_size;
	 void *btf_data;
	#endif
	// ...
	}

fixes #51005
  • Loading branch information
classabbyamp committed Jun 26, 2024
1 parent 3832fa9 commit 98f0d74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions srcpkgs/dkms/template
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Template file for 'dkms'
pkgname=dkms
version=3.0.12
revision=1
revision=2
conf_files="/etc/dkms/framework.conf /etc/default/dkms"
depends="bash kmod gcc bc make coreutils xbps-triggers>=0.123_1"
depends="bash kmod gcc bc make coreutils pahole xbps-triggers>=0.123_1"
short_desc="Dynamic Kernel Module Support"
maintainer="Orphaned <[email protected]>"
license="GPL-2.0-or-later"
Expand Down

0 comments on commit 98f0d74

Please sign in to comment.