text_poke_set(9)
β¨ text_poke_set(9) β¨
okay bestie, welcome to the Kernel API Manual π
this one's called text_poke_set and honestly it's giving "small function, big chaos energy" π
π NAME π
text_poke_set β memset into (an unused part of) RX memory π«Ά
like, it's memset but make it spicy β¨
πΈ SYNOPSIS πΈ
void * text_poke_set (void *addr , int c , size_t len );
yes the spacing is like that, no i will not be fixing it, it's iconic π
π¦ ARGUMENTS π¦
addrβ the address to modify π this is where the magic goescβ the byte you're filling the area with π literally just one lil bytelenβ length to copy, and bestie listen, this could be more than 2x PAGE_SIZE π that's not a typo, that's canon
π DESCRIPTION π
so what's the vibe? this function is useful to overwrite unused regions of RX memory with illegal instructions π₯
and no, "illegal" is not me being dramatic for once β that is literally what the manpage says. we're planting bad-girl instructions in the dead zones. it's giving trap street, it's giving main character sabotage, it's exactly what it sounds like β¨
ngl the caveat matters here: we're talking about unused regions of RX memory. that word is doing a lot of work. do not come crying to me if you fill a region that was, in fact, used π
π SEE ALSO π
the whole friend group π«Ά β kernel file ./arch/x86/kernel/alternative.c, plus:
text_poke_early(9)text_poke(9)text_poke_kgdb(9)text_poke_copy(9)smp_text_poke_batch_finish(9)smp_text_poke_batch_add(9)smp_text_poke_single(9)
periodt π go read all of them, i'll wait π
and that's the whole page, bestie π§ no notes, ate and left no crumbs π
sign-off time: this cutie lives under./arch/x86/kernel, dated October 2026, and the page itself goes bytext_poke_set(9)β that's the source, the version, and the date, all wrapped up with a little bow π mwah π
π¦ 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