core_param(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– core_param(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes this is a real one, section 9, and it's giving "small function, big historical importance" energy. Let's get into it ✨


🌸 NAME 🌸

core_param β€” define a historical core kernel parameter.

(yes, historical, she's been here a minute πŸŽ€)


πŸ¦‹ SYNOPSIS πŸ¦‹

core_param (name , var , type , perm );

🌈 ARGUMENTS 🌈

  • name β€” the name of the cmdline and sysfs parameter. fun fact: it's often the exact same thing as var πŸ‘€
  • var β€” the variable itself. the actual variable. the main character πŸ’…
  • type β€” the type of the parameter.
  • perm β€” visibility in sysfs. i.e. who gets to see her in /sys 🫢

⭐ DESCRIPTION ⭐

so here's the tea β˜• core_param is just like module_param, except for two very important things:

  • it cannot be modular β€” nope, no module energy here, she's built in, periodt πŸ’€
  • it doesn't add a prefix (such as printk.) β€” no little name tag, she's just out there raw 😭

and why? because this is for compatibility with __setup, and honestly it makes sense β€” truly core parameters aren't tied to the particular file they're in. they're core. they're everywhere. they're not defined by which .c file they happened to be typed into πŸ‘‘

ngl that's kind of iconic of them.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/moduleparam.h β€” go read it, iykwinkw πŸ‘€ β€” plus the whole friend group:

like. that's a lot of cousins at the family reunion 🧚


πŸ’– cute little sign-off: this page lives under ./include/linux, it's dated October 2026, and you just read core_param(9). slay, go define some core params, and remember β€” no prefix, no modules, no problem πŸŽ€βœ¨
πŸ“¦ where this page comes from