add_taint(9)
π add_taint(9)
okay so bestie, we're in the Kernel API Manual today and this one is short but iconic β it's literally the function that lets the kernel raise its hand and say "hey. something is up." π«Ά
β¨ NAME β¨
add_taint β adds a taint flag, but only if that flag isn't already set. no double-dipping, no cap π
π SYNOPSIS π
void add_taint (unsigned flag , enum lockdep_ok lockdep_ok );
π¦ ARGUMENTS π¦
flagβ one of theTAINT_*constants. that's the whole vibe check, pick your flag πΈlockdep_okβ tells the kernel whether lock debugging is still OK. lowkey the important one π
π DESCRIPTION π
so if something bad has gone wrong, bestie, you're gonna want lockdebug_ok = false. like, fully. do not pass go.
but for some notewortht-but-not-corrupting cases, it can be set to true. yes, notewortht is literally how it's spelled in the source and honestly? we stan a typo that made it to production πβ¨
fr fr though: the distinction matters.false= something actually went wrong.true= noteworthy but not corrupting. don't get them twisted π
π SEE ALSO π
- Kernel file
./kernel/panic.cβ the main character of a file, go read it π panic_smp_redirect_cpu(9)panic_try_force_cpu(9)vpanic(9)print_tainted(9)print_tainted_verbose(9)
and that's the page, bestie π it lives under ./kernel and the docs are dated October 2026 β periodt, go forth and taint responsibly π§ββοΈπ
π¦ 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