Commit Graph
80948 Commits
Author SHA1 Message Date
Yu Watanabe cda045882e network: enable ARP when IPv4LL and/or IPv4ACD is enabled (#37190) 2025-04-23 08:53:49 +09:00
Yu Watanabe 1393c5a2a4 sd-device: fix sysname check in sd_device_new_from_subsystem_sysname()
For example, consider the following device:
- syspath: /sys/bus/mdio_bus/drivers/Qualcomm Atheros AR8031!AR8033
- subsystem: "drivers"
- driver subsystem: "mdio_bus"
- sysname: "Qualcomm Atheros AR8031/AR8033"  <-- '!' is replaced with '/'

When sd_device_new_from_subsystem_sysname() is called to get the device,
the arguments to sd_device_new_from_subsystem_sysname() should be
- subsystem: "drivers"
- sysname (concatenated with driver subsystem): "mdio_bus:Qualcomm Atheros AR8031/AR8033"

In that case, we need to pass to device_new_from_path_join() the following:
- subsystem: "drivers"
- driver subsystem: "mdio_bus"
- sysname: "Qualcomm Atheros AR8031/AR8033"
- a: "/sys/bus"
- b: "drivers"
- c: "mdio_bus"
- d: "Qualcomm Atheros AR8031!AR8033"
Here, the important point is that the `sysname` argument and the
last argument `d` are differnt: the `sysname` argument needs to match
the sysname obtained by `sd_device_get_sysname()`, but `d` must be
the last path component of the syspath.

Previously, we passed a wrong sysname to device_new_from_path_join().
This fixes the issue.

Fixes a bug in cd7c71154c (v257).
2025-04-23 08:52:29 +09:00
Yu Watanabe f35a48bd57 mkosi: Add extra packages to the tools tree (#37218) 2025-04-23 08:51:44 +09:00
Lennart Poettering 4b325eca60 core: add concurrency limits to slice units (#36831)
I needed something to hack on "offline", during a long transatlantic
flight. I decided to implement #35862, since I could do that without
checking any online docs nor needing GitHub.
2025-04-22 20:44:04 +02:00
Lennart Poettering 5d919d8785 update TODO 2025-04-22 18:56:01 +02:00
Lennart Poettering edca63a632 test: add integration test for concurrency limits 2025-04-22 18:56:01 +02:00
Lennart Poettering 9ca16f6f18 pid1: add a concurrency limit to slice units
Fixes: #35862
2025-04-22 18:53:51 +02:00
Lennart Poettering 80653ba925 man: explain coredump handling in context of containers better
We have two different mechanisms, let's discuss them explicitly,
comparing their effect and intended usecase.
2025-04-22 11:46:44 +02:00
Daan De Meyer 505492d61c udev: serialize queued events on exit (#37047)
Previously, all queued events were discarded on exit, hence several
events might not be processed by udevd when it is restarted. Such
situation especially easily happens on switching root.

This makes queued events serialized on exit, and deserialized in the
next invocation. Hence, no events should be lost during restarting
udevd.

This is important with the several aspects. Basically
systemd-udev-trigger.service (re)triggers all devices anyway after
switching root, But the service may be disabled or modified by admin.
Moreover, the service produces only 'add' events, and thus the service
cannot cover events with other actions generated by the kernel during
switching root. Also, the userspace triggered events may not contain
some parameters compared with events triggered by the kernel.
2025-04-22 10:54:25 +02:00
Daan De Meyer 97d5cf46d8 Several preparation for killing SysV compat (#37207) 2025-04-22 10:13:44 +02:00
Yu Watanabe 87541e254f meson: use deprecated tag for dns-over-tls and cryptolib meson options
Follow-up for #36937.
2025-04-22 10:10:53 +02:00
Yu Watanabe b4d5115264 test-specifier: replace /dev/initctl with /dev/fd
To make the test work even when systemd is built without SysV compat.
2025-04-22 10:24:42 +09:00
Yu Watanabe 33f90ddefd test: drop nonexistent units from test-unit-name
The test does not request each unit file exists, but keeping legacy unit
names in test sounds spurious. Let's remove them. Hopefully we still
have enough test cases.
2025-04-22 10:24:42 +09:00
Yu Watanabe 97b2e136eb man/systemd: drop explanation about SysV compatibilities
Sooner or later, we will drop the explained SysV compatibilities.
Let's remove them from the man page now to make not people rely on that.
2025-04-22 10:24:42 +09:00
Yu Watanabe 70fd998c40 man/systemd: fix mapping from SysV runlevel to actual target name
See runlevel_to_target() in src/shared/unit-file.c.
2025-04-22 10:24:42 +09:00
Yu Watanabe ca7c4d4d89 unit-file: use STRV_FOREACH_PAIR() macro at one more place 2025-04-22 10:24:42 +09:00
Yu Watanabe f7586abfe0 man/systemctl: list-sockets command sorts the result
This updates the example output of list-sockets command.
2025-04-22 10:24:42 +09:00
Yu Watanabe efe0fe43a8 core: kill StartAuxiliaryScope() DBus method (#37184)
This removes StartAuxiliaryScope() DBus method as already planned and
announced.
This effectively reverts #28836.
2025-04-22 10:18:06 +09:00
Yu Watanabe a0e078e785 NEWS: mention org.freedesktop.systemd1.StartAuxiliaryScope() has been removed 2025-04-22 09:02:48 +09:00
Yu Watanabe 8c35e8a9d2 core: remove deprecated StartAuxiliaryScope() DBus method
The method is deprecated since 64f173324e
(v257) and announced that it will be removed in v258.
Let's remove it now.

This effectively reverts 84c01612de.
2025-04-22 09:02:45 +09:00
Yu Watanabe acd65ba1cd Revert "tests: add test for StartAuxiliaryScope()"
This reverts commit fd7fd59b6d.

The DBus method StartAuxiliaryScope() will be removed in the next
commit.
2025-04-22 09:00:19 +09:00
Yu Watanabe f62465b870 cgroup-util: drop cg_freezer_supported() and cg_ns_supported() (#37201) 2025-04-22 08:58:52 +09:00
Mike Yuan 239afa5971 core/cgroup: actually apply BPF everywhere
Follow-up for f1c5534eb6

The previous logic was an OR, i.e. as long as we're running
in unified mode BPF is applied. The offending commit
spuriously excluded local root.

While at it, remove check for cgv1 CGROUP_MASK_DEVICES controller.
2025-04-22 08:45:39 +09:00
Mike Yuan 497e607ca0 cgroup-util: drop now unused cg_ns_supported() 2025-04-21 16:54:37 +02:00
Mike Yuan e857964b0f nspawn: use namespace_type_supported() 2025-04-21 16:54:37 +02:00
Mike Yuan 418082596c namespace-util: generalize namespace_type_supported() 2025-04-21 16:54:37 +02:00
Mike Yuan 3c86a935ad cgroup-util: drop cg_freezer_supported(), assume supported 2025-04-21 16:29:40 +02:00
igo95862 399a358a38 man/sd-bus: Add at least one reference per sd-bus function man page
Some sd-bus man pages did not have any references on the main
 sd-bus man page. Unless you accidentally stumbled on them from
other pages  it was difficult to discover them.
2025-04-21 04:18:19 +09:00
igo95862 3f75684028 man/sd_bus_emit_signal: Fix extra const for strv functions
The functions `sd_bus_emit_interfaces_added_strv`, `sd_bus_emit_interfaces_removed_strv`
and `sd_bus_emit_properties_changed_strv` take an `char **` not
`const char **` as last argument.

See `src/systemd/sd-bus.h` for the function definition.
2025-04-21 03:31:33 +09:00
Yu Watanabe 7137e0bf24 ssh-proxy: use % as an alternative separator
Since OpenSSH 10.0p1, specifically
https://anongit.mindrot.org/openssh.git/commit/?id=487cf4c18c123b66c1f3f733398cd37e6b2ab6ab
ssh refuses comma in hostname by default.

Let's use % as an alternative separator.

Follow-up for defd5060d6.
2025-04-20 15:15:54 +02:00
Alexander Kurtz e8939ebcd3 docs/MEMORY_PRESSURE: Replace incorrect "packages" with correct "pages" 2025-04-20 17:49:06 +09:00
Yu Watanabe a06e884264 network: enable ARP= when IPv4LL/IPv4ACD is enabled
We can run sd-ipv4ll/sd-ipv4acd also on an interface with IFF_NOARP
flag, but that may cause address conflict with other hosts.
Let's enable ARPing when sd-ipv4ll/sd-ipv4acd are enabled unless ARP= is
explicitly disabled.
2025-04-20 10:49:15 +09:00
Yu Watanabe b5c83cd5a7 network/ipv4ll: introduce ipv4ll_start() helper function
No effective functional change. Just refactoring.
2025-04-20 10:48:52 +09:00
Yu Watanabe 07021ed4f5 network/link: move logging 2025-04-20 09:46:29 +09:00
Yu Watanabe 6f9d8b685d Add two new paragraphs to coding style about header files (#37188) 2025-04-19 20:46:02 +09:00
Daan De Meyer 352fee103b docs: Add note to keep header files as lean as possible to CODING_STYLE.md 2025-04-19 11:52:58 +02:00
Daan De Meyer c7e42c2705 docs: Add paragraph about circular includes to CODING_STYLE.md 2025-04-19 11:51:07 +02:00
Daan De Meyer 46833d6c8f mkosi: Add clang tools and iwyu to tools tree 2025-04-19 00:45:47 +02:00
Daan De Meyer 8ffacf8efa mkosi: Replace base-devel with base in arch tools packages
base-devel pulls in a bit too much, especially for NO_BUILD builds
so let's use base instead.
2025-04-19 00:45:42 +02:00
Yu Watanabe e895a490b7 NEWS: mention that F20 and friends has been replaced with micmute and so on
Follow-up for #34325.
2025-04-19 05:30:32 +09:00
Yu Watanabe cdf3339c56 bootctl: fix typo
Follow-up for bbeeea4362.
2025-04-19 04:49:29 +09:00
Mike Yuan 3180c4d461 logind: drop session fifo logic, rely solely on pidfd for exit notification
Traditionally, logind installed a fifo in the PAM session and
used EOF on the fd as signal for session close. With the addition of
pidfd (76f2191d8e) however,
logind tracks the leader process and the session is terminated
as soon as that exits. I think the new behavior generally makes
more sense, and the behavior got changed *in the mentioned commit
already* without anyone ever showing up to complain. It hence
feels safe to kill the concept now (also before the varlink interface
gets rolled out).

Note that the 'PID' field in CreateSession() Varlink method
is now marked as strict, i.e. failure to acquire pidfd
is immediately treated as fatal.
2025-04-19 04:43:04 +09:00
Mike Yuan f630d17c9b login: replace tabs with spaces in example polkit rule 2025-04-19 03:47:54 +09:00
Yu Watanabe a4f003bac0 TEST-17-UDEV: add test case for queued events serialization/deserialization 2025-04-19 01:51:59 +09:00
Yu Watanabe 95e78b5e53 udev: serialize queued events on exit, and deserialize them in the next invocation
To make systemd-udevd not lose received uevents on restart. This may be
important on switching root, even though we typically trigger all devices
after switching root by systemd-udev-trigger.service, but it may be
disabled or modified by admin.
2025-04-19 01:51:50 +09:00
Daan De Meyer 3bb398c299 resolve,import: always use openssl (#36937) 2025-04-18 15:30:33 +02:00
Daan De Meyer b8fd3f77db Various changes made as part of trying to run include-what-you-use on the systemd repository (#37112)
I have been trying to run
https://github.com/include-what-you-use/include-what-you-use on the
systemd repository to hopefully get a handle on the rampant numbers of
includes we have in every file with no idea if any of the symbols coming
from that file are used or not.

While I haven't got it fully working yet, these changes still make sense
IMO and can be merged already.

Except the last commit, all other changes are about removing circular
dependencies between headers which trips up include-what-you-use.
Regardless of the tool, circular dependencies between headers are a code
smell and I think we should get rid of them regardless of whether we end
up using the tool or not.
2025-04-18 15:07:33 +02:00
Daan De Meyer 44c2c9a036 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 "".
2025-04-18 14:19:16 +02:00
Daan De Meyer 9fea5b4250 tree-wide: Remove references to src/shared/linux
This directory doesn't exist anymore.
2025-04-18 14:19:16 +02:00
Daan De Meyer 793e187718 basic: Remove circular dependency between process-util.h and pidref.h 2025-04-18 14:19:16 +02:00