-
-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chunker permutation #5070
base: master
Are you sure you want to change the base?
Chunker permutation #5070
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5070 +/- ##
==========================================
- Coverage 83.15% 83.15% -0.01%
==========================================
Files 38 38
Lines 10058 10078 +20
Branches 1668 1672 +4
==========================================
+ Hits 8364 8380 +16
- Misses 1202 1204 +2
- Partials 492 494 +2
Continue to review full report at Codecov.
|
It would be useful, if someone else would also review this. |
On first look this seems to silently diverge on the chunking when this key is used in older borg versions? That sounds problematic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found one cosmetic thing while doing another review.
|
||
if pool == 0: | ||
# the pool value was less than 256!, we have an unbiased choice | ||
return bytes(perm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be also just break
.
@textshell looks to me like:
I have still to check how the old code deals with a key that is longer than expected. I guess it would just silently ignore that. Do you think it is problematic if we just document "don't use borg 1.1.x on repos created with borg 1.2"? |
We could also set item.Key.version to 2 (was: 1), then borg 1.1.x code will reject working with a key made by borg 1.2. borg 1.2 would check the version and accept version 1 (null permutation, compatibility mode) or version 2 (random permutation). |
1508a33
to
6647331
Compare
rebased on current master. |
Make the buzhash chunker more resistant to fingerprinting by introducing a permutation of the buzhash table, as discussed at #3687