Thread (5 messages) 5 messages, 3 authors, 29d ago

Re: [RESEND][PATCH v2] unwind: Add sframe_(un)register() system calls

From: Florian Weimer <hidden>
Date: 2026-06-01 11:54:45
Also in: bpf, lkml

* Steven Rostedt:
From: Steven Rostedt <rostedt@goodmis.org>

Add system calls to register and unregister sframes that can be used by
dynamic linkers to tell the kernel where the sframe section is in memory
for libraries it loads.

Both system calls take a pointer to a new structure:

  struct sframe_setup {
	__u64			sframe_start;
	__u64			sframe_size;
	__u64			text_start;
	__u64			text_size;
  };

and a size of the passed in structure. If the system call needs to be
extended, then the structure could be changed and the size of that
structure will tell the kernel that it is the new version. If the kernel
does not recognize the structure size, it will return -EINVAL.

  sframe_start - The virtual address of the sframe section
  sframe_size  - The length of the sframe section
  text_start   - the text section the sframe represents
  test_size    - the length of the section

If other stack tracing functionality is added, it will require a new
system call.
Would it make sense to have a more general mechanism to attach metadata
to code memory?  For example, a JIT generator might want to provide a
hint how to obtain debuginfo for the code.

Thanks,
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help