]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 months agotree-wide: Mark linux and sys includes as system includes 37112/head
Daan De Meyer [Sat, 12 Apr 2025 17:36:48 +0000 (19:36 +0200)] 
tree-wide: Mark linux and sys includes as system includes

Even though these are in our tree, we should still treat them as
system includes which helps various tools (clangd, iwyu, ...) understand
that these are system includes and <> should be used instead of "".

6 months agotree-wide: Remove references to src/shared/linux
Daan De Meyer [Thu, 17 Apr 2025 19:19:12 +0000 (21:19 +0200)] 
tree-wide: Remove references to src/shared/linux

This directory doesn't exist anymore.

6 months agobasic: Remove circular dependency between process-util.h and pidref.h
Daan De Meyer [Sat, 12 Apr 2025 17:45:49 +0000 (19:45 +0200)] 
basic: Remove circular dependency between process-util.h and pidref.h

6 months agobasic: Remove circular dep between alloc-util.h and memory-util.h
Daan De Meyer [Sat, 12 Apr 2025 14:59:43 +0000 (16:59 +0200)] 
basic: Remove circular dep between alloc-util.h and memory-util.h

6 months agobasic: Move macro.h include in list.h to the top of the file
Daan De Meyer [Sat, 12 Apr 2025 14:50:36 +0000 (16:50 +0200)] 
basic: Move macro.h include in list.h to the top of the file

Now that the circular dependency between log.h, macro.h and list.h
is gone, we can move the include to the top.

6 months agobasic: Stop including log.h in macro.h
Daan De Meyer [Sat, 12 Apr 2025 14:47:29 +0000 (16:47 +0200)] 
basic: Stop including log.h in macro.h

Now that the necessary functions from log.h have been moved to macro.h,
we can stop including log.h in macro.h. This requires modifying source
files all over the tree to include log.h instead.

6 months agofundamental: Always use _Static_assert for assert_cc()
Daan De Meyer [Fri, 18 Apr 2025 09:50:18 +0000 (11:50 +0200)] 
fundamental: Always use _Static_assert for assert_cc()

Let's get rid of the assert.h include in macro-fundamental.h by always
using the builtin. Behavior is unchanged.

6 months agobasic: Move assertion specific functions to assert-util.h
Daan De Meyer [Sat, 12 Apr 2025 12:14:04 +0000 (14:14 +0200)] 
basic: Move assertion specific functions to assert-util.h

Various functions in log.h are only used by asserts, and there's
enough assertion related stuff in macro.h to justify a separate header
which also makes it easier to avoid circular dependencies.

Let's introduce assert-util.h and an accompanying fundamental header
and move all the assertion related stuff over there. PROJECT_FILE is
moved over to macro.h.

6 months agofundamental: Move alignment logic to memory-util-fundamental.h
Daan De Meyer [Fri, 18 Apr 2025 09:26:43 +0000 (11:26 +0200)] 
fundamental: Move alignment logic to memory-util-fundamental.h

Aligning is closely related to memory management, so let's move these
macros and functions to memory-util-fundamental.h. This will allow us
to move assertion related logic out of macro-fundamental.h as well in
a later commit.

6 months agomacro: Move definition of dummy_t to macro-fundamental.h
Daan De Meyer [Sat, 12 Apr 2025 12:04:19 +0000 (14:04 +0200)] 
macro: Move definition of dummy_t to macro-fundamental.h

There is code in macro-fundamental.h that makes use of dummy_t so
let's make sure to declare dummy_t in macro-fundamental.h as well.

6 months agobasic: Remove stdio-util.h include from log.h
Daan De Meyer [Sat, 12 Apr 2025 09:28:27 +0000 (11:28 +0200)] 
basic: Remove stdio-util.h include from log.h

6 months agobasic: Remove list.h include from log.h
Daan De Meyer [Sat, 12 Apr 2025 09:22:52 +0000 (11:22 +0200)] 
basic: Remove list.h include from log.h

6 months agobasic: Move trivial cleanup/ref/unref macros from macro.h to memory-util.h
Daan De Meyer [Fri, 18 Apr 2025 09:01:10 +0000 (11:01 +0200)] 
basic: Move trivial cleanup/ref/unref macros from macro.h to memory-util.h

Let's keep macro.h for the extremely generic macros that don't fit anywhere
else. Since CLEANUP_ARRAY() is already in memory-util-fundamental.h, we can
make a good case for moving the other cleanup macros in there as well.

6 months agobasic: Move log context functions to log-context.h
Daan De Meyer [Fri, 18 Apr 2025 08:47:23 +0000 (10:47 +0200)] 
basic: Move log context functions to log-context.h

6 months agobasic: Move ratelimit logging functions to ratelimit.h
Daan De Meyer [Sat, 12 Apr 2025 09:16:49 +0000 (11:16 +0200)] 
basic: Move ratelimit logging functions to ratelimit.h

The ratelimit logging functions are only useful in a few scenarios
so let's move them to ratelimit.h instead of keeping them in the
generic log.h

6 months agomeson: build tests for nspawn even -Dnspawn= is disabled
Yu Watanabe [Wed, 16 Apr 2025 14:43:33 +0000 (23:43 +0900)] 
meson: build tests for nspawn even -Dnspawn= is disabled

Follow-up for d95818f5221d9b9b19648cffa0cb2407f023b27e.
Fixes #36880.

6 months agoudev: several follow-ups for recent change about listening fds (#37162)
Zbigniew Jędrzejewski-Szmek [Fri, 18 Apr 2025 06:48:08 +0000 (08:48 +0200)] 
udev: several follow-ups for recent change about listening fds (#37162)

6 months agoNEWS: mention integration-tests meson option is deprecated
Yu Watanabe [Fri, 18 Apr 2025 00:35:54 +0000 (09:35 +0900)] 
NEWS: mention integration-tests meson option is deprecated

Follow-up for 710653d3bcc46d6c45d8771e0a74c8d5f6328bc4.

6 months agodaemon-util: remove existing fds with the same name from fdstore 37162/head
Yu Watanabe [Fri, 18 Apr 2025 00:00:35 +0000 (09:00 +0900)] 
daemon-util: remove existing fds with the same name from fdstore

Currently, all use cases of notify_push_fd()/notify_push_fdf()
assume that the name of each fd in the fdstore is unique.
For safety, let's remove the existing fds before pushing a new one
to avoid multiple fds with the same name stored in the fdstore.

6 months agoudev: re-add unintentionally dropped error log
Yu Watanabe [Wed, 16 Apr 2025 19:12:27 +0000 (04:12 +0900)] 
udev: re-add unintentionally dropped error log

Follow-up for 9b6bf4e10e7464784609989c77b6a6fb1d38066e.

6 months agorules: Make ADB and fastboot work out-of-the-box
LuK1337 [Tue, 1 Apr 2025 20:23:06 +0000 (22:23 +0200)] 
rules: Make ADB and fastboot work out-of-the-box

https://android.googlesource.com/platform/packages/modules/adb/+/d0db47dcdf941673f405e1095e6ffb5e565902e5/adb.h#199
https://android.googlesource.com/platform/system/core/+/7199051aaf0ddfa2849650933119307327d8669c/fastboot/fastboot.cpp#244

6 months agoshutdown: handle gracefully if a device disappears while we detach it
Lennart Poettering [Thu, 17 Apr 2025 12:39:34 +0000 (14:39 +0200)] 
shutdown: handle gracefully if a device disappears while we detach it

Let's gracefully handle cases where a device disappears in the time we
between our discovery and when we want to detach it, due to "auto-clear"
or a similar logic.

The loopback case already handled this quite OK, do the same for MD and
swap too.

Switch to ERRNO_IS_DEVICE_ABSENT() for all checks, just in case.

Also improve debug logging for all these cases, so we know exactly what
is going on.

This is inspired by #37160, but shouldn't really fix anything there, I
am pretty sure the ENODEV seen in that output stems from the STOP_ARRAY
call, not from the open().

Note that this does not change anything for the device mapper case,
because the DM subsystem does not return useful error codes to
userspace, hence everything is a complete mess there.

6 months agonetwork/manager: hash_ops related cleanups (#37121)
Yu Watanabe [Thu, 17 Apr 2025 21:00:15 +0000 (06:00 +0900)] 
network/manager: hash_ops related cleanups (#37121)

6 months agonetwork/network: hash_ops related cleanups (#37120)
Yu Watanabe [Thu, 17 Apr 2025 20:59:47 +0000 (05:59 +0900)] 
network/network: hash_ops related cleanups (#37120)

6 months agomisc: hash_ops related cleanups (#37117)
Yu Watanabe [Thu, 17 Apr 2025 20:59:15 +0000 (05:59 +0900)] 
misc: hash_ops related cleanups (#37117)

6 months agolibudev: several trivial cleanups (#37106)
Yu Watanabe [Thu, 17 Apr 2025 20:58:41 +0000 (05:58 +0900)] 
libudev: several trivial cleanups (#37106)

6 months agomissing_fcntl: Introduce O_ACCMODE_STRICT
Stefan Hansson [Sun, 13 Apr 2025 18:35:49 +0000 (20:35 +0200)] 
missing_fcntl: Introduce O_ACCMODE_STRICT

On musl, O_ACCMODE is defined as (03|O_SEARCH), unlike glibc which
defines it as (O_RDONLY|O_WRONLY|O_RDWR). Additionally, O_SEARCH is
simply defined as O_PATH.

This causes problems for systemd on musl, as it changes the
behaviour of open_mkdir_at_full() to return -EINVAL if O_PATH is
included in flags due to the fact that O_ACCMODE includes O_SEARCH
(i.e. O_PATH). Consequently, this makes the test-fs-util test fail.

Upstream musl seems content with this behaviour and doesn't seem
interested in matching glibc's behaviour due to that defining it this
way allows for O_SEARCH to match POSIX better by allowing it to open
directories where read permission is missing. Apparently musl does some
emulation in other places to make this work more consistently as well.

Initially I took the approach of working around this by redefining
O_SEARCH as O_RDONLY if O_SEARCH == O_PATH. This fixes the test and is
the approach taken by both XZ[1] and Gzip[2][3], but was not taken as
redefining system headers potentially could be problematic.

Instead, introduce O_ACCMODE_STRICT which just is a copy of glibc's
O_ACCMODE and use it everywhere. This way we don't have to deal with
unusual definitions of O_ACCMODE from C standard libraries other than
glibc.

 [1]: https://git.tukaani.org/?p=xz.git;a=blob;f=src/xz/file_io.c;h=8c83269b13fa31284f7ea5f3627a1dfbce7d6e14;hb=HEAD#l72
 [2]: https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/fcntl.in.h
      (lines 380 and 396, commit d7f551b30f3f2a0fa57c1b10c12f4eea41a9b89e)
 [3]: https://lists.gnu.org/archive/html/bug-gzip/2025-01/msg00000.html

6 months agotest: Use meson add_test_setup() instead of environment variables
Daan De Meyer [Thu, 17 Apr 2025 11:29:16 +0000 (13:29 +0200)] 
test: Use meson add_test_setup() instead of environment variables

We add a default test setup that excludes the integration-tests suite
so that the integration tests don't run by default. This allows us to
get rid of $SYSTEMD_INTEGRATION_TESTS. Then, we add two extra setups:
'integration' and 'shell'. The 'integration' setup does not exclude the
integration-tests suite, and so can be used to run the integration tests.
The 'shell' setup does the same, but additionally sets $TEST_SHELL=1,
allowing to get rid of $TEST_SHELL in the docs.

6 months agomkosi: update mkosi commit reference to dbb4020beee2cdf250f93a425794f1cf8b0fe693
Daan De Meyer [Thu, 17 Apr 2025 14:02:47 +0000 (16:02 +0200)] 
mkosi: update mkosi commit reference to dbb4020beee2cdf250f93a425794f1cf8b0fe693

dbb4020bee mkosi: Use tools tree by default in repository config
a2407a305c dnf: Stop messing around with plugins
eee382ebc6 Fix mkosi help
8d4f9969bb mkosi-obs: simplify generation of signed UEFI auth files
*   364dfc65eb Merge pull request #3661 from septatrix/ssh-runtime
|\
| * ab3b52841c Improve Ssh= documentation
| * 79878d7e6c Add new Ssh=auto and Ssh=runtime options
*   49036322c2 Merge pull request #3682 from DaanDeMeyer/history
|\
| * 96e512fe6e installer: Make sure package manager state is preserved in the image
| * b859a7cf0a Only copy repository metadata from specific subdirs from /var
| * c8bf8e4278 Rename cache_subdirs() to package_subdirs()
* |   54b59c4a2e Merge pull request #3696 from DaanDeMeyer/history-cli
|\ \
| * | 898d89e887 Rework version bumping
| * | cc45fe3bad Only write CLI arguments to history instead of full config
| * | 1def443097 Disallow using --rerun-build-scripts with --force again
| * | 87b03ee264 Rename get_configdir() to finalize_configdir()
| * | 9c1217a217 Get rid of to_json() methods on Args and Config
| |/
* | 124f551e77 mkosi-obs: do not publish roothash
* | fc86100e51 mkosi-obs: append certs from mkosi.uefi.db/ to 'db'
* | 8bee4cb8e2 Make sure sync scripts are executable
|/
a7e90514fa Simplify tools tree out of date error
f9956daba7 Fail if --rerun-build-scripts is used and tools is out of date
d94bf56ae8 mkosi-initrd: add specific configuration for plymouth in Debian
8235ddbc5b Take shared lock in copy_ephemeral()
19c74d5ba5 Two follow ups for #3678
*   0d6f15e8c3 Merge pull request #3678 from DaanDeMeyer/history
|\
| * 5410c4c7af tests: Require genkey to be run once upfront
| * 86b8c611a1 tests: Drop unused tools field
| * c3d1bd0dde Rework history <=> sandbox integration
fce4db970f zypper: display debugging output if ARG_DEBUG is set
2c052b9d45 Allow PCR signing settings to be overridden in sub-images
00c220225b zypper: do not fail if a package configured to be removed is not found

6 months agoRevert "mkosi: temporarily disable panic_on_warn"
Luca Boccassi [Fri, 4 Apr 2025 12:48:31 +0000 (13:48 +0100)] 
Revert "mkosi: temporarily disable panic_on_warn"

The BRTFS issue that caused a spurious WARN has been fixed and
backported to Noble, so we can enable panic_on_warm again.

This reverts commit 930d65ccca8193a8cb635099c55852b677f5d58a.

6 months agonetlink-socket: extend comments a bit
Lennart Poettering [Thu, 17 Apr 2025 06:19:43 +0000 (08:19 +0200)] 
netlink-socket: extend comments a bit

Follow-up for 90755dac69dfb0c64e0e042aef0257c5dedb06c4.

6 months agomkosi: Rename mkosi.prepare scripts for systemd deps to systemd.prepare
Daan De Meyer [Thu, 17 Apr 2025 10:40:17 +0000 (12:40 +0200)] 
mkosi: Rename mkosi.prepare scripts for systemd deps to systemd.prepare

These scripts are reused by multiple images, so let's give them a
non-standard name to indicate that. Otherwise it's all too easy to add
something to mkosi.prepare for the main image and accidentally have it
included in all the subimages as well even though that's not desired.

6 months agosd-netlink: don't fail on netlink message truncation if we pass a zero sized buffer...
Zbigniew Jędrzejewski-Szmek [Thu, 17 Apr 2025 11:11:13 +0000 (13:11 +0200)] 
sd-netlink: don't fail on netlink message truncation if we pass a zero sized buffer (#37165)

Alternative to #37163

6 months agonetlink-socket: ignore ECHRNG/EXFULL errors from recvmsg_safe() if we expect truncation 37165/head
Lennart Poettering [Thu, 17 Apr 2025 06:19:43 +0000 (08:19 +0200)] 
netlink-socket: ignore ECHRNG/EXFULL errors from recvmsg_safe() if we expect truncation

When we receive a netlink messages from userspace we need to drop it
from the queue. Hence we need call recvmsg() on the socket for it. We do
this with a zero-size socket read() buffer, so that the message would be
truncated when copied to userspace, and we do not have to allocate any
memory for it, but it's still dropped.

This was broken in ad501930d749e00f9686d29692b3142c36914f31, which
turned datagram truncation into an error (rightfully so I think – for
the common case). That broke this code here, because here we *expect*
truncation, and need to handle it gracefully.

Hence simply check for the two error codes for truncated payload or
cdata, and eat it up.

6 months agoRevert "sd-netlink: prepare buffer for dropping unexpected message"
Lennart Poettering [Thu, 17 Apr 2025 06:15:11 +0000 (08:15 +0200)] 
Revert "sd-netlink: prepare buffer for dropping unexpected message"

This reverts commit bf478dcffbc3c568fb3a3c8e8b93b3e7b66f4228.

I think we should avoid allocating memory needlessly just to free it
again, in particular if this can be triggered by some rogue peer.

6 months agosd-netlink: prepare buffer for dropping unexpected message
Yu Watanabe [Wed, 16 Apr 2025 19:47:49 +0000 (04:47 +0900)] 
sd-netlink: prepare buffer for dropping unexpected message

Follow-up for c7460cce79fd358f2745bd390bd2e7ded450ee62 (v219).

Fixes #35654.

6 months agonetwork: fix handling of routing policy rule fwmask
Beniamino Galvani [Tue, 15 Apr 2025 20:13:11 +0000 (22:13 +0200)] 
network: fix handling of routing policy rule fwmask

The firewall mask should be applied even if the mark is 0, to allow defining a
value of e.g. 0/255.

Fixes #36973

6 months agoresolve: query the parent zone for DS records
MaxHearnden [Tue, 15 Apr 2025 00:16:48 +0000 (01:16 +0100)] 
resolve: query the parent zone for DS records

RFC 4035 Section 4.2 requires that missing DS records are queried for in
the parent zone rather than the child zone, the old behaviour could
cause subdomains under home.arpa (RFC 8375) to fail validation.

This commit assumes that QDCOUNT = 1 as per RFC 9619

Fixes https://github.com/systemd/systemd/issues/19496

6 months agonetwork/netdev: hash_ops related cleanups (#37119)
Yu Watanabe [Wed, 16 Apr 2025 18:22:36 +0000 (03:22 +0900)] 
network/netdev: hash_ops related cleanups (#37119)

6 months agonetwork/macsec: use hash_ops with destructor 37119/head
Yu Watanabe [Sat, 12 Apr 2025 17:20:24 +0000 (02:20 +0900)] 
network/macsec: use hash_ops with destructor

6 months agonetwork/macsec: replace security_association_init() with structured initializer
Yu Watanabe [Sat, 12 Apr 2025 17:18:50 +0000 (02:18 +0900)] 
network/macsec: replace security_association_init() with structured initializer

6 months agonetwork/wireguard: use hash_ops with destructor for managing WireguardPeer
Yu Watanabe [Sat, 12 Apr 2025 16:46:27 +0000 (01:46 +0900)] 
network/wireguard: use hash_ops with destructor for managing WireguardPeer

6 months agonetwork/l2tp: use hash_ops with destructor for managing sessions
Yu Watanabe [Sat, 12 Apr 2025 16:42:59 +0000 (01:42 +0900)] 
network/l2tp: use hash_ops with destructor for managing sessions

6 months agomkosi: Two improvements (#37155)
Daan De Meyer [Wed, 16 Apr 2025 13:12:15 +0000 (15:12 +0200)] 
mkosi: Two improvements (#37155)

6 months agomkosi: Reuse main image prepare scripts in subimages 37155/head
Daan De Meyer [Wed, 16 Apr 2025 12:04:33 +0000 (14:04 +0200)] 
mkosi: Reuse main image prepare scripts in subimages

In the subimages we also want to make sure all dependencies of the
systemd packages are cached so reuse the same prepare scripts from
the main image to do that.

We only want required dependencies in the subimages, not recommended
or suggested dependendencies, so add an environment variable
$SYSTEMD_REQUIRED_DEPS_ONLY which the prepare scripts can check for
and enable it for the subimages.

6 months agomkosi: Make sure coreutils is installed in initrd/exitrd
Daan De Meyer [Wed, 16 Apr 2025 12:20:41 +0000 (14:20 +0200)] 
mkosi: Make sure coreutils is installed in initrd/exitrd

This is already installed but Fedora/CentOS systems are nudged towards
installing coreutils-single which then later causes issues when we try
to install coreutils as a dependency of systemd so let's make sure we
pick coreutils from the beginning.

6 months agobootctl: replace --no-variables by --variables=BOOL
Lennart Poettering [Tue, 15 Apr 2025 15:20:07 +0000 (17:20 +0200)] 
bootctl: replace --no-variables by --variables=BOOL

I think the current behaviour of not doing EFI variables when we are run
in a container makes a ton of sense, but in some cases it's useful to
do EFI var setup even when a set of namespaces is set up for us, for
example to recover a hosed installation from a rescue disk.

While we are at it, let's remove some duplicate checks, and
systematically output information why we skip various operations.

Fixes: #36174 #35005
6 months agoelf2efi: Add back python 3.7 compat
Daan De Meyer [Wed, 16 Apr 2025 10:00:06 +0000 (12:00 +0200)] 
elf2efi: Add back python 3.7 compat

The walrus operator was introduced in python 3.9 so using it
accidentally bumped the minimum python version to 3.9 from 3.7 and
bluca still cares about keeping this working on 3.8 so let's remove
the usage of the walrus operator.

Follow up for d6a29eee2be6ec8ef1473b8097f6d0a2b9e09f4b

6 months agouse hashmap_dump_sorted() and friends at more several places (#37150)
Yu Watanabe [Wed, 16 Apr 2025 10:20:19 +0000 (19:20 +0900)] 
use hashmap_dump_sorted() and friends at more several places (#37150)

6 months agoupdate TODO
Lennart Poettering [Wed, 16 Apr 2025 08:48:31 +0000 (10:48 +0200)] 
update TODO

6 months agodocs: fix mkosi section for Environment= setting
Yu Watanabe [Tue, 15 Apr 2025 23:30:25 +0000 (08:30 +0900)] 
docs: fix mkosi section for Environment= setting

6 months agoconf-files: use hashmap_dump_sorted() at one more place 37150/head
Yu Watanabe [Tue, 15 Apr 2025 20:49:24 +0000 (05:49 +0900)] 
conf-files: use hashmap_dump_sorted() at one more place

6 months agoresolve: use set_dump_sorted() at one more place
Yu Watanabe [Tue, 15 Apr 2025 20:38:13 +0000 (05:38 +0900)] 
resolve: use set_dump_sorted() at one more place

6 months agoresolve: fix memleak
Yu Watanabe [Tue, 15 Apr 2025 20:28:22 +0000 (05:28 +0900)] 
resolve: fix memleak

Follow-up for 5c274555c3f6d5e188cb7e3e0adafa9ae55d5f49.

6 months agoxattr: fix assert that breaks importctl (#37146)
Luca Boccassi [Tue, 15 Apr 2025 21:44:24 +0000 (22:44 +0100)] 
xattr: fix assert that breaks importctl (#37146)

getxattr_at_malloc() calls getxattr_pinned_internal() with size 0 to get
the size of the xattr, and then asserts because n > 0
```
Assertion '(size_t) n <= size' failed at src/basic/xattr-util.c:107, function getxattr_pinned_internal().
```

Follow-up for b8df25dcfe674e37ceb3d54e00a31e1d33e96057

6 months agocore: remove cgroup v1 properties (#37026)
Yu Watanabe [Tue, 15 Apr 2025 21:22:46 +0000 (06:22 +0900)] 
core: remove cgroup v1 properties (#37026)

6 months agocgroup-setup: use path_join() to get path to cgroup attribute 37026/head
Yu Watanabe [Mon, 14 Apr 2025 21:12:05 +0000 (06:12 +0900)] 
cgroup-setup: use path_join() to get path to cgroup attribute

We already have the path to the cgroup. Hence, it is not necessary to
call cg_get_path() again.

6 months agocgroup-setup: drop unnecessary controller argument
Yu Watanabe [Sun, 6 Apr 2025 19:25:32 +0000 (04:25 +0900)] 
cgroup-setup: drop unnecessary controller argument

This also removes unnecessary cg_{create,attach,trim}_everywhere(),
and rename cg_enable_everywhere() -> cg_enable().

6 months agocgroup-setup: drop cgroup v1 support
Yu Watanabe [Sun, 6 Apr 2025 18:47:16 +0000 (03:47 +0900)] 
cgroup-setup: drop cgroup v1 support

6 months agocore: drop several more cgroup version check
Yu Watanabe [Tue, 15 Apr 2025 18:39:24 +0000 (03:39 +0900)] 
core: drop several more cgroup version check

6 months agocore/bpf-foreign: drop unnecessary check for cgroup v1
Yu Watanabe [Tue, 8 Apr 2025 08:37:11 +0000 (17:37 +0900)] 
core/bpf-foreign: drop unnecessary check for cgroup v1

6 months agocore/bpf-devices: drop cgroup v1 support
Yu Watanabe [Sun, 6 Apr 2025 19:43:36 +0000 (04:43 +0900)] 
core/bpf-devices: drop cgroup v1 support

6 months agocore/cgroup: drop cgroup v1 specific code in unit_update_cgroup()
Yu Watanabe [Tue, 15 Apr 2025 18:29:55 +0000 (03:29 +0900)] 
core/cgroup: drop cgroup v1 specific code in unit_update_cgroup()

6 months agocore/cgroup: drop unnecessary cgroup version check in several getters
Yu Watanabe [Sun, 6 Apr 2025 18:16:53 +0000 (03:16 +0900)] 
core/cgroup: drop unnecessary cgroup version check in several getters

After 2b61489e5a53eb2611e1e573519c209ca07de98e, these checks are not
necessary anymore.

6 months agocore/cgroup: drop unnecessary _unified_ modifier from function names
Yu Watanabe [Tue, 8 Apr 2025 08:16:56 +0000 (17:16 +0900)] 
core/cgroup: drop unnecessary _unified_ modifier from function names

6 months agocore/cgroup: remove logic of CGroup v1 attribute assignment
Yu Watanabe [Tue, 15 Apr 2025 18:19:16 +0000 (03:19 +0900)] 
core/cgroup: remove logic of CGroup v1 attribute assignment

6 months agocore/cgroup: remove unused legacy parameters in CGroupContext
Yu Watanabe [Sun, 6 Apr 2025 07:53:19 +0000 (16:53 +0900)] 
core/cgroup: remove unused legacy parameters in CGroupContext

6 months agocore/cgroup: remove CGroup v1 settings in dump message
Yu Watanabe [Sun, 6 Apr 2025 01:02:19 +0000 (10:02 +0900)] 
core/cgroup: remove CGroup v1 settings in dump message

6 months agobus-unit-util: refuse setting CGroup v1 properties through DBus
Yu Watanabe [Sun, 6 Apr 2025 02:08:10 +0000 (11:08 +0900)] 
bus-unit-util: refuse setting CGroup v1 properties through DBus

6 months agocore: deprecate CGroup v1 DBus properties
Yu Watanabe [Sun, 6 Apr 2025 01:22:12 +0000 (10:22 +0900)] 
core: deprecate CGroup v1 DBus properties

6 months agocore: remove deprecated CGroup v1 settings
Yu Watanabe [Sun, 6 Apr 2025 00:44:41 +0000 (09:44 +0900)] 
core: remove deprecated CGroup v1 settings

6 months agotest: replace deprecated CGroup v1 settings with v2 ones
Yu Watanabe [Sun, 6 Apr 2025 06:27:25 +0000 (15:27 +0900)] 
test: replace deprecated CGroup v1 settings with v2 ones

6 months agojournal: hash_ops related cleanups (#37115)
Yu Watanabe [Tue, 15 Apr 2025 13:32:15 +0000 (22:32 +0900)] 
journal: hash_ops related cleanups (#37115)

6 months agoresolve: hash_ops related cleanups (#37116)
Yu Watanabe [Tue, 15 Apr 2025 13:31:57 +0000 (22:31 +0900)] 
resolve: hash_ops related cleanups (#37116)

6 months agonetwork-tools: hash_ops related cleanups (#37118)
Yu Watanabe [Tue, 15 Apr 2025 13:31:40 +0000 (22:31 +0900)] 
network-tools: hash_ops related cleanups (#37118)

6 months agojournal: drop old kernels support (#37137)
Yu Watanabe [Tue, 15 Apr 2025 13:30:51 +0000 (22:30 +0900)] 
journal: drop old kernels support (#37137)

This drops several codes for supporting old kernels.
Also, this cleanups code a bit.

6 months agoimport/export: add support for zstd
Luca Boccassi [Mon, 14 Apr 2025 23:03:45 +0000 (00:03 +0100)] 
import/export: add support for zstd

6 months agojournal/kmsg: drop old kernels (<3.6) support 37137/head
Yu Watanabe [Mon, 14 Apr 2025 20:09:28 +0000 (05:09 +0900)] 
journal/kmsg: drop old kernels (<3.6) support

The flags field was added by kernel v3.6:
https://github.com/torvalds/linux/commit/d39f3d77c9b1fe7cc33a14beb4a4849af0a4ac22

Now our baseline on the kernel is v5.4, so we can assume there exists
the flags field after the monotonic timestamp.

This also adds several short comments.

6 months agojournal/kmsg: modernize server_open_dev_kmsg()
Yu Watanabe [Mon, 14 Apr 2025 19:46:58 +0000 (04:46 +0900)] 
journal/kmsg: modernize server_open_dev_kmsg()

Let's assign fd and event source only on success.

6 months agojournal/kmsg: drop Server.dev_kmsg_readable flag and use Server.read_kmsg
Yu Watanabe [Mon, 14 Apr 2025 20:57:14 +0000 (05:57 +0900)] 
journal/kmsg: drop Server.dev_kmsg_readable flag and use Server.read_kmsg

When /dev/kmsg is opened, the two flags have the same value.

This also adds an assertion in server_read_dev_kmsg().

6 months agojournal/kmsg: drop support old kernels (<3.5) without reading /dev/kmsg support
Yu Watanabe [Mon, 14 Apr 2025 19:34:40 +0000 (04:34 +0900)] 
journal/kmsg: drop support old kernels (<3.5) without reading /dev/kmsg support

/dev/kmsg is readable since kernel v3.5:
https://github.com/torvalds/linux/commit/e11fea92e13fb91c50bacca799a6131c81929986

Now our baseline on the kernel is v5.4. Let's assume /dev/kmsg is always
readable.

6 months agojournal: remove old kernels (<3.2) support in monitoring hostname
Yu Watanabe [Mon, 14 Apr 2025 19:23:57 +0000 (04:23 +0900)] 
journal: remove old kernels (<3.2) support in monitoring hostname

Similar to cc983fc9dceb989f2cd7cb5ae393630b6c8c2f12.

6 months agotest: drop error conditions for old kernels (<3.2)
Yu Watanabe [Mon, 14 Apr 2025 13:31:53 +0000 (22:31 +0900)] 
test: drop error conditions for old kernels (<3.2)

Now our baseline on the kernel is 5.4.

6 months agotree-wide: IFA_FLAGS is supported since kernel v3.14
Yu Watanabe [Sun, 13 Apr 2025 20:56:09 +0000 (05:56 +0900)] 
tree-wide: IFA_FLAGS is supported since kernel v3.14

Now our baseline on the kernel is v5.4.
Let's unconditionally use the IFA_FLAGS attribute, and drop the getter
and setter for the deprecated header element.

Continuation of 29c2d4e1587e03a4d7589d045b81f7bea91c283e.

6 months agosd-netlink,sd-device: drop old kernels (<4.2) support
Yu Watanabe [Sun, 13 Apr 2025 20:42:24 +0000 (05:42 +0900)] 
sd-netlink,sd-device: drop old kernels (<4.2) support

NETLINK_LIST_MEMBERSHIPS is supported since kernel v4.2, specifically
https://github.com/torvalds/linux/commit/b42be38b2778eda2237fc759e55e3b698b05b315

Our baseline on the kernel is v5.4. Let's drop unnecessary conditions.

6 months agoudev-builtin-net_id: drop old kernels (<4.20) support
Yu Watanabe [Sun, 13 Apr 2025 20:15:45 +0000 (05:15 +0900)] 
udev-builtin-net_id: drop old kernels (<4.20) support

Since kernel v4.20, specifically since
https://github.com/torvalds/linux/commit/9b8b2a323008aedd39a8debb861b825707f01420
IP-over-Infiniband driver also uses dev_port.

As our baseline on the kernel is v5.4. Let's remove the fallback code.
For more details about the fallback, see
https://github.com/systemd/systemd/pull/10082#issuecomment-421416461

6 months agotest-condition: drop cgroup version check
Yu Watanabe [Mon, 14 Apr 2025 11:33:08 +0000 (20:33 +0900)] 
test-condition: drop cgroup version check

After f74ca66e6833c340a1532578176e55cb494590d0, we do not check the
cgroup version of the runtime environment, and unconditionally returns 0
for "v1", and 1 for "v2".

6 months agoresolve: drop code for supporting old kernels (<3.2)
Yu Watanabe [Mon, 14 Apr 2025 11:46:27 +0000 (20:46 +0900)] 
resolve: drop code for supporting old kernels (<3.2)

Now our baseline on the kernel is 5.4.

Note, the removed code triggered assert_return() in
sd_event_source_set_description().

6 months agoloop-util: drop workaround for kernel older than v5.0
Yu Watanabe [Sun, 13 Apr 2025 21:54:26 +0000 (06:54 +0900)] 
loop-util: drop workaround for kernel older than v5.0

Now our baseline on the kernel is v5.4.

6 months agocore: hash_ops related cleanups (#37114)
Yu Watanabe [Sun, 13 Apr 2025 18:17:26 +0000 (03:17 +0900)] 
core: hash_ops related cleanups (#37114)

6 months agoshared/condition: remove cgroup hierarchy check (#37101)
Yu Watanabe [Sun, 13 Apr 2025 18:17:01 +0000 (03:17 +0900)] 
shared/condition: remove cgroup hierarchy check (#37101)

6 months agooomd: it's safe to assume cgv2 now 37101/head
Mike Yuan [Fri, 11 Apr 2025 23:13:45 +0000 (01:13 +0200)] 
oomd: it's safe to assume cgv2 now

6 months agoshared/condition: remove cgroup hierarchy check
Mike Yuan [Fri, 11 Apr 2025 23:16:34 +0000 (01:16 +0200)] 
shared/condition: remove cgroup hierarchy check

6 months agocore/taint: decrease stage array size for "cgroupsv1" removal
Mike Yuan [Fri, 11 Apr 2025 23:10:12 +0000 (01:10 +0200)] 
core/taint: decrease stage array size for "cgroupsv1" removal

Follow-up for 399791eaf0f53887e52488b9f4e966d71abeea6a

6 months agosocket-proxy: fix use-after-free
Yu Watanabe [Sun, 13 Apr 2025 05:10:28 +0000 (14:10 +0900)] 
socket-proxy: fix use-after-free

Fixes a bug in 10e41cdddc45548cc5938a307a16711b47d68062.
Fixes CID#1609061.

6 months agocoredump: verify pidfd after parsing data in usermode helper
Luca Boccassi [Fri, 11 Apr 2025 13:44:30 +0000 (14:44 +0100)] 
coredump: verify pidfd after parsing data in usermode helper

Ensure the pidfd is still valid before continuing

Follow-up for 313537da6ffdea4049873571202679734d49f0a1

6 months agonetwork/wiphy: use hash_ops with destructor for managing Wiphy objects 37121/head
Yu Watanabe [Sat, 12 Apr 2025 18:38:50 +0000 (03:38 +0900)] 
network/wiphy: use hash_ops with destructor for managing Wiphy objects

6 months agonetwork/link: use hash_ops with destructor for managing Link objects
Yu Watanabe [Sat, 12 Apr 2025 18:30:44 +0000 (03:30 +0900)] 
network/link: use hash_ops with destructor for managing Link objects

6 months agonetwork/network: use hash_ops with destructor for managing Network objects
Yu Watanabe [Sat, 12 Apr 2025 18:18:12 +0000 (03:18 +0900)] 
network/network: use hash_ops with destructor for managing Network objects

6 months agohashmap: introduce ordered_hashmap_free_and_replace()
Yu Watanabe [Sat, 12 Apr 2025 18:17:38 +0000 (03:17 +0900)] 
hashmap: introduce ordered_hashmap_free_and_replace()