module_param_string(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– module_param_string(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual entry for module_param_string β€” it's a char array parameter, and honestly? she's lowkey the responsible older sister of the module param family. let's get into it ✨


🌸 NAME 🌸

module_param_string β€” a char array parameter πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

module_param_string (name , string , len , perm );

like, that's the whole incantation. four things, no cap πŸ’…


πŸ’œ ARGUMENTS πŸ’œ

  • name β€” the name of the parameter. yes bestie, this is literally what it's called 🏷️
  • string β€” the string variable itself. the actual char array doing the work πŸ’–
  • len β€” the maximum length of the string, incl. terminator. don't forget the terminator, she counts! 😭
  • perm β€” visibility in sysfs. that's your permissions vibe check πŸ‘‘

🧚 DESCRIPTION 🧚

okay so here's the moment that matters: this one actually copies the string when it's set β€” unlike type charp, which does not. big difference, iykyk 🫢

and len is usually just sizeof(string). that's it. that's the whole tip ⭐


⭐ SEE ALSO ⭐

the whole friend group, ok? every single one, i'm not skipping anybody:

Kernel file ./include/linux/moduleparam.h β€” module_param(9), module_param_unsafe(9), module_param_named(9), module_param_named_unsafe(9), module_param_cb(9), core_param_cb(9), postcore_param_cb(9), arch_param_cb(9), subsys_param_cb(9), fs_param_cb(9), device_param_cb(9), late_param_cb(9), core_param(9), core_param_unsafe(9), __core_param_cb(9), parameq(9), parameqn(9), module_param_array(9), module_param_array_named(9), module_param_hw_named(9), module_param_hw_array(9) πŸ”₯


ngl bestie, if you only remember one thing: it copies. charp does not. that's the whole plot twist πŸ’€

okay that's the page!! mwah πŸ’‹ this one lives at ./include/linux, dated October 2026, and that's the module_param_string(9) era signing off β€” slay responsibly, bestie πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from