Linux kernel source is not consist with current kernel image

Bug #1991038 reported by quanxian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
intel
New
Undecided
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

[Bug Description]

This is a general issue. in Ubuntu 22.10, our test case will build kernel module based on current kenel.
when we install linux-source, and build the kernel module out, found it can't be insert into current system.

just like this:
|0919_172629.892|TRACE|CMD=insmod ddt_intel/cpu/sync_core_timing.ko|
insmod: ERROR: could not insert module ddt_intel/cpu/sync_core_timing.ko: Invalid module format

root cause:
linux-source-5.19.0 subversion is not the same as Linux RPLS01 5.19.0-15-generic which is default kernel.

we build this module based on default linux-source
#modinfo sync_core_timing.ko
filename: case/Processor/SERIALIZE_func_test-M/serialize/sync_core_timing.ko
license: GPL
srcversion: D5404C78B18A3199F1BC9FB
depends:
retpoline: Y
name: sync_core_timing
vermagic: 5.19.0 SMP preempt mod_unload modversions
parm: repeats:uint

a. installed linux-source
# apt-get install linux-source
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
linux-source is already the newest version (5.19.0.15.15).
0 upgraded, 0 newly installed, 0 to remove and 387 not upgraded.

b. here is default installed linux-source version
# cat /usr/src/linux-source-5.19.0/Makefile |more
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 19
SUBLEVEL = 0
EXTRAVERSION =
NAME = Superb Owl

c. here is default kernel installed information
# uname -a
Linux RPLS01 5.19.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 2 07:35:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

[HW/SW Information]
Target Kernel: 5.19
Target Release: 22.10

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I don't think you're supposed to be building modules against what linux-source package provides, but by installing 'linux-headers-generic' instead.

Timo Aaltonen (tjaalton)
Changed in ubuntu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.