On Tue, Feb 04, 2025 at 07:10:00AM -0800, Kees Cook wrote:
On Mon, Feb 03, 2025 at 10:05:05AM +0100, Thomas Weißschuh wrote:
The definitions are used by tools/testing/selftests/vDSO/parse_vdso.c. To be able to build the vDSO selftests without a libc dependency, add the definitions to the kernels own UAPI headers.
For all the UAPI changes, where are the defines "normally" found? i.e. how does adding these to UAPI not break something that already has them? Or have these never been defined before? I'm confused about how removing the libc dependency exposes the lack of these defines. Are they defined in a non-exported libc header somewhere?
They are normally defined directly in libc <elf.h>, which does not use UAPI headers. Libc elf.h and Linux UAPI elf.h can not be used at the same time because they define the same symbols. In theory some user of UAPI elf.h could have defined these new symbols on their own without ifdef guards. However UAPI elf.h is regularly updated with new symbols.