DEVICE_ATTR_ADMIN_RO(9)
π DEVICE_ATTR_ADMIN_RO π
okay so bestie, welcome to the DEVICE_ATTR_ADMIN_RO page in the Kernel API Manual β yes that's the whole manual name, we're fancy here π this one's short and sweet and honestly kind of iconic for it.
β¨ NAME β¨
DEVICE_ATTR_ADMIN_RO β define an admin-only readable device attribute. that's it. that's the whole job. no cap π
πΈ SYNOPSIS πΈ
DEVICE_ATTR_ADMIN_RO (_name );
like, yes, there's a space before the _name in the original and I'm not touching it because copying things exactly is the whole vibe check β
π¦ ARGUMENTS π¦
_nameβ the attribute name. that's the one (1) thing you hand it. give it a name and it slays β¨
π DESCRIPTION π
so here's the tea: it's like DEVICE_ATTR_RO, but _mode is 0400. π₯
that's literally the entire description and honestly? the way it says so much with so little. 0400 β admin-only readable, main character energy, nobody else gets to peek π
fr fr the only difference fromDEVICE_ATTR_ROis that_modevalue, so don't go assuming extra behaviour, because the page doesn't say there is any π
π SEE ALSO π
the friend group π all of these, exactly as listed, no gatekeeping:
- Kernel file
./include/linux/device.hstruct subsys_interface(9),struct device_attribute(9),struct dev_ext_attribute(9),DEVICE_ATTR(9),DEVICE_ATTR_RW(9),DEVICE_ATTR_ADMIN_RW(9),DEVICE_ATTR_RW_NAMED(9),DEVICE_ATTR_RO(9),DEVICE_ATTR_RO_NAMED(9),DEVICE_ATTR_WO(9),DEVICE_ATTR_WO_NAMED(9),DEVICE_ULONG_ATTR(9),DEVICE_INT_ATTR(9),DEVICE_BOOL_ATTR(9),DEVICE_STRING_ATTR_RO(9),enum device_link_state(9),enum dl_dev_state(9),enum device_removable(9),struct dev_links_info(9),struct dev_msi_info(9),enum device_physical_location_panel(9),enum device_physical_location_vertical_position(9),enum device_physical_location_horizontal_position(9),struct device_physical_location(9),enum struct_device_flags(9),struct device(9),struct device_link(9),device_set_driver_override(9),device_has_driver_override(9),device_match_driver_override(9),device_iommu_mapped(9),dev_name(9),dev_bus_name(9),device_find_child_by_name(9),device_find_any_child(9),device_lock_set_class(9),device_lock_reset_class(9)
like I said. whole friend group. every single one π«Ά
okay that's the page!! mwah π tiny little sign-off for you: this one lives in ./include/linux, it's dated October 2026, and it's filed under DEVICE_ATTR_ADMIN_RO(9) β go be admin-only and readable about it, bestie πβ¨π
π¦ 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