summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #23309 from DaanDeMeyer/log-contextLuca Boccassi2023-01-2022-96/+528
|\ | | | | basic: Add log context
| * device-monitor: Add extra fields to the log context before callbackDaan De Meyer2023-01-083-0/+82
| |
| * sd-bus: Log extra fields when processing bus messageDaan De Meyer2023-01-083-0/+29
| |
| * basic: Add log contextDaan De Meyer2023-01-085-18/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for attaching extra metadata to log messages written to the journal via log.h. We keep track of a thread local log context in log.c onto which we can push extra metadata fields that should be logged. Once a field is no longer relevant, it can be popped again from the log context. On top of this, we then add macros to allow pushing extra fields onto the log context. LOG_CONTEXT_PUSH() will push the provided field onto the log context and pop the last field from the log context when the current block ends. LOG_CONTEXT_PUSH_STRV() will do the same but for all fields in the given strv. Using the macros is as simple as putting them anywhere inside a block to add a field to all following log messages logged from inside that block. void myfunction(...) { ... LOG_CONTEXT_PUSH("MYMETADATA=abc"); // Every journal message logged will now have the MYMETADATA=abc // field included. } For convenience, there's also LOG_CONTEXT_PUSHF() to allow constructing the field to be logged using printf() syntax. log_context_new()/log_context_free() can be used to attach a log context to an async operation by storing it in the associated userdata struct.
| * basic: Add strv_extend_assignment()Daan De Meyer2023-01-083-0/+30
| |
| * basic: Use statement expressions more in list.hDaan De Meyer2023-01-088-69/+65
| | | | | | | | | | Let's use statement expressions to return values instead of passing in return arguments to the LIST macros.
| * basic: Drop memory-util.h include from stdio-util.hDaan De Meyer2023-01-081-2/+1
| | | | | | | | | | | | We want to include stdio-util.h in log.h in a future commit. To avoid circular includes, we need to drop the memory-util.h include from stdio-util.h
| * basic: Make snprintf_ok() a static inline functionDaan De Meyer2023-01-081-7/+13
| | | | | | | | | | | | | | | | This allows passing pre-allocated buffers via compound initializers to snprint_ok(). If snprintf_ok() is a macro, the compound initializer block will be scoped to the macro block, if snprint_ok() is a function, the compound initializer block will be scoped to the block from which snprintf_ok() is called.
* | bootctl: add kernel-inspect to --help textGerd Hoffmann2023-01-201-0/+1
| |
* | hwdb: Add Chuwi Hi10X (N4120 version) iio matrixWaltibaba2023-01-201-0/+4
| | | | | | | | | | There is a later model version of the Chuwi Hi10X that has significantly changed components compared to the existing hwdb one. Differentiator (on Chuwi forums, in thesofproject, etc.) is the N4120 rather than the N4100 processor. The svn and pn seem to be identical, my Chuwi Hi10X matches with the old model except for the changed KIOX000A* iio sensor. With the added ACCEL_MOUNT_MATRIX, my device works on gnome and has the correct (right-up) output in monitor-sensors.
* | ukify: Downgrade required python version to 3.9Daan De Meyer2023-01-202-27/+24
| |
* | Merge pull request #26115 from yuwata/test-fix-memleak-fdleakLuca Boccassi2023-01-203-28/+17
|\ \ | | | | | | test: fix memleak and fd leak
| * | test-unit-name: fix fd leakYu Watanabe2023-01-201-1/+3
| | | | | | | | | | | | Fixes an issue reported at https://github.com/systemd/systemd/issues/22576#issuecomment-1396774385.
| * | test-ndisc: fix memleak and fd leakYu Watanabe2023-01-202-27/+14
| | | | | | | | | | | | Fixes issues reported at #22576.
* | | tree-wide: fix typoYu Watanabe2023-01-2013-15/+15
|/ /
* | Merge pull request #26105 from ↵Luca Boccassi2023-01-198-63/+38
|\ \ | | | | | | | | | | | | yuwata/network-config-parse-address-make-prefix-length-full network: make config_parse_address() assume full prefix length
| * | NEWS: mention that Address= assumes /32 or /128 prefix length if not specifiedYu Watanabe2023-01-191-0/+4
| | |
| * | in-addr-util: drop unused mode to parse prefix lengthYu Watanabe2023-01-193-46/+26
| | |
| * | network: assume prefix length is full address sizeYu Watanabe2023-01-193-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 0f707207b9fc04d45ad176930cfefc77c0068545 enables strong warning about missing prefix length in Address= setting. The change was done in v241, and was about 4 years ago. Let's drop the legacy assumption and make the parser consistent with 'ip address' command. C.f. #11307. Closes #26102.
| * | test-network: drop unused fileYu Watanabe2023-01-191-8/+0
| | |
* | | core: mount namespaces: Remove auxiliary bind mounts directory after unit ↵Michal Koutný2023-01-193-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | termination Unit that requires its own mount namespace creates a temporary directory to implement dynamic bind mounts (org.freedesktop.systemd1.Manager.BindMountUnit). However, this directory is never removed and they will accumulate for each unique unit (e.g. templated units of systemd-coredump@). Attach the auxiliary runtime directory existence to lifetime of other "runtime" only per-unit directories.
* | | Merge pull request #25977 from YHNdnzj/PropagatesStopTo-fix-restartLennart Poettering2023-01-191-27/+33
|\ \ \ | | | | | | | | core: propagate stop too if restart is issued
| * | | core: propagate stop too if restart is issuedMike Yuan2023-01-191-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The restart of a unit should also be considered as that a stop job happens, and thus gets propagated to units specified using PropagatesStopTo=. Fixes #24068
| * | | core/transaction: modernize to use cleanup attributeMike Yuan2023-01-111-5/+2
| | | |
| * | | core/transaction: avoid unneeded gotosMike Yuan2023-01-091-7/+4
| | | |
* | | | hostnamed: expose FirmwareDate as timestamp in dbusJelle van der Waa2023-01-194-8/+117
| | | | | | | | | | | | | | | | | | | | | | | | Offer the firmware date as an epoch instead of the literal DMI string. Closes #25679
* | | | Merge pull request #26103 from lnussel/bootctlLuca Boccassi2023-01-1914-7/+398
|\ \ \ \ | | | | | | | | | | bootctl: unlink and cleanup functions
| * | | | bootctl: unlink and cleanup functionsLudwig Nussel2023-01-1911-7/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unlink command removes an entry from the ESP including referenced files that are not referenced in other entries. That is useful eg to have multiple entries that use the same kernel with different options. The cleanup command removes all files that are not referenced by any entry.
| * | | | chase-symlinks: new chase_symlinks_and_unlink()Ludwig Nussel2023-01-193-0/+47
| | | | |
* | | | | mkosi: Rename the configuration files to use ".conf" as extensionDaan De Meyer2023-01-196-0/+0
| | | | |
* | | | | Fix typo in parameter nameedupont2023-01-191-1/+1
| | | | |
* | | | | bpf: disable -fstack-protector in mesonSam James2023-01-191-0/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Gentoo, we recently started making Clang behave the same way as our GCC, with -fstack-protector and some friends enabled by default. SSP doesn't make sense for BPF, so disable it explicitly. See also e.g. https://www.spinics.net/lists/netdev/msg556400.html. Bug: https://bugs.gentoo.org/890004
* | | | test: update Ubuntu CI docsFrantisek Sumsal2023-01-191-7/+5
| | | |
* | | | network: do not enter failed state when received an invalid RAYu Watanabe2023-01-191-10/+11
| |/ / |/| | | | | | | | Fixes the issue reported at https://github.com/systemd/systemd/issues/25891#issuecomment-1368509262.
* | | meson: ukify depends on GNU_EFILudwig Nussel2023-01-191-18/+18
| | | | | | | | | | | | | | | ukify is rather efi specific and the manpage is already conditional on HAVE_GNU_EFI so make the program also depend on HAVE_GNU_EFI
* | | testsuite-77: Fix race conditionDaan De Meyer2023-01-197-22/+18
| | | | | | | | | | | | | | | Use a socket unit to make sure the socket exists before we start the client that accesses it.
* | | Merge pull request #23706 from medhefgo/efi-clangLuca Boccassi2023-01-1828-322/+1091
|\ \ \ | | | | | | | | boot: Add printf functions
| * | | boot: Drop use of PrintJan Janssen2023-01-184-98/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom print helpers have been replaced with explicit checks at the call site to keep this in line with the way it is done in userspace. Any calls where the check has been ommited should not need them as the value is expected to alawys be around.
| * | | boot: Drop use of xpool_print/SPrintJan Janssen2023-01-186-44/+43
| | | |
| * | | tree-wide: Use __func__ in assertsJan Janssen2023-01-183-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | clang puts the whole function signature in __PRETTY_FUNCTION__, which is a bit excessive for something that can already be figured out by using the line number.
| * | | boot: Add log_trace debugging helperJan Janssen2023-01-181-0/+1
| | | |
| * | | boot: Introduce log_waitJan Janssen2023-01-189-16/+46
| | | | | | | | | | | | | | | | | | | | Instead of stalling for every log message as it appears we now wait for several messages at strategic locations.
| * | | boot: Use printf for error loggingJan Janssen2023-01-1818-161/+148
| | | | | | | | | | | | | | | | This also drops the _stall suffix in anticipation of the next commit.
| * | | boot: Add printf functionsJan Janssen2023-01-186-0/+748
| | | |
* | | | tpm2: add salt to pinWilliam Roberts2023-01-1811-15/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a salt to the pin and store it in the TPM2 LUKS header for future this. This adds entropy to user supplied pins and helps brute forcing the passphrase on the key residing in the TPM or brute forcing bind key encrypted sessions with low entropy passphrases. Signed-off-by: malikabhi05 <abhishek.malik@intel.com> Signed-off-by: William Roberts <william.c.roberts@intel.com>
* | | | man: note that cgroup-based sandboxing is not bypassed by '+'Luca Boccassi2023-01-184-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DeviceAllow= and others are applied to the whole cgroup via bpf, so using '+' on an Exec line will not bypass them. Explain this in the manpage. Fixes https://github.com/systemd/systemd/issues/26035
* | | | Merge pull request #25790 from joshua-zivkovic/JZ/plotjson-mainLennart Poettering2023-01-187-58/+210
|\ \ \ \ | | | | | | | | | | systemd-analyze: Add JSON and table output to systemd-analyze's plot
| * | | | systemd-analyze: Add --json=, --table and -no-legend tests for plotjoshuazivkovic2023-01-181-0/+9
| | | | |
| * | | | systemd-analyze: Add tab complete logic for plotjoshuazivkovic2023-01-182-3/+19
| | | | |
| * | | | systemd-analyze: Update man/systemd-analyze.xml with Plot JSON and tablejoshuazivkovic2023-01-181-3/+28
| | | | |