Skip to content

ec2-audit: add EC2/Nitro portability audit app#71

Open
gburd wants to merge 1 commit into
cloudius-systems:masterfrom
gburd:pr/ec2-audit
Open

ec2-audit: add EC2/Nitro portability audit app#71
gburd wants to merge 1 commit into
cloudius-systems:masterfrom
gburd:pr/ec2-audit

Conversation

@gburd

@gburd gburd commented Jul 2, 2026

Copy link
Copy Markdown

Summary

Adds ec2-audit, a small defensive C app that probes the hardware and OS features OSv should expose when running on AWS EC2/Nitro, and serves the findings as JSON over HTTP.

Probes: CPU (vendor/features via CPUID on x86_64, uname on arm64), memory (/proc/meminfo cross-checked against sysconf), block devices, networking (interfaces/addresses), clock (monotonic vs realtime sanity), hugepages, io_uring availability, and the EC2 Instance Metadata Service (IMDS).

Each probe is skeptical by design: it cross-checks independent sources, bounds all I/O, and reports unknown/degraded/fail rather than assuming success. The intent is a single artifact you can boot on a candidate instance type to confirm OSv's platform bring-up before qualifying a real workload.

Files:

  • ec2-audit.c — the probes and JSON/HTTP server
  • Makefile — builds a PIE with -std=gnu99
  • module.py — runs /ec2-audit
  • usr.manifest, .gitignore

Test plan

  • Builds as a ramfs image and boots under QEMU (scripts/build fs=ramfs image=ec2-audit).
  • Verified probe output under QEMU; the memory/block/io_uring "degraded" results under run.py -k are test-harness artifacts (the -k PVH path drops --rootfs=ramfs so /proc isn't mounted), not app or OSv defects — on a full boot the probes report ok.

New C app that probes the hardware/OS features OSv should expose on AWS
EC2 (CPU vendor/arch, memory sizing, monotonic/realtime clock, MAP_HUGETLB,
network interfaces, block devices, io_uring opcodes, IMDSv2 reachability)
across Intel, AMD, and arm64. Each probe cross-checks independent sources
and reports ok/degraded/fail/unknown rather than assuming success.

Serves the findings as JSON over HTTP (GET /all plus per-probe endpoints
/cpu, /memory, /clock, /hugepages, /net, /block, /io_uring, /imds); --once
prints the full report to the console and exits.
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