MASTER AND AUTHENTICATION(9)
π master and authentication(9) π
okay so this is from the Kernel API Manual, section 9, and it's literally the whole lore drop on how DRM keeps track of who's in charge of your GPU. bestie, this is the group-chat admin system of the kernel. let's get into it π
β¨ the actual tea (DESCRIPTION) β¨
struct drm_master is the thing that tracks groups of clients with open primary device nodes. think of it as the little crown π that a group of besties shares.
for every struct drm_file that has at least once successfully become the device master β whether that happened through the SET_MASTER IOCTL, or implicitly by opening the primary device node when nobody else was the current master at that time β there exists one drm_master. this is recorded in drm_file.is_master so everyone knows who's who π
all the other clients out here? they just have a pointer to the drm_master they're associated with. no crown, just a link in the group chat π«Ά
also huge: only one drm_master can be the current master for a drm_device. one. single. main character. π and that crown can be switched:
- through the
DROP_MASTERandSET_MASTERIOCTLs, or - implicitly, through closing/opening the primary device node
see also drm_is_current_master β it's the vibe check for "are you actually the master rn" π
clients can authenticate against the current master (if it matches their own) using the GETMAGIC and AUTHMAGIC IOCTLs. and together with exchanging masters, this is what allows controlled access to the device for an entire group of mutually trusted clients. mutuals only, no gatecrashers π β¨
π« SEE ALSO π«
- kernel file
./drivers/gpu/drm/drm_auth.cβ the source, go read it iykyk drm_is_current_master(9)drm_master_get(9)drm_file_get_master(9)drm_master_put(9)
that's the whole thing, no cap π§ from ./drivers/gpu/drm, dated October 2026 β slay, and good luck out there with your masters, 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