[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202502040731.4EE9CCBB@keescook>
Date: Tue, 4 Feb 2025 07:32:14 -0800
From: Kees Cook <kees@...nel.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Eric Biederman <ebiederm@...ssion.com>, Shuah Khan <shuah@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vincenzo Frascino <vincenzo.frascino@....com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH 04/16] elf, uapi: Add definitions for VER_FLG_BASE and
VER_FLG_WEAK
On Tue, Feb 04, 2025 at 04:17:03PM +0100, Thomas Weißschuh wrote:
> 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.
Okay, great. As long as the collision risk is low, I'm fine with all the
UAPI additions. Thanks for doing this!
--
Kees Cook
Powered by blists - more mailing lists