mirror of
https://github.com/Zagitta/gpu-unlock.git
synced 2026-12-03 19:44:49 +07:00
[PR #272] gpu_unlock: contain a late failure with the success path's FLR instead of keeping the card until power off #277
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Zagitta/gpu-unlock#277
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Zagitta/gpu-unlock/pull/272
Author: @jontyler21
Created: 10/30/2026
Status: 🔄 Open
Base:
main← Head:contain-late-failure📝 Commits (1)
7eca70agpu_unlock: contain a late failure with the success path's FLR instead of keeping the card until power off📊 Changes
1 file changed (+29 additions, -10 deletions)
View changed files
📝
kernel/gpu_unlock/unlock_610.c(+29 -10)📄 Description
What
A failure after firmware has started (FWSEC, a Booter launch or its readback, a pre-FLR check) currently retains the card: BME off, BAR0 and the DMA buffers held until power off, and the stock driver can't bind. On a card that also drives the display, that's a black screen until a cold boot. Behind a LUKS root it's a blank passphrase prompt too, because the FLR path has already removed simpledrm/efifb by then.
This PR runs the same FLR and post-FLR checks a successful unlock uses, once, before giving up. The card is only quiesced and handed to the stock driver (at stock speed) when every existing check passes: config identity and BARs restored, GFW halted, SEC2 reset, no pending transactions, WPR2 down. If any check fails, the card stays retained exactly as today. The original error is still returned, so
card->unlockedstays false and nothing is reported as unlocked.This isn't the unconditional cleanup #43 warns against. Memory is only released after the FLR has disposed of the firmware's execution, which is the same proof the success path already relies on.
How
unlock_transaction_reset(work, contain): in contain mode it skips the "selectors must be unlocked" pre/post checks and also acceptsGU_ALLOCATED(FWSEC failed before publish). It logsstage=contain ….flr_attemptedmakes sure the FLR is tried at most once: a failure inside the success path's own post-FLR checks is not retried.restore_stock_signature(), so the stock signature is in place before the FLR.Testing
Open question for the maintainers
Is there any late-failure state where an FLR itself is unsafe? For example, a Booter that never halted while holding something the FLR can't reset. If so, contain mode could be limited to failures with
invocation_halted(or FWSEC proven halted), which would still cover the common readback-mismatch case.🤖 Generated with Claude Code
https://claude.ai/code/session_013LhtwTLXMR7uvVCcq1xbrM
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.