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

Draft: Policies required for logind BPF-based hidraw revoke #1920

Draft
wants to merge 3 commits into
base: rawhide
Choose a base branch
from

Conversation

whot
Copy link

@whot whot commented Nov 1, 2023

These are the required policies (I think) for systemd-logind to access /dev/hidraw devices, pass the fd via DBus to the requestor (usually a compositor).

On vt-switch we expect logind to revoke the devices via an eBPF program (wip kernel patches) so we need the ability to load and run those. The corresponding PR for systemd is systemd/systemd#29797.

Filing as Draft, this is all still WIP. Feel free to close, I just wanted a linkable PR to work on this :)

usb devices is a broad stroke, our plan is for logind to access
/dev/hidraw devices but those are under the more rather generic
usb_devices_t label.
Our plan is to add support for /dev/hidraw devices to logind via its
TakeDevice() - this requires that logind passes the fd via dbus to the
target (usually the compositor).
The current plan is to implement hidraw revoke support via BPF - for
this to work logind has to be able to load and run BPF programs.

This comment was marked as resolved.

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