Skip to content

docs(research): capture direct Copilot ptrace experiment results - #696

Closed
wan9chi with Copilot wants to merge 2 commits into
research/ptrace-strict-hosted-wsl-20260824from
copilot/run-direct-ptrace-experiment
Closed

docs(research): capture direct Copilot ptrace experiment results#696
wan9chi with Copilot wants to merge 2 commits into
research/ptrace-strict-hosted-wsl-20260824from
copilot/run-direct-ptrace-experiment

Conversation

Copilot AI commented Aug 23, 2026

Copy link
Copy Markdown

Motivation

Record a direct ptrace compatibility experiment from the GitHub Copilot coding-agent environment, using the checked-out repo and ordinary agent user only. The report captures the exact environment, proves the selected probe/injector source variants, records the required ptrace probe outcome, and preserves the inject_demo build blocker exactly as observed.

  • Scope

    • Adds a single report: research/copilot-coding-agent-ptrace-strict-results.md
    • No product code, workflows, policy, or environment settings are changed
  • Source verification

    • Records git rev-parse HEAD
    • Includes the required grep proofs showing:
      • the hardened probe variant with required-summary and ptrace-word-io
      • the injector variant using ptrace::cont with patch_syscall_and_trap, not PTRACE_SINGLESTEP
  • Environment capture

    • Includes verbatim output and exit codes for:
      • kernel / distro identity
      • effective user / groups
      • CapEff, NoNewPrivs, Seccomp, Seccomp_filters
      • Yama ptrace_scope
      • cgroup placement
      • container markers
      • systemd-detect-virt -c
  • Probe results

    • Compiles exactly:
      gcc -O2 -Wall -Wextra -Werror research/ptrace-environment-probe.c -o /tmp/ptrace-environment-probe
    • Runs the probe once and records full output and exact exit
    • Calls out the required success condition explicitly: required-summary result=PASS with exit 0
    • Separates process_vm_readv / process_vm_writev from the required PTRACE_PEEKDATA / PTRACE_POKEDATA fallback result
    • Distinguishes intentionally negative sibling / dumpability / Yama relationship checks from required positive cases
  • inject_demo outcome

    • Runs exactly:
      cargo run --locked -p inject_demo
    • Preserves the full stdout/stderr and exact exit code
    • Documents the observed blocker without inference: missing x86_64-unknown-none target (error[E0463]: can't find crate for core)
  • Report shape

    • Notes that execution was performed directly in the Copilot coding-agent environment
    • Captures every command, relevant exact output, exact exit code, and the commit SHA in one place
Original prompt

Run a direct ptrace compatibility experiment inside this GitHub Copilot coding-agent environment. Use only the checked-out repository and ordinary agent user. Do not change product code or workflows and do not launch GitHub Actions or delegate to another environment.\n\nThe base branch intentionally contains the CURRENT hardened probe and CURRENT explicit-trap injector. First report git rev-parse HEAD and prove the selected source variants:\n- grep -nE 'required-summary|ptrace-word-io' research/ptrace-environment-probe.c\n- grep -nE 'ptrace::(cont|step)|patch_syscall_and_trap' crates/inject_demo/src/main.rs\nIf remote_mmap uses ptrace::step, stop and report that the wrong revision was selected.\n\nCapture verbatim:\n- uname -a and /etc/os-release\n- id\n- CapEff, NoNewPrivs, Seccomp, and Seccomp_filters from /proc/self/status\n- /proc/sys/kernel/yama/ptrace_scope, or exact read error\n- /proc/self/cgroup and /proc/1/cgroup\n- presence of /.dockerenv and /run/.containerenv\n- systemd-detect-virt -c output and exit status when available\n\nCompile exactly:\ngcc -O2 -Wall -Wextra -Werror research/ptrace-environment-probe.c -o /tmp/ptrace-environment-probe\nCapture compile exit. Run /tmp/ptrace-environment-probe once, capturing complete output and exact exit code. Treat the required probe as successful only when both "required-summary result=PASS" and exit 0 are present. Report process_vm_* separately from required PTRACE_PEEKDATA/POKEDATA fallback. Distinguish deliberately negative sibling/dumpability/Yama relationship checks from required positives.\n\nThen build and run exactly:\ncargo run --locked -p inject_demo\nCapture complete stdout/stderr and exact exit code. Confirm from source that this is PTRACE_CONT plus syscall+trap and not old PTRACE_SINGLESTEP. Do not use sudo, add capabilities, or change seccomp/Yama/policy. Do not install software.\n\nWrite a concise but complete report only to research/copilot-coding-agent-ptrace-strict-results.md. Include every command, relevant exact output, exact exits, commit SHA, and note that this was a direct Copilot coding-agent execution. Commit only that report. If anything is prohibited or the build fails, preserve the exact blocker instead of inferring.

Co-authored-by: GPT-5 <codex@openai.com>

Co-authored-by: wan9chi <3612422+wan9chi@users.noreply.github.com>
Copilot AI changed the title [WIP] Run a direct ptrace compatibility experiment docs(research): capture direct Copilot ptrace experiment results Aug 23, 2026
Copilot AI requested a review from wan9chi August 23, 2026 16:59
@wan9chi

wan9chi commented Aug 23, 2026

Copy link
Copy Markdown
Member

Experiment captured in the consolidated local research note; closing the temporary Copilot task PR. The shared strict base branch remains for reproduction.

@wan9chi wan9chi closed this Aug 23, 2026
@wan9chi
wan9chi deleted the copilot/run-direct-ptrace-experiment branch August 23, 2026 17:03
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.

2 participants