Closed kpcyrd closed 4 months ago
LSOF_VSTR is used in some os-specific code to validate that the runtime kernel version matches the compile-time one. That's because in some os, the data has to be read from data structures residing in kernel memory, so the data structure must not be changed between compilation and runtime, otherwise the data will be invalid.
However, since in Linux lsof reads the data from procfs, so the compatibility between lsof and different Linux kernel versions are much better. So it is not validated in Linux.
Hello!
the test infrastructure for Reproducible Arch Linux has built lsof, trying to match the original binary distributed to users (in the same path, with the same compiler/library versions and noticed this difference:
It seems
LSOF_VSTR
contains the output of$(uname -r)
, the kernel version number, is there a reason for this?It seems the
LSOF_VSTR
string itself isn't actually embedded (used?) anywhere, but it ends up inCFLAGS
which the binary records forlsof -v
version output:Can this be set to an empty string, or maybe removed even? :)
Thanks!