diffkemp
diffkemp copied to clipboard
Improve finding sysctl definitions in the kernel source
It is not always the case that all sysctl entries for a group are defined in a single table. For example, kernel group can point to kern_table in kernel/sysctl.c or to bin_kern_table in kernel/sysctl_binary.c. The method KernelSource.get_sysctl_module needs to be improved so that it can handle search in multiple source files and multiple tables.
This issue can be reproduced by running:
echo kernel.ostype > test.sysctl
bin/diffkemp generate kernel/linux-4.18.0-147.el8 sysctl-snapshots/linux-4.18.0-147.el8 test.sysctl --sysctl
which cannot find the sysctl parameter, even though it should.