Skip to content

Proper develop and test workflow #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vax-r opened this issue Mar 28, 2025 · 0 comments
Open

Proper develop and test workflow #34

vax-r opened this issue Mar 28, 2025 · 0 comments

Comments

@vax-r
Copy link

vax-r commented Mar 28, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant