]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 months agoMerge pull request #31444 from bluca/semaphore
Frantisek Sumsal [Wed, 28 Feb 2024 14:03:11 +0000 (15:03 +0100)] 
Merge pull request #31444 from bluca/semaphore

semaphore: set upstream build profile and set default branch to debian/master

2 months agoMerge pull request #31293 from ragazenta/netdev_rps
Luca Boccassi [Wed, 28 Feb 2024 13:37:28 +0000 (13:37 +0000)] 
Merge pull request #31293 from ragazenta/netdev_rps

udevd: Add ReceivePacketSteeringCPUMask for systemd.link

2 months agoresolved: exit function if varlink_dispatch() returns > 0
Lennart Poettering [Wed, 28 Feb 2024 10:29:04 +0000 (11:29 +0100)] 
resolved: exit function if varlink_dispatch() returns > 0

varlink_dispatch() returns > 0 if it already replied to the method call,
hence this is reason to return from the handler function, and not
proceed.

2 months agouserbdb: pass log level from main daemon to worker
Lennart Poettering [Wed, 28 Feb 2024 08:43:02 +0000 (09:43 +0100)] 
userbdb: pass log level from main daemon to worker

2 months agonetwork/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()
Yu Watanabe [Tue, 27 Feb 2024 10:31:26 +0000 (19:31 +0900)] 
network/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()

This effectively reverts 9175002864d8876f375e0df089d142d239282528.

The retrans time field in RA message is for neighbor solicitation,
and the commit d4c8de21a07d015f2f2c787e0735be5e4d02fb3c makes the value
assigned to the correct sysctl property.

Let's deprecate the option, and drop the redundant functions.

2 months agonspawn: minor coding style tweaks to nspawn-register.c
Lennart Poettering [Wed, 28 Feb 2024 10:07:39 +0000 (11:07 +0100)] 
nspawn: minor coding style tweaks to nspawn-register.c

2 months agoMerge pull request #31511 from jamacku/prepare-for-diff-shellcheck
Zbigniew Jędrzejewski-Szmek [Wed, 28 Feb 2024 09:28:56 +0000 (10:28 +0100)] 
Merge pull request #31511 from jamacku/prepare-for-diff-shellcheck

Prepare for new version of Differential ShellCheck & scanning of shell completion scripts

2 months agocgroup-setup: clarify '<=' is evaluated earlier
Yu Watanabe [Wed, 28 Feb 2024 02:51:04 +0000 (11:51 +0900)] 
cgroup-setup: clarify '<=' is evaluated earlier

Follow-up for 31323f21bb0ae7c712f43500c42997c91a6d20bf.

The code is correct, but let's silence Coverity.

Closes CID#1534787.

2 months agotest-network: Add test for rps_cpu_mask option 31293/head
Renjaya Raga Zenta [Fri, 16 Feb 2024 07:01:47 +0000 (14:01 +0700)] 
test-network: Add test for rps_cpu_mask option

2 months agoudevd: Add ReceivePacketSteeringCPUMask for systemd.link
Renjaya Raga Zenta [Tue, 13 Feb 2024 14:15:24 +0000 (21:15 +0700)] 
udevd: Add ReceivePacketSteeringCPUMask for systemd.link

Takes a list of CPU indices or ranges separated by either whitespace or commas. Alternatively,
takes the special value "all" in which will include all available CPUs in the mask.
CPU ranges are specified by the lower and upper CPU indices separated by a dash (e.g. "2-6").
This option may be specified more than once, in which case the specified CPU affinity masks are merged.
If an empty string is assigned, the mask is reset, all assignments prior to this will have no effect.
Defaults to unset and RPS CPU list is unchanged. To disable RPS when it was previously enabled, use the
special value "disable".

Currently, this will set CPU mask to all `rx` queue of matched device (if it has multiple queues).

The `/sys/class/net/<dev>/queues/rx-<n>/rps_cpus` only accept cpu bitmap mask in hexadecimal.

Fix: #30323

2 months agoTODO: fix typo
Yu Watanabe [Wed, 28 Feb 2024 02:46:07 +0000 (11:46 +0900)] 
TODO: fix typo

Follow-up for 666a348d1c98873c55115924751e6f2d3bdb7435.

2 months agotest-network: fix typo
Yu Watanabe [Wed, 28 Feb 2024 02:44:17 +0000 (11:44 +0900)] 
test-network: fix typo

Follow-up for a663ddc04e43a9234e00e47aed98bf2bbeb1573a.

2 months agosemaphore: set upstream build profile and set default branch to debian/master 31444/head
Luca Boccassi [Thu, 22 Feb 2024 10:07:24 +0000 (10:07 +0000)] 
semaphore: set upstream build profile and set default branch to debian/master

Leave TEST_UPSTREAM=1 for now in case we switch branches via the hook

2 months agosemaphore: enable backports to get new dependencies
Luca Boccassi [Thu, 22 Feb 2024 10:18:32 +0000 (10:18 +0000)] 
semaphore: enable backports to get new dependencies

Required due to building with debian/master branch

2 months agotest/README: document how to add a new empty release to the PPA to migrate the CI...
Luca Boccassi [Thu, 22 Feb 2024 14:19:08 +0000 (14:19 +0000)] 
test/README: document how to add a new empty release to the PPA to migrate the CI to a new version

2 months agotest/README: update ubuntu IRC channel for CI help
Luca Boccassi [Thu, 22 Feb 2024 14:15:30 +0000 (14:15 +0000)] 
test/README: update ubuntu IRC channel for CI help

2 months agoinstall: fix compiler warning about empty directive argument
Luca Boccassi [Sat, 24 Feb 2024 12:05:44 +0000 (12:05 +0000)] 
install: fix compiler warning about empty directive argument

On ppc64el with gcc 13.2 on Ubuntu 24.04:

3s In file included from ../src/basic/macro.h:386,
483s                  from ../src/basic/alloc-util.h:10,
483s                  from ../src/shared/install.c:12:
483s ../src/shared/install.c: In function ‘install_changes_dump’:
483s ../src/shared/install.c:432:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
483s       |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
483s ../src/shared/install.c:432:75: note: format string is defined here
483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",

2 months agoMerge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch
Luca Boccassi [Tue, 27 Feb 2024 20:07:18 +0000 (20:07 +0000)] 
Merge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch

Small cleanups after review of stable batch

2 months agoMerge pull request #31442 from YHNdnzj/towards-cgroup-v1-deprecation
Luca Boccassi [Tue, 27 Feb 2024 19:21:35 +0000 (19:21 +0000)] 
Merge pull request #31442 from YHNdnzj/towards-cgroup-v1-deprecation

core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE

2 months agotmpfiles.d: avoid deprecated, undocumented syntax (s/F/f+/)
Štěpán Němec [Tue, 27 Feb 2024 13:21:33 +0000 (14:21 +0100)] 
tmpfiles.d: avoid deprecated, undocumented syntax (s/F/f+/)

Fixes: eccebf4b0dcb ("systemd-tmpfiles: deprecate F for f+")
2 months agocore: remove duplicate serialization of `cpu_sched_reset_on_fork`
Antonio Alvarez Feijoo [Tue, 27 Feb 2024 13:28:10 +0000 (14:28 +0100)] 
core: remove duplicate serialization of `cpu_sched_reset_on_fork`

`c->cpu_sched_reset_on_fork` is serialized using
`exec-context-cpu-sched-reset-on-fork` and
`exec-context-cpu-scheduling-reset-on-fork`. Let's keep only the second one, to
serialize the value only if `cpu_sched_set` is true.

2 months agotest: drop route from test-functions
Jan Engelhardt [Tue, 27 Feb 2024 15:05:14 +0000 (16:05 +0100)] 
test: drop route from test-functions

I do not see `route` being exercised anywhere else, everything seems
to be on `ip route` already.

2 months agoshared/pam-util: fix awkward tense in log message 31515/head
Zbigniew Jędrzejewski-Szmek [Tue, 27 Feb 2024 17:32:51 +0000 (18:32 +0100)] 
shared/pam-util: fix awkward tense in log message

2 months agovirt: wrap comment, add missing punctuation
Zbigniew Jędrzejewski-Szmek [Tue, 27 Feb 2024 17:32:21 +0000 (18:32 +0100)] 
virt: wrap comment, add missing punctuation

2 months agoman/sd_bus_service_reconnect.c: normalize whitespace
Zbigniew Jędrzejewski-Szmek [Tue, 27 Feb 2024 17:15:51 +0000 (18:15 +0100)] 
man/sd_bus_service_reconnect.c: normalize whitespace

For man pages, we generally indent with 2 spaces and wrap to ~80 columns.

2 months agoman, shell-completion: fix a few typos/language issues
Štěpán Němec [Tue, 27 Feb 2024 13:31:43 +0000 (14:31 +0100)] 
man, shell-completion: fix a few typos/language issues

2 months agobootspec: don't complain about valid loader.conf settings
Lennart Poettering [Mon, 26 Feb 2024 11:21:01 +0000 (12:21 +0100)] 
bootspec: don't complain about valid loader.conf settings

Let's not complain about various valid loader.conf settings we more
recently added. At the same time let's remove the half-assed userspace
parsers for the fields we actually do support but don't actually really
care about in userspace. There's really no point in storing strings away
that we are not using at all, hence just don#t.

Fixes: #31487
2 months agoci(labeler): add rule for `shell-completion` label
Jan Macku [Tue, 27 Feb 2024 14:54:40 +0000 (15:54 +0100)] 
ci(labeler): add rule for `shell-completion` label

2 months agotest: use socat in unidirectional mode
Frantisek Sumsal [Tue, 27 Feb 2024 10:10:53 +0000 (11:10 +0100)] 
test: use socat in unidirectional mode

By default socat open a separate r/w channel for each specified address,
and terminates the connection after .5s from receiving EOF on _either_
side. And since one side of that connection is an empty stdin, we reach
that EOF pretty quickly. Let's avoid this by using socat in
"reversed unidirectional" mode, where the first address is used only for
writing, and the second one is used only for reading.

Addresses:
  - https://github.com/systemd/systemd/issues/31500
  - https://github.com/systemd/systemd/issues/31493

Follow-up for 3456c89ac26.

2 months agoNEWS: announce cgroup v1 deprecation 31442/head
Mike Yuan [Sun, 25 Feb 2024 02:13:26 +0000 (10:13 +0800)] 
NEWS: announce cgroup v1 deprecation

2 months agomeson: drop default-hierarchy= option, always use unified
Mike Yuan [Sun, 25 Feb 2024 02:05:26 +0000 (10:05 +0800)] 
meson: drop default-hierarchy= option, always use unified

2 months agocore: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE
Mike Yuan [Sun, 25 Feb 2024 01:10:51 +0000 (09:10 +0800)] 
core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE

Also, add a 30s sleep even if cgroup v1 is forced.

Closes #30852

2 months agoshared/cgroup-setup: introduce cg_is_legacy_force_enabled
Mike Yuan [Sun, 25 Feb 2024 01:03:16 +0000 (09:03 +0800)] 
shared/cgroup-setup: introduce cg_is_legacy_force_enabled

2 months agoshared/mount-setup: split out mount_cgroup_legacy_controllers
Mike Yuan [Sun, 25 Feb 2024 01:07:17 +0000 (09:07 +0800)] 
shared/mount-setup: split out mount_cgroup_legacy_controllers

2 months agoshared/mount-setup: minor modernization
Mike Yuan [Thu, 22 Feb 2024 05:03:09 +0000 (13:03 +0800)] 
shared/mount-setup: minor modernization

2 months agocore/cgroup: remove obsolete TODO
Mike Yuan [Sun, 25 Feb 2024 01:00:27 +0000 (09:00 +0800)] 
core/cgroup: remove obsolete TODO

2 months agocore: mark JoinControllers= as DISABLED_LEGACY rather than _CONFIGURATION
Mike Yuan [Thu, 22 Feb 2024 05:06:44 +0000 (13:06 +0800)] 
core: mark JoinControllers= as DISABLED_LEGACY rather than _CONFIGURATION

Follow-up for 143fadf369a18449464956206226761e49be1928

2 months agoci(lint): temporarily disable ShellCheck for bash-completion 31511/head
Jan Macku [Tue, 27 Feb 2024 14:33:36 +0000 (15:33 +0100)] 
ci(lint): temporarily disable ShellCheck for bash-completion

This commit should be reverted once bash completion is in better shape when it comes to ShellCheck.

2 months agofix(SC2148): add ShellCheck directive to bash completion scripts
Jan Macku [Tue, 27 Feb 2024 13:54:49 +0000 (14:54 +0100)] 
fix(SC2148): add ShellCheck directive to bash completion scripts

2 months agoci(lint): exclude zsh completion from ShellCheck
Jan Macku [Tue, 27 Feb 2024 13:26:52 +0000 (14:26 +0100)] 
ci(lint): exclude zsh completion from ShellCheck

zsh is not supported by ShellCheck

2 months agozsh/_journalctl: complete -g, --case-sensitive, 'help' (pseudo-)facility
Štěpán Němec [Tue, 27 Feb 2024 13:36:57 +0000 (14:36 +0100)] 
zsh/_journalctl: complete -g, --case-sensitive, 'help' (pseudo-)facility

2 months agoupdate TODO
Lennart Poettering [Tue, 27 Feb 2024 13:40:31 +0000 (14:40 +0100)] 
update TODO

2 months agosysext: fix typo
Yu Watanabe [Tue, 27 Feb 2024 04:28:02 +0000 (13:28 +0900)] 
sysext: fix typo

2 months agoMerge pull request #31000 from flatcar-hub/krnowak/mutable-overlays
Luca Boccassi [Mon, 26 Feb 2024 16:17:11 +0000 (16:17 +0000)] 
Merge pull request #31000 from flatcar-hub/krnowak/mutable-overlays

systemd-sysext: Implement optional mutability for extensions

2 months agoMerge pull request #31458 from poettering/vmspawn-ptyfwd
Luca Boccassi [Mon, 26 Feb 2024 15:44:50 +0000 (15:44 +0000)] 
Merge pull request #31458 from poettering/vmspawn-ptyfwd

vmspawn: implement TTY logic via ptyfwd

2 months agoMerge pull request #31480 from rpigott/dnssec-maxwork
Luca Boccassi [Mon, 26 Feb 2024 12:26:36 +0000 (12:26 +0000)] 
Merge pull request #31480 from rpigott/dnssec-maxwork

resolved: limit the number of signature validations in a transaction

2 months agonetwork: fix use-after-free in {address,route}_remove_and_cancel()
Yu Watanabe [Mon, 26 Feb 2024 03:09:52 +0000 (12:09 +0900)] 
network: fix use-after-free in {address,route}_remove_and_cancel()

Fixes #31485.

2 months agonspawn: hide ^] hint unless we are interactive mode 31458/head
Lennart Poettering [Fri, 23 Feb 2024 11:30:19 +0000 (12:30 +0100)] 
nspawn: hide ^] hint unless we are interactive mode

The hotkey only works in interactive mode hence don't mislead users
about it.

2 months agovmspawn: use our own ptyfwd code for the console of a VM
Lennart Poettering [Fri, 23 Feb 2024 11:20:55 +0000 (12:20 +0100)] 
vmspawn: use our own ptyfwd code for the console of a VM

Let's make systemd-nspawn use our own ptyfwd logic to handle the TTY by
default.

This adds a new setting --console=, inspired by nspawn's setting of the
same name. If --console=interactive= is used, then we'll do the TTY
dance on our own via ptyfwd, and thus get tinting, our usual hotkey
handling and similar.

Since qemu's own console is useful too, let's keep it around via
--console=native.

FInally, replace the --qemu-gui switch by --console=gui.

2 months agopretty-print: make tinting a bit less aggressive
Lennart Poettering [Fri, 23 Feb 2024 11:20:04 +0000 (12:20 +0100)] 
pretty-print: make tinting a bit less aggressive

2 months agorun: use sd_event_set_signal_exit() at one more place
Lennart Poettering [Fri, 23 Feb 2024 11:19:43 +0000 (12:19 +0100)] 
run: use sd_event_set_signal_exit() at one more place

2 months agonetwork/ndisc: rename Network.ipv6_accept_ra -> Network.ndisc
Yu Watanabe [Fri, 23 Feb 2024 03:41:24 +0000 (12:41 +0900)] 
network/ndisc: rename Network.ipv6_accept_ra -> Network.ndisc

These settings are leated to sd-ndisc and Neighbor Discovery protocol.
Let's use more suitable name.

2 months agoFix: Chuwi UBook X (CWI535) screen rotation matrix
Alexander Zavyalov [Mon, 26 Feb 2024 06:15:02 +0000 (14:15 +0800)] 
Fix: Chuwi UBook X (CWI535) screen rotation matrix

2 months agoukify: Use VERSION_TAG instead of GIT_VERSION
Daan De Meyer [Fri, 23 Feb 2024 15:39:18 +0000 (16:39 +0100)] 
ukify: Use VERSION_TAG instead of GIT_VERSION

GIT_VERSION isn't actually available so use VERSION_TAG instead which
is available.

2 months agoresolved: reduce the maximum nsec3 iterations to 100 31480/head
Ronan Pigott [Sun, 25 Feb 2024 07:23:32 +0000 (00:23 -0700)] 
resolved: reduce the maximum nsec3 iterations to 100

According to RFC9267, the 2500 value is not helpful, and in fact it can
be harmful to permit a large number of iterations. Combined with limits
on the number of signature validations, I expect this will mitigate the
impact of maliciously crafted domains designed to cause excessive
cryptographic work.

2 months agoresolved: limit the number of signature validations in a transaction
Ronan Pigott [Sun, 25 Feb 2024 01:21:24 +0000 (18:21 -0700)] 
resolved: limit the number of signature validations in a transaction

It has been demonstrated that tolerating an unbounded number of dnssec
signature validations is a bad idea. It is easy for a maliciously
crafted DNS reply to contain as many keytag collisions as desired,
causing us to iterate every dnskey and signature combination in vain.

The solution is to impose a maximum number of validations we will
tolerate. While collisions are not hard to craft, I still expect they
are unlikely in the wild so it should be safe to pick fairly small
values.

Here two limits are imposed: one on the maximum number of invalid
signatures encountered per rrset, and another on the total number of
validations performed per transaction.

2 months agoMerge pull request #31490 from yuwata/network-varlink-cleanups
Yu Watanabe [Mon, 26 Feb 2024 06:12:12 +0000 (15:12 +0900)] 
Merge pull request #31490 from yuwata/network-varlink-cleanups

network/varlink: several trivial cleanups

2 months agovarlink/network: reindent methods 31490/head
Yu Watanabe [Mon, 26 Feb 2024 04:42:01 +0000 (13:42 +0900)] 
varlink/network: reindent methods

2 months agonetwork/varlink: downgrade log level about failure in getting netns ID
Yu Watanabe [Mon, 26 Feb 2024 02:30:34 +0000 (11:30 +0900)] 
network/varlink: downgrade log level about failure in getting netns ID

2 months agoformat-table: replace "(size_t) -1" with SIZE_MAX
Yu Watanabe [Mon, 26 Feb 2024 01:37:32 +0000 (10:37 +0900)] 
format-table: replace "(size_t) -1" with SIZE_MAX

2 months agoMerge pull request #31440 from yuwata/sd-ndisc-sd-radv-cleanups
Luca Boccassi [Sun, 25 Feb 2024 13:07:53 +0000 (13:07 +0000)] 
Merge pull request #31440 from yuwata/sd-ndisc-sd-radv-cleanups

sd-ndisc,sd-radv: several trivial cleanups

2 months agoin-addr-util: introduce in{4,6}_addr_is_multicast()
Yu Watanabe [Fri, 23 Feb 2024 04:12:57 +0000 (13:12 +0900)] 
in-addr-util: introduce in{4,6}_addr_is_multicast()

2 months agoicmp6-util: make icmp6_receive() refuse packets without IPv6 sender address
Yu Watanabe [Thu, 22 Feb 2024 05:28:52 +0000 (14:28 +0900)] 
icmp6-util: make icmp6_receive() refuse packets without IPv6 sender address

Previously, the function supports packets without IPv6 sender address
for unit tests. However, now unit tests use their own version of
icmp6_receive(). Hence, let's make the check more strict.

2 months agosd-ndisc: make callback takes arbitrary type of message
Yu Watanabe [Wed, 14 Feb 2024 11:38:12 +0000 (20:38 +0900)] 
sd-ndisc: make callback takes arbitrary type of message

No functional change. Preparation for supporting Neighbor Advertisement
message.

2 months agonetwork/ndisc: drop all configurations without lifetime on stop
Yu Watanabe [Fri, 23 Feb 2024 03:02:46 +0000 (12:02 +0900)] 
network/ndisc: drop all configurations without lifetime on stop

As we call ndisc_drop_outdated() with USEC_INFINITY on stop.

2 months agodocs: update link for Arch Linux bugtracker
Mike Yuan [Sun, 25 Feb 2024 04:48:49 +0000 (12:48 +0800)] 
docs: update link for Arch Linux bugtracker

2 months agoMerge pull request #31472 from YHNdnzj/systemctl-pidref
Mike Yuan [Sat, 24 Feb 2024 22:54:14 +0000 (06:54 +0800)] 
Merge pull request #31472 from YHNdnzj/systemctl-pidref

systemctl: generalize GetUnitByPIDFD handling

2 months agonetwork: use FOREACH_STRING()
Yu Watanabe [Sat, 24 Feb 2024 05:25:54 +0000 (14:25 +0900)] 
network: use FOREACH_STRING()

2 months agodocs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK)
Mike Yuan [Sat, 24 Feb 2024 05:26:19 +0000 (13:26 +0800)] 
docs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK)

2 months agosystemctl-show: use lookup_unit_by_pidref too 31472/head
Mike Yuan [Sat, 24 Feb 2024 01:39:32 +0000 (09:39 +0800)] 
systemctl-show: use lookup_unit_by_pidref too

Follow-up for e0e7bc8223c3f28fcb48db9f0f003d9f03ca46d7

This allows us to pin the process locally when GetUnitByPIDFD
is not available, just like what we have been doing for
'systemctl whoami'. Also, fix looking up remote pid.
We can't use pidfd for those.

2 months agosystemctl: generalize GetUnitByPIDFD handling
Mike Yuan [Sat, 24 Feb 2024 01:01:22 +0000 (09:01 +0800)] 
systemctl: generalize GetUnitByPIDFD handling

2 months agosystemctl-util: use strv_free_and_replace at one more place
Mike Yuan [Sat, 24 Feb 2024 00:55:33 +0000 (08:55 +0800)] 
systemctl-util: use strv_free_and_replace at one more place

2 months agoFallback from pidfd_open on permission errors too
Luca Boccassi [Fri, 23 Feb 2024 21:09:11 +0000 (21:09 +0000)] 
Fallback from pidfd_open on permission errors too

Skip using pidfds if we get a permission denied error.
This can happen with an old policy and a new kernel that uses the
new pidfs filesystem to back pidfds, instead of anonymous inodes,
as the existing policy denies access.

This is already the case for most uses of pidfd_open, like pidref,
but not on these two. Fix them.

2 months agotest: split out {dump,verify}_ra_message() 31440/head
Yu Watanabe [Sun, 18 Feb 2024 17:21:31 +0000 (02:21 +0900)] 
test: split out {dump,verify}_ra_message()

Then, let's not modify the global object.

2 months agosd-radv: several cleanups
Yu Watanabe [Sun, 18 Feb 2024 03:45:48 +0000 (12:45 +0900)] 
sd-radv: several cleanups

- split out radv_setup_recv_event(),
- slightly update log messages,
- use DIV_ROUND_UP(),
- use structured initializer more.

No functional change, just preparation for later commits.

2 months agosd-ndisc: several trivial cleanups
Yu Watanabe [Wed, 14 Feb 2024 06:59:38 +0000 (15:59 +0900)] 
sd-ndisc: several trivial cleanups

- update several log messages,
- use event_reset_time_relative(),
- split out ndisc_setup_recv_event() and ndisc_setup_timer().

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

2 months agoicmp6-util: merge icmp6_bind_router_{solicitation,advertisement}() into icmp6_bind()
Yu Watanabe [Wed, 14 Feb 2024 07:45:55 +0000 (16:45 +0900)] 
icmp6-util: merge icmp6_bind_router_{solicitation,advertisement}() into icmp6_bind()

No functional change, just refactoring.

2 months agohwdb: Add support for Elgato Stream Deck Plus
Georges Basile Stavracas Neto [Fri, 23 Feb 2024 23:04:12 +0000 (20:04 -0300)] 
hwdb: Add support for Elgato Stream Deck Plus

Add support for the following device:

 - ID 0fd9:0084 Elgato Systems GmbH Stream Deck Plus

2 months agodocs: fix typo
Yu Watanabe [Sat, 24 Feb 2024 02:30:39 +0000 (11:30 +0900)] 
docs: fix typo

2 months agoefi: de-inline xmalloc to fix build failure with gcc 12.2 and -O2
Luca Boccassi [Thu, 22 Feb 2024 14:23:06 +0000 (14:23 +0000)] 
efi: de-inline xmalloc to fix build failure with gcc 12.2 and -O2

With meson build --werror --buildtype=plain -Dc_args=" -O2" the build fails:

../src/boot/efi/stub.c: In function ‘load_addons.constprop’:03:06
../src/boot/efi/stub.c:475:40: error: using a dangling pointer to ‘p’ [-Werror=dangling-pointer=]03:06
  475 |                         dt_bases[n_dt] = xmemdup((uint8_t*)loaded_addon->ImageBase + addrs[UNIFIED_SECTION_DTB],03:06
      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~03:06
  476 |                                                  dt_sizes[n_dt]);03:06
      |                                                  ~~~~~~~~~~~~~~~03:06
In file included from ../src/boot/efi/stub.c:20:03:06
../src/boot/efi/util.h:33:15: note: ‘p’ declared here03:06
   33 |         void *p;03:06
      |               ^

De-inline the function and initialize p to make gcc happy.

2 months agoMerge pull request #31464 from poettering/vmspawn-limit-bank
Luca Boccassi [Fri, 23 Feb 2024 22:04:44 +0000 (22:04 +0000)] 
Merge pull request #31464 from poettering/vmspawn-limit-bank

vmspawn: disable all TPM PCR banks, except for SHA256

2 months agoptyfwd: optionally prefix window title with colored dot
Lennart Poettering [Fri, 23 Feb 2024 14:54:22 +0000 (15:54 +0100)] 
ptyfwd: optionally prefix window title with colored dot

in uid0/systemd-run/nspawn we already set a window title with a colorful
unicode dot indicating the changed privileges/execution context. This typically
gets overriden by the shell inside the environment however.

Let's tweak this a bit: when we see the window title OSC ANSI sequence
passing through, let's patch in the unicode dot as a prefix to the
title.

This is super pretty, since it makes sure root sessions via 0ad are
really easily recognizable as such, because the window title carries an
🔴 red dot as prefix then.

2 months agoMerge pull request #31465 from xypron/detect-virt
Luca Boccassi [Fri, 23 Feb 2024 20:50:51 +0000 (20:50 +0000)] 
Merge pull request #31465 from xypron/detect-virt

Detect virtualization on RISC-V

2 months agoman/systemd-sysext.xml: document mutable extensions 31000/head
Thilo Fromm [Fri, 16 Feb 2024 18:29:12 +0000 (19:29 +0100)] 
man/systemd-sysext.xml: document mutable extensions

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
2 months agosignal-util: imply sentinel -1 in sigprocmask_many() + sigset_add_many() args list
Lennart Poettering [Fri, 23 Feb 2024 14:03:49 +0000 (15:03 +0100)] 
signal-util: imply sentinel -1 in sigprocmask_many() + sigset_add_many() args list

2 months agosignal-util: use RET_NERRNO() + RET_GATHER() more
Lennart Poettering [Fri, 23 Feb 2024 13:53:53 +0000 (14:53 +0100)] 
signal-util: use RET_NERRNO() + RET_GATHER() more

2 months agodetect-virt: allow detection via SMBIOS on RISC-V 31465/head
Heinrich Schuchardt [Fri, 23 Feb 2024 16:29:20 +0000 (17:29 +0100)] 
detect-virt: allow detection via SMBIOS on RISC-V

SMBIOS support in QEMU for RISC-V is merged upstream.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 months agoupdate TODO 31464/head
Lennart Poettering [Fri, 23 Feb 2024 16:25:38 +0000 (17:25 +0100)] 
update TODO

2 months agovmspawn: disable all PCR banks but SHA256
Lennart Poettering [Fri, 23 Feb 2024 16:23:06 +0000 (17:23 +0100)] 
vmspawn: disable all PCR banks but SHA256

By default swtpm runs with four banks: SHA1, SHA256, SHA384, SHA512.
This means all data that is part of the boot will be hashed four times,
which slows everything down.

Let's restrict things to SHA256 only, which is the one that really
matters. SHA1 is no up to today's standards anyway, and noone really
consumes the other two, hence no point in enabling this.

To disable the banks we need to call swtpm_setup with --pcr-banks. Do
so.

2 months agovmspawn: drop "const" from string we free
Lennart Poettering [Fri, 23 Feb 2024 16:22:34 +0000 (17:22 +0100)] 
vmspawn: drop "const" from string we free

I am a bit surprised this compiled at all...

2 months agodetect-virt: allow detection via device-tree on RISC-V
Heinrich Schuchardt [Fri, 23 Feb 2024 16:25:59 +0000 (17:25 +0100)] 
detect-virt: allow detection via device-tree on RISC-V

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 months agoMerge pull request #31455 from keszybz/restore-docs-urls
Lennart Poettering [Fri, 23 Feb 2024 14:59:44 +0000 (15:59 +0100)] 
Merge pull request #31455 from keszybz/restore-docs-urls

Restore docs urls

2 months agoMerge pull request #31456 from poettering/tpm1.2-no-more
Lennart Poettering [Fri, 23 Feb 2024 13:52:20 +0000 (14:52 +0100)] 
Merge pull request #31456 from poettering/tpm1.2-no-more

sd-stub: drop any support for TPM 1.2

2 months agossh-generator: add mention of ssh.authorized_keys.root to man page
Sam Leonard [Fri, 23 Feb 2024 12:04:08 +0000 (12:04 +0000)] 
ssh-generator: add mention of ssh.authorized_keys.root to man page

2 months agoupdate TODO
Lennart Poettering [Fri, 23 Feb 2024 12:20:19 +0000 (13:20 +0100)] 
update TODO

2 months agoMerge pull request #31411 from poettering/build-path
Luca Boccassi [Fri, 23 Feb 2024 11:57:42 +0000 (11:57 +0000)] 
Merge pull request #31411 from poettering/build-path

userdbd,homed,importd,sysupdate,pid1: make it easier to run daemons that have callouts from build dir

2 months agoupdate TODO
Lennart Poettering [Fri, 23 Feb 2024 10:09:08 +0000 (11:09 +0100)] 
update TODO

2 months agoupdate TODO 31456/head
Lennart Poettering [Fri, 23 Feb 2024 10:08:14 +0000 (11:08 +0100)] 
update TODO

2 months agoMerge pull request #31352 from DaanDeMeyer/versioning
Zbigniew Jędrzejewski-Szmek [Fri, 23 Feb 2024 10:07:56 +0000 (11:07 +0100)] 
Merge pull request #31352 from DaanDeMeyer/versioning

Rework meson-vcs-tag.sh

2 months agosd-stub: drop any support for TPM 1.2
Lennart Poettering [Fri, 23 Feb 2024 09:52:16 +0000 (10:52 +0100)] 
sd-stub: drop any support for TPM 1.2

TPM 1.2 is obsolete, and doesn't really provide much security guarantees
given it's build around SHA1 which is not up to today's standards.

The rest of systemd's TPM codebase never supported TPM 1.2 hence let's
drop this partial support in sd-stub too. It has created problems after
all (sd-stub reported the measuements and userspace assumed these were
for TPM2), without bringing any benefits (given that the measurements we
make are not consumed by us anyway, unlike those for TPM 2.0)

let's cut off this old support.