[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250722151759.616bd551@batman.local.home>
Date: Tue, 22 Jul 2025 15:17:59 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Jose E. Marchesi" <jemarch@....org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
bpf@...r.kernel.org, x86@...nel.org, Masami Hiramatsu
<mhiramat@...nel.org>, Josh Poimboeuf <jpoimboe@...nel.org>, Peter Zijlstra
<peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>, Jiri Olsa
<jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>, Thomas Gleixner
<tglx@...utronix.de>, Andrii Nakryiko <andrii@...nel.org>, Indu Bhagat
<indu.bhagat@...cle.com>, Beau Belgrave <beaub@...ux.microsoft.com>, Jens
Remus <jremus@...ux.ibm.com>, Linus Torvalds
<torvalds@...ux-foundation.org>, Andrew Morton <akpm@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>, Florian Weimer <fweimer@...hat.com>, Sam
James <sam@...too.org>, Brian Robbins <brianrob@...rosoft.com>, Elena
Zannoni <elena.zannoni@...cle.com>
Subject: Re: [RFC] New codectl(2) system call for sframe registration
On Tue, 22 Jul 2025 20:56:47 +0200
"Jose E. Marchesi" <jemarch@....org> wrote:
> I think glibc could "register" loaded SFrame data by just pointing the
> kernel to the VM address where it got loaded, "you got some SFrame
> there". Starting from that address it is then possible to find the
> referred code locations just by applying the offsets, without needing
> any additional information nor ELF foobar...
>
> Or thats how I understand it. Indu will undoubtly correct me if I am
> wrong 8-)
Maybe I'm wrong, but if you know where the text is loaded (the final
location it is in memory), it is possible to figure out the relocations
in the sframe section.
>
> > In the future, if we wants to compress the sframe section, it will not
> > even be a loadable ELF section. But the system call can tell the
> > kernel: "there's a sframe compressed section at this offset/size in
> > this file" for this text address range and then the kernel will do the
> > rest.
>
> I think supporting compressed SFrame will probably require to do some
> sort of relocation of the offsets in the uncompressed data, depending on
> where the uncompressed data will get eventually loaded.
Assuming that all the text is at a given offset, would that be enough
to fill in the blanks?
As the text would have already been linked into memory before the
system call is made. If this is not the case, then we definitely need
the linker to load the sframe into memory before it does the system
call, and just give the kernel that address.
-- Steve
Powered by blists - more mailing lists