[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22D3CE6E-945B-43C4-A3A2-C57588B12BD0@fb.com>
Date: Wed, 7 Aug 2024 19:46:31 +0000
From: Song Liu <songliubraving@...a.com>
To: zhang warden <zhangwarden@...il.com>
CC: Song Liu <songliubraving@...a.com>, Steven Rostedt <rostedt@...dmis.org>,
Song Liu <song@...nel.org>,
"live-patching@...r.kernel.org"
<live-patching@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
"linux-trace-kernel@...r.kernel.org" <linux-trace-kernel@...r.kernel.org>,
Josh Poimboeuf <jpoimboe@...nel.org>, Jiri Kosina <jikos@...nel.org>,
Miroslav Benes <mbenes@...e.cz>, Petr Mladek <pmladek@...e.com>,
Joe Lawrence
<joe.lawrence@...hat.com>,
Nathan Chancellor <nathan@...nel.org>,
"morbo@...gle.com" <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Luis Chamberlain <mcgrof@...nel.org>,
Leizhen <thunder.leizhen@...wei.com>,
"kees@...nel.org" <kees@...nel.org>,
Kernel Team <kernel-team@...a.com>,
Matthew Maurer <mmaurer@...gle.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols
without .XXX suffix
> On Aug 7, 2024, at 7:58 AM, zhang warden <zhangwarden@...il.com> wrote:
>
>
>> In my GCC built, we have suffixes like ".constprop.0", ".part.0", ".isra.0",
>> and ".isra.0.cold".
>
> A fresher's eye, I met sometime when try to build a livepatch module and found some mistake caused by ".constprop.0" ".part.0" which is generated by GCC.
>
> These section with such suffixes is special and sometime the symbol st_value is quite different. What is these kind of section (or symbol) use for?
IIUC, constprop means const propagation. For example, function
"foo(int a, int b)" that is called as "foo(a, 10)" will be come
"foo(int a)" with a hard-coded b = 10 inside.
.part.0 is part of the function, as the other part is inlined in
the caller.
With binary-diff based toolchain (kpatch-build), I think these will be
handled automatically. However, if we write the livepatch manually, we
need to understand these behavior with .constprop and .part.
Thanks,
Song
Powered by blists - more mailing lists