Skip to content

libpathrs v0.2.7 -- "This is going straight to the pool room."

Latest

Choose a tag to compare

@cyphar cyphar released this 29 Nov 09:33
· 2 commits to main since this release
Immutable release. Only release title and notes can be modified.
v0.2.7
4d604da

This release includes quite a few fixes related to unnecessary panics in
error situations which caused problems on some older and custom-built
kernels, as well as some other minor improvements.

Added

  • Even with -C panic=abort, rust-std contains code for dealing with
    backtraces which makes our binaries much larger than necessary and the only
    workaround is to rebuild rust-std with the backtrace support disabled. To
    make this easier to do, we now provide a simple opt-in knob
    (make LIBPATHRS_LIBSTD_NO_BACKTRACE=1) that can be used to reduce binary size.
    This requires nightly Rust (or RUSTC_BOOTSTRAP=1), since the Rust standard
    library has to be rebuilt. See INSTALL.md for more details. (#432)

Fixed

  • Due to some unfortunate type usage in libc and rustix, libpathrs would
    previously fail to build on s390x with musl. We've worked around that issue
    by casting all f_type values to u64 (though we believe it to be an
    upstream issue
    ). Previously our CI mostly focused on tier
    1 and 2 targets (which include some musl targets), but we now compile-test
    the equivalent tier 3 targets for most relevant architectures. (#425, #426)
  • When using libpathrs from languages that support embedded nul bytes in
    strings, libpathrs (and its bindings) will now correctly return an error
    rather than silently truncating the string C-style. (#436)
  • make -C e2e-tests test-* now all test against the in-tree libpathrs.so.
    You can set PATHRS_E2E_USE_HOST_SO=1 to switch to the old behaviour of
    testing the host's libpathrs.so install (for obvious reasons, this does
    nothing for the Rust end-to-end test). (#438)
  • install.sh now longer writes the generated pathrs.pc into the libpathrs
    source tree. Previously this would cause issues when a sudo ./install.sh
    was followed by an unprivileged ./install.sh invocation. (#438)
  • The parsing of kernel releases (used for last-resort kernel feature detection)
    has been made more resilient:
    • libpathrs will no longer panic if the host version string cannot be parsed
      using the parsing rules we have, and instead it will assume the worst
      (i.e., some ancient Linux version). (#471, #473)
    • Release versions that have some non-numerical value immediately after a dot
      (i.e., releases of the form 5.8.0.custom) will now be parsed more
      permissively as just another form of suffix. Previously such versions would
      be treated as invalid (triggering the panic mentioned above). (#471, #473)
  • Several other unnecessary panic!-level assertions were replaced with
    error-returning assertions to avoid crashing user programs in weird
    situations. (#475)
  • On kernels without /proc/thread-self (pre-3.17), libpathrs would enter a
    recursive loop when trying to apply its workaround for /proc/thread-self
    due to some code reuse that lead to inadverent reentrancy. (#468, #478)

Thanks to the following contributors who made this release possible:

Signed-off-by: Aleksa Sarai cyphar@cyphar.com