• Linus Torvalds added hidden tabs to Kconfig to challenge parsers that can’t handle them.
  • Tabs were intentionally added to the common Kconfig file for page sizes to expose faulty parsers.
  • Torvalds believes parsers unable to handle tabs shouldn’t be parsing kernel Kconfig files, aiming to force fixes.
  • AutoTL;DR@lemmings.worldB
    link
    fedilink
    English
    arrow-up
    0
    ·
    8 months ago

    This is the best summary I could come up with:


    Within yesterday’s Linux 6.9-rc4 release is an interesting little nugget by Linus Torvalds to battle Kconfig parsers that can’t correctly handle tabs but rather just assume spaces for whitespace for this kernel configuration format.

    Due to a patch having been queued last week to replace a tab with a space character in the kernel tracing Kconfig file, Linus Torvalds decided to take matters into his own hand for Kconfig parsers that can’t deal with tabs… Torvalds authored a patch to intentionally add some tabs of his own into Kconfig for throwing off any out-of-tree/third-party parsers that can’t correctly handle them.

    Torvalds added these intentional hidden tabs to the common Kconfig file for handling page sizes for the kernel.

    Torvalds wrote in the patch: "Commit d96c36004e31 (“tracing: Fix FTRACE_RECORD_RECURSION_SIZE Kconfig entry”) removed a hidden tab because it apparently showed breakage in some third-party kernel config parsing tool.

    Yes, tab-vs-space confusion is sadly a traditional Unix thing, and ‘make’ is famous for being broken in this regard.

    I’d add more random tabs to our Kconfig files, but I don’t want to make things uglier than necessary.


    The original article contains 308 words, the summary contains 184 words. Saved 40%. I’m a bot and I’m open source!