This repository contains the software artifact for the CCS'26 Paper: "You Shall Not Pass into Ring-0! A User Privacy-Friendly Anti-Cheat Architecture for Personal Computers".
The paper introduces a VM-based video game framework, which we call Tirith.
Tirith is optimized to execute on AMD x86_64 CPUs and discrete GPUs. Our evaluation system had the following specifications:
OS: Arch Linux x86_64
Kernel: Linux 6.19.11-arch1-1
CPU: AMD Ryzen 5 5600X (12)
GPU: AMD Radeon RX 6950 XT [Discrete]
Memory: 32 GiB
Window Manager: Labwc
Note that other Intel x86_64 configurations work, but they are largely unoptimized. In particular, the system's functionality has been evaluated on an Intel x86_64 CPU (i9-12900k) and an Intel integrated GPU (Intel UHD-770).
This README assumes you have Arch Linux installed with a Wayland window manager. Development and evaluation used Labwc, but other wayland environments also work.
-
Please install podman (a Linux container environment):
host> sudo pacman -Syu podman podman-compose host> systemctl --user enable --now podman.socket
-
Build and execute the podman container (~4-5 minutes)
host> cd docker host> ./build.sh host> ./exec.sh # opens the container shell
-
Build and install all the required toolchain inside the container environment
-
QEMU (~1-2 minutes):
container> cd Tirith/qemu container> ./qemu-install.sh
-
gramine-tdx (~3-5 minutes):
container> cd Tirith/gramine-tdx container> ./gramine-install.sh
-
mesa3d (~3-5 minutes):
container> cd Tirith/mesa3d container> ./mesa-install.sh
-
OpenGL-EGL Translation Library (<1 minute):
container> cd Tirith/egl-redirect container> make
-
To redirect graphics onto the host environment, we must disable xhost authentication and enable display forwarding.
-
In a separate terminal shell on the host, please disable xhost authentication:
host> cd Tirith/scripts host> xhost +Note: This is just for testing. The system will be updated later to avoid disabling authentication.
-
Then, enable display forwarding:
-
Check your active display with
echo $DISPLAY:- If
:0, run:
host> ./host-proxy.sh # targets /tmp/.X11-unix/X0
- If
:1, run:
host> ./host-proxy-xwayland.sh # targets /tmp/.X11-unix/X1
- If
-
Important Notes
-
The proxy must be left running for the duration of the follow sections.
-
FPS data will in general be output to the terminal every 1 minute, with the exception of Supertuxkart which will print only at the end of the benchmark.
-
After the tests are done, please re-enabled xhost authentication
host> xhost -
socat E read(6, ...): Connection reset by peer:- Ensure
xhost +has been run on the host. - Alternatively, run socat directly matching your active socket:
host> sudo socat VSOCK-LISTEN:6000,fork,reuseaddr UNIX-CONNECT:/tmp/.X11-unix/X1 # substitute with X0 based if DISPLAY=:0
- Ensure
Authorization required / x11 not available:- Run
xhost +on the host to disable X11 restrictions.
- Run
Benchmarks like Glxgears and video games are run in the container environment (i.e., cd docker && ./exec.sh).
Compile the benchmark and build the required manifest.
container> cd Tirith/gramine-tdx/CI-Examples/graphics/glxgears-with-lows
container> makeExecute the benchmark; a window with spinning gears will appear and it will print average/1%-low FPS every minute
container> gramine-vm glxgearsDownload the game, compile it, and build the required manifest.
container> cd Tirith/gramine-tdx/CI-Examples/graphics/quake2
container> ./setup-quake.shThen, execute the game inside a gramine vm:
container> make
container> gramine-vm quake2During gameplay, you can
- Hit esc to open the menu, navigate with arrow keys and enter to the graphics settings.
- Increase the graphics options to the maximums (optionally).
- Close the game with esc, navigating to quit and hitting y.
Download the game, compile it, and build the required manifest.
container> cd Tirith/gramine-tdx/CI-Examples/graphics/supertuxkart
container> ./install-stx.shThen, execute the game inside a gramine vm:
container> make
container> gramine-vm supertuxkartDuring gameplay, you can
- Skip through the popups and click the wrench at the bottom.
- Update the graphics level to the maximum and ensure the FPS cap is changed from vsync to 1000.
Download the game, compile it, and build the required manifest.
container> cd Tirith/gramine-tdx/CI-Examples/graphics/minetest
container> ./setup-minetest.shcontainer> make
container> gramine-vm minetestTo open a new in-game environment (also called "world"),
- Click
Newon the main menu - Click create in the new screen.
- Click Play Game.
On subsequent runs, the game should load your created world automatically.
During gameplay, you can:
- Hit esc to open the menu, navigate with arrow keys and enter to the graphics settings.
- Increase the graphics options to the maximums.
TF2 uses its native 64-bit Linux client and an offline cp_badlands bot
workload. Installation requires claiming the free TF2 license with a Steam
account.
First, please install steam and log-in to your account. Then,
container> cd Tirith/gramine-tdx/CI-Examples/graphics/tf2
container> ./setup-tf2.sh <STEAM_USERNAME>In a separate terminal shell on the host, please steam proxy:
host> cd Tirith/scripts
host> ./host-steam-proxy.sh
This must be left running while Team Fortress 2 is open with Gramine.
With the desktop Steam client running, execute the game natively first (to verify):
container> ./run-native.shIf the game works correctly, you can execute the game with Tirith:
container> make
container> make runNote that the mouse sensitivity is set to 0 for ignoring accidental inputs during benchmarking, you can increase it in the ingame settings ( -> gear icon)
See gramine-tdx/CI-Examples/graphics/tf2/README.md for alternate Steam
library paths, tracing, current limitations, and the benchmark plan.
Tirith's original code is released under the GNU General Public License v3.0.
Bundled third-party components keep their own licenses; see the license files in each directory:
qemu/: seeqemu/LICENSEandqemu/COPYINGgramine-tdx/: seegramine-tdx/LICENSE.txt(LGPL-3.0)mesa3d/: seemesa3d/docs/license.rstsharedgl/: seesharedgl/LICENSE(MIT)