Skip to content

vm: enable Landlock in both guest kernels - #35

Open
zbarsky-openai wants to merge 1 commit into
hermeticbuild:mainfrom
zbarsky-openai:zbarsky/kernel-landlock-lsm
Open

zbarsky-openai wants to merge 1 commit into
hermeticbuild:mainfrom
zbarsky-openai:zbarsky/kernel-landlock-lsm

Conversation

@zbarsky-openai

@zbarsky-openai zbarsky-openai commented Aug 24, 2026

Copy link
Copy Markdown

Sandbox tests executed inside actiond fail because its minimal guest kernels do
not implement the Landlock system calls:

landlock.SyscallError: [Errno 38] Function not implemented:
'Error calling landlock_create_ruleset: syscall(444, None, 0, 1) = -1'
Note: Cannot find Landlock syscalls - perhaps the kernel was not built with 'CONFIG_SECURITY_LANDLOCK=y'

RuntimeError: Landlock not available in linux kernel, unable to create a safe sandbox.

Enable the kernel security framework and Landlock on both ARM64 and x86_64,
and explicitly select Landlock in the boot-time LSM list. Linux automatically
selects the required security-path and networking hooks.

Both fragments were resolved through the repository's actual Linux 6.18.2
Kconfig parser with allnoconfig, verifying CONFIG_SECURITY,
CONFIG_SECURITY_LANDLOCK, CONFIG_SECURITY_PATH, CONFIG_SECURITY_NETWORK,
and CONFIG_LSM for both architectures. The original failure was reproduced
remotely with //project/oai_sandbox:pytest -k test_seccomp_default_action.

The ARM64 kernel was then built through actiond itself (//vm:linux_kernel.image; 924 real remote compilation actions, followed by a successful 25-remote-action relink after repairing one pre-existing corrupt CAS blob). The rebuilt kernel boots successfully, and the original sandbox test now passes its Landlock ABI check and reaches the separate missing-libcap.so.2 dependency.

Sandbox tests executed inside actiond fail because its minimal guest kernels do
not implement the Landlock system calls:

```text
landlock.SyscallError: [Errno 38] Function not implemented:
'Error calling landlock_create_ruleset: syscall(444, None, 0, 1) = -1'
Note: Cannot find Landlock syscalls - perhaps the kernel was not built with 'CONFIG_SECURITY_LANDLOCK=y'

RuntimeError: Landlock not available in linux kernel, unable to create a safe sandbox.
```

Enable the kernel security framework and Landlock on both ARM64 and x86_64,
and explicitly select Landlock in the boot-time LSM list. Linux automatically
selects the required security-path and networking hooks.

Both fragments were resolved through the repository's actual Linux 6.18.2
Kconfig parser with `allnoconfig`, verifying `CONFIG_SECURITY`,
`CONFIG_SECURITY_LANDLOCK`, `CONFIG_SECURITY_PATH`, `CONFIG_SECURITY_NETWORK`,
and `CONFIG_LSM` for both architectures. The original failure was reproduced
remotely with `//project/oai_sandbox:pytest -k test_seccomp_default_action`.
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