STRUCT DRM_VC4_CREATE_SHADER_BO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct drm_vc4_create_shader_bo β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual, and buckle up because this one is a little struct with a lot of opinions πŸ’…

πŸŽ€ NAME πŸŽ€

struct drm_vc4_create_shader_bo β€” the ioctl argument for creating VC4 shader BOs. yes that's the whole name, she's long but she's iconic 🀍

🌸 SYNOPSIS 🌸

struct drm_vc4_create_shader_bo {
    __u32 size;
    __u32 flags;
    __u64 data;
    __u32 handle;
    __u32 pad;
 };

like, look at her. five fields. flawless. no notes 🫢

πŸ¦‹ Members πŸ¦‹

the full cast is right up there in the SYNOPSIS β€” size, flags, data, handle, pad β€” that's the entire squad, no extras, no surprises ✨

πŸ”₯ Description πŸ”₯

okay so here's the drama: if a shader could get overwritten while it's also being executed, that would allow privilege escalation 😭 and we are simply not doing that.

so. shaders must be created using this ioctl. that's the rule, that's the whole vibe.

and they can't be mmapped later β€” no mmap for these babies, ever, no cap. πŸ”’

fr fr take this seriously β€” the "no overwriting while executing" and "no mmap afterwards" bits are the entire security model here, don't go looking for a loophole πŸ™ˆ

🌈 SEE ALSO 🌈

  • Kernel file ./include/uapi/drm/vc4_drm.h
  • struct drm_vc4_submit_cl(9)
  • struct drm_vc4_wait_seqno(9)
  • struct drm_vc4_wait_bo(9)
  • struct drm_vc4_create_bo(9)
  • struct drm_vc4_mmap_bo(9)
  • struct drm_vc4_label_bo(9)

and that's the page, bestie πŸ’– this one came straight out of ./include/uapi/drm, dated October 2026, and honestly? she ate. πŸ‘‘ go read the SEE ALSOs, ily, bye πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from