Skip to content

vm: provide isolated pseudo-terminals for each action - #46

Open
zbarsky-openai wants to merge 1 commit into
hermeticbuild:mainfrom
zbarsky-openai:zbarsky/vm-private-action-ptys
Open

zbarsky-openai wants to merge 1 commit into
hermeticbuild:mainfrom
zbarsky-openai:zbarsky/vm-private-action-ptys

Conversation

@zbarsky-openai

Copy link
Copy Markdown

Tools that need an interactive terminal currently fail inside actiond:

OSError: out of pty devices

A real remotely executed Python probe confirms there is no /dev/ptmx,
no /dev/pts, and no devpts mount in the action chroot.

Enable CONFIG_UNIX98_PTYS=y for both ARM64 and x86_64 guest kernels.
Prepare /dev/pts and point /dev/ptmx at its instance-local ptmx
node. Mount a fresh devpts filesystem with newinstance,
ptmxmode=0666, mode=0620, nosuid, and noexec inside each
action's existing private mount namespace before dropping privileges.
nodev is intentionally omitted because pseudo-terminal device nodes
must remain usable. No runtime package or shared host device is added.

The real Linux Kconfig parser verifies both architectures, and the
existing chroot unit test checks the new directory and relative symlink.
The ARM64 kernel and guest initramfs were rebuilt through actiond itself;
the restarted executor passes a real pty.openpty() read/write probe
and the complete 1,224-test packaging suite.

Tools that need an interactive terminal currently fail inside actiond:

```text
OSError: out of pty devices
```

A real remotely executed Python probe confirms there is no `/dev/ptmx`,
no `/dev/pts`, and no `devpts` mount in the action chroot.

Enable `CONFIG_UNIX98_PTYS=y` for both ARM64 and x86_64 guest kernels.
Prepare `/dev/pts` and point `/dev/ptmx` at its instance-local `ptmx`
node. Mount a fresh `devpts` filesystem with `newinstance`,
`ptmxmode=0666`, `mode=0620`, `nosuid`, and `noexec` inside each
action's existing private mount namespace before dropping privileges.
`nodev` is intentionally omitted because pseudo-terminal device nodes
must remain usable. No runtime package or shared host device is added.

The real Linux Kconfig parser verifies both architectures, and the
existing chroot unit test checks the new directory and relative symlink.
The ARM64 kernel and guest initramfs were rebuilt through actiond itself;
the restarted executor passes a real `pty.openpty()` read/write probe
and the complete 1,224-test packaging suite.
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