]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agomeson: Don't create static library target unless option is enabled 37395/head
Daan De Meyer [Sat, 10 May 2025 20:19:22 +0000 (22:19 +0200)] 
meson: Don't create static library target unless option is enabled

While we don't build these by default, all the source files still
get added to the compile_commands.json file by meson, which can confuse
tools as they might end up analyzing the source files twice or analyzing
the wrong one.

To avoid this issue, only define the static library target if the
corresponding option is enabled.

5 months agomeson: Remove unneeded include directories
Daan De Meyer [Fri, 9 May 2025 18:48:51 +0000 (20:48 +0200)] 
meson: Remove unneeded include directories

meson by default adds the current source and build directory as include
directories. Because we structure our meson code by gathering a giant dict
of everything we want to do and then doing all the actual target generation
in the top level meson.build, this behavior does not make sense at all because
we end up adding the top level repository directory as an include directory
which is never what we want.

At the same time, let's also make sure the top level directory of the build
directory is not an include directory, by moving the version.h generation
into the src/version subdirectory and then adding the src/version subdirectory
of the build directory as an include directory instead of the top level
repository directory.

Making this change means that language servers such as clangd can't get
confused when they automatically insert an #include line and insert
"#include "src/basic/fs-util.h" instead of "#include "fs-util.h".

5 months agomeson: Extract objects instead of creating intermediate static libraries
Daan De Meyer [Wed, 7 May 2025 20:55:15 +0000 (22:55 +0200)] 
meson: Extract objects instead of creating intermediate static libraries

Currently, when we want to add unit tests for code that is compiled into
an executable, we either compile the code at least twice (once for the
executable, and once for each test that uses it) or we create a static
library which is then used by both the executable and all the tests.

Both of these options are not ideal, compiling source files more than
once slows down the build for no reason and creating the intermediate
static libraries takes a lot of boilerplate.

Instead, let's use the extract_objects() method that meson exposes on
build targets. This allows us to extract the objects corresponding to
specific source files and use them in other executables. Because we
define all executables upfront into a dictionary, we integrate this into
the dictionary approach by adding two new fields:

- 'extract' takes a list of files for which objects should be extracted.
  The extracted objects are stored in a dict keyed by the executable name
  from which they were extracted.
- 'objects' takes the name of an executable from which the extracted
  objects should be added to the current executable.

One side effect of this approach is that we can't build test executables
anymore without building the main executable, so we stop building test
executables unless we're also building the main executable. This allows
us to switch to using subdir_done() in all of these subdirectories to skip
parsing them if the corresponding component is disabled.

These changes get me down from 2439 => 2403 ninja targets on a full rebuild
from scratch.

5 months agomeson: Stop doing nested build when fuzzers are enabled
Daan De Meyer [Sun, 11 May 2025 07:42:28 +0000 (09:42 +0200)] 
meson: Stop doing nested build when fuzzers are enabled

Currently, when fuzzers are enabled, we run meson from within meson
to build the fuzzer executables with sanitizers. The idea is that
we can build the fuzzers with different kinds of sanitizers
independently from the main build.

The issue with this setup is that we don't actually make use of it.
We only build the fuzzers with one set of sanitizers (address,undefined)
so we're adding a bunch of extra complexity without any benefit as we
can just setup the top level meson build with these sanitizers and get
the same result.

The other issue with this setup is that we don't pass on all the options
passed to the top level meson build to the nested meson build. The only things
we pass on are extra compiler arguments and the value of the auto_features
option, but none of the individual feature options if overridden are passed on,
which can lead to very hard to debug issues as an option enabled in the top
level build is not enabled in the nested build.

Since we're not getting anything useful out of this setup, let's simplify
and get rid of the nested meson build. Instead, sanitizers should be enabled
for the top level meson.build. This currently didn't work as we were overriding
the sanitizers passed to the meson build with the fuzzer sanitizer, so we
fix that as well by making sure we combine the fuzzer sanitizer with the ones
passed in by the user.

We also drop support for looking up libFuzzer as a separate library as
it has been shipped builtin in clang since clang 6.0, so we can assume
that -fsanitize=fuzzer is available.

To make sure we still run the fuzzing tests, we enable the fuzz-tests option
by default now to make sure they still always run (without instrumentation unless
one of llvm-fuzz or oss-fuzz is enabled).

5 months agoAdd netdev files associated with link to networkd JSON output (#37402)
Valentin Hăloiu [Sun, 11 May 2025 00:33:28 +0000 (01:33 +0100)] 
Add netdev files associated with link to networkd JSON output (#37402)

`networkctl status LINK` gained support for showing the netdev
configuration files associated with a link in
c9837c17d57d7e0fd9d3e2a4f2693f389ca76c24, but these netdev files were
never added to the JSON output too.

This pull-request fixes that by adding two new fields (`NetDevFile` and
`NetDevFileDropins`) to the `networkctl` (and `D-Bus`) JSON output.

5 months agotest: fix root check for test-bpf-foreign-programs
Luca Boccassi [Sat, 10 May 2025 11:31:19 +0000 (12:31 +0100)] 
test: fix root check for test-bpf-foreign-programs

This test requires root, but the check was mistakenly dropped, causing it
to fail with an assert when running without root:

src/test/test-bpf-foreign-programs.c:308: Assertion failed: expected "test_bpf_cgroup_programs(m, "single_prog.service", single_prog, ELEMENTSOF(single_prog))" to succeed, but got error: Operation not permitted

Restore the uid check

Follow-up for 22e2f0642897cfa7ba975527f5394bd7fcdf639b

5 months agomount-tool: honor arg_canonicalize for ACTION_UMOUNT path_is_absolute() check too...
Yu Watanabe [Fri, 9 May 2025 18:22:20 +0000 (03:22 +0900)] 
mount-tool: honor arg_canonicalize for ACTION_UMOUNT path_is_absolute() check too (#37398)

Split out from #36337

5 months agocore/bpf: drop old kernels support (#37151)
Yu Watanabe [Fri, 9 May 2025 18:13:42 +0000 (03:13 +0900)] 
core/bpf: drop old kernels support (#37151)

5 months agoudev: several cleanups for managing events (#37384)
Yu Watanabe [Fri, 9 May 2025 17:30:25 +0000 (02:30 +0900)] 
udev: several cleanups for managing events (#37384)

Mostly no functional changes, just refactoring.

5 months agomount-tool: honor arg_canonicalize for ACTION_UMOUNT path_is_absolute() check too 37398/head
Mike Yuan [Mon, 24 Feb 2025 17:32:58 +0000 (18:32 +0100)] 
mount-tool: honor arg_canonicalize for ACTION_UMOUNT path_is_absolute() check too

Follow-up for 4e24796b5a64064f8b21c07356eba19e9db4bb33

5 months agocore/mount: remove unused temporary variable
Mike Yuan [Sun, 6 Apr 2025 22:26:57 +0000 (00:26 +0200)] 
core/mount: remove unused temporary variable

5 months agoboot: skip shim-specific logic when running with new shim
Luca Boccassi [Wed, 7 May 2025 23:49:25 +0000 (00:49 +0100)] 
boot: skip shim-specific logic when running with new shim

Since shim 16 the plain BS->LoadImage() will just work (TM), we do not need
anymore to set up manual overrides and manually call in the shim-specific
lock protocol or to set shim-specific EFIVAR to make addons work or to load
shim-signed kernels.

Check if the new protocol added in v16 is present, and if so, skip
all that. Once versions < 16 are no longer supported/revoked, all
the code can be dropped entirely.

5 months agoudev: move error handling in event_requeue() to caller 37384/head
Yu Watanabe [Tue, 6 May 2025 17:46:11 +0000 (02:46 +0900)] 
udev: move error handling in event_requeue() to caller

Also, remove udev database on failure.

5 months agoudev: split out device_broadcast_on_error()
Yu Watanabe [Tue, 6 May 2025 17:32:56 +0000 (02:32 +0900)] 
udev: split out device_broadcast_on_error()

5 months agosd-device: rename arguments
Yu Watanabe [Tue, 6 May 2025 17:31:46 +0000 (02:31 +0900)] 
sd-device: rename arguments

To make it consistent with its declaration and other function
prototypes.

5 months agoudev: move timeout event sources from struct Event to struct Worker
Yu Watanabe [Tue, 6 May 2025 10:23:53 +0000 (19:23 +0900)] 
udev: move timeout event sources from struct Event to struct Worker

The timeout event sources are enabled only when the event is being
processed by a worker, hence they are not necessary to be owned by the
event.

No effective functional change, just refactoring.

5 months agoudev: list up all dependencies of an event when the first time it is examined
Yu Watanabe [Mon, 5 May 2025 17:25:32 +0000 (02:25 +0900)] 
udev: list up all dependencies of an event when the first time it is examined

No functional change, just refactoring.

5 months agoudev: check earlier if there is a free room for processing an event
Yu Watanabe [Mon, 5 May 2025 16:37:16 +0000 (01:37 +0900)] 
udev: check earlier if there is a free room for processing an event

5 months agoudev: cache last queued event entry
Yu Watanabe [Sat, 26 Apr 2025 06:09:12 +0000 (15:09 +0900)] 
udev: cache last queued event entry

When we have N queued events, LIST_APPEND() takes O(N).
Let's cache the last event to optimize queueing.

5 months agoudev: introduce event_freep() and use it as cleanup attribute
Yu Watanabe [Sat, 26 Apr 2025 06:37:11 +0000 (15:37 +0900)] 
udev: introduce event_freep() and use it as cleanup attribute

No functional change, just refactoring and preparation for later change.

5 months agoMore header cleanups (#37381)
Daan De Meyer [Fri, 9 May 2025 15:22:33 +0000 (17:22 +0200)] 
More header cleanups (#37381)

5 months agotest: allow to allocate test scope even running with unprivileged user 37151/head
Yu Watanabe [Wed, 16 Apr 2025 18:03:53 +0000 (03:03 +0900)] 
test: allow to allocate test scope even running with unprivileged user

5 months agocore/bpf-devices: use bpf_program_supported()
Yu Watanabe [Tue, 8 Apr 2025 08:26:58 +0000 (17:26 +0900)] 
core/bpf-devices: use bpf_program_supported()

Note, BPF_PROG_TYPE_CGROUP_DEVICE is supported since kernel v4.15.
As our baseline on the kernel is v5.4, we can assume the bpf type is
always supported.

5 months agocore/bpf-firewall: replace bpf_firewall_supported() with bpf_program_supported()
Yu Watanabe [Wed, 16 Apr 2025 17:39:08 +0000 (02:39 +0900)] 
core/bpf-firewall: replace bpf_firewall_supported() with bpf_program_supported()

Note, BPF_PROG_TYPE_CGROUP_SKB is supported since kernel v4.10, and
BPF_F_ALLOW_MULTI and program name is supported since kernel v4.15.
As our baseline on the kernel is v5.4, we can assume that the type,
flag, and naming is supported when bpf_program_supported() succeeds.

5 months agocore/cgroup: foreign bpf programs needs to pass bpf_program_supported()
Yu Watanabe [Wed, 16 Apr 2025 18:10:38 +0000 (03:10 +0900)] 
core/cgroup: foreign bpf programs needs to pass bpf_program_supported()

As CONFIG_CGROUP_BPF may be disabled on the kernel or we are running on
sanitizers. See comments in bpf_program_supported().

Follow-up for 3fcb98cbff0a5be8bf7c5deda6c1f7e8a31699bd.

5 months agobpf-program: introduce bpf_program_supported() helper function
Yu Watanabe [Wed, 16 Apr 2025 17:05:09 +0000 (02:05 +0900)] 
bpf-program: introduce bpf_program_supported() helper function

It checks if the kernel is built with CONFIG_CGROUP_BPF.
It is currently unused, but will be used later.

5 months agobpf-compat: drop unused compat_libbpf_probe_bpf_prog_type()
Yu Watanabe [Tue, 29 Apr 2025 20:20:06 +0000 (05:20 +0900)] 
bpf-compat: drop unused compat_libbpf_probe_bpf_prog_type()

5 months agocore/bpf: drop unnecessary check for probing program type
Yu Watanabe [Tue, 29 Apr 2025 20:13:26 +0000 (05:13 +0900)] 
core/bpf: drop unnecessary check for probing program type

BPF_PROG_TYPE_CGROUP_SKB is supported since kernel v4.10
(0e33661de493db325435d565a4a722120ae4cbf3) and
BPF_PROG_TYPE_CGROUP_SOCK_ADDR is supported since kernel v4.17
(4fbac77d2d092b475dda9eea66da674369665427).

Our baseline on the kernel is v5.4. The check is not necessary.

5 months agocore: replace cgroup_bpf_supported() with dlopen_bpf_full()
Yu Watanabe [Sun, 20 Apr 2025 03:14:23 +0000 (12:14 +0900)] 
core: replace cgroup_bpf_supported() with dlopen_bpf_full()

After 3988e2489aaf30034e09918890f688780c154af7, the function is a simple
wrapper of bpf_dlopen() with logging. Let's introduce dlopen_bpf_full()
that takes log level, and replace cgroup_bpf_supported() with it.

5 months agoudev: replace get_user/group_creds() with userdb/groupdb_by_name() (#37304)
Yu Watanabe [Fri, 9 May 2025 11:54:16 +0000 (20:54 +0900)] 
udev: replace get_user/group_creds() with userdb/groupdb_by_name() (#37304)

This also makes networkd not refuse User=/Group=root.

5 months agohwdb: keyboard: Add Alienware special keys
Kurt Borja [Thu, 8 May 2025 07:37:55 +0000 (04:37 -0300)] 
hwdb: keyboard: Add Alienware special keys

Add Alienware *Performance mode* toggle key and *Macro* keys.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
5 months agoAdd emulated release to G-Mode key
Marcos Alano [Thu, 8 May 2025 10:28:16 +0000 (07:28 -0300)] 
Add emulated release to G-Mode key

6 months agostrv: Move STRV_FOREACH() to strv-fundamental.h 37381/head
Daan De Meyer [Wed, 7 May 2025 19:43:39 +0000 (21:43 +0200)] 
strv: Move STRV_FOREACH() to strv-fundamental.h

6 months agoalloc-util: Remove unneeded stdlib.h include
Daan De Meyer [Tue, 6 May 2025 12:20:43 +0000 (14:20 +0200)] 
alloc-util: Remove unneeded stdlib.h include

6 months agocompress: Drop lz4 includes from compress.h
Daan De Meyer [Wed, 7 May 2025 09:43:44 +0000 (11:43 +0200)] 
compress: Drop lz4 includes from compress.h

The lz4 functions are only used in test-compress.c, so let's just
put the declarations and includes in there instead of having everyone
including compress.h pull in the lz4 headers.

6 months agoterminal-util: Move various functions to ansi-color.c
Daan De Meyer [Wed, 7 May 2025 09:26:36 +0000 (11:26 +0200)] 
terminal-util: Move various functions to ansi-color.c

6 months agobasic: Move parts of audit-util.{c,h} to libaudit-util.{c,h} in shared/
Daan De Meyer [Wed, 7 May 2025 09:15:12 +0000 (11:15 +0200)] 
basic: Move parts of audit-util.{c,h} to libaudit-util.{c,h} in shared/

6 months agomacro: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 14:03:20 +0000 (16:03 +0200)] 
macro: Reduce transitive includes

6 months agobasic: Override glibc's sys/param.h header with an empty file
Daan De Meyer [Tue, 6 May 2025 13:39:03 +0000 (15:39 +0200)] 
basic: Override glibc's sys/param.h header with an empty file

Instead of unconditionally including sys/param.h in
macro-fundamental.h which itself includes a bunch of other unnecessary
headers, let's override it with an empty file to avoid it from overriding
our MAX() macro. We can't make including it an error as it's included (
for seemingly no good reason) by <resolv.h>.

6 months agoudevadm-info: parse all arguments before doing anything (#37292)
Yu Watanabe [Fri, 9 May 2025 05:09:45 +0000 (14:09 +0900)] 
udevadm-info: parse all arguments before doing anything (#37292)

6 months agoudevadm-info: use string table to parse query type 37292/head
David Tardon [Wed, 7 May 2025 13:05:22 +0000 (15:05 +0200)] 
udevadm-info: use string table to parse query type

6 months agoudevadm-info: drop args of stat_device()
David Tardon [Fri, 25 Apr 2025 12:56:35 +0000 (14:56 +0200)] 
udevadm-info: drop args of stat_device()

They are all static vars now, so can be used directly.

6 months agoudevadm-info: shorten the code a bit
David Tardon [Fri, 25 Apr 2025 12:36:02 +0000 (14:36 +0200)] 
udevadm-info: shorten the code a bit

6 months agoudevadm-info: reject devices passed via opts too
David Tardon [Wed, 7 May 2025 12:35:54 +0000 (14:35 +0200)] 
udevadm-info: reject devices passed via opts too

Follow-up-for a6b4b2fa010f6dc5e18f1a14d93204c6c1416278

6 months agoudevadm-info: split arg. parsing into a separate function
David Tardon [Fri, 3 Nov 2023 13:56:52 +0000 (14:56 +0100)] 
udevadm-info: split arg. parsing into a separate function

6 months agoudevadm-info: drop superfluous pager_open() call
David Tardon [Fri, 25 Apr 2025 12:42:34 +0000 (14:42 +0200)] 
udevadm-info: drop superfluous pager_open() call

It's already called in advance in info_main().

6 months agoudevadm-info: make arg_pager_flags static
David Tardon [Thu, 17 Apr 2025 08:21:41 +0000 (10:21 +0200)] 
udevadm-info: make arg_pager_flags static

6 months agoudevadm-info: move static dtor closer to args
David Tardon [Thu, 17 Apr 2025 08:20:33 +0000 (10:20 +0200)] 
udevadm-info: move static dtor closer to args

6 months agoudev: use userdb_by_name()/groupdb_by_name() 37304/head
Yu Watanabe [Wed, 30 Apr 2025 11:43:44 +0000 (20:43 +0900)] 
udev: use userdb_by_name()/groupdb_by_name()

Prompted by https://github.com/systemd/systemd/pull/37294#discussion_r2068141968.

6 months agouserdb: introduce USERDB_SYNTHESIZE_NUMERIC flag
Yu Watanabe [Fri, 9 May 2025 02:18:02 +0000 (11:18 +0900)] 
userdb: introduce USERDB_SYNTHESIZE_NUMERIC flag

When the flag is set, even if the specified UID/GID does not exist,
create a synthetic user record for the UID/GID.
Currently, only system UID/GID are supported.

6 months agonetwork/tuntap: allow to specify root to User=/Group=
Yu Watanabe [Wed, 30 Apr 2025 16:30:35 +0000 (01:30 +0900)] 
network/tuntap: allow to specify root to User=/Group=

Follow-up for 940441b44c7040d62ae58b66bf124e9a0dae578d.

With the commit, User=/Group=root was refused and warned that the root
is not a system user. Typically it is not necessary to specify such, but
let's not log confusing warning and honor the setting.

6 months agouser-record: introduce USERDB_MATCH_ROOT_AND_SYSTEM
Yu Watanabe [Wed, 30 Apr 2025 14:27:59 +0000 (23:27 +0900)] 
user-record: introduce USERDB_MATCH_ROOT_AND_SYSTEM

It may be useful when we want to resolve root and system user/group
but want to refuse nobody user/group.

6 months agouserdb: introduce user/group_record_buildo() helper macros
Yu Watanabe [Wed, 30 Apr 2025 13:53:35 +0000 (22:53 +0900)] 
userdb: introduce user/group_record_buildo() helper macros

6 months agouser-util,user-record-nss: initialize buffer before calling getpwnam_r() and friends
Yu Watanabe [Thu, 1 May 2025 03:44:23 +0000 (12:44 +0900)] 
user-util,user-record-nss: initialize buffer before calling getpwnam_r() and friends

The buffer will be used by a library outside of our code base,
and may not be initialized even on success. Let's initialize
them for safety.

Hopefully fixes the following fuzzer warning:
```
==2039==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f9ad8be3ae6 in _nss_files_getsgnam_r (/lib/x86_64-linux-gnu/libnss_files.so.2+0x8ae6) (BuildId: 013bf05b4846ebbdbebdb05585acc9726c2fabce)
    #1 0x7f9ad93e5902 in getsgnam_r (/lib/x86_64-linux-gnu/libc.so.6+0x126902) (BuildId: 0323ab4806bee6f846d9ad4bccfc29afdca49a58)
    #2 0x7f9ad9b98153 in nss_sgrp_for_group /work/build/../../src/systemd/src/shared/user-record-nss.c:357:21
    #3 0x7f9ad9b98926 in nss_group_record_by_gid /work/build/../../src/systemd/src/shared/user-record-nss.c:431:21
    #4 0x7f9ad9bcebd7 in groupdb_by_gid_fallbacks /work/build/../../src/systemd/src/shared/userdb.c:1372:29

  Uninitialized value was created by a heap allocation
    #0 0x556fd5294302 in malloc /src/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1021:3
    #1 0x7f9ad9b9811d in nss_sgrp_for_group /work/build/../../src/systemd/src/shared/user-record-nss.c:353:23
    #2 0x7f9ad9b98926 in nss_group_record_by_gid /work/build/../../src/systemd/src/shared/user-record-nss.c:431:21
    #3 0x7f9ad9bcebd7 in groupdb_by_gid_fallbacks /work/build/../../src/systemd/src/shared/userdb.c:1372:29
```

6 months agoudevadm-trigger: parse all arguments before doing anything (#37293)
Yu Watanabe [Fri, 9 May 2025 03:09:18 +0000 (12:09 +0900)] 
udevadm-trigger: parse all arguments before doing anything (#37293)

6 months agoudev: enable kill workers timer when processing events stopped (#37382)
Yu Watanabe [Fri, 9 May 2025 01:42:48 +0000 (10:42 +0900)] 
udev: enable kill workers timer when processing events stopped (#37382)

This also extends test cases for
`udevadm control --start-exec-queue/--stop-exec-queue`.

6 months agoudevadm-trigger: use string table to parse scan type 37293/head
David Tardon [Wed, 7 May 2025 14:11:38 +0000 (16:11 +0200)] 
udevadm-trigger: use string table to parse scan type

6 months agoudevadm-trigger: add prefix to enumeration values
David Tardon [Tue, 29 Apr 2025 12:02:37 +0000 (14:02 +0200)] 
udevadm-trigger: add prefix to enumeration values

6 months agoudevadm-trigger: replace home-made key/value splitting function
David Tardon [Tue, 29 Apr 2025 11:57:10 +0000 (13:57 +0200)] 
udevadm-trigger: replace home-made key/value splitting function

6 months agotest: extend udevadm coverage test a bit
David Tardon [Tue, 29 Apr 2025 12:34:44 +0000 (14:34 +0200)] 
test: extend udevadm coverage test a bit

6 months agoudevadm: allow key without a value
David Tardon [Tue, 29 Apr 2025 12:29:59 +0000 (14:29 +0200)] 
udevadm: allow key without a value

6 months agoudevadm: move key/value parsing func. to udevadm-util.c
David Tardon [Tue, 29 Apr 2025 12:22:15 +0000 (14:22 +0200)] 
udevadm: move key/value parsing func. to udevadm-util.c

6 months agoudevadm-trigger: split arg. parsing into a separate function
David Tardon [Tue, 29 Apr 2025 08:36:28 +0000 (10:36 +0200)] 
udevadm-trigger: split arg. parsing into a separate function

6 months agoudevadm-trigger: add vertical space to separate cases
David Tardon [Tue, 29 Apr 2025 08:09:11 +0000 (10:09 +0200)] 
udevadm-trigger: add vertical space to separate cases

6 months agoTEST-17-UDEV: extend test cases for udevadm control --start-exec-queue/--stop-exec... 37382/head
Yu Watanabe [Wed, 7 May 2025 19:18:58 +0000 (04:18 +0900)] 
TEST-17-UDEV: extend test cases for udevadm control --start-exec-queue/--stop-exec-queue

6 months agoTEST-17-UDEV: drop needless numbering
Yu Watanabe [Wed, 7 May 2025 19:07:04 +0000 (04:07 +0900)] 
TEST-17-UDEV: drop needless numbering

The subtest was renamed from TEST-17-UDEV.10.sh.
Let's also drop the numbering from function name and interface name.

Follow-up for 40959dcc028a6884fbea00c11d89217a77716d4d.

6 months agoudev: enable kill workers timer when processing queued events stopped
Yu Watanabe [Wed, 7 May 2025 16:07:44 +0000 (01:07 +0900)] 
udev: enable kill workers timer when processing queued events stopped

It is not necessary to keep idle workers so long time in that case.

6 months agohashmap,prioq: check hash_ops or compare_func is identical to one already set (#37379)
Mike Yuan [Thu, 8 May 2025 20:50:38 +0000 (22:50 +0200)] 
hashmap,prioq: check hash_ops or compare_func is identical to one already set (#37379)

6 months agoudev-worker: send path to device node of whole disk when it is locked, and one cleanu...
Daan De Meyer [Thu, 8 May 2025 06:20:21 +0000 (08:20 +0200)] 
udev-worker: send path to device node of whole disk when it is locked, and one cleanup (#37385)

6 months agoboot: add an option to control action after SecureBoot enrollment (#36684)
Itxaka [Thu, 8 May 2025 04:28:41 +0000 (06:28 +0200)] 
boot: add an option to control action after SecureBoot enrollment (#36684)

This PR provides a new option for systemd-boot
`secure-boot-enroll-action` which allows to configure the behavior after
SecureBoot keys are enrolled.

Provides the option to either reboot or power off.

The current behavior is not changed, it will by default reboot as it did
before.

It also provides a small message about the action its going to take with
a small delay so the user can read it.

6 months agoprioq: make prioq_ensure_put() type safe 37379/head
Yu Watanabe [Wed, 7 May 2025 16:59:40 +0000 (01:59 +0900)] 
prioq: make prioq_ensure_put() type safe

6 months agoprioq: check if identical compare func is specified if already allocated
Yu Watanabe [Wed, 7 May 2025 17:01:55 +0000 (02:01 +0900)] 
prioq: check if identical compare func is specified if already allocated

6 months agohashmap: check if identical hash_ops is specified if already allocated
Yu Watanabe [Wed, 7 May 2025 17:06:28 +0000 (02:06 +0900)] 
hashmap: check if identical hash_ops is specified if already allocated

6 months agoresolve: use set_put_strdup_full() to specify hash_ops
Yu Watanabe [Wed, 7 May 2025 20:53:23 +0000 (05:53 +0900)] 
resolve: use set_put_strdup_full() to specify hash_ops

6 months agocore/unit: use the same hash_ops originally used on allocation
Yu Watanabe [Wed, 7 May 2025 19:59:37 +0000 (04:59 +0900)] 
core/unit: use the same hash_ops originally used on allocation

See unit_file_build_name_map().

6 months agoset: rename _set_ensure_allocated() -> set_ensure_allocated()
Yu Watanabe [Wed, 7 May 2025 17:10:31 +0000 (02:10 +0900)] 
set: rename _set_ensure_allocated() -> set_ensure_allocated()

Follow-ups for c09ce222b6379e8f73695e5ce53fce76a44d78c7.

6 months agonetwork: log_link_message_debug_errno() automatically append %m if necessary
Yu Watanabe [Wed, 7 May 2025 17:21:59 +0000 (02:21 +0900)] 
network: log_link_message_debug_errno() automatically append %m if necessary

Follow-up for d28746ef552b11cba8890963f49ce3e0082e6053.
Fixes CID#1609753.

6 months agoudev-worker: notify device node of whole disk to manager when the disk is locked 37385/head
Yu Watanabe [Tue, 6 May 2025 16:02:26 +0000 (01:02 +0900)] 
udev-worker: notify device node of whole disk to manager when the disk is locked

It is currently unused, but will be used later.

6 months agoudev-worker: allocate UdevEvent object just before use
Yu Watanabe [Tue, 6 May 2025 15:59:56 +0000 (00:59 +0900)] 
udev-worker: allocate UdevEvent object just before use

No functional change, just refactoring.

6 months agoman: fix typo
Yu Watanabe [Wed, 7 May 2025 18:37:35 +0000 (03:37 +0900)] 
man: fix typo

Follow-up for a50fa2a40f4a91d49503d3588a3dd29ea05e559b.

6 months agoboot: Add EDID (#36843)
Yu Watanabe [Wed, 7 May 2025 17:48:00 +0000 (02:48 +0900)] 
boot: Add EDID (#36843)

This adds a couple of custom CHIDs which include panel manufacturer and
product code.

6 months agoexec-util: make missing agents a gracefull handled issues
Lennart Poettering [Wed, 7 May 2025 15:47:01 +0000 (17:47 +0200)] 
exec-util: make missing agents a gracefull handled issues

Just downgrade the log message in case of ENOENT of agent binaries to
LOG_DEBUG. Do this in order to support distros which split off some
agent bianries into separate optional binaries.

Fixes: #37369
6 months agoflush_ports: flush POSIX message queues properly
Todd C. Miller [Tue, 6 May 2025 22:39:14 +0000 (16:39 -0600)] 
flush_ports: flush POSIX message queues properly

On Linux, read() on a message queue descriptor returns the message
queue statistics, not the actual message queue data.  We need to use
mq_receive() to drain the queues instead.

Fixes a problem where a POSIX message queue socket unit with messages
in the queue at shutdown time could result in a hang on reboot/shutdown.

6 months agounits: enable IgnoreOnIsolate=yes on systemd-udevd-kernel.socket
Yu Watanabe [Wed, 7 May 2025 12:44:22 +0000 (21:44 +0900)] 
units: enable IgnoreOnIsolate=yes on systemd-udevd-kernel.socket

Otherwise, initrd-cleanup.service requests isolation thus the socket
is stopped before switching root, and several early events after
switching root may be lost.

6 months agoanalyze-chid: Support EDID CHIDs 36843/head
anonymix007 [Mon, 31 Mar 2025 17:41:15 +0000 (20:41 +0300)] 
analyze-chid: Support EDID CHIDs

6 months agosd-device: Introduce sd_device_get_sysattr_value_with_size()
anonymix007 [Tue, 1 Apr 2025 14:40:29 +0000 (17:40 +0300)] 
sd-device: Introduce sd_device_get_sysattr_value_with_size()

6 months agochid: Setup EDID CHIDs
anonymix007 [Mon, 24 Mar 2025 13:53:49 +0000 (16:53 +0300)] 
chid: Setup EDID CHIDs

6 months agochid-fundamental: Introduce new CHID types
anonymix007 [Mon, 24 Mar 2025 13:43:12 +0000 (16:43 +0300)] 
chid-fundamental: Introduce new CHID types

These are extra types needed to distinguish devices by the installed
display panel

6 months agoboot: Add EDID parsing
anonymix007 [Mon, 31 Mar 2025 17:56:58 +0000 (20:56 +0300)] 
boot: Add EDID parsing

Will be used for identifying the currently used display panel
and choosing the appropriate DTB

6 months agofundamental: Introduce EDID header parsing
anonymix007 [Mon, 31 Mar 2025 17:38:24 +0000 (20:38 +0300)] 
fundamental: Introduce EDID header parsing

6 months agoboot: Add be16toh, le16toh and le32toh
anonymix007 [Mon, 31 Mar 2025 17:37:13 +0000 (20:37 +0300)] 
boot: Add be16toh, le16toh and le32toh

6 months agofundamental: Move common string constants from basic/string-util.h to string-util...
anonymix007 [Wed, 7 May 2025 15:01:07 +0000 (18:01 +0300)] 
fundamental: Move common string constants from basic/string-util.h to string-util-fundamental.h

6 months agoReduce the number of transitive includes (#37364)
Yu Watanabe [Wed, 7 May 2025 13:58:09 +0000 (22:58 +0900)] 
Reduce the number of transitive includes (#37364)

6 months agostatic-destruct: Reduce transitive includes 37364/head
Daan De Meyer [Mon, 5 May 2025 12:28:08 +0000 (14:28 +0200)] 
static-destruct: Reduce transitive includes

6 months agoiovec-util: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 12:15:47 +0000 (14:15 +0200)] 
iovec-util: Reduce transitive includes

6 months agorm-rf: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 12:13:11 +0000 (14:13 +0200)] 
rm-rf: Reduce transitive includes

6 months agoconf-parser: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 12:09:05 +0000 (14:09 +0200)] 
conf-parser: Reduce transitive includes

6 months agodevice-util: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 11:32:55 +0000 (13:32 +0200)] 
device-util: Reduce transitive includes

6 months agostrv: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 11:27:39 +0000 (13:27 +0200)] 
strv: Reduce transitive includes

6 months agopath-util: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 10:18:39 +0000 (12:18 +0200)] 
path-util: Reduce transitive includes