__kprobe_event_add_fields(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __kprobe_event_add_fields(9) πŸ’…

okay so bestie, this is a page from the Kernel API Manual (section 9), and it's all about the function __kprobe_event_add_fields ✨ β€” no cap, it's the helper that adds probe fields to a kprobe command from an arg list. Let's get into it 🫢


🌸 NAME 🌸

__kprobe_event_add_fields β€” add probe fields to a kprobe command from arg list πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int __kprobe_event_add_fields (struct dynevent_cmd *cmd , ... );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • cmd β€” a pointer to the dynevent_cmd struct representing the new event. literally the main character of this call πŸ’…
  • ... β€” Variable number of arg (pairs), one pair for each field. yes bestie, pairs β€” one per field πŸŽ€

πŸ’… NOTE πŸ’…

okay so listen πŸ‘‘ β€” users normally won't want to call this function directly. Instead, use the kprobe_event_add_fields wrapper, because it automatically adds a NULL to the end of the arg list. easy peasy, no extra manual NULL-ing 🌸

but if you do use this function directly, make sure the last arg in the variable arg list is NULL. not optional, bestie β€” fr fr πŸ™ˆ

This function adds probe fields to an existing kprobe command using a variable list of args. Fields are added in the same order they're listed. so the order you write them? that's the order you get. iconic πŸ’–


πŸ’– RETURN πŸ’–

0 if successful, error otherwise. that's it, that's the whole vibe check ⭐


🌈 SEE ALSO 🌈


mwah πŸ’‹ β€” this cutie comes from ./kernel/trace, dated October 2026, and it's all about __kprobe_event_add_fields(9). slay πŸŽ€

πŸ“¦ where this page comes from