Repository navigation
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-stdcontains code for dealing with
backtraces which makes our binaries much larger than necessary and the only
workaround is to rebuildrust-stdwith 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 (orRUSTC_BOOTSTRAP=1), since the Rust standard
library has to be rebuilt. SeeINSTALL.mdfor more details. (#432)
Fixed
- Due to some unfortunate type usage in
libcandrustix, libpathrs would
previously fail to build on s390x with musl. We've worked around that issue
by casting allf_typevalues tou64(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-treelibpathrs.so.
You can setPATHRS_E2E_USE_HOST_SO=1to switch to the old behaviour of
testing the host'slibpathrs.soinstall (for obvious reasons, this does
nothing for the Rust end-to-end test). (#438)install.shnow longer writes the generatedpathrs.pcinto the libpathrs
source tree. Previously this would cause issues when asudo ./install.sh
was followed by an unprivileged./install.shinvocation. (#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 form5.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)
- libpathrs will no longer panic if the host version string cannot be parsed
- 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:
- Akihiro Suda akihiro.suda.cz@hco.ntt.co.jp
- Aleksa Sarai cyphar@cyphar.com
- Alexej Disterhoft alexej@disterhoft.de
- Daniel Norberg dano@modal.com
- Ken Kassing ken.kassing@arcticwolf.com
- Kir Kolyshkin kolyshkin@gmail.com
Signed-off-by: Aleksa Sarai cyphar@cyphar.com