Skip to content

Proper develop and test workflow #34

Open
@vax-r

Description

@vax-r

Description

I'm trying to understand btrfs and the interaction between it and userspace.

During the process I used sudo modprobe btrfs to load btrfs as kernel module into my kernel, it works fine because it consumes the module from /lib/modules/ .

However when I'm trying to make some changes to btrfs code and compile it into module again, I will face the following issue while trying to insert it into kernel.

$ sudo dmesg
...
[237568.020605] module btrfs: .gnu.linkonce.this_module section size must match the kernel's built struct module size at run time

Which turns out that my self-compiled kernel module's size doesn't match what the kernel expected. ( we can know from Link ).

As the definition of struct module is tagged with ____cacheline_aligned __randomize_layout , so the size would possibly change between different built, even using exact same kernel config.

I want to know what's a proper workflow when trying to use/test my self-compiled btrfs , does it have to be , recompile the whole kernel -> boot the machine with new kernel -> use the module under /lib/modules/ , everytime ? Maybe there're some better workflow for development ?

I would love to know if you're so kind to share with me, thanks.

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