Re: [PATCH v2] x86/lib: Do not use local symbols with SYM_CODE_START_LOCAL()

From: Borislav Petkov
Date: Fri May 26 2023 - 11:53:54 EST

On Thu, May 25, 2023 at 12:39:47PM -0700, Nadav Amit wrote:
> I do not think in this tradeoff not exposing local names worth
> preventing profilers (and their users) from understanding where a
> sample/trace is was taken. If for instance you look at a branch
> trace (e.g., using Intel PT) you want to see the symbol to which a
> branch goes to.

If those functions were written in C, you wouldn't see any
exception-handling symbols either. It is the fact that they're asm
and the exception labels are defined "out-of-line" so that you don't
have code duplication and thus are symbols outside of the respective

So you'd have to give a lot more detailed example where making those
symbols global, helps.

And if those symbols are going to be global, then they better have more
descriptive names as they're gonna be pretty much independent functions.
Something like __get_user_handle_exception() or so.