Systemd/src/journal
Chris Morin 08f9e80b3f journal-file: handle SIGBUS on offlining thread
The thread launched in journal_file_set_offline() accesses a memory
mapped file, so it needs to handle SIGBUS. Leave SIGBUS unblocked on the
offlining thread so that it uses the same handler as the main thread.

The result of triggering SIGBUS in a thread where it's blocked is
undefined in Linux. The tested implementations were observed to cause
the default handler to run, taking down the whole journald process.

We can leave SIGBUS unblocked in multiple threads since it's handler is
thread-safe. If SIGBUS is sent to the journald process asynchronously
(i.e. with kill, sigqueue, or raise), either thread handling it will
result in the same behavior: it will install the default handler and
reraise the signal, killing the process.

Fixes: #12042
2019-03-20 13:02:04 +01:00
..
audit-type.c journal: use missing_audit.h to generate audit_type-list.txt 2018-12-07 11:48:37 +09:00
audit-type.h tree-wide: use newa() instead of alloca() wherever we can 2019-01-26 16:17:04 +01:00
audit_type-to-name.awk meson: also indent scripts with 8 spaces 2017-04-25 08:49:16 -04:00
cat.c cat: add --stderr-priority option 2019-01-08 10:37:20 +01:00
catalog.c util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
catalog.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
compress.c journal: adapt for new improved LZ4_decompress_safe_partial() 2018-10-30 11:04:51 +01:00
compress.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
fsprg.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
fsprg.h tree-wide: use '#pragma once' for header guard 2018-08-30 06:10:43 +03:00
generate-audit_type-list.sh separate flags from shebang 2017-12-25 19:48:49 +01:00
journal-authenticate.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
journal-authenticate.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal-def.h journal: drop _packed_ attribute in a few places 2019-02-04 20:32:44 +01:00
journal-file.c journal-file: handle SIGBUS on offlining thread 2019-03-20 13:02:04 +01:00
journal-file.h journal: fix sort order of header includes 2018-11-20 07:27:37 +01:00
journal-internal.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal-qrcode.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal-qrcode.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal-send.c util: split out errno related stuff 2019-03-14 13:25:51 +01:00
journal-vacuum.c util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
journal-vacuum.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal-verify.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
journal-verify.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journalctl.c journalctl: support -b all to negate effect of -b 2019-03-19 10:48:26 +01:00
journald-audit.c tree-wide: use newa() instead of alloca() wherever we can 2019-01-26 16:17:04 +01:00
journald-audit.h tree-wide: add whitespace between type and variable name 2018-12-04 09:29:54 +01:00
journald-console.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journald-console.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journald-context.c journald: periodically drop cache for all dead PIDs 2019-01-26 12:43:27 +01:00
journald-context.h core: implement per unit journal rate limiting 2018-10-18 09:56:20 +02:00
journald-gperf.gperf journal: make the compression threshold tunable 2018-03-20 14:54:07 -07:00
journald-kmsg.c journal: fix an off-by-one error in dev_kmsg_record 2018-11-16 08:45:16 +01:00
journald-kmsg.h tests: add a fuzzer for dev_kmsg_record 2018-11-16 08:44:35 +01:00
journald-native.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
journald-native.h journald: make server_process_native_message compatible with fuzz_journald_processing_function 2018-09-03 07:03:52 +00:00
journald-rate-limit.c core: implement per unit journal rate limiting 2018-10-18 09:56:20 +02:00
journald-rate-limit.h core: implement per unit journal rate limiting 2018-10-18 09:56:20 +02:00
journald-server.c journald: do not store the iovec entry for process commandline on stack 2019-01-09 23:41:53 +01:00
journald-server.h journald: periodically drop cache for all dead PIDs 2019-01-26 12:43:27 +01:00
journald-stream.c util-lib: split out env file parsing code into env-file.c 2018-12-02 13:22:29 +01:00
journald-stream.h tests: add a fuzzer for journald streams 2018-11-20 03:03:32 +01:00
journald-syslog.c tree-wide: some automatic coccinelle fixes (#10463) 2018-10-20 00:07:46 +09:00
journald-syslog.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journald-wall.c journald: drop copyright headers for Sebastian Thorarensen 2018-07-03 01:32:25 +02:00
journald-wall.h Delete duplicate lines 2019-01-12 16:02:26 +01:00
journald.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journald.conf journal: add missing option in journald.conf 2018-06-26 04:05:42 +09:00
lookup3.c tree-wide: use new macro HAS_FEATURE_ADDRESS_SANITIZER everywhere 2018-12-03 17:38:50 +01:00
lookup3.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
meson.build journal: use missing_audit.h to generate audit_type-list.txt 2018-12-07 11:48:37 +09:00
mmap-cache.c util: split out errno related stuff 2019-03-14 13:25:51 +01:00
mmap-cache.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
sd-journal.c util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
test-audit-type.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
test-catalog.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00
test-compress-benchmark.c util: split out nulstr related stuff to nulstr-util.[ch] 2019-03-14 13:25:52 +01:00
test-compress.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
test-journal-config.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-journal-enum.c tree-wide: add whitespace between type and variable name 2018-12-04 09:29:54 +01:00
test-journal-flush.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-journal-init.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-journal-interleaving.c tree-wide: use IOVEC_MAKE() at many places 2018-11-27 10:12:27 +01:00
test-journal-match.c tree-wide: add whitespace between type and variable name 2018-12-04 09:29:54 +01:00
test-journal-send.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-journal-stream.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-journal-syslog.c test-journal-syslog: initialize variable 2018-09-25 11:34:52 +02:00
test-journal-verify.c tree-wide: use IOVEC_MAKE() at many places 2018-11-27 10:12:27 +01:00
test-journal.c tree-wide: use IOVEC_MAKE() at many places 2018-11-27 10:12:27 +01:00
test-mmap-cache.c util-lib: split out all temporary file related calls into tmpfiles-util.c 2018-12-02 13:22:29 +01:00