[rb-general] Linux kernel modules "srcversion"

Juro Bystricky juro.bystricky at linux.intel.com
Fri Apr 6 19:02:21 CEST 2018


While building Yocto images and verifying binary reproducibility, I 
noticed that on several occasions binaries for kernel

modules differed in embedded "srcversion", although the modules were 
built using the very same sources.

This pretty much negates the whole premise/purpose of the "srcversion" 
field, as the checksum should be the same

if the source files are the same, breaking binary reproducibility as well.

( https://bugzilla.yoctoproject.org/show_bug.cgi?id=12544 )

At first I suspected some kind of race condition, but it turns out the 
problem was/is in Linux kbuild system, where during

"srcversion" checksum calculation some source files were simply 
(silently!) ignored/excluded from srcversion calculation.

This happened  when during parsing certain text lines exceeded 4096 
bytes. Yocto builds can have complicated build paths

and complex CCFLAGS, so on occasions 4096 bytes were exceeded, no 
warnings issued and incorrect "srcversion"  were calculated.

Long story short, I sent a patch to the maintainers, (no feedback so far):

https://patchwork.kernel.org/patch/10318141/


Juro

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-general/attachments/20180406/29e94a49/attachment.html>


More information about the rb-general mailing list