smp_text_poke_batch_add(9)
π smp_text_poke_batch_add(9) π
Okay so bestie, welcome to the Kernel API Manual entry for smp_text_poke_batch_add β this is a Level 9 page (iykyk, section 9 is where all the kernel API girlies live), and it's literally about updating instructions on a live kernel while SMP is doing its thing, but β plot twist β batched. π¦
β¨ NAME β¨
smp_text_poke_batch_add β update instruction on live kernel on SMP, batched πΈ
Like, you're poking a running kernel's instructions. On SMP. But you're doing it in a batch, because we're organized and iconic. Periodt. π
π SYNOPSIS π
void __ref smp_text_poke_batch_add (void *addr , const void *opcode ,
size_t len , const void *emulate );
Yes, the spacing is a little unhinged, no we are not fixing it, it's part of the vibe. π
π ARGUMENTS π
addrβ the address to patch. This is the spot you're targeting, bestie. π―opcodeβ the opcode of the new instruction. This is the new content going in β the main character of this whole operation. πlenβ the length to copy. How many bytes we're moving. Count them. Don't get it wrong. πemulateβ the instruction to be emulated. There's a stand-in for when things can't just be swapped directly. π§
β DESCRIPTION β
So here's the tea, bestie: this function adds a new instruction to the current queue of to-be-patched instructions that the kernel maintains. π«Ά
And here's the important part β the patching request will NOT be executed immediately. Not me being dramatic, that's just literally how it works. Instead, it becomes part of an array of patching requests, and that array is optimized for batched execution. Efficiency queen behavior. π₯
β οΈ Nothing has actually been poked yet when this returns! Don't walk away thinking it's done!
All pending patching requests will be executed on the next smp_text_poke_batch_finish call. That's your finish line, your finale, the moment the batch actually goes through. Mark your calendar. ποΈβ¨
π SEE ALSO π
- Kernel file
./arch/x86/kernel/alternative.cπ text_poke_early(9)text_poke(9)text_poke_kgdb(9)text_poke_copy(9)text_poke_set(9)smp_text_poke_batch_finish(9)β the one that actually runs the queue, go read it next fr frsmp_text_poke_single(9)
All the poking besties in one place. Slay. ππ
Okay that's the whole page! π It lives in ./arch/x86/kernel and this particular edition is dated October 2026 β so like, future girlie energy. You understood it, you ate, no cap. ππ
π
π¦ 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