Skip to content

refactor: strip libgbm dependency and use sealed memfd for SHM fallback - #23

Merged
InternetOfTofu merged 1 commit into
mainfrom
feature/remove-gbm
Jul 25, 2026
Merged

refactor: strip libgbm dependency and use sealed memfd for SHM fallback#23
InternetOfTofu merged 1 commit into
mainfrom
feature/remove-gbm

Conversation

@InternetOfTofu

Copy link
Copy Markdown
Collaborator

Replaces the GBM allocator in allocator.rs with a clean CPU-accessible memfd allocator for local placeholder mode (wl_shm). Applies file seals (F_SEAL_SHRINK, F_SEAL_GROW, F_SEAL_SEAL) to allocated memfd buffers to guarantee memory size immutability and prevent SIGBUS truncation bugs.

Removes all references to gbm BufferObjects across state and SHM handling, enabling out-of-the-box 100% statically linked builds (+crt-static).

Also updates wayland_codegen to emit &str instead of &String to resolve clippy warnings across protocol handlers.

TAG=agy
CONV=17ab6d56-57a3-4f9b-a034-5fdda38d047d

@InternetOfTofu

Copy link
Copy Markdown
Collaborator Author

still need to test that it works.

@InternetOfTofu

Copy link
Copy Markdown
Collaborator Author

(this is a prereq of #22)

Replaces the GBM allocator in allocator.rs with a clean CPU-accessible
memfd allocator for local placeholder mode (wl_shm). Applies file seals
(F_SEAL_SHRINK, F_SEAL_GROW, F_SEAL_SEAL) to allocated memfd buffers to
guarantee memory size immutability and prevent SIGBUS truncation bugs.

Removes all references to gbm BufferObjects across state and SHM handling,
enabling out-of-the-box 100% statically linked builds (+crt-static).

Also updates wayland_codegen to emit &str instead of &String to resolve
clippy warnings across protocol handlers.

TAG=agy
CONV=17ab6d56-57a3-4f9b-a034-5fdda38d047d
@InternetOfTofu

Copy link
Copy Markdown
Collaborator Author

manual testing passed, local compositor pass through and in-vm compositor pass through both still work.

ldd is much clean and minimal:

	linux-vdso.so.1 
	libgcc_s.so.1
	libm.so.6
	libc.so.6 
	/lib64/ld-linux-x86-64.so.2 

@InternetOfTofu
InternetOfTofu merged commit fc4b52a into main Jul 25, 2026
11 checks passed
@InternetOfTofu
InternetOfTofu deleted the feature/remove-gbm branch July 25, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant