Skip to content

docs(CAVES): address Copilot review nits from #3#6

Merged
tkgstrator merged 1 commit into
developfrom
docs/cave-kinds-review-fix
Jun 22, 2026
Merged

docs(CAVES): address Copilot review nits from #3#6
tkgstrator merged 1 commit into
developfrom
docs/cave-kinds-review-fix

Conversation

@tkgstrator

Copy link
Copy Markdown
Contributor

Follow-up to #3, addressing three Copilot review comments that landed after merge plus one related ABI wording fix.

What

  • ADRP/LDR placeholder names unified in both cave diagrams. The observer cave previously read `page(HOOK_SLOT_RVA) + lo12(SLOT)` and the entry cave `page(entry_slot_va) + lo12(slot)`; using two names for the same address obscures the relocation pattern. Both halves now name the same symbol.
  • Broken inline code fixed. The `-Werror=unused-variable` snippet was wrapped across a hard line break, leaving the backtick span unterminated and Markdown rendering the flag as plain text. Joined onto a single line.
  • AAPCS64 wording tightened. W9 isn't "arg release: sync develop into master #9" — integer arguments end at x7, x8 is the indirect-result register, and x9–x15 are call-clobbered scratch. The entry cave is safe to use W9 precisely because of that scratch status; reword to say so in ABI-native language.

Pure docs; no runtime changes.

Test plan

🤖 Generated with Claude Code

Three review nits from #3 plus one extra ABI wording fix:

- Unify the ADRP/LDR placeholder names in both cave diagrams. The pair
  previously read `page(HOOK_SLOT_RVA) + lo12(SLOT)` and
  `page(entry_slot_va) + lo12(slot)`; using two names for the same
  address obscures the relocation pattern.
- Fix the inline code that was broken across a hard line wrap
  (`-Werror=unused-` / `variable`) so Markdown actually renders the
  flag as code instead of opening an unterminated backtick span.
- Tighten the AAPCS64 wording: W9 isn't an arg-9 slot. The integer
  argument sequence ends at x7, x8 is the indirect-result register,
  and x9–x15 are call-clobbered scratch — which is exactly why
  touching W9 from the entry cave is safe.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 22, 2026 02:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates docs/CAVES.md to address follow-up review nits from #3 by tightening ABI terminology, unifying placeholder symbol names in the cave diagrams, and fixing a Markdown inline-code rendering issue.

Changes:

  • Unify ADRP/LDR placeholder naming in both observer and entry cave diagrams to reflect a single underlying symbol/address.
  • Fix a broken inline code span for -Werror=unused-variable by removing an in-word line break.
  • Refine AAPCS64 wording to correctly describe x9–x15/w9 as call-clobbered scratch registers rather than argument slots.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/CAVES.md
| Substitute argument registers | ❌ (cave restores `x0..x7` before `B orig+4`) | ✅ (cave passes pristine `x0..x7` through and never restores) |
| Hooks routed through a single shared dispatcher | ✅ (one slot, identified by `W6 = hook_id`) | ❌ (each site has its own slot under an entry-slot table) |
| `W6` (= 7th C arg) survives across the cave | ❌ (clobbered with `hook_id`) | ✅ (only `W9` is touched, an unused arg-9+ slot under AAPCS64) |
| `W6` (= 7th C arg) survives across the cave | ❌ (clobbered with `hook_id`) | ✅ (only `W9` is touched, and `x9–x15` are AAPCS64 call-clobbered scratch — never an argument slot) |
@tkgstrator
tkgstrator merged commit e3695dc into develop Jun 22, 2026
3 checks passed
@tkgstrator
tkgstrator deleted the docs/cave-kinds-review-fix branch June 22, 2026 02:38
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