From: Frantisek Sumsal Date: Wed, 22 Apr 2026 17:12:23 +0000 (+0200) Subject: test: wrap mount/umount when running with sanitizers X-Git-Tag: v260.2~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eead1296eb91cb13d8dca4a0c40e91b3e241063e;p=thirdparty%2Fsystemd.git test: wrap mount/umount when running with sanitizers On Fedora Rawhide mount/umount is linked against libsystemd, which then breaks the binaries in sanitizer runs, as we try to run instrumented code from an uninstrumented binary: bash-5.3# ldd /usr/bin/mount linux-vdso.so.1 (0x00007fa757ef9000) libmount.so.1 => /lib64/libmount.so.1 (0x00007fa757e84000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa757e51000) libc.so.6 => /lib64/libc.so.6 (0x00007fa757c56000) libblkid.so.1 => /lib64/libblkid.so.1 (0x00007fa757c16000) libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007fa757400000) libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fa75734f000) /lib64/ld-linux-x86-64.so.2 (0x00007fa757efb000) libclang_rt.asan.so => /usr/lib/clang/22/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so (0x00007fa756800000) libm.so.6 => /lib64/libm.so.6 (0x00007fa7566e4000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa7566b7000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa756400000) bash-5.3# mount ==458==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. This then breaks the whole machine, as mount is quite essential during boot. Let's just add mount/umount to the list of wrapped binaries to fix this. (cherry picked from commit 8030e0b19ef7c0e823d84dd08ad38a2d88e0a230) --- diff --git a/mkosi/mkosi.sanitizers/mkosi.postinst b/mkosi/mkosi.sanitizers/mkosi.postinst index d4d00907ed0..8fbd0d4f85e 100755 --- a/mkosi/mkosi.sanitizers/mkosi.postinst +++ b/mkosi/mkosi.sanitizers/mkosi.postinst @@ -81,6 +81,7 @@ wrap=( mdadm mkfs.btrfs mksquashfs + mount multipath multipathd nvme @@ -96,6 +97,7 @@ wrap=( su tar tgtd + umount unix_chkpwd useradd userdel