Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-09 Thread Matthew Maurer
On Mon, Jul 8, 2024 at 5:07 PM Sami Tolvanen wrote: > > On Mon, Jul 8, 2024 at 2:33 PM Luis Chamberlain wrote: > > > > Looking at this again its not to me why Masahiro Yamada's suggestion on > > that old patch series to just increase the length and put long symbols > > names into its own section

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-09 Thread Song Liu
> On Jul 9, 2024, at 8:07 AM, Sami Tolvanen wrote: [...] > >>> I am a bit scared because using hashed symbol names in backtraces, gdb, >>> ... would be a nightmare. Hashes are not human readable and >>> they would complicate the life a lot. And using different names >>> in different

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-08 Thread Sami Tolvanen
On Mon, Jul 8, 2024 at 2:33 PM Luis Chamberlain wrote: > > Looking at this again its not to me why Masahiro Yamada's suggestion on > that old patch series to just increase the length and put long symbols > names into its own section [0] could not be embraced with a new kconfig > option, so new

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-08 Thread Luis Chamberlain
On Thu, Jul 04, 2024 at 11:02:18AM +0200, Petr Mladek wrote: > On Wed 2024-07-03 08:30:33, Luis Chamberlain wrote: > > On Tue, Jul 02, 2024 at 10:56:41PM -0700, Josh Poimboeuf wrote: > > > On Mon, Jul 01, 2024 at 03:13:23PM +0200, Petr Mladek wrote: > > > > So, you suggest to search the symbols by

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-04 Thread Petr Mladek
On Wed 2024-07-03 08:30:33, Luis Chamberlain wrote: > On Tue, Jul 02, 2024 at 10:56:41PM -0700, Josh Poimboeuf wrote: > > On Mon, Jul 01, 2024 at 03:13:23PM +0200, Petr Mladek wrote: > > > So, you suggest to search the symbols by a hash. Do I get it correctly? > > I meant, that in the Rust world

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-03 Thread Luis Chamberlain
On Tue, Jul 02, 2024 at 10:56:41PM -0700, Josh Poimboeuf wrote: > On Mon, Jul 01, 2024 at 03:13:23PM +0200, Petr Mladek wrote: > > So, you suggest to search the symbols by a hash. Do I get it correctly? I meant, that in the Rust world the symbols go over the allowed limit, and so an alternative

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-02 Thread Josh Poimboeuf
On Mon, Jul 01, 2024 at 03:13:23PM +0200, Petr Mladek wrote: > So, you suggest to search the symbols by a hash. Do I get it correctly? > > Well, it might bring back the original problem. I mean > the commit 8b8e6b5d3b013b0 ("kallsyms: strip ThinLTO hashes from > static functions") added

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-01 Thread Petr Mladek
On Fri 2024-06-28 10:36:45, Luis Chamberlain wrote: > On Fri, Jun 28, 2024 at 02:23:49PM +0200, Miroslav Benes wrote: > > On Fri, 7 Jun 2024, Song Liu wrote: > > > > > Hi Miroslav, > > > > > > Thanks for reviewing the patch! > > > > > > On Fri, Jun 7, 2024 at 6:06 AM Miroslav Benes wrote: > >

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-06-28 Thread Sami Tolvanen
Hi Luis, On Fri, Jun 28, 2024 at 10:36 AM Luis Chamberlain wrote: > > On Fri, Jun 28, 2024 at 02:23:49PM +0200, Miroslav Benes wrote: > > On Fri, 7 Jun 2024, Song Liu wrote: > > > > > Hi Miroslav, > > > > > > Thanks for reviewing the patch! > > > > > > I think it is possible. Currently,

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-06-28 Thread Luis Chamberlain
On Fri, Jun 28, 2024 at 02:23:49PM +0200, Miroslav Benes wrote: > On Fri, 7 Jun 2024, Song Liu wrote: > > > Hi Miroslav, > > > > Thanks for reviewing the patch! > > > > On Fri, Jun 7, 2024 at 6:06 AM Miroslav Benes wrote: > > > > > > Hi, > > > > > > On Tue, 4 Jun 2024, Song Liu wrote: > > > >

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-06-28 Thread Miroslav Benes
On Fri, 7 Jun 2024, Song Liu wrote: > Hi Miroslav, > > Thanks for reviewing the patch! > > On Fri, Jun 7, 2024 at 6:06 AM Miroslav Benes wrote: > > > > Hi, > > > > On Tue, 4 Jun 2024, Song Liu wrote: > > > > > With CONFIG_LTO_CLANG, the compiler may postfix symbols with .llvm. > > > to avoid

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-06-07 Thread Song Liu
Hi Miroslav, Thanks for reviewing the patch! On Fri, Jun 7, 2024 at 6:06 AM Miroslav Benes wrote: > > Hi, > > On Tue, 4 Jun 2024, Song Liu wrote: > > > With CONFIG_LTO_CLANG, the compiler may postfix symbols with .llvm. > > to avoid symbol duplication. scripts/kallsyms.c sorted the symbols > >

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-06-07 Thread Miroslav Benes
Hi, On Tue, 4 Jun 2024, Song Liu wrote: > With CONFIG_LTO_CLANG, the compiler may postfix symbols with .llvm. > to avoid symbol duplication. scripts/kallsyms.c sorted the symbols > without these postfixes. The default symbol lookup also removes these > postfixes before comparing symbols. > > On

[PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-06-04 Thread Song Liu
With CONFIG_LTO_CLANG, the compiler may postfix symbols with .llvm. to avoid symbol duplication. scripts/kallsyms.c sorted the symbols without these postfixes. The default symbol lookup also removes these postfixes before comparing symbols. On the other hand, livepatch need to look up symbols