Skip to content

Not able to install kernel object using insmod #13259

Open
@bvbasavaraju

Description

@bvbasavaraju

Windows Version

10.0.26100.4652

WSL Version

2.5.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.2

Distro Version

Ubuntu 20.04 and Ubuntu 24.04

Other Software

No response

Repro Steps

  1. To clone the repo:
git clone https://github.com/microsoft/WSL2-Linux-Kernel.git .
git checkout linux-msft-wsl-${KERNEL_VERSION}
  1. To configure and build the kernel:
cp Microsoft/config-wsl .config
make olddefconfig
make modules_prepare
make -j$(nproc) modules
  1. Insert any kernel object or build any custom kernel object and try inserting it
    Ex: sudo insmod drivers/i2c/i2c-smbus.ko

Results in the error:
insmod: ERROR: could not insert module drivers/i2c/i2c-smbus.ko: Invalid module format

Expected Behavior

Successful installation of kernel object same has to be listed in the /dev/

Actual Behavior

Insmod result in following error:
insmod: ERROR: could not insert module drivers/i2c/i2c-smbus.ko: Invalid module format

in dmesg log says: disagrees about version of symbol module_layout

Diagnostic Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions