You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: