Repository navigation
Conversation
Owner
Author
|
@nobbs PTAL? |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
It's really quite extreme to panic if the host kernel version is unknown because in libpathrs we have all sorts of fallbacks for older kernel versions. A much simpler approach is to treat an unknown kernel version as being some impossibly ancient kernel and thus enable all compatibility workarounds. (Ideally we would also log something but we don't do logging from libpathrs yet so instead we just pick an obviously fake version number -- 0.99.1234 -- that hopefully shows up in a log somewhere.) Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
cyphar
force-pushed
the
kver-resilience
branch
from
November 22, 2026 13:20
7a43266 to
405a934
Compare
Some systems have really funky kernel versions like "5.4.0.custom" which would previously be treated as completely invalid version strings by libpathrs. Given that kernel builders have a lot of freedom to pick all sorts of whacky release version schemes we should take a more permissive approach and just accept any dot-separated digits at the start of the version as the version string. Once we hit a non-digit or otherwise invalid component we truncate any later dot-separated digits (meaning that "3.1..5" will be treated as "3.1"). This should make us more resilient to weird cases. Reported-by: Alexej Disterhoft <alexej@disterhoft.de> Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
cyphar
force-pushed
the
kver-resilience
branch
from
November 22, 2026 13:24
405a934 to
4327933
Compare
|
@cyphar Thanks! Confirmed |
This branch has not been deployed
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.
It's really quite extreme to panic if the host kernel version is
unknown because in libpathrs we have all sorts of fallbacks for older
kernel versions. A much simpler approach is to treat an unknown kernel
version as being some impossibly ancient kernel and thus enable all
compatibility workarounds.
Some systems have really funky kernel versions like
5.4.0.customwhichwould previously be treated as completely invalid version strings by
libpathrs.
Given that kernel builders have a lot of freedom to pick all sorts of
whacky release version schemes we should take a more permissive approach
and just accept any dot-separated digits at the start of the version as
the version string. Once we hit a non-digit or otherwise invalid
component we truncate any later dot-separated digits (meaning that
3.1..5will be treated as3.1).This should make us more resilient to weird cases.
Fixes #471
Closes #472
Reported-by: Alexej Disterhoft alexej@disterhoft.de
Signed-off-by: Aleksa Sarai cyphar@cyphar.com