/sys as an allow-list under --mask-host, the driver files of /proc emptied, and
--kernel-release.

ai-jail binds the host's whole /sys read-only. --mask-host already hides a list
of trees in it (DMI, block devices, NUMA, memory, the CPU tree it replaces), but
a deny-list over sysfs never ends: every PCI and USB device with vendor, model
and serial, the network interfaces and their MAC addresses, the loaded modules
and their parameters, power supplies and thermal zones all stayed readable.
Under --mask-host the base bind of /sys is now replaced, in place, by a tmpfs
holding only what programs are known to read:

  - /sys/fs/cgroup                       the jail's own cgroup (host view)
  - /sys/devices/system/cpu              the synthetic CPU tree (host view)
  - /sys/kernel/mm/transparent_hugepage  jemalloc, Go's runtime, the JVM

With GPU passthrough (--gpu, never under --lockdown) the trees the graphics
stack walks to find the device behind /dev/dri and /dev/nvidia* come back:
/sys/class/drm, /sys/bus/pci, /sys/dev/char, the PCI roots /sys/devices/pci*,
the GPU drivers' own trees in /sys/module (nvidia*, amdgpu, radeon, i915, xe,
nouveau -- NVML refuses to start without /sys/module/nvidia: "GPU access
blocked by the operating system", found by bisecting the allow-list), plus
/proc/driver/nvidia. That re-exposes every PCI device, which is the price of a
GPU. The tmpfs is sealed with --remount-ro /sys after
every group (as /etc is under --minimal-etc), since later binds create their
mount points in it; the /sys deny-list masks and the host view's tmpfs masks
inside /sys are dropped, because the tmpfs already hides what they covered.

In /proc, modules, devices and misc read empty (an empty file bound over each)
and /proc/driver is hidden by a tmpfs. /proc/devices stays real under --gpu:
NVIDIA's userspace looks up nvidia-uvm's major there.

--kernel-release STRING (with --mask-host; never saved, like --hostname) is the
release the jail reads in /proc/sys/kernel/osrelease and /proc/version and,
under --syscall-view, from uname(2) -- instead of the numeric part of the
host's. It must start with a digit and hold only letters, digits and .-_+~, at
most 64 bytes (struct utsname's field is 65 with the NUL).

What stays visible: /proc/self/mountinfo still names the host's block devices
and subvolumes as the sources of the read-only binds (/usr, /etc, /opt, the
project, the allow-listed /sys trees); --overlay-system replaces them for
/usr, /etc and /opt only. The per-process files under /proc/<pid> describe the
jail's own processes. cpuid, timing and sched_getaffinity's CPU numbers are
the host's, as before.

Tests: sys_allowlist's plan (with and without the GPU, absent host paths, the
PCI roots), the /proc half of the host view plan, the configured release in
the identity layer, the dry-run argv (tmpfs /sys, no whole-/sys bind, the seal
after every /sys bind, no deny-list masks, only allow-listed binds, the GPU
trees, /proc/devices kept with the GPU), the host view request, the CLI parse
and the validation. Full suite on bentoo-lab: no failure that the tree without
this patch does not also have (the lab container cannot mount a fresh /proc,
so the in-jail integration tests skip there). In a real jail on the desktop,
--mask-host --syscall-view --minimal-etc --kernel-release 6.12.0-generic:
git commit, node, python3, cargo build+run of a new crate and claude --version
all work, /sys holds 60 entries to depth 3 instead of 4612, uname -r and
/proc/version read the configured release, /proc/modules is empty; with --gpu,
nvidia-smi -L lists the GPU.

Written against ai-jail (it applies before kekkai-rename.patch), so it can go
upstream on its own once tested there.

diff --git a/CLAUDE.md b/CLAUDE.md
index c65e032..c9276d6 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -182,7 +182,7 @@ There are regression tests in `src/config.rs` that parse old config file formats
 
 The bwrap command mounts are order-dependent. The sequence in `sandbox/bwrap.rs` must be:
 
-1. Base mounts (`/usr`, `/etc`, `/opt`, `/sys`, `/dev`, `/proc`, `/tmp`, `/run`). Under `--mask-host --minimal-etc` the `/etc` bind is replaced in place by a tmpfs and its allowlisted entries, so the hosts and resolv.conf binds that follow still land on it, as does the sandbox's `/etc/hostname` (naming `--hostname`, or `ai-sandbox`), bound last in the base; a `--remount-ro /etc` is emitted after every discovered group, because later groups (the host view, ssh's `ssh_config.d` tmpfs) may create mount points inside it
+1. Base mounts (`/usr`, `/etc`, `/opt`, `/sys`, `/dev`, `/proc`, `/tmp`, `/run`). Under `--mask-host` the `/sys` bind is replaced in place by a tmpfs and read-only binds of the allow-list in `sandbox/sys_allowlist.rs`; the `/sys` masks of group 2 are then dropped, and a `--remount-ro /sys` follows every discovered group, like `/etc`'s. Under `--mask-host --minimal-etc` the `/etc` bind is replaced in place by a tmpfs and its allowlisted entries, so the hosts and resolv.conf binds that follow still land on it, as does the sandbox's `/etc/hostname` (naming `--hostname`, or `ai-sandbox`), bound last in the base; a `--remount-ro /etc` is emitted after every discovered group, because later groups (the host view, ssh's `ssh_config.d` tmpfs) may create mount points inside it
 2. Sensitive /sys masks (tmpfs over `/sys/firmware`, `/sys/kernel/security`, etc.)
 3. GPU devices, then KVM device (`--kvm`, `/dev/kvm`)
 4. Docker socket
diff --git a/docs/CLI_TUI_PARITY.md b/docs/CLI_TUI_PARITY.md
index fa3343b..0e89bb9 100644
--- a/docs/CLI_TUI_PARITY.md
+++ b/docs/CLI_TUI_PARITY.md
@@ -110,6 +110,9 @@ or integration rather than saved sandbox authority.
   own; no configuration key, ignored on macOS, which has no UTS namespace;
   refused unless one DNS label). It needs no `--mask-host`: it only
   replaces `ai-sandbox`, and it narrows nothing
+- Kernel release: `--kernel-release` STRING (with `--mask-host`; the same
+  per-run choice as the host view, no configuration key, refused on its own
+  and unless it reads as a release). It only changes what the jail reads
 - Backward-compatible rejected option: `--allow-tcp-port`
 
 ## Release rule
diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md
index 02f3b10..0da6543 100644
--- a/docs/USER_GUIDE.md
+++ b/docs/USER_GUIDE.md
@@ -770,6 +770,22 @@ sandbox gets that `/etc/hostname` either way, so the host's own name no longer
 shows through it. The name is one DNS label -- lowercase letters, digits and
 hyphens, at most 63 -- and anything else is refused.
 
+Under `--mask-host`, `/sys` is a read-only tmpfs holding an allow-list
+rather than the host's whole sysfs: the sandbox's own cgroup, the synthetic
+CPU tree and `/sys/kernel/mm/transparent_hugepage`. With GPU passthrough
+on it also holds `/sys/class/drm`, `/sys/bus/pci`, `/sys/dev/char`, the PCI roots
+`/sys/devices/pci*`, the GPU drivers' entries in `/sys/module`
+(NVIDIA's NVML refuses to start without them) and `/proc/driver/nvidia`. `/proc/modules`,
+`/proc/devices` (kept with GPU passthrough) and `/proc/misc` read empty and
+`/proc/driver` is hidden. The list, with the reason for each entry, is in
+`src/sandbox/sys_allowlist.rs`.
+
+`--kernel-release STRING` (with `--mask-host`; never saved) is the release
+the sandbox reads in `/proc/sys/kernel/osrelease` and `/proc/version` and,
+under `--syscall-view`, from `uname(2)` -- instead of the numeric part of the
+host's. It must start with a digit and hold only letters, digits and
+`.-_+~`, at most 64 bytes.
+
 A nested sandbox can no longer mount its own `/proc` under `--mask-host`; with
 ai-jail's default Landlock and seccomp a nested sandbox is refused anyway, so
 this matters only under `--no-landlock --no-seccomp`. The `cpuid` instruction,
diff --git a/src/cli.rs b/src/cli.rs
index fbc7f5c..1242012 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -239,6 +239,9 @@ OPTIONS:
     --hostname <NAME>              The jail's host name, one DNS label: uname, /etc/hosts,
                                    /etc/hostname and --syscall-view all read it (Linux;
                                    never saved; default ai-sandbox)
+    --kernel-release <STRING>      With --mask-host: the kernel release the jail reads in
+                                   /proc and, with --syscall-view, from uname(2), instead
+                                   of the host's numeric one (Linux; never saved)
     --clean                        Ignore saved and legacy project policy, start fresh
     --dry-run                      Print the sandbox command without executing
     --init                         Create/update external per-project config and exit
@@ -322,6 +325,7 @@ pub struct CliArgs {
     pub syscall_view: bool,
     pub minimal_etc: bool,
     pub hostname: Option<String>,
+    pub kernel_release: Option<String>,
     /// Internal: the helper's end of the `--syscall-view` socket pair.
     pub syscall_view_fd: Option<i32>,
     pub agent_state: Option<bool>,
@@ -658,6 +662,10 @@ pub fn parse_from(mut parser: lexopt::Parser) -> Result<CliArgs, String> {
                 let val = parser.value().map_err(|e| e.to_string())?;
                 args.hostname = Some(val.to_string_lossy().into_owned());
             }
+            Long("kernel-release") => {
+                let val = parser.value().map_err(|e| e.to_string())?;
+                args.kernel_release = Some(val.to_string_lossy().into_owned());
+            }
             Long("syscall-view-fd") => {
                 if !args.landlock_exec {
                     return Err(
@@ -1438,6 +1446,7 @@ const INTERFACE_INTERNAL_FIELDS: &[&str] = &[
     "syscall_view",
     "minimal_etc",
     "hostname",
+    "kernel_release",
 ];
 
 /// Names already missing from docs/USER_GUIDE.md at upstream v3.3.0
@@ -1581,6 +1590,7 @@ const INTERFACE_UNDOCUMENTED_BASELINE: &[&str] = &[
     "--syscall-view",
     "--minimal-etc",
     "--hostname",
+    "--kernel-release",
     "--x11",
     "--no-x11",
     "--host-shm",
@@ -3383,6 +3393,21 @@ mod tests {
         assert!(HELP.contains("--hostname"));
     }
 
+    #[test]
+    fn parse_kernel_release() {
+        assert_eq!(parse_test(&["claude"]).unwrap().kernel_release, None);
+        let args = parse_test(&[
+            "--mask-host",
+            "--kernel-release",
+            "6.12.0-generic",
+            "claude",
+        ])
+        .unwrap();
+        assert_eq!(args.kernel_release.as_deref(), Some("6.12.0-generic"));
+        assert_eq!(args.command, vec!["claude".to_string()]);
+        assert!(HELP.contains("--kernel-release"));
+    }
+
     #[test]
     fn parse_minimal_etc() {
         assert!(!parse_test(&["claude"]).unwrap().minimal_etc);
diff --git a/src/config.rs b/src/config.rs
index 33c0691..10ea70a 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -207,6 +207,10 @@ pub struct Config {
     /// Runtime only, never saved: a caller passes it on every launch.
     #[serde(default, skip)]
     pub hostname: Option<String>,
+    /// `--kernel-release`: the release a `--mask-host` jail reads.
+    /// Runtime only, never saved: a caller passes it on every launch.
+    #[serde(default, skip)]
+    pub kernel_release: Option<String>,
     #[serde(default, skip_serializing_if = "Vec::is_empty")]
     pub command: Vec<String>,
     #[serde(default, skip_serializing_if = "Vec::is_empty")]
@@ -1552,6 +1556,7 @@ fn global_config_example_is_inert_and_documents_public_keys() {
                     | "syscall_view"
                     | "minimal_etc"
                     | "hostname"
+                    | "kernel_release"
             )
         })
         .collect::<std::collections::BTreeSet<_>>();
@@ -3712,6 +3717,7 @@ pub fn merge(cli: &CliArgs, existing: Config) -> Config {
     config.syscall_view = cli.syscall_view;
     config.minimal_etc = cli.minimal_etc;
     config.hostname = cli.hostname.clone();
+    config.kernel_release = cli.kernel_release.clone();
 
     expand_user_paths(&mut config);
 
@@ -6063,6 +6069,7 @@ no_gpu = true
             syscall_view: false,
             minimal_etc: false,
             hostname: None,
+            kernel_release: None,
             command: vec!["claude".into()],
             rw_maps: vec![PathBuf::from("/tmp/a"), PathBuf::from("/tmp/b")],
             ro_maps: vec![PathBuf::from("/opt/data")],
@@ -9501,6 +9508,7 @@ hide_dotdirs = [".my_secrets"]
             syscall_view: false,
             minimal_etc: false,
             hostname: None,
+            kernel_release: None,
             command: vec!["codex".into()],
             rw_maps: vec![PathBuf::from("/tmp/shared")],
             ro_maps: vec![],
@@ -11395,6 +11403,7 @@ mod profile_field_coverage_tests {
         "syscall_view",
         "minimal_etc",
         "hostname",
+        "kernel_release",
     ];
 
     fn config_fields() -> Vec<String> {
diff --git a/src/config_store.rs b/src/config_store.rs
index bcddc5b..fd1e8fa 100644
--- a/src/config_store.rs
+++ b/src/config_store.rs
@@ -1240,6 +1240,7 @@ pub(crate) fn save_project_grants(
     grants.syscall_view = false;
     grants.minimal_etc = false;
     grants.hostname = None;
+    grants.kernel_release = None;
     doc.directory_grants = approved_directory_grants.to_vec();
     doc.grants = grants;
     doc.approved_env_names = approved_env_names;
@@ -1567,6 +1568,7 @@ const CONFIG_FIELD_POLICY: &[ConfigFieldPolicy] = &[
     excluded_policy!("syscall_view", Restriction),
     excluded_policy!("minimal_etc", Restriction),
     excluded_policy!("hostname", Preference),
+    excluded_policy!("kernel_release", Preference),
     static_policy!("command", Authority, Command),
     static_policy!("rw_maps", Authority, RwMaps),
     static_policy!("ro_maps", Authority, RoMaps),
@@ -2382,6 +2384,7 @@ mod tests {
         expected_excluded!("syscall_view", Restriction),
         expected_excluded!("minimal_etc", Restriction),
         expected_excluded!("hostname", Preference),
+        expected_excluded!("kernel_release", Preference),
         expected_authority!("command", Authority, Command, ["command claude"]),
         expected_authority!(
             "rw_maps",
@@ -2512,6 +2515,9 @@ mod tests {
             "hostname" => {
                 config.hostname = Some("desktop-k3f9a2".into());
             }
+            "kernel_release" => {
+                config.kernel_release = Some("6.12.0-generic".into());
+            }
             "command" => {
                 config.command =
                     vec!["claude".into(), "--token=top-secret".into()];
diff --git a/src/main.rs b/src/main.rs
index cd09bf0..47f7403 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -433,9 +433,34 @@ fn validate_overlay_system(config: &config::Config) -> Result<(), String> {
     if let Some(name) = &config.hostname {
         sandbox::hostname::validate(name)?;
     }
+    if let Some(release) = &config.kernel_release {
+        if !config.mask_host {
+            return Err("--kernel-release requires --mask-host".into());
+        }
+        validate_kernel_release(release)?;
+    }
     Ok(())
 }
 
+/// `--kernel-release`: what fits `struct utsname`'s 65-byte field and reads
+/// as a release to the probes that parse one -- a leading digit, then
+/// letters, digits and `.-_+~`, at most 64 bytes.
+fn validate_kernel_release(release: &str) -> Result<(), String> {
+    let ok = !release.is_empty()
+        && release.len() <= 64
+        && release.starts_with(|c: char| c.is_ascii_digit())
+        && release
+            .chars()
+            .all(|c| c.is_ascii_alphanumeric() || ".-_+~".contains(c));
+    if ok {
+        Ok(())
+    } else {
+        Err(format!(
+            "--kernel-release {release:?}: expected a release such as 6.12.0-generic (a leading digit, then letters, digits and .-_+~, at most 64 bytes)"
+        ))
+    }
+}
+
 /// `--egress-log` only sees what the filtered-egress proxy relays, so with
 /// the network off or full it would log nothing while looking enabled.
 /// Checked on the finalized config: a config file or a harness
@@ -3401,6 +3426,21 @@ mod tests {
         };
         let error = validate_overlay_system(&dotted).unwrap_err();
         assert!(error.contains("--hostname"), "{error}");
+        let release = |r: &str, mask_host: bool| {
+            validate_overlay_system(&Config {
+                kernel_release: Some(r.into()),
+                mask_host,
+                ..Config::default()
+            })
+        };
+        assert!(release("6.12.0-generic", true).is_ok());
+        assert!(release("6.1.0-13-amd64", true).is_ok());
+        let alone = release("6.12.0", false).unwrap_err();
+        assert!(alone.contains("requires --mask-host"), "{alone}");
+        for bad in ["", "generic", "6.12 0", "6.12/0", &"6".repeat(65)] {
+            let error = release(bad, true).unwrap_err();
+            assert!(error.contains("--kernel-release"), "{bad:?}: {error}");
+        }
         assert!(validate_overlay_system(&Config::default()).is_ok());
     }
 
diff --git a/src/sandbox/bwrap.rs b/src/sandbox/bwrap.rs
index 7dc0ba3..fe78415 100644
--- a/src/sandbox/bwrap.rs
+++ b/src/sandbox/bwrap.rs
@@ -279,9 +279,10 @@ struct MountSet {
     /// inside the sandbox. Applied last so it sits on top of the
     /// project mount that contains it.
     overlay_hide: Vec<Mount>,
-    /// `--minimal-etc`: `--remount-ro /etc`, after every group, since a
-    /// later bind under `/etc` (the host view's, ssh's tmpfs) may need to
-    /// create its mount point in the tmpfs first.
+    /// `--minimal-etc`: `--remount-ro /etc`, and `--mask-host`'s
+    /// `--remount-ro /sys`, after every group, since a later bind under
+    /// either (the host view's, ssh's tmpfs) may need to create its mount
+    /// point in the tmpfs first.
     etc_seal: Vec<Mount>,
 }
 
@@ -689,12 +690,18 @@ impl SandboxGuard {
         &self.deny_dir_path
     }
 
-    fn syscall_view(&self) -> Result<&super::syscall_view::Supervisor, String> {
+    fn syscall_view(
+        &self,
+        config: &Config,
+    ) -> Result<&super::syscall_view::Supervisor, String> {
         if let Some(supervisor) = self.syscall_view.get() {
             return Ok(supervisor);
         }
         let supervisor = super::syscall_view::Supervisor::start(
-            super::syscall_view::answers_for_host(&self.hostname),
+            super::syscall_view::answers_for_host(
+                &self.hostname,
+                config.kernel_release.as_deref(),
+            ),
             std::time::Instant::now(),
         )?;
         Ok(self.syscall_view.get_or_init(|| supervisor))
@@ -735,6 +742,9 @@ fn host_view_request(config: &Config) -> super::host_view::HostViewRequest {
             .as_deref()
             .map(|root| root.join("machine-id")),
         overlay_system: config.overlay_system,
+        // The same predicate that binds the GPU devices (lockdown wins).
+        gpu: !config.lockdown_enabled() && config.gpu_enabled(),
+        kernel_release: config.kernel_release.clone(),
     }
 }
 
@@ -790,9 +800,43 @@ fn apply_host_view(
             }
         })
         .collect();
+    apply_sys_allowlist(mount_set, view.sys_binds());
     mount_set.unshare_cgroup = true;
 }
 
+/// `--mask-host`: replace the base read-only bind of the host's `/sys`, in
+/// place, with a tmpfs and read-only binds of the allow-listed host trees
+/// (`sys_allowlist`). The tmpfs hides everything else, so the `/sys` masks
+/// and the view's own tmpfs masks inside `/sys` are dropped rather than
+/// leave empty mount points behind; the view's binds into `/sys` (the
+/// jail's cgroup, the synthetic CPU tree) stay and land on the tmpfs. The
+/// tmpfs is sealed read-only after every group, since later binds create
+/// mount points in it. A host without `/sys` is left alone.
+fn apply_sys_allowlist(mount_set: &mut MountSet, sys_binds: &[PathBuf]) {
+    use super::sys_allowlist::{SYS, under_sys};
+    let sys = Path::new(SYS);
+    let Some(at) = mount_set
+        .base
+        .iter()
+        .position(|m| matches!(m, Mount::RoBind { dest, .. } if dest == sys))
+    else {
+        return;
+    };
+    let mut mounts = vec![Mount::Tmpfs { dest: sys.into() }];
+    mounts.extend(sys_binds.iter().map(|p| Mount::RoBind {
+        src: p.clone(),
+        dest: p.clone(),
+    }));
+    mount_set.base.splice(at..=at, mounts);
+    mount_set.sys_masks.clear();
+    mount_set
+        .host_view
+        .retain(|m| !matches!(m, Mount::Tmpfs { dest } if under_sys(dest)));
+    mount_set
+        .etc_seal
+        .push(Mount::RemountRo { dest: sys.into() });
+}
+
 /// `--minimal-etc`: replace the base bind of `/etc` with a tmpfs holding
 /// the allowlisted entries of `host_etc`, in place, so the binds the base
 /// makes inside `/etc` after it (hosts, resolv.conf) still land on top.
@@ -1904,7 +1948,7 @@ pub fn build(
         // `--syscall-view`: the helper's end of the supervisor's socket
         // pair, before the wrapper's own `--`.
         if config.syscall_view {
-            let fd = guard.syscall_view()?.child_fd();
+            let fd = guard.syscall_view(config)?.child_fd();
             let separator = wrapper_args.pop();
             wrapper_args.push(super::syscall_view::FD_FLAG.into());
             wrapper_args.push(fd.to_string());
@@ -6065,6 +6109,120 @@ mod tests {
         assert!(!plain.iter().any(|a| a == "/proc/cpuinfo"));
     }
 
+    #[test]
+    fn mask_host_replaces_the_sys_bind_with_a_sealed_allowlist() {
+        // A guard per launch: the guard caches its host view.
+        let dry_run = |config: &Config| {
+            let guard =
+                SandboxGuard::test_with_hosts(PathBuf::from("/tmp/test-hosts"));
+            let sources = MountSources::from_guard(&guard);
+            let view = config
+                .mask_host
+                .then(|| guard.host_view(config, false).unwrap());
+            build_dry_run_args_forwarded(
+                config,
+                &std::env::temp_dir(),
+                &sources,
+                false,
+                None,
+                &crate::sandbox::BridgeSockets::default(),
+                false,
+                view,
+            )
+            .unwrap()
+        };
+        let pair = |args: &[String], flag: &str, dest: &str| {
+            args.windows(2).position(|w| w[0] == flag && w[1] == dest)
+        };
+        let has_sys = Path::new("/sys/kernel").is_dir();
+
+        let plain = dry_run(&minimal_test_config());
+        assert!(pair(&plain, "--tmpfs", "/sys").is_none());
+        assert!(pair(&plain, "--remount-ro", "/sys").is_none());
+
+        let masked = dry_run(&Config {
+            mask_host: true,
+            ..minimal_test_config()
+        });
+        if has_sys {
+            let tmpfs = pair(&masked, "--tmpfs", "/sys").expect("tmpfs /sys");
+            assert!(
+                !masked.windows(3).any(|w| w[0] == "--ro-bind"
+                    && w[1] == "/sys"
+                    && w[2] == "/sys"),
+                "the host's whole /sys must not be bound"
+            );
+            let seal =
+                pair(&masked, "--remount-ro", "/sys").expect("sealed /sys");
+            let last_sys_mount = masked
+                .iter()
+                .rposition(|a| a.starts_with("/sys/"))
+                .unwrap_or(tmpfs);
+            assert!(seal > last_sys_mount, "the seal must follow every bind");
+            // The tmpfs already hides what the deny-list masks covered.
+            assert!(pair(&masked, "--tmpfs", "/sys/firmware").is_none());
+            assert!(pair(&masked, "--tmpfs", "/sys/class/dmi").is_none());
+            // Only allow-listed host trees are bound into /sys.
+            for w in masked.windows(3) {
+                if w[0] == "--ro-bind" && w[2].starts_with("/sys/") {
+                    assert!(
+                        w[2] == "/sys/fs/cgroup"
+                            || w[2] == "/sys/devices/system/cpu"
+                            || super::super::sys_allowlist::SYS_ALLOW
+                                .contains(&w[2].as_str()),
+                        "unexpected /sys bind {w:?}"
+                    );
+                }
+            }
+            assert!(pair(&masked, "--ro-bind", "/sys/bus/pci").is_none());
+        }
+        if Path::new("/proc/driver").exists() {
+            let proc_at = pair(&masked, "--proc", "/proc").unwrap();
+            let hidden = pair(&masked, "--tmpfs", "/proc/driver").unwrap();
+            assert!(hidden > proc_at);
+        }
+        if Path::new("/proc/modules").exists() {
+            let at = masked.iter().position(|a| a == "/proc/modules").unwrap();
+            assert_eq!(masked[at - 2], "--ro-bind");
+            assert!(masked[at - 1].ends_with("/empty"), "{}", masked[at - 1]);
+        }
+
+        let gpu = dry_run(&Config {
+            mask_host: true,
+            no_gpu: Some(false),
+            ..minimal_test_config()
+        });
+        if Path::new("/sys/bus/pci").exists() {
+            assert!(pair(&gpu, "--ro-bind", "/sys/bus/pci").is_some());
+        }
+        if Path::new("/proc/devices").exists() {
+            assert!(
+                !gpu.windows(2).any(
+                    |w| w[0].ends_with("/empty") && w[1] == "/proc/devices"
+                ),
+                "--gpu keeps the real /proc/devices"
+            );
+        }
+    }
+
+    #[test]
+    fn host_view_request_carries_gpu_and_the_kernel_release() {
+        let config = Config {
+            mask_host: true,
+            no_gpu: Some(false),
+            kernel_release: Some("6.12.0-generic".into()),
+            ..minimal_test_config()
+        };
+        let request = host_view_request(&config);
+        assert!(request.gpu);
+        assert_eq!(request.kernel_release.as_deref(), Some("6.12.0-generic"));
+        let locked = host_view_request(&Config {
+            lockdown: Some(true),
+            ..config
+        });
+        assert!(!locked.gpu, "lockdown never passes the GPU through");
+    }
+
     #[test]
     fn minimal_etc_replaces_the_etc_bind_in_place() {
         let host_etc = std::env::temp_dir()
diff --git a/src/sandbox/host_view.rs b/src/sandbox/host_view.rs
index 710a30b..8d8ca82 100644
--- a/src/sandbox/host_view.rs
+++ b/src/sandbox/host_view.rs
@@ -38,6 +38,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
 use super::host_view_extra as extra;
 use super::host_view_synth as synth;
 use super::host_view_uptime::{LiveFile, UptimeTicker};
+use super::sys_allowlist;
 
 const CGROUP_ROOT: &str = "/sys/fs/cgroup";
 const SYS_CPU: &str = "/sys/devices/system/cpu";
@@ -59,6 +60,12 @@ pub(crate) struct HostViewRequest {
     /// `--overlay-system`: serve `/usr`, `/etc` and `/opt` through
     /// read-only overlays (see `host_view_extra::overlay_mounts`).
     pub overlay_system: bool,
+    /// `--gpu`: the `/sys` allow-list also re-exposes the graphics trees
+    /// (see `sys_allowlist`).
+    pub gpu: bool,
+    /// `--kernel-release`: the release the jail reads instead of the host's
+    /// cleaned one, in `/proc` and through `--syscall-view`.
+    pub kernel_release: Option<String>,
 }
 
 /// The host as the jail's limits frame it, read once per launch.
@@ -263,6 +270,36 @@ pub(super) fn plan(
     out
 }
 
+/// Add the `/proc` half of the `/sys` allow-list to `out`: the emptied
+/// files (bound from the view's `empty`), the hidden directories, then the
+/// host paths re-exposed under them, in that order.
+pub(super) fn extend_plan_with_sys(
+    out: &mut HostViewPlan,
+    sys: &sys_allowlist::SysPlan,
+    dir: &Path,
+) {
+    let empty = Path::new("empty");
+    if !sys.proc_empty.is_empty() && !out.files.iter().any(|(r, _)| r == empty)
+    {
+        out.files.push((empty.into(), String::new()));
+    }
+    for dest in &sys.proc_empty {
+        out.mounts.push(HostViewMount::File {
+            src: dir.join(empty),
+            dest: dest.clone(),
+        });
+    }
+    for dest in &sys.proc_hide {
+        out.mounts.push(HostViewMount::Tmpfs { dest: dest.clone() });
+    }
+    for path in &sys.proc_binds {
+        out.mounts.push(HostViewMount::Dir {
+            src: path.clone(),
+            dest: path.clone(),
+        });
+    }
+}
+
 /// The CPU ids the jail is shown: its pinned or allowed set, narrowed to
 /// its CPU quota.
 pub(super) fn cpu_ids(
@@ -284,6 +321,9 @@ pub(crate) struct HostView {
     dir: PathBuf,
     written: bool,
     mounts: Vec<HostViewMount>,
+    /// `/sys` allow-list: what `bwrap.rs` binds over the tmpfs `/sys` it
+    /// puts in place of the host's.
+    sys_binds: Vec<PathBuf>,
     /// Keeps `/proc/uptime` live; stopped first when the view is dropped.
     uptime: Option<UptimeTicker>,
 }
@@ -314,9 +354,21 @@ impl HostView {
             Err(_) => false,
         };
         let mut plan = plan(&snap, &request, &machine_id, &dir, &exists);
-        let identity = extra::HostIdentity::read(boot_id()?);
+        let mut identity = extra::HostIdentity::read(boot_id()?);
+        identity.configured_release = request.kernel_release.clone();
         let ids = cpu_ids(&snap, &request);
         extra::extend_plan(&mut plan, &identity, &ids, &dir, &exists);
+        let (pci_roots, gpu_modules) = if request.gpu {
+            (
+                sys_allowlist::host_pci_roots(),
+                sys_allowlist::host_gpu_modules(),
+            )
+        } else {
+            (Vec::new(), Vec::new())
+        };
+        let sys =
+            sys_allowlist::plan(request.gpu, &exists, &pci_roots, &gpu_modules);
+        extend_plan_with_sys(&mut plan, &sys, &dir);
         if request.overlay_system {
             plan.mounts.extend(extra::overlay_mounts(&dir, &exists));
         }
@@ -324,6 +376,7 @@ impl HostView {
             dir,
             written: false,
             mounts: plan.mounts,
+            sys_binds: sys.sys_binds,
             uptime: None,
         };
         if write {
@@ -348,6 +401,11 @@ impl HostView {
         &self.mounts
     }
 
+    /// The host sysfs paths bound over the jail's tmpfs `/sys`.
+    pub(super) fn sys_binds(&self) -> &[PathBuf] {
+        &self.sys_binds
+    }
+
     /// The empty bottom layer of `--overlay-system`'s overlays.
     fn make_empty_dir(&self, name: &str) -> Result<(), String> {
         let path = self.dir.join(name);
diff --git a/src/sandbox/host_view_extra.rs b/src/sandbox/host_view_extra.rs
index ddb8674..4915e48 100644
--- a/src/sandbox/host_view_extra.rs
+++ b/src/sandbox/host_view_extra.rs
@@ -87,6 +87,8 @@ pub(super) struct HostIdentity {
     /// `/etc/os-release` is a regular file rather than the usual symlink
     /// into `/usr/lib`, so it needs a bind of its own.
     pub etc_os_release_is_file: bool,
+    /// `--kernel-release`: shown verbatim instead of the cleaned host one.
+    pub configured_release: Option<String>,
 }
 
 impl HostIdentity {
@@ -102,8 +104,17 @@ impl HostIdentity {
             boot_id,
             etc_os_release_is_file: std::fs::symlink_metadata(ETC_OS_RELEASE)
                 .is_ok_and(|m| m.file_type().is_file()),
+            configured_release: None,
         }
     }
+
+    /// The release the jail reads: `--kernel-release` when given, else the
+    /// numeric part of the host's.
+    pub fn jail_release(&self) -> String {
+        self.configured_release
+            .clone()
+            .unwrap_or_else(|| kernel_release(&self.osrelease))
+    }
 }
 
 /// The numeric part of a kernel release: `7.3.5-bentoo-dist` -> `7.3.5`,
@@ -230,7 +241,7 @@ pub(super) fn extend_plan(
             dest: dest.into(),
         });
     };
-    let release = kernel_release(&identity.osrelease);
+    let release = identity.jail_release();
     let version = kernel_version(&identity.version);
     file("version", proc_version(&release, &version), PROC_VERSION);
     file("osrelease", format!("{release}\n"), OSRELEASE);
diff --git a/src/sandbox/host_view_extra_tests.rs b/src/sandbox/host_view_extra_tests.rs
index 50b51d6..9438c14 100644
--- a/src/sandbox/host_view_extra_tests.rs
+++ b/src/sandbox/host_view_extra_tests.rs
@@ -10,6 +10,7 @@ fn identity() -> HostIdentity {
         version: "#1 SMP PREEMPT_DYNAMIC Tue Nov 17 20:32:13 -03 2026".into(),
         boot_id: "0f0e0d0c-0b0a-4908-8706-050403020100".into(),
         etc_os_release_is_file: false,
+        configured_release: None,
     }
 }
 
@@ -246,3 +247,20 @@ fn cpu_mask_is_the_kernels_bitmap_format() {
     assert_eq!(cpu_mask(&ids(&[0, 1, 31])), "80000003\n");
     assert_eq!(cpu_mask(&ids(&[32, 33])), "00000003,00000000\n");
 }
+
+#[test]
+fn a_configured_kernel_release_is_shown_verbatim() {
+    let mut plan = HostViewPlan::default();
+    let id = HostIdentity {
+        configured_release: Some("6.12.0-generic".into()),
+        ..identity()
+    };
+    extend_plan(&mut plan, &id, &ids(&[0]), Path::new("/v"), &|_| true);
+    assert_eq!(file(&plan, "osrelease"), Some("6.12.0-generic\n"));
+    assert!(
+        file(&plan, "version")
+            .unwrap()
+            .starts_with("Linux version 6.12.0-generic #1 SMP")
+    );
+    assert_eq!(identity().jail_release(), "7.3.5");
+}
diff --git a/src/sandbox/host_view_tests.rs b/src/sandbox/host_view_tests.rs
index 582bf9f..43e502e 100644
--- a/src/sandbox/host_view_tests.rs
+++ b/src/sandbox/host_view_tests.rs
@@ -133,6 +133,8 @@ fn explicit_cpus_win_over_affinity_and_keep_their_numbers() {
         cpus: Some(pinned),
         machine_id_file: None,
         overlay_system: false,
+        gpu: false,
+        kernel_release: None,
     };
     let plan = plan(
         &limited_host(),
@@ -314,3 +316,41 @@ fn a_written_view_keeps_uptime_live_until_dropped() {
     drop(view);
     assert!(started.elapsed() < std::time::Duration::from_millis(500));
 }
+
+#[test]
+fn the_sys_allowlist_empties_proc_files_then_rebinds_under_the_hidden_tree() {
+    let sys = super::sys_allowlist::SysPlan {
+        sys_binds: vec![],
+        proc_empty: vec!["/proc/modules".into()],
+        proc_hide: vec!["/proc/driver".into()],
+        proc_binds: vec!["/proc/driver/nvidia".into()],
+    };
+    let mut plan = HostViewPlan::default();
+    // An `empty` already planned by the identity layer is reused, not
+    // written twice (the view creates its files with create_new).
+    plan.files.push(("empty".into(), String::new()));
+    extend_plan_with_sys(&mut plan, &sys, Path::new("/v"));
+    assert_eq!(
+        plan.files
+            .iter()
+            .filter(|(r, _)| r == Path::new("empty"))
+            .count(),
+        1
+    );
+    assert_eq!(
+        plan.mounts,
+        vec![
+            HostViewMount::File {
+                src: "/v/empty".into(),
+                dest: "/proc/modules".into(),
+            },
+            HostViewMount::Tmpfs {
+                dest: "/proc/driver".into()
+            },
+            HostViewMount::Dir {
+                src: "/proc/driver/nvidia".into(),
+                dest: "/proc/driver/nvidia".into(),
+            },
+        ]
+    );
+}
diff --git a/src/sandbox/mod.rs b/src/sandbox/mod.rs
index 087b261..9508cff 100644
--- a/src/sandbox/mod.rs
+++ b/src/sandbox/mod.rs
@@ -73,6 +73,8 @@ pub(crate) mod hostname;
 #[cfg(target_os = "linux")]
 mod minimal_etc;
 #[cfg(target_os = "linux")]
+mod sys_allowlist;
+#[cfg(target_os = "linux")]
 mod syscall_view;
 
 /// In the helper: install `--syscall-view`'s notify filter and hand its
diff --git a/src/sandbox/sys_allowlist.rs b/src/sandbox/sys_allowlist.rs
new file mode 100644
index 0000000..45c56aa
--- /dev/null
+++ b/src/sandbox/sys_allowlist.rs
@@ -0,0 +1,168 @@
+//! `--mask-host`: `/sys` as a tmpfs holding an allow-list, and the `/proc`
+//! files that name the host's drivers emptied.
+//!
+//! Without it the jail gets the host's whole sysfs read-only: every PCI and
+//! USB device with its vendor, model and serial, the network interfaces and
+//! their MAC addresses, the loaded modules with their parameters, the power
+//! supplies, the thermal zones. `--mask-host` already hides a list of those
+//! trees, but a deny-list over sysfs never ends. Here the jail starts from an
+//! empty `/sys` instead and gets back only what programs are known to read:
+//!
+//! - `/sys/fs/cgroup` -- the jail's own cgroup (bound by the host view);
+//! - `/sys/devices/system/cpu` -- the synthetic CPU tree (host view);
+//! - `/sys/kernel/mm/transparent_hugepage` -- read by jemalloc, Go's runtime
+//!   and the JVM to pick their huge-page strategy.
+//!
+//! With `--gpu`, the trees the graphics stack walks to find the device
+//! behind `/dev/dri` and `/dev/nvidia*` come back as well: `/sys/class/drm`,
+//! `/sys/bus/pci`, `/sys/dev/char` and the PCI roots `/sys/devices/pci*`
+//! (whose devices the first three link into), the GPU drivers' own module
+//! trees in `/sys/module` (NVML refuses to start without
+//! `/sys/module/nvidia`: "GPU access blocked by the operating system",
+//! measured 2026-12-01), and `/proc/driver/nvidia`.
+//! That re-exposes every PCI device, which is the price of a GPU.
+//!
+//! In `/proc`, `modules`, `devices` and `misc` (loaded modules, device
+//! majors, misc minors) read empty and `/proc/driver` is hidden. `/proc/devices`
+//! stays under `--gpu`: NVIDIA's userspace looks up `nvidia-uvm`'s major there.
+//!
+//! What stays visible: `/proc/self/mountinfo` names the host's block devices
+//! and subvolumes as the sources of the read-only binds (`--overlay-system`
+//! replaces them for `/usr`, `/etc` and `/opt`), and the per-process files in
+//! `/proc/<pid>` describe the jail's own processes only.
+
+use std::path::{Path, PathBuf};
+
+pub(super) const SYS: &str = "/sys";
+
+/// Host sysfs trees bound read-only into the tmpfs `/sys` when present.
+pub(super) const SYS_ALLOW: &[&str] = &["/sys/kernel/mm/transparent_hugepage"];
+
+/// With `--gpu`, also bound: what Mesa, libdrm and NVIDIA's libraries walk.
+pub(super) const SYS_ALLOW_GPU: &[&str] =
+    &["/sys/class/drm", "/sys/bus/pci", "/sys/dev/char"];
+
+/// The PCI root complexes (`/sys/devices/pci0000:00`, ...) the GPU trees
+/// above link into, bound with `--gpu`.
+const SYS_DEVICES: &str = "/sys/devices";
+const PCI_ROOT_PREFIX: &str = "pci";
+
+/// GPU kernel drivers whose `/sys/module/<name>` (and `<name>_*`, such as
+/// `nvidia_uvm`) is bound with `--gpu`. Only these: the rest of
+/// `/sys/module` lists every loaded module and its parameters.
+const SYS_MODULE: &str = "/sys/module";
+const GPU_MODULES: &[&str] =
+    &["nvidia", "amdgpu", "radeon", "i915", "xe", "nouveau"];
+
+/// `/proc` files that read empty.
+pub(super) const PROC_EMPTY: &[&str] =
+    &["/proc/modules", "/proc/devices", "/proc/misc"];
+
+/// Kept with `--gpu`.
+const PROC_DEVICES: &str = "/proc/devices";
+
+/// `/proc` directories hidden by a tmpfs.
+pub(super) const PROC_HIDE: &[&str] = &["/proc/driver"];
+
+/// With `--gpu`, bound back from the host under the hidden `/proc/driver`.
+pub(super) const PROC_GPU: &[&str] = &["/proc/driver/nvidia"];
+
+/// What one launch's allow-list binds and masks.
+#[derive(Debug, Default, Clone, PartialEq, Eq)]
+pub(crate) struct SysPlan {
+    /// Host sysfs paths bound read-only over the tmpfs `/sys`, in order.
+    pub sys_binds: Vec<PathBuf>,
+    /// `/proc` files bound over with an empty file.
+    pub proc_empty: Vec<PathBuf>,
+    /// `/proc` directories covered by a tmpfs.
+    pub proc_hide: Vec<PathBuf>,
+    /// Host `/proc` paths bound back after `proc_hide`.
+    pub proc_binds: Vec<PathBuf>,
+}
+
+/// The allow-list for a launch. Pure: `exists` and `pci_roots` stand in for
+/// the host so tests can describe any machine.
+pub(super) fn plan(
+    gpu: bool,
+    exists: &dyn Fn(&Path) -> bool,
+    pci_roots: &[PathBuf],
+    gpu_modules: &[PathBuf],
+) -> SysPlan {
+    let present = |list: &[&str]| -> Vec<PathBuf> {
+        list.iter()
+            .map(PathBuf::from)
+            .filter(|p| exists(p))
+            .collect()
+    };
+    let mut sys_binds = present(SYS_ALLOW);
+    let mut proc_empty = present(PROC_EMPTY);
+    let mut proc_binds = Vec::new();
+    if gpu {
+        sys_binds.extend(present(SYS_ALLOW_GPU));
+        sys_binds.extend(pci_roots.iter().cloned());
+        sys_binds.extend(gpu_modules.iter().cloned());
+        proc_empty.retain(|p| p != Path::new(PROC_DEVICES));
+        proc_binds = present(PROC_GPU);
+    }
+    SysPlan {
+        sys_binds,
+        proc_empty,
+        proc_hide: present(PROC_HIDE),
+        proc_binds,
+    }
+}
+
+/// The host's PCI roots under `/sys/devices`, sorted.
+pub(super) fn host_pci_roots() -> Vec<PathBuf> {
+    pci_roots_in(Path::new(SYS_DEVICES))
+}
+
+pub(super) fn pci_roots_in(dir: &Path) -> Vec<PathBuf> {
+    let Ok(entries) = std::fs::read_dir(dir) else {
+        return Vec::new();
+    };
+    let mut roots: Vec<PathBuf> = entries
+        .flatten()
+        .filter(|e| {
+            e.file_name().to_string_lossy().starts_with(PCI_ROOT_PREFIX)
+                && e.file_type().is_ok_and(|t| t.is_dir())
+        })
+        .map(|e| Path::new(SYS_DEVICES).join(e.file_name()))
+        .collect();
+    roots.sort();
+    roots
+}
+
+/// The loaded GPU drivers' trees under `/sys/module`, sorted.
+pub(super) fn host_gpu_modules() -> Vec<PathBuf> {
+    gpu_modules_in(Path::new(SYS_MODULE))
+}
+
+pub(super) fn gpu_modules_in(dir: &Path) -> Vec<PathBuf> {
+    let Ok(entries) = std::fs::read_dir(dir) else {
+        return Vec::new();
+    };
+    let mut found: Vec<PathBuf> = entries
+        .flatten()
+        .filter(|e| {
+            let name = e.file_name();
+            let name = name.to_string_lossy();
+            GPU_MODULES.iter().any(|m| {
+                name == *m
+                    || name.strip_prefix(m).is_some_and(|r| r.starts_with('_'))
+            })
+        })
+        .map(|e| Path::new(SYS_MODULE).join(e.file_name()))
+        .collect();
+    found.sort();
+    found
+}
+
+/// Whether `dest` lies in `/sys` (itself included).
+pub(super) fn under_sys(dest: &Path) -> bool {
+    dest.starts_with(SYS)
+}
+
+#[cfg(test)]
+#[path = "sys_allowlist_tests.rs"]
+mod tests;
diff --git a/src/sandbox/sys_allowlist_tests.rs b/src/sandbox/sys_allowlist_tests.rs
new file mode 100644
index 0000000..683ff0e
--- /dev/null
+++ b/src/sandbox/sys_allowlist_tests.rs
@@ -0,0 +1,117 @@
+use super::*;
+
+fn everything(_: &Path) -> bool {
+    true
+}
+
+fn paths(list: &[&str]) -> Vec<PathBuf> {
+    list.iter().map(PathBuf::from).collect()
+}
+
+#[test]
+fn without_gpu_only_the_toolchain_trees_come_back() {
+    let plan = plan(
+        false,
+        &everything,
+        &paths(&["/sys/devices/pci0000:00"]),
+        &paths(&["/sys/module/nvidia"]),
+    );
+    assert_eq!(plan.sys_binds, paths(SYS_ALLOW));
+    assert_eq!(plan.proc_empty, paths(PROC_EMPTY));
+    assert_eq!(plan.proc_hide, paths(&["/proc/driver"]));
+    assert!(plan.proc_binds.is_empty());
+}
+
+#[test]
+fn gpu_re_exposes_drm_pci_and_the_nvidia_proc_tree() {
+    let roots = paths(&["/sys/devices/pci0000:00", "/sys/devices/pci0000:40"]);
+    let modules = paths(&["/sys/module/nvidia", "/sys/module/nvidia_uvm"]);
+    let plan = plan(true, &everything, &roots, &modules);
+    for p in [
+        "/sys/class/drm",
+        "/sys/bus/pci",
+        "/sys/dev/char",
+        "/sys/devices/pci0000:00",
+        "/sys/devices/pci0000:40",
+        "/sys/module/nvidia",
+        "/sys/module/nvidia_uvm",
+        "/sys/kernel/mm/transparent_hugepage",
+    ] {
+        assert!(plan.sys_binds.contains(&PathBuf::from(p)), "{p}");
+    }
+    assert_eq!(plan.proc_binds, paths(&["/proc/driver/nvidia"]));
+    // NVIDIA's userspace reads nvidia-uvm's major from /proc/devices.
+    assert!(!plan.proc_empty.contains(&PathBuf::from("/proc/devices")));
+    assert!(plan.proc_empty.contains(&PathBuf::from("/proc/modules")));
+}
+
+#[test]
+fn absent_host_paths_are_skipped() {
+    let only_thp =
+        |p: &Path| p == Path::new("/sys/kernel/mm/transparent_hugepage");
+    let plan = plan(true, &only_thp, &[], &[]);
+    assert_eq!(plan.sys_binds, paths(SYS_ALLOW));
+    assert!(plan.proc_empty.is_empty());
+    assert!(plan.proc_hide.is_empty());
+    assert!(plan.proc_binds.is_empty());
+}
+
+#[test]
+fn pci_roots_are_the_pci_directories_only() {
+    let dir = std::env::temp_dir()
+        .join(format!("ai-jail-sys-allowlist-{}", std::process::id()));
+    let _ = std::fs::remove_dir_all(&dir);
+    for d in ["pci0000:40", "pci0000:00", "platform", "virtual"] {
+        std::fs::create_dir_all(dir.join(d)).unwrap();
+    }
+    std::fs::write(dir.join("pcifile"), "").unwrap();
+    let roots = pci_roots_in(&dir);
+    let _ = std::fs::remove_dir_all(&dir);
+    assert_eq!(
+        roots,
+        paths(&["/sys/devices/pci0000:00", "/sys/devices/pci0000:40"])
+    );
+}
+
+#[test]
+fn gpu_modules_are_the_gpu_drivers_and_their_sub_modules_only() {
+    let dir = std::env::temp_dir()
+        .join(format!("ai-jail-sys-modules-{}", std::process::id()));
+    let _ = std::fs::remove_dir_all(&dir);
+    for d in [
+        "nvidia",
+        "nvidia_uvm",
+        "nvidia_drm",
+        "amdgpu",
+        "i915",
+        "xe",
+        "nvidiafoo",
+        "xen",
+        "kvm",
+        "snd_hda_intel",
+        "drm",
+    ] {
+        std::fs::create_dir_all(dir.join(d)).unwrap();
+    }
+    let found = gpu_modules_in(&dir);
+    let _ = std::fs::remove_dir_all(&dir);
+    assert_eq!(
+        found,
+        paths(&[
+            "/sys/module/amdgpu",
+            "/sys/module/i915",
+            "/sys/module/nvidia",
+            "/sys/module/nvidia_drm",
+            "/sys/module/nvidia_uvm",
+            "/sys/module/xe",
+        ])
+    );
+}
+
+#[test]
+fn under_sys_matches_components_not_prefixes() {
+    assert!(under_sys(Path::new("/sys")));
+    assert!(under_sys(Path::new("/sys/class/dmi")));
+    assert!(!under_sys(Path::new("/sysroot")));
+    assert!(!under_sys(Path::new("/proc/sys/kernel/osrelease")));
+}
diff --git a/src/sandbox/syscall_view.rs b/src/sandbox/syscall_view.rs
index a399a54..c45f71f 100644
--- a/src/sandbox/syscall_view.rs
+++ b/src/sandbox/syscall_view.rs
@@ -423,8 +423,13 @@ fn answer_one(
 
 /// The answers for this host, from the same cleaning as the host view's
 /// files and the jail's cgroup limits.
-pub(crate) fn answers_for_host(hostname: &str) -> Answers {
-    let identity = super::host_view_extra::HostIdentity::read(String::new());
+pub(crate) fn answers_for_host(
+    hostname: &str,
+    kernel_release: Option<&str>,
+) -> Answers {
+    let mut identity =
+        super::host_view_extra::HostIdentity::read(String::new());
+    identity.configured_release = kernel_release.map(str::to_string);
     let snap = super::host_view::HostSnapshot::read();
     // SAFETY: zeroed utsname is valid; uname fills it.
     let machine = unsafe {
@@ -439,7 +444,7 @@ pub(crate) fn answers_for_host(hostname: &str) -> Answers {
     };
     Answers {
         hostname: hostname.to_string(),
-        release: super::host_view_extra::kernel_release(&identity.osrelease),
+        release: identity.jail_release(),
         version: super::host_view_extra::kernel_version(&identity.version),
         machine,
         cgroup_dir: snap.cgroup_dir,
