On September 9, 2026 7:49:30 AM PDT, Borislav Petkov <[email protected]> wrote: >On Wed, Sep 09, 2026 at 07:59:51AM +0200, Thomas Weißschuh wrote: >> These names and numbers are defined by the architectures' ELF specifications. >> They are already cast in stone. For example see Table 4.9 of [0]. >> Changing them would break compilers, linkers, loaders and more or less every >> existing ELF binary. > >So? > >Your goal is to provide them to tools/. You want to provide them to >*everything*. See the discrepance here? > >> That is the documentation for the tools UAPI headers. > >Did you even read that file? > >"Why we want a copy of kernel headers in tools? >============================================== > >There used to be no copies, with tools/ code using kernel headers >directly. From time to time tools/perf/ broke due to legitimate kernel >hacking. At some point Linus complained about such direct usage. Then we >adopted the current model. > >The way these headers are used in perf are not restricted to just >including them to compile something. >..." > >Just read the damn thing before you reply. > >> Also we already have other, closely related, ELF constants in the UAPI, >> see {,tools/}include/uapi/linux/elf{,-em}.h. > >Srsly?!? > >You moved them there: > >commit 626fd35278295fbb21f2da331cd8028e9738d965 >Author: Thomas Weißschuh <[email protected]> >Date: Wed Feb 26 12:44:46 2025 +0100 > > tools/include: Add uapi/linux/elf.h > > It will be used by the vDSO selftests. > > >Looking at the rest, it looks like some elf bits got exported, you added some >more and that ship has sailed. I still think us providing headers is >completely unnecessary and it will come to cause conflicts eventually but hey, >not my problem. >
I do believe there are *some* headers that would be reasonably to export to tools/ beyond what it is in uapi; a major reason for that is that the tools are suffering from a crazy level of internal inconsistency right now. Basically uapi ⊂ treewide ⊂ kernel, but also treewide ⊂ tools common ⊂ tool-specific...
