]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi/sanitizers: add more ASAN options
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 5 Dec 2024 18:42:09 +0000 (03:42 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 10 Dec 2024 02:01:53 +0000 (11:01 +0900)
This adds the following three options:
- detect_invalid_pointer_pairs=2
- handle_ioctl=1
- print_cmdline=1

Note, these options were used in the CentOS CI job.

mkosi.sanitizers/mkosi.conf
mkosi.sanitizers/mkosi.extra/usr/lib/systemd/system.conf.d/10-sanitizers.conf

index 0492716ec110c7214fcfaa9121e63b045e420986..22ae2028f2a9c0cce018a58a3d191537b2848200 100644 (file)
@@ -17,6 +17,6 @@ Environment=ASAN_OPTIONS=verify_asan_link_order=0:intercept_tls_get_addr=0
 # systemd.setenv here as there's a size limit on the kernel command line and we don't want to trigger it. We
 # don't use ManagerEnvironment= either as we want these to be set for pid1 from the earliest possible moment.
 KernelCommandLine=
-        ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1
+        ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_invalid_pointer_pairs=2:handle_ioctl=1:print_cmdline=1:disable_coredump=0:use_madv_dontdump=1
         UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
         LSAN_OPTIONS=suppressions=/usr/lib/systemd/leak-sanitizer-suppressions
index a7152a3abe47302e0aa86492eaab126955e5741b..1798226b6f8d462c9f4da00c55d525c21392483b 100644 (file)
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
 [Manager]
-DefaultEnvironment=ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1 \
-                   UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 \
-                   LSAN_OPTIONS=suppressions=/usr/lib/systemd/leak-sanitizer-suppressions
+DefaultEnvironment= \
+        ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_invalid_pointer_pairs=2:handle_ioctl=1:print_cmdline=1:disable_coredump=0:use_madv_dontdump=1 \
+        UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 \
+        LSAN_OPTIONS=suppressions=/usr/lib/systemd/leak-sanitizer-suppressions