stapstd elf note flags

Frank Ch. Eigler fche@redhat.com
Mon Jan 12 18:35:45 GMT 2026


Hi, Jiri -


> [...]
> That works well for apps running on new kernel that allows to optimize
> nop5, but it will regress on old kernel, which needs to do single
> stepping of the nop5 instruction when the USDT probe is hit.

Can you explain the regression exactly?  Would and old kernel tripping
across a nop5 cause more single-stepping ops than if it had come
across a nop1?  Is that a big problem?


> To prevent that we would like to emit <nop1,nop5> instructions combo
> for the USDT probe and install uprobe on top:
>    - nop1 if kernel does NOT have nop5 optimization support
>    - nop5 if kernel has nop5 optimization support

Is this suggesting instrumenting the binary with a nop1 xor a nop5,
based on whether the build-time kernel supports a particular facility?
If so, that's unusual - in our distro building processes, build-host
kernels are often rather older than the resulting distro kernels
themselves.


> And to recognize such probes, we would like to mark USDT stapstd ELF
> note with some flag saying this probe emits <nop1,nop5> instructions
> combo.

What would an old kernel or userspace do with such a distinct note type?


- FChE



More information about the Systemtap mailing list