Skip to content

soc: apple: rtkit: map a placed crash log only over pages its IOMMU translates - #2775

Open
funkzy wants to merge 2 commits into
aurora-silicon:integration/aurorafrom
funkzy:pr/rtkit-crashlog-pages
Open

funkzy wants to merge 2 commits into
aurora-silicon:integration/aurorafrom
funkzy:pr/rtkit-crashlog-pages

Conversation

@funkzy

@funkzy funkzy commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Change of approach

The earlier version fixed the page walk inside apple_rtkit_crashlog_map(): it stepped by PAGE_SIZE from an
unaligned address and now stepped from page to page, as dcp_check_iova_contiguous() does. That made the walk
right, but as one more hand-written copy of it, and the function still mapped whatever physical range the IOMMU
named, cacheable. The cause is that no shared check exists for "does this firmware-named DVA range map to memory
the CPU may map". This version adds that check to the DART driver, apple_dart_fw_range(), and RTKit's crash log
uses it, mapped write-combined. It also gives RTKit one rule for when a placed crash log is mapped.

Problem

apple_rtkit_crashlog_map() maps a crash log buffer that a co-processor placed at its own address.

  • It stepped by PAGE_SIZE from the buffer's address, which need not be page aligned, so the page holding its last
    bytes could go unchecked and the mapping could reach memory the IOMMU doesn't translate for the buffer.
  • It mapped the physical range the IOMMU named without checking what memory that is: a leaf the firmware kept could
    name registers or memory the kernel allocates from, and on an identity domain iommu_iova_to_phys() returns the
    DVA verbatim.
  • It mapped it cacheable (MEMREMAP_WB). The co-processor's writes need not be coherent with the CPU's caches (the
    T6050 AOP's node isn't dma-coherent), and apple_rtkit_crashlog_late() polls the buffer, with no cache
    maintenance for a placed buffer, for a log written after the request, so it could keep reading a stale header.
  • Whether such a buffer is mapped had three answers, by how the firmware asked: APPLE_RTKIT_FIRMWARE_OWNED_CRASHLOG
    kept it unmapped, a request on an announced crashlog endpoint was refused, and the crash report on an endpoint the
    firmware left out of its map was mapped, flag or not.

Why this shape

The question "does this firmware-named DVA range map to one physical range the CPU may map" was answered by hand in
about a dozen places: this function; dcp_check_iova_contiguous() and the placed-buffer walks in iomfb_m4.c,
iomfb_v14_7.c and iomfb_v26_6.c; afk.c's remote-buffer copy; aop.rs, ave-fw.c and the ANE firmware
loader; and Aura's RTKit. Separate from the walk, dcp_fw_phys_in_dram() (drivers/gpu/drm/apple/dcp-internal.h,
used by afk.c and dcp.c) carries another copy of the "registers sit below the first System RAM" check. They
differ in the stride (the IOMMU's smallest page, a fixed 16 KiB, or the CPU's page), in which mappings count, and
in what the target may be. Fixing only the stride here would leave the memory check and the cache attribute wrong
and add one more copy. The DART driver already resolves the firmware's kept mappings (apple_dart_fw_remote()), so
the one check goes there: apple_dart_fw_range() walks every IOMMU page at the domain's smallest page, through the
mappings the caller names (APPLE_DART_FW_LINUX on paging domains only so identity domains never treat an unmapped
DVA as mapped, and APPLE_DART_FW_RETAINED), and returns a range only when it is
contiguous DRAM whose CPU-page-rounded span lies outside System RAM. RTKit's crash log is its first user. The other
walks and dcp_fw_phys_in_dram() are named under Still to run as conversions for their owners, offered rather than
made here.

Change

  • apple_dart_fw_range(dev, iova, size, flags, &phys) in apple-dart.c, next to apple_dart_fw_remote(), with a
    stub when the driver isn't reachable. APPLE_DART_FW_LINUX resolves through Linux's mappings when the domain is
    a paging domain (__IOMMU_DOMAIN_PAGING), and APPLE_DART_FW_RETAINED through those the firmware kept. A range
    passes when every page translates at the same offset as its first byte and the CPU-page-rounded span is DRAM
    outside System RAM: at or above the first System RAM (every device's registers on these SoCs sit below it), and
    not memory the kernel allocates from, which its linear map also covers. A firmware carveout passes. Unlike
    afk.c's check, a no-map reserved-memory region passes too: the kernel neither uses nor maps it.
  • apple_rtkit_crashlog_map() takes the range from it, through both kinds of mapping, and maps it write-combined.
  • apple_rtkit_maps_placed_crashlog() is the one rule for both paths: unmapped when the client says the firmware
    owns the buffer, set up by the client when it has shmem_setup, otherwise mapped through the check above. A
    request on an announced crashlog endpoint from a client with neither is now mapped and acknowledged rather than
    refused. None in this row triggers that branch: the base logs
    no refused crashlog request, and t6050-aop is not bound on this stock kit.
  • Two commits (e15fd8252721, 8301fc463c47): the helper, then RTKit's use of it. Shared code with no chip
    selection.

Testing

  • Host test tools/asahi/rtkit-crashlog-map-tests.py (registered in run-host-tests.py). It builds
    apple_rtkit_crashlog_map(), apple_rtkit_maps_placed_crashlog() and apple_dart_fw_range() with its two
    helpers unchanged, under ASan and UBSan, against a 4 KiB-granular stand-in IOMMU and resource map. Aligned and
    unaligned buffers on contiguous pages, through Linux's paging mappings or the firmware's kept mappings, are
    mapped write-combined. Buffers that reach a page mapped elsewhere or not at all (including a last byte on byte 0
    of a bad page, and a 4 KiB subpage discontinuity inside a 16 KiB block), reach System RAM (including a 4 KiB
    carveout strictly past System RAM sharing a 16 KiB CPU page with it), lie on registers, or run on an identity
    domain are refused. Routing via apple_rtkit_maps_placed_crashlog() is checked too. Its --old-ref
    run requires the base to fail, and it does.
  • run-host-tests.py in the build VM (integration/aurora 377060f3688a): 463 of 463 pass on the base, 465 of
    465 with this change (only the 2 new rtkit-crashlog-map-tests runs differ). KUnit, built in (kits pr2775-r5k
    vs pr2775-r5bk on 377060f3688a): 77 suites, 385 of 387 cases pass, 0 fail, 2 skip, identical to the base.
  • J775D (Mac Studio, M5 Ultra): kit pr2775-r5 (window r2775r5@20261123-0837, aura aura-main-59b8b977:
    integration/aurora 377060f3688a plus both commits of this PR at 8301fc463c47) against kit pr2775-r5b
    (window r2775r5@20261123-0837, aura aura-main-59b8b977: the same base alone). One boot each through the
    default 27.0 firmware stub and published Aura main 59b8b977, default kernel command line, read-only root
    (ALARM has no SELinux). Both arms boot to SSH with 0 WARNING/BUG/Oops, the same bound co-processors (macsmc,
    nvme-apple, both apple-dcp instances, both avd instances, apple-display-crossbar; t6050-aop is not
    bound on this stock base), 4 err-level kernel lines (0 new vs base), and the same 2 failed units on both
    (iwd.service missing kernel crypto options in integration's defconfig, and
    systemd-networkd-persistent-storage.service on the read-only root).
  • Builds: the J775D kernel and integration's own config; no warnings in the changed files. checkpatch --strict:
    0 errors.

Still to run

  • The crash path itself needs a co-processor crash and isn't exercised on hardware. A T8140 row would exercise the
    firmware's kept mappings (the J700 AOP), and any Mac whose co-processor announces its crashlog endpoint with its
    own buffer would exercise the rule's announced path.
  • Conversions to apple_dart_fw_range(), for their owners: dcp_check_iova_contiguous(), dcp_fw_phys_in_dram()
    (dcp-internal.h), and the walks in iomfb_m4.c, iomfb_v14_7.c and iomfb_v26_6.c (fixed 16 KiB strides),
    afk.c's remote copy (CPU-page chunks, kept mappings only), aop.rs, ave-fw.c and the ANE firmware loader.
    We're glad to send them if wanted.
  • Aura's RTKit translates a placed buffer at its first page only and parses its crash log without a size bound; a
    separate Aura PR fixes it.

Assisted-by: LLM (Claude:Opus 5.5), LLM (Gemini:Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

The change looks right to me.

  • drivers/soc/apple/rtkit.c:984-990: the walk now covers every IOMMU page the range touches, and the phys + (addr - iova) comparison holds for both translation sources, since iommu_iova_to_phys() and apple_dart_fw_leaf_decode() (apple-dart.c:1165) both keep the in-page offset. With a 44-bit IOVA and at most 255 4 KiB units of size, iova + size can't wrap.
  • rtkit.c:1091-1093: the function only runs for a client whose endpoint map leaves out the crashlog endpoint and that has no shmem_setup. DCP, SMC, ANS and the GPU on M1 to M4 never take this path, so they are unaffected. When the check refuses a buffer, the crash is still reported and ops->crashed still runs. Only the log is lost, which is the right trade.
  • The missing memory-type check before memremap(MEMREMAP_WB) was already there before this change, and the description lists it as a follow-up. Fine to leave it out of this PR.

A T8140 row would be useful, since that AOP leaves out the crashlog endpoint: AOP probe and an s2idle cycle at this head, with no new err-level lines. The crash path itself can't be shown without a co-processor crash, and the host test covers it.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pre-PR checklist review on 831aa366b8704b1e64d9ec23daa5e93026408c04 (CI: 7/7 checks green — host-tests, source, rust-build, kunit, and all three DWC3/ATC builds).

Code Audit

  • drivers/soc/apple/rtkit.c (apple_rtkit_crashlog_map()):
    • Moving if (!phys) return -ENOENT; ahead of the walk is cleaner than the prior loop guard.
    • Stepping page-by-page via pgsize = domain->pgsize_bitmap ? 1UL << __ffs(domain->pgsize_bitmap) : PAGE_SIZE and addr = ALIGN_DOWN(addr, pgsize) + pgsize matches dcp_check_iova_contiguous() in drivers/gpu/drm/apple/dcp.c and closes the off-by-last-page gap for unaligned crash log buffers (e.g. 4 KiB-granular buffers crossing a 16 KiB IOMMU page boundary).
    • Overflow safety verified: APPLE_RTKIT depends on APPLE_MAILBOX, which requires ARCH_APPLE || (64BIT && COMPILE_TEST), so dma_addr_t is 64-bit; with 44-bit iova (GENMASK_ULL(43, 0)) and max ~1 MiB size (GENMASK_ULL(51, 44) << 12), neither iova + size nor ALIGN_DOWN(addr, pgsize) + pgsize can overflow.
    • Non-blocking note: as the PR body notes, a follow-up sharing one helper with dcp_check_iova_contiguous() and verifying the resolved physical range is DRAM before memremap(..., MEMREMAP_WB) would be valuable.
  • Host test: tools/asahi/rtkit-crashlog-map-tests.py compiles apple_rtkit_crashlog_phys() and apple_rtkit_crashlog_map() unchanged under ASan/UBSan, verifies aligned/unaligned/non-contiguous/unmapped cases at both 16 KiB and 4 KiB IOMMU page sizes, checks memremap() bounds, and confirms --old-ref cacf35543b4d fails.

Pre-PR Checklist (§1–§6)

  • §1 No model gating: Pass — shared RTKit code using domain->pgsize_bitmap, no chip/board/firmware gates.
  • §2 Production-ready: Pass — default command line, no hacks.
  • §3 Safety: Pass — derives step granularity from the IOMMU domain rather than hardcoding.
  • §4 Clean-room & attribution: Pass — human author/committer and Signed-off-by only in commit; Assisted-by: disclosed in PR body.
  • §5 Evidence: Holding for additional regression row. The crash path itself is thoroughly covered by the ASan/UBSan host test (and isn't expected to be triggered via a live crash in routine boots), and the stock-base J775D A/B row passes without new errors, but J775D does not bring up AOP on stock integration/aurora (and reports 2 failed units on ALARM/RO-root with no SELinux). A clean regression row on a Mac where AOP boots on integration/aurora (such as T8140, where d9b438c4ca41 introduced apple_rtkit_crashlog_map(), with 0 failed units / 0 SELinux denials where applicable) would complete §5.
  • §6 Naming: Pass.

Zero code, policy, or CI blockers — holding as COMMENT only for a stock-base regression row on an affected Mac where AOP boots on integration/aurora.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Not on integration/aurora yet: on daa9e2d apple_rtkit_crashlog_map() still steps by PAGE_SIZE from the buffer's start. The commit applies cleanly on daa9e2d and its host tests pass there (run-host-tests.py --only rtkit-crashlog, 10/10, including the --old-ref run). Both reviews found no code issue; the one thing still open is the regression row on a Mac whose AOP comes up on integration/aurora (the A18 Pro: AOP probe and an s2idle cycle at this head with no new error lines).

…ps it

Several drivers map for the CPU a buffer that a co-processor's firmware
names by its DVA, and each resolves it through the IOMMU by hand first:
RTKit's crash log, the DCP's walks in drm/apple (dcp.c, iomfb_m4.c,
iomfb_v14_7.c, iomfb_v26_6.c, afk.c), aop.rs, ave-fw.c and the ANE
firmware loader. They differ in the stride (the IOMMU's smallest page,
a fixed 16 KiB, or the CPU's page), in which mappings count (Linux's,
those the firmware kept from the boot loader, or both) and in what the
target may be (DRAM, a DT memory-region, or anything). Separate from the
walk, dcp_fw_phys_in_dram() in drivers/gpu/drm/apple/dcp-internal.h
(used by afk.c and dcp.c) carries its own copy of the "registers sit
below the first System RAM" check.

Add apple_dart_fw_range(). It resolves every IOMMU page the buffer
touches, at the domain's smallest page and from page boundary to page
boundary, through the mappings the caller names (APPLE_DART_FW_LINUX on
a paging domain so identity domains never treat an unmapped DVA as a
translation or shadow retained mappings, and APPLE_DART_FW_RETAINED). It
returns the range's start only when the pages are contiguous and the
CPU-page-rounded range is DRAM outside System RAM: at or above the first
System RAM, as every device's registers on these SoCs sit below it, and
not memory the kernel allocates from, which its linear map also covers
with other attributes. A firmware carveout passes. A stub returns
-ENODEV when the driver isn't reachable.

RTKit's crash log is the first user. Converting the other walks and
dcp_fw_phys_in_dram() is left to their owners.

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
…DRAM

apple_rtkit_crashlog_map() maps a crash log buffer the co-processor
placed at its own address. It stepped by PAGE_SIZE from the buffer's
address, which need not be page aligned, so the page holding its last
bytes could go unchecked. It mapped whatever physical range the IOMMU
named, without checking what memory that is. And it mapped it
cacheable, although the co-processor's writes need not be coherent with
the CPU's caches (the T6050 AOP's node isn't dma-coherent), while
apple_rtkit_crashlog_late() polls the buffer, with no cache maintenance
for a placed buffer, for a log written after the request.

Take the range from apple_dart_fw_range(), through Linux's mappings and
those the firmware kept, and map it write-combined.

Whether such a buffer is mapped also had three answers, by how the
firmware asked: a client flag kept it unmapped, a request on an
announced crashlog endpoint was refused, and the crash report on an
endpoint the firmware left out of its map was mapped, flag or not.
apple_rtkit_maps_placed_crashlog() is now the one rule for both paths:
unmapped when the client says the firmware owns the buffer, set up by
the client when it has shmem_setup, and otherwise mapped through the
checks above. A request on an announced endpoint from a client with
neither is now mapped and acknowledged rather than refused.

The host test tools/asahi/rtkit-crashlog-map-tests.py builds the
functions unchanged against a 4 KiB-granular stand-in IOMMU and resource
map. Aligned and unaligned buffers on contiguous pages, through either
kind of mapping, are mapped write-combined; buffers that reach a page
mapped elsewhere or not at all (at 16 KiB or 4 KiB stride), reach System
RAM (including a carveout strictly past RAM sharing a 16 KiB CPU page
with it), lie on registers, or run on an identity domain are refused.
Routing via apple_rtkit_maps_placed_crashlog() is checked too. The code
before this change fails the test.

Fixes: d9b438c ("arm64: apple: support coordinated suspend-to-RAM on T8140")
Reported-by: Erik Bourget <erik@ebourget.net>
Suggested-by: Erik Bourget <erik@ebourget.net>
Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
@funkzy
funkzy force-pushed the pr/rtkit-crashlog-pages branch from 831aa36 to 8301fc4 Compare November 23, 2026 16:55
@funkzy

funkzy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, Ryan and dj.

  • Change of approach: the earlier version fixed the page walk inside apple_rtkit_crashlog_map(), as one more hand-written copy of the walk in dcp_check_iova_contiguous(), and still mapped whatever physical range the IOMMU named, cacheable. The cause is that no shared check exists for a firmware-named DVA range the CPU may map. This version (e15fd8252721, 8301fc463c47) adds it to the DART driver, apple_dart_fw_range(), next to apple_dart_fw_remote(): every IOMMU page at the domain's smallest page, through Linux's paging mappings (__IOMMU_DOMAIN_PAGING, so identity domains are refused) or the firmware's kept mappings, and only contiguous DRAM whose CPU-page-rounded span lies outside System RAM. RTKit's crash log uses it, mapped write-combined, and RTKit now has one rule for when a placed crash log is mapped, the same for an announced endpoint and one the firmware left out of its map.
  • Memory-type check before memremap(): that's now part of the helper, so it's in this PR rather than a follow-up.
  • Other walks: the DCP's (dcp.c, dcp_fw_phys_in_dram() in dcp-internal.h, iomfb_m4.c, iomfb_v14_7.c, iomfb_v26_6.c, afk.c), aop.rs, ave-fw.c and the ANE loader are listed in the body as conversions for their owners. dj, I'm glad to send the DCP ones if you want them. Aura's RTKit has the same first-page-only translation and gets its own PR.
  • The 2 failed units on the J775D row (kit pr2775-r5 vs kit pr2775-r5b, window r2775r5@20261123-0837, aura aura-main-59b8b977, on integration/aurora 377060f3688a) are the same on both kernels: iwd.service, because integration's defconfig lacks the kernel crypto options it needs, and systemd-networkd-persistent-storage.service, because the test boots mount the root read-only.
  • T8140 row: Ryan, could you run this head on your J700: AOP probe and an s2idle cycle, with no new err-level lines and the failed units? It's the Mac whose AOP uses the firmware's kept mappings, and also the stock-base row dj asks for.

Assisted-by: LLM (Gemini:Neon)

funkzy added a commit to funkzy/aura that referenced this pull request Nov 23, 2026
…parse

In Aura's RTKit driver, a placed buffer request carrying an IOP DVA
(syslog, crash log, ioreport) was translated only at its first page via
dart_translate(), leaving later 16 KiB DART pages unchecked for contiguity
or validity. Meanwhile, rtkit_handle_oslog_request() and
dart_search_range() each carried separate multi-page contiguity loops, and
dart_translate_internal() printed TTBR/L1 errors even when called silently.
Separately, rtkit_crashed() walked crash-log entries without checking
crashlog_bfr.sz, allowing zero-length entries to loop, oversized lengths
to read past the buffer, odd lengths to create unaligned struct pointers,
and unterminated Cstr payloads to read past the entry.

Honor the silent flag on dart_translate_internal()'s TTBR/L1 error paths,
and add dart_translate_range() in src/dart.c using dart_translate_silent()
to validate every 16 KiB DART page from iova through iova + size - 1 (with
NULL-dart, zero-size, IOVA-wrap, 256 GiB window-crossing, and one-past-end
pointer-wrap guards, while preserving high window tag bits used by callers
such as Gen3 vm_base and display segment remaps). Reuse
dart_translate_range() across rtkit_handle_buffer_request(),
rtkit_handle_oslog_request(), and dart_search_range(). Refuse zero-size
placed buffer requests on DART paths and only populate the buffer struct
on success. Bound every header, entry, and Cstr read in rtkit_crashed()
against crashlog_bfr.sz using memcpy() into aligned locals, strnlen(), and
an INT_MAX precision cap.

Add a host test (tests/run-rtkit-placed-buffer.sh, compiled with ASan and
UBSan against the extracted production functions, including 4-TTBR 256 GiB
boundary crossing, bit-40-tagged IOVAs, 1-TTBR silent crossing, and
pointer wrap) and run it in CI. Linux's RTKit maps the crash log the same
way and gets the equivalent check in aurora-silicon/linux#2775.

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review of 8301fc463c47f39d2f29d3b062bf8e1c76466a0c against pre-pr-checklist.md (§1–§6) following the apple_dart_fw_range() redesign (CI: 8/8 checks green — host-tests, kunit ×2, source, rust-build, DWC3/ATC ×3; MERGEABLE / CLEAN, non-draft).

Confirmed clean

  • Design & §1–§3: Moving the IOMMU-granularity contiguity walk into shared apple_dart_fw_range() (with __IOMMU_DOMAIN_PAGING guarding APPLE_DART_FW_LINUX against identity domains, APPLE_DART_FW_RETAINED via apple_dart_fw_remote(), CPU-page-rounded apple_dart_fw_phys_shareable() checking DRAM outside System RAM, and MEMREMAP_WC in apple_rtkit_crashlog_map()) is a strong architectural upgrade with no chip gating and thorough ASan/UBSan host-test coverage (tools/asahi/rtkit-crashlog-map-tests.py, including --old-ref cacf35543b4d).
  • §4 & §6: Both commits (e15fd8252721, 8301fc463c47) carry human author/committer and human Signed-off-by: only, zero AI trailers in commits, PR body discloses Assisted-by:, naming clean.

Blockers before approval

  1. Code bug — drivers/soc/apple/rtkit.c:615-683 (apple_rtkit_common_rx_get_buffer()): On the newly added announced-endpoint placed-crashlog path (ep == APPLE_RTKIT_EP_CRASHLOG && request.iova && apple_rtkit_maps_placed_crashlog(rtk)), the first request calls apple_rtkit_crashlog_map() (setting buffer->is_mapped = true, rtk->crashlog_placed = true) and sends the ACK. However, if firmware re-sends the same GET_BUFFER request while buffer->size != 0, line 615 jumps to goto reply;, where the else if branch (apple_rtkit_coproc_places_buffers(rtk) || (apple_rtkit_firmware_owns_crashlog(rtk) && ep == APPLE_RTKIT_EP_CRASHLOG)) does not match rtk->crashlog_placed, silently dropping the ACK for clients without APPLE_RTKIT_COPROC_PLACES_BUFFERS. Add (rtk->crashlog_placed && ep == APPLE_RTKIT_EP_CRASHLOG) to the reply: ACK condition so re-sent requests behave consistently with the first request and with APPLE_RTKIT_FIRMWARE_OWNED_CRASHLOG.
  2. §5 Evidence — missing affected-hardware regression row: The PR now introduces a new exported DART helper (apple_dart_fw_range()), switches crashlog mappings to MEMREMAP_WC, and adds the announced-endpoint placed-crashlog path, yet the only hardware row at 8301fc463c47 is J775D where t6050-aop is not bound on stock integration/aurora (ALARM/RO-root, no SELinux, 2 failed units). The stock-base T8140 (J700) row (AOP probe exercising retained DART mappings + s2idle cycle, 0 new kernel errors, failed units / SELinux AVC counts) requested by both reviewers and noted as pending is still required before merge.

Assisted-by: LLM (Gemini 4 Neon)

@funkzy

funkzy commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the re-review, @DjDeveloperr.

On Blocker 1 (apple_rtkit_common_rx_get_buffer() reply: ACK for rtk->crashlog_placed): that path is actually unreachable for APPLE_RTKIT_EP_CRASHLOG.

apple_rtkit_crashlog_rx() is the only caller of apple_rtkit_common_rx_get_buffer() for APPLE_RTKIT_EP_CRASHLOG, and it guards that call with if (!rtk->crashlog_buffer.size) (drivers/soc/apple/rtkit.c:1114-1116). On the crashlog endpoint, APPLE_RTKIT_BUFFER_REQUEST and APPLE_RTKIT_CRASHLOG_CRASH share message type 1, so only the first message (crashlog_buffer.size == 0) is treated as a buffer request; any subsequent message while crashlog_buffer.size != 0 falls directly through to the crash-handling path (rtkit.c:1128-1138) and never calls apple_rtkit_common_rx_get_buffer(). (The existing apple_rtkit_firmware_owns_crashlog(rtk) check in reply: is unreachable for the same reason — its first request returns early at rtkit.c:651.)

Keeping 8301fc463c47 unchanged avoids adding dead code on an unreachable path and keeps the verified J775D A/B row (pr2775-r5 / pr2775-r5b) at this head.

Blocker 2 (the stock-base T8140 / J700 row exercising AOP retained DART mappings + s2idle) is still waiting on a J700 owner.

Assisted-by: LLM (Claude:Opus 5.5), LLM (Gemini:Neon)

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.

3 participants