Linus Torvalds criticizes Kconfig parsers lacking tab support

Linus Torvalds refused take into kernel change, which replaces the tab character with a space in the delimiter of the FTRACE_RECORD_RECURSION_SIZE parameter in the Kconfig kernel configuration. The change was proposed by the Fedora project developer with the note that using tabs causes the configuration parser to break. Instead of the proposed change, Linus included his own in the kernel patchwhich specifically adds tab characters to the definition of the PAGE_SHIFT setting, which specifies the offset for various memory page sizes.

Adding tabs to settings greater than FTRACE_RECORD_RECURSION_SIZE is explained by the fact that the kernel settings file allows the use of both spaces and tabs, so if the parser cannot parse a string with tabs normally, this is a parser problem that should be fixed in it . The “make defconfig” command accepts tabs correctly, so external parsers should process them too.

Advertisement

The presence in the Kconfig core supplied not only of spaces, but also of tabs, will allow identify problematic parsers and encourage their correction. The idea is to customize the kernel for faulty parsers perceived as flawed, since even if the reference Kconfig always contains only spaces, the average user is free to use tabs in the settings on their systems and such use can lead to failures in uncorrected third-party parsers.

Thanks for reading:

Advertisement