Bug 278099 - outdated version of zstd(1) is kept in the base
Summary: outdated version of zstd(1) is kept in the base
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-patch, performance, regression
Depends on:
Blocks:
 
Reported: 2024-04-01 14:34 UTC by Marek Zarychta
Modified: 2024-04-16 23:09 UTC (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Zarychta 2024-04-01 14:34:01 UTC
A few days ago ZSTD v 1.5.6 was released[1], but we still have two years old ZSTD v1.5.2 in the base. Zstandard is developed under Facebook's eye so likely it's backdoor-prone. Delaying updates for such a long time is not optimal considering speed improvements and other benefits from the upgrade.


1. https://github.com/facebook/zstd/releases/tag/v1.5.6
Comment 1 Xin LI freebsd_committer freebsd_triage 2024-04-01 22:19:13 UTC
Somewhat related: there is an even older version of zstd bundled with OpenZFS.  The bundled copy (except the wrapper) should be removed and we should have only one copy in the source tree.
Comment 2 Marek Zarychta 2024-04-02 11:45:23 UTC
PR was submitted on April 1 and after this date, all suggestions but backdoor pronity are still legitimate.
Comment 3 Alexander Motin freebsd_committer freebsd_triage 2024-04-02 13:51:00 UTC
(In reply to Xin LI from comment #1)
ZFS intentionally keeps older versions of compressors (decompressors can be updated) to produce identical results when needed (L2ARC on system with uncompressed ARC is the most known).
Comment 4 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2024-04-02 14:23:42 UTC
“pronity” is not a word, and I don't think “prone” means what you think it means:  https://www.merriam-webster.com/dictionary/prone
Comment 5 Marek Zarychta 2024-04-02 15:23:43 UTC
(In reply to Dag-Erling Smørgrav from comment #4)
>“pronity” is not a word, and I don't think “prone” means what you think it
>means: https://www.merriam-webster.com/dictionary/prone

Maybe it's not a word but it's still a thing[1], anyway, it was partially April Fool's PR, so please exclude this sentence from the original bug report as a post-factum errata: "Zstandard is developed under Facebook's eye so likely it's backdoor-prone."

(In reply to Alexander Motin from comment #3)
>ZFS intentionally keeps older versions of compressors
My report refers to sys/contrib/zstd. Bytes under sys/contrib/openzfs/module/zstd
 are derived from OpenZFS and most ZFS users know that they probably have a good reason for denying updates. 

1. https://en.wiktionary.org/wiki/pronity
Comment 6 Xin LI freebsd_committer freebsd_triage 2024-04-16 21:53:49 UTC
(In reply to Alexander Motin from comment #3)
For future reference in case someone wanted to give this a shot, the concerns at OpenZFS[1] was that different versions of zstd may [2] generate different output for the same data.  When compressed ARC is disabled (enabled by default), ARC would only have a copy of uncompressed data, but the MAC was calculated against compressed data, so arc_hdr_authenticate() would see a mismatch because it's now using a newer version of zstd to compress the data (for performance reasons, because re-compression is faster than reading the data back from disk).

[1] https://github.com/openzfs/zfs/pull/11367#pullrequestreview-559645117 further explained in https://github.com/openzfs/zfs/pull/11367#issuecomment-753517958
[2] https://github.com/facebook/zstd/issues/999#issuecomment-359538229
Comment 7 Alexander Burke 2024-04-16 22:08:18 UTC
(In reply to Dag-Erling Smørgrav from comment #4)
> “pronity” is not a word

I think it's a perfectly cromulent word, and at any rate if Shakespeare could make up his own words then so can Marek.
Comment 8 Chris Hutchinson 2024-04-16 23:09:09 UTC
pronity:
noun
Proneness; propensity.

It *is* a word. It's been in use since 1913. If you happen to have a copy
of the Websters dictionary with a print/publishing date of 1913. You'll
find it there. Do Note; it will need to be an American-English dictionary.

Sorry. I couldn't resist. :)

--Chris