[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <0F07EEDB-8A3F-4224-9FF1-43A5300B1B8B@gmail.com>
Date: Fri, 26 May 2023 10:29:29 -0700
From: Nadav Amit <nadav.amit@...il.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...el.com>,
Jiri Slaby <jirislaby@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] x86/lib: Do not use local symbols with
SYM_CODE_START_LOCAL()
> On May 26, 2023, at 8:53 AM, Borislav Petkov <bp@...en8.de> wrote:
>
> 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
> functions.
According to my experience any or virtually any code address, C or asm,
can be mapped back to a symbol. I say virtually all, but it is actually
all the code addresses that I encountered.
Can you give me some examples for code whose address cannot be mapped
back to a symbol?
> So you'd have to give a lot more detailed example where making those
> symbols global, helps.
I did not ask to make them global. Just to keep them as local after
linkage in the executable, like all other functions in the kernel.
> 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.
I can do that.
Powered by blists - more mailing lists