mkosi: Sanitizer improvements
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 16 May 2024 15:18:38 +0000 (17:18 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 May 2024 10:47:45 +0000 (12:47 +0200)
commitaef13ad0294b403993e19b424b26535fb65749f4
tree4c420a5b628c3106f5b47b004f3df97818dff002
parent6b572e88a353f1d9edd4a87ea24c201ff57faa04
mkosi: Sanitizer improvements

- Let's set the environment on the kernel command line so it applies
to initrd and main system.
- Let's add the necessary wrappers that are also added in test-functions.
Unlike test-functions we don't use gcc/clang to get the library path as
that requires installing gcc/clang in the initrd.
- Let's drop the hack to get journald writing to the console and have
it write to kmsg instead. We'll get the output either way.
- Stop removing libstdc++ and sanitizer libraries from Arch Linux
initrds and other images as it's required by the sanitizer libraries.
- Add a workaround for specifying extra meson options for opensuse
- Add a leak sanitizer suppression file as a workaround for a false
positive leak in verify_selinuxmnt() in libselinux. We do a soname match
because the stacktrace can't be properly symbolized on Debian.
12 files changed:
.github/workflows/mkosi.yml
mkosi.conf
mkosi.conf.d/20-sanitizers.conf [new file with mode: 0644]
mkosi.images/exitrd/mkosi.conf.d/10-arch.conf
mkosi.images/minimal-base/mkosi.conf.d/10-arch.conf
mkosi.images/system/initrd/mkosi.conf [new file with mode: 0644]
mkosi.images/system/mkosi.conf
mkosi.images/system/mkosi.conf.d/10-opensuse/mkosi.build.chroot
mkosi.images/system/mkosi.extra/usr/lib/systemd/leak-sanitizer-suppressions [new file with mode: 0644]
mkosi.images/system/mkosi.extra/usr/lib/systemd/system/iscsi-init.service.d/asan.conf [new file with mode: 0644]
mkosi.images/system/mkosi.postinst.chroot
mkosi.images/system/mkosi.sanitizers.chroot [new file with mode: 0755]