On Mon, 21 Jul 2025 11:20:34 -0400 Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote: > Hi! > > I've written up an RFC for a new system call to handle sframe registration > for shared libraries. There has been interest to cover both sframe in > the short term, but also JIT use-cases in the long term, so I'm > covering both here in this RFC to provide the full context. Implementation > wise we could start by only covering the sframe use-case. > > I've called it "codectl(2)" for now, but I'm of course open to feedback. Hmm, I guess I'm OK with that name. I can't really think of anything that would be better. But kernel developers are notorious for sucking at coming up with decent names ;-) > > For ELF, I'm including the optional pathname, build id, and debug link > information which are really useful to translate from instruction pointers > to executable/library name, symbol, offset, source file, line number. > This is what we are using in LTTng-UST and Babeltrace debug-info filter > plugin [1], and I think this would be relevant for kernel tracers as well > so they can make the resulting stack traces meaningful to users. Honestly, I'm not sure it needs to be an ELF file. Just a file that has an sframe section in it. > > sys_codectl(2) > ================= > > * arg0: unsigned int @option: > > /* Additional labels can be added to enum code_opt, for extensibility. */ > > enum code_opt { > CODE_REGISTER_ELF, Perhaps the above should be: CODE_REGISTER_SFRAME, as currently SFrame is read only via files. > CODE_REGISTER_JIT,