shred: schedule passes with Gutmann pass groups (genpattern) - #13699
Open
sankalpsthakur wants to merge 3 commits into
Open
shred: schedule passes with Gutmann pass groups (genpattern)#13699sankalpsthakur wants to merge 3 commits into
sankalpsthakur wants to merge 3 commits into
Conversation
Introduce a Pattern model with three repeating bytes and an optional sector-phase flag (pattern code bit 0x1000). Decode codes via Pattern::from_code; on write, XOR the first byte of every 512-byte sector with 0x80 and keep buffer offset locked so flips stay sector-aligned. Keep the existing pass schedulers for production behavior. Scheduler and distribution changes land in follow-up PRs.
Replace max(n/10,3)+cycle+shuffle for the default path with clean-room genpattern over PASS_GROUPS (group select, Bresenham random spacing, shuffle fixed patterns). Phase-variant codes enter the scheduled set. Keep create_test_compatible for --random-source until residual entropy lands so integration tests stay green.
This was referenced Aug 1, 2026
Merging this PR will not alter performance
Comparing Footnotes
|
Note that the format and comments here are clearly copied from GNU source source code: Unsure if it was you who wrote that or mechahitler [1]. [1] https://www.npr.org/2025/07/09/nx-s1-5462609/grok-elon-musk-antisemitic-racist-content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Depends on #13694 (sector-phase patterns).
Default path uses clean-room
genpattern+PASS_GROUPS(Gutmann groups, Bresenham random spacing, fixed-pattern shuffle). Phase-variant codes can be scheduled.--random-sourcestill uses the legacy test-compatible sequence (dual path) so existing integration tests stay green. Residual-entropy scheduling is a follow-up.Not a GNU source port; clean-room from public algorithm description.
Tests
Structural genpattern unit tests only; exact GNU distribution matrix lands with residual entropy.
Assisted by Grok (xAI); reviewed and tested locally.