mirror of
https://github.com/joleuger/vuinputd.git
synced 2026-07-21 02:08:28 +00:00
Fix chapters in DESIGN-document
This commit is contained in:
parent
783c917ff2
commit
a23e01486c
1 changed files with 6 additions and 7 deletions
|
|
@ -47,34 +47,33 @@ uinput (kernel)->>eventx: create /dev/input/eventx
|
|||
uinput (kernel)->>vuinputd: announce new device via udev
|
||||
vuinputd->>libinput/game: announce new device via udev
|
||||
libinput/game->>eventx: open /dev/input/eventx
|
||||
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 2. Design Decisions
|
||||
## 3. Design Decisions
|
||||
|
||||
### 2.1 Where `/dev/uinput` lives
|
||||
### 3.1 Where `/dev/uinput` lives
|
||||
|
||||
* **Decision**: Provide a fake `/dev/vuinput` backed by host proxy. This character device can be bind mounted inside containers to `/dev/uinput`.
|
||||
* **Why**: Prevents containers from creating devices visible system-wide.
|
||||
|
||||
### 2.2 Prevent host from using devices
|
||||
### 3.2 Prevent host from using devices
|
||||
|
||||
* **Decision**: udev rules strip `ID_INPUT_KEYBOARD` and `ID_INPUT_MOUSE`, set `ID_SEAT=seat_vuinput`.
|
||||
* **Why**: Ensures devices are invisible to host input subsystems while still available in containers.
|
||||
|
||||
### 2.3 udev events in containers
|
||||
### 3.3 udev events in containers
|
||||
|
||||
* **Decision**: Proxy forwards udev events into the container via netlink.
|
||||
* **Why**: Without this, SDL2 and libinput might not recognize devices correctly; with it, containers behave as if devices were created locally.
|
||||
|
||||
### 2.4 Where to run the proxy
|
||||
### 3.4 Where to run the proxy
|
||||
|
||||
* **Decision**: Run proxy on host, one instance per container.
|
||||
* **Why**: Only host can safely access `/dev/uinput` and enforce mediation.
|
||||
|
||||
### 2.5 Security trade-off
|
||||
### 3.5 Security trade-off
|
||||
|
||||
* **Decision**: Accept that host always sees devices, but enforce rules to stop it consuming them.
|
||||
* **Why**: Full input namespaces don’t exist in Linux today; mediation is the practical compromise.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue