Skip to content

The release's report times the first SSH login; QEMU's hardening asserted - #257

Merged
aledbf merged 5 commits into
mainfrom
first-login-report
Nov 13, 2026
Merged

aledbf merged 5 commits into
mainfrom
first-login-report

Conversation

@aledbf

@aledbf aledbf commented Nov 13, 2026

Copy link
Copy Markdown
Member

v20261113.03's report read +11-18% on every row. It times the serial console's prompt, which no workspace waits for: since #250 the getty is Type=idle again and waits for the lane's units. The first login, which is the goal, went 478/500 → 381/410 ms (v20261113.02 in lab 43524334205, v20261113.03 in lab 43524721490: two runs, not interleaved).

Changes

  • boot: the report times the first SSH login. TestReport logs in over SSH through the vsock to the release as built, the same way boot:ssh-first does, and records first_login (accepts / login). spin-machine compare writes that section first, every time, and says the sections after it time the console's prompt. On the fleet (lab 43524936240): 20/20 boots logged in, accepts 235/241, login 374/381 ms. Releases before this one have no first_login, so their side of the comparison reads "-".
  • qemu: hardening asserted. None of these protections comes from a configure flag: static-pie, full RELRO (BIND_NOW), an NX stack and stack canaries come from QEMU's meson defaults and Alpine's gcc. The build now fails if any shipped binary loses one of them. In the real build: 7111 / 2093 / 9274 canary reads. The check rejects a non-PIE binary and a lazily bound one.
  • Experiment, measured and removed: one sshd for every connection. The vsock socket with Accept=no and an sshd -D started early. On the fleet, 20 boots of each interleaved: first login 382/393 against 381/410, a second login 40 against 48 ms. It does not move the goal, so the result is in docs/log.md (an entry and a row in "Measured and rejected").

Verification

  • go vet ./... and go test ./boot/ ./machine/ pass. A new TestDiffFirstLogin covers the section's order, the "-" for a release without the field, and failed boots.
  • task qemu:build ran locally with the new check: OK.
  • On the bench fleet: lab 43524334205, 43524721490 and 43524936240.

🤖 Generated with Claude Code

aledbf and others added 5 commits November 13, 2026 20:07
The report timed only the serial console's prompt, which nothing a
workspace waits for. v20261113.03 showed what that costs: its report
read +11-18% on every row, because the getty went back to Type=idle and
now waits for the lane's units, while the first login it was built for
went 478 -> 402 ms (lab run 43518915618).

TestReport now logs into the release as built over SSH through its
vsock, as boot:ssh-first does, and Report.FirstLogin holds sshd's
accept and the login. compare writes it first and always, moved or not,
and says the sections after it time the console. The key and the row
come from one helper both tests use.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
No configure flag asks for them: they come from QEMU's meson defaults
and Alpine's gcc, so a bump of either could drop one with no line here
changing. The build now checks each shipped binary's ELF type, RELRO
segment, BIND_NOW, GNU_STACK and stack guard reads, as it checks that
they are static. As built 2026-11-13: 7111, 2093 and 9274 canary reads
in qemu-system-x86_64, qemu-img and the TCG build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The vsock socket with Accept=no, handed to an sshd -D started from the
boot's first dispatch, as Ubuntu's ssh.socket hands TCP's to ssh.service:
no transient sshd@ unit and no sshd -i reading its configuration and
host keys per connection. Checked in a boot (2026-11-13): Accept=no, one
"sshd -D [listener]", no sshd@ units, the login over vsock works. On a
laptop, 10 boots of each: first login 251 -> 242 ms, a second 34 -> 30.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… report found

The row answered: on the bench fleet, 20 boots of each interleaved on
v20261113.03 (lab run 43524721490), the first login read 382/393 ms
against 381/410 as released, and a second login 40 against 48. The goal
is the first, so the row is removed and the result is in the log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…section

A release before the first login against one without it, a p50 under a
millisecond, one failed boot: the five edits to firstLogin no test held.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@aledbf
aledbf merged commit 3509f2d into main Nov 13, 2026
3 checks passed
@aledbf
aledbf deleted the first-login-report branch November 13, 2026 23:33
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