Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xorg compat #502

Merged
merged 4 commits into from
Oct 29, 2024
Merged

Xorg compat #502

merged 4 commits into from
Oct 29, 2024

Conversation

quitschbo
Copy link
Member

@quitschbo quitschbo commented Oct 29, 2024

Recent Linux kernel 6.9 changed device link of parent devices
in the sysfs. Newer xorg servers can handle this. However, to be
compatible with container payload which includes no recent xorg
server, we introduce this module. It will mount a tmpfs on the
/sys/class/graphics directory and links the included files, so
that it will compatible with old matching logic.

Especially, the link in /sys/class/graphics/fb0 may not include
a pci suffix to get recognized as platform device by legacy xorg
servers. Thus we link to bus/platform instead.

@quitschbo quitschbo force-pushed the xorg_compat branch 4 times, most recently from 449eeac to b3ab381 Compare October 29, 2024 12:19
Recent Linux kernel 6.9 changed device link of parent devices
in the sysfs. Newer xorg servers can handle this. However, to be
compatible with container payload which includes no recent xorg
server, we introduce this module. It will mount a tmpfs on the
/sys/class/graphics directory and links the included files, so
that it will compatible with old matching logic.

Especially, the link in /sys/class/graphics/fb0 may not include
a pci suffix to get recognized as platform device by legacy xorg
servers. Thus we link to bus/platform instead.

Signed-off-by: Michael Weiß <[email protected]>
Instead of unconditionally enable compat code, do this conditionally
if the new flag COMPARTMENT_FLAG_XORG_COMPAT is set for this
compartment.

Signed-off-by: Michael Weiß <[email protected]>
Introduce the config field 'enable_xorg_compat' to enable or disable
(default) the xorg_compat submodule for this container at runtime.
Wire up the corresponding container source files from container.proto
through container_config.c to container.c.

Signed-off-by: Michael Weiß <[email protected]>
Since now the actual runtime compat code can be enabled by a flag
in the container config, Set XORG_COMPAT=y in Makefile. Thus, the
xorg compat module itself is enabled at compile time.

Signed-off-by: Michael Weiß <[email protected]>
@quitschbo quitschbo merged commit 65b7749 into gyroidos:kirkstone Oct 29, 2024
3 checks passed
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.

2 participants