trace_seq_putmem(9)
π trace_seq_putmem β kernel API manual, bestie edition β¨
okay so likeβ¦ this one lives in the Kernel API Manual, and it's genuinely such a little icon. it's trace_seq_putmem(9) and it does exactly one thing but does it so well. let's get into it π
β¨ NAME β¨
trace_seq_putmem β write raw data into the trace_seq buffer. no cap, that's the whole vibe. π«Ά
πΈ SYNOPSIS πΈ
void trace_seq_putmem (struct trace_seq *s , const void *mem , unsigned
int len );
literally just copy the code exactly as it is, do not touch it, i don't make the rules π
π¦ ARGUMENTS π¦
sβ the trace sequence descriptor. your main character struct, the whole point of the operation πmemβ The raw memory to copy into the buffer. raw. unfiltered. iconic πlenβ The length of the raw memory to copy (in bytes). bytes, bestie, bytes π
π₯ DESCRIPTION π₯
okay so picture this: there may be cases where raw memory needs to be written into the buffer, and a strcpy would simply not work. like, it's giving wrong tool for the job, it's giving strcpy walked into the wrong function. π
and that's where this queen comes in β¨ β using this function allows for such cases. that's it, that's the whole plot. trace_seq_putmem said "i'll handle the raw memory" and then it DID. periodt π
π
ngl this is one of those functions where the entire documentation is basically "sometimes you need the raw version" and honestly? respect. the confidence. π
π SEE ALSO π
Kernel file ./kernel/trace/trace_seq.c β go read it, iykyk π§
trace_print_seq(9)trace_seq_printf(9)trace_seq_bitmask(9)trace_seq_bitmask_list(9)trace_seq_vprintf(9)trace_seq_bprintf(9)trace_seq_puts(9)trace_seq_putc(9)trace_seq_putmem_hex(9)trace_seq_path(9)trace_seq_to_user(9)
like the whole trace_seq friend group showed up to the function. we love a supportive cast π«Άβ¨
okay so that's the page!! this gem comes to you from ./kernel/trace and it's dated October 2026 β mwah, sending you off with a kiss from the kernel ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms