systemd/.git
20 months agotest: add test cases for journalctl --facility=/--output=help
Yu Watanabe [Mon, 25 Mar 2024 19:18:16 +0000 (04:18 +0900)]
test: add test cases for journalctl --facility=/--output=help

Follow-up for d44233503f29ad6f79914c8e6137fc2d260d9f89.

20 months agotest: add test cases for systemd-analyze --global
Yu Watanabe [Mon, 25 Mar 2024 19:10:01 +0000 (04:10 +0900)]
test: add test cases for systemd-analyze --global

Follow-up for ac97053618387ca1fa0d378cde7957aab8f0476c.

20 months agoci: build with clang-18
Frantisek Sumsal [Tue, 5 Mar 2024 11:24:19 +0000 (12:24 +0100)]
ci: build with clang-18

20 months agoDocument SYSTEMD_REPART_MKFS_* in repart.d manual
Gaël Donval [Thu, 14 Mar 2024 13:00:01 +0000 (13:00 +0000)]
Document SYSTEMD_REPART_MKFS_* in repart.d manual

20 months agohome/homework: use FOREACH_ARRAY more
Mike Yuan [Mon, 25 Mar 2024 12:33:18 +0000 (20:33 +0800)]
home/homework: use FOREACH_ARRAY more

Prompted by #31932

20 months agoMerge pull request #31932 from bluca/coverity
Yu Watanabe [Mon, 25 Mar 2024 18:04:51 +0000 (03:04 +0900)]
Merge pull request #31932 from bluca/coverity

Fix coverity issues

20 months agokernel-install/60-ukify: do not rebuild existing UKIs
Vitaly Kuznetsov [Mon, 25 Mar 2024 10:18:25 +0000 (11:18 +0100)]
kernel-install/60-ukify: do not rebuild existing UKIs

In case kernel-install is called to install what's already a UKI, 60-ukify
must be skipped. E.g. when distro shipped and signed UKI is being installed,
it is counter-productive to try to rebuild it with ukify. Also, the existing
script is not ready to handle UKIs with embedded initramfs.

Note, it is already possible to disable 60-ukify by setting
KERNEL_INSTALL_UKI_GENERATOR to something but in case it is not set, 60-ukify
assumes it should run.

20 months agoMerge pull request #31899 from yuwata/sd-journal-add-match
Yu Watanabe [Mon, 25 Mar 2024 17:56:58 +0000 (02:56 +0900)]
Merge pull request #31899 from yuwata/sd-journal-add-match

sd-journal: introduce two helpers for adding journal filter

20 months agoMerge pull request #31807 from yuwata/sd-ndisc-send
Yu Watanabe [Mon, 25 Mar 2024 17:55:33 +0000 (02:55 +0900)]
Merge pull request #31807 from yuwata/sd-ndisc-send

sd-ndisc: introduce sd_ndisc_send()

20 months agoMerge pull request #31938 from YHNdnzj/journalctl-facility
Yu Watanabe [Mon, 25 Mar 2024 17:23:50 +0000 (02:23 +0900)]
Merge pull request #31938 from YHNdnzj/journalctl-facility

journalctl: explicitly check < 0 for error

20 months agoMerge pull request #31870 from CodethinkLabs/base-image-tweaks
Daan De Meyer [Mon, 25 Mar 2024 17:04:49 +0000 (18:04 +0100)]
Merge pull request #31870 from CodethinkLabs/base-image-tweaks

Base image tweaks

20 months agomkosi: Add selinux support to CentOS and Fedora initrds
Richard Maw [Wed, 20 Mar 2024 15:22:36 +0000 (15:22 +0000)]
mkosi: Add selinux support to CentOS and Fedora initrds

The base initrd is also used by the system image
so selinux should be there even if not enabled by the base image.

20 months agomkosi: Remove testuser from base/mkosi.postinst.chroot
Richard Maw [Wed, 20 Mar 2024 14:33:17 +0000 (14:33 +0000)]
mkosi: Remove testuser from base/mkosi.postinst.chroot

The testuser user is only needed for integration tests,
which are used in the system user and this config
can be provided as drop-ins instead of inline in postinst scripts.

20 months agojournalctl: explicitly check < 0 for error
Mike Yuan [Mon, 25 Mar 2024 15:11:27 +0000 (23:11 +0800)]
journalctl: explicitly check < 0 for error

20 months agobasic/string-table: remove unnecessary brackets
Mike Yuan [Mon, 25 Mar 2024 15:10:52 +0000 (23:10 +0800)]
basic/string-table: remove unnecessary brackets

20 months agoMerge pull request #31730 from yuwata/network-dhcp-server-lease-file-follow-ups
Luca Boccassi [Mon, 25 Mar 2024 14:32:05 +0000 (14:32 +0000)]
Merge pull request #31730 from yuwata/network-dhcp-server-lease-file-follow-ups

network: several follow-ups for DHCP server lease file

20 months agoUse .git suffix for all submodule urls
Daan De Meyer [Mon, 25 Mar 2024 12:49:42 +0000 (13:49 +0100)]
Use .git suffix for all submodule urls

20 months agologs-show: use journal_add_matchf() and journal_add_match_pair()
Yu Watanabe [Thu, 21 Mar 2024 20:51:15 +0000 (05:51 +0900)]
logs-show: use journal_add_matchf() and journal_add_match_pair()

20 months agonetworkctl: use journal_add_matchf() and journal_add_match_pair()
Yu Watanabe [Thu, 21 Mar 2024 20:33:08 +0000 (05:33 +0900)]
networkctl: use journal_add_matchf() and journal_add_match_pair()

20 months agojournal-gateway: use journal_add_match_pair() and add_match_boot_id()
Yu Watanabe [Thu, 21 Mar 2024 20:26:02 +0000 (05:26 +0900)]
journal-gateway: use journal_add_match_pair() and add_match_boot_id()

20 months agocoredumpctl: use strv_skip()
Yu Watanabe [Thu, 21 Mar 2024 20:18:41 +0000 (05:18 +0900)]
coredumpctl: use strv_skip()

No functional change, just refactoring.

20 months agocoredumpctl: use journal_add_match_pair()
Yu Watanabe [Thu, 21 Mar 2024 20:14:33 +0000 (05:14 +0900)]
coredumpctl: use journal_add_match_pair()

Also,
- use is_path(),
- drop unused pid.

20 months agotest: add missing return value check in test-dirent-util
Luca Boccassi [Mon, 25 Mar 2024 12:05:28 +0000 (12:05 +0000)]
test: add missing return value check in test-dirent-util

CID#1540029

Follow-up for 6a57d86bf9d7f8d6f5d339f57665dfb2e1d191c5

20 months agomkosi: Use new environment variables for Arch
Daan De Meyer [Mon, 25 Mar 2024 11:27:56 +0000 (12:27 +0100)]
mkosi: Use new environment variables for Arch

These were changed to be prefixed with _systemd_ so let's account
for that.

20 months agohomework: add missing assert
Luca Boccassi [Mon, 25 Mar 2024 12:02:20 +0000 (12:02 +0000)]
homework: add missing assert

'cache' is used unconditionally in this function, so add an assert.

CID#1540860

20 months agohwdb: Add mapping for ACPI quickstart keys on Toshiba Z830
Hans de Goede [Sun, 24 Mar 2024 14:04:47 +0000 (15:04 +0100)]
hwdb: Add mapping for ACPI quickstart keys on Toshiba Z830

The Toshiba Z830 has 3 hotkeys which use the ACPI PNP0C32 quickstart spec:
https://archive.org/details/microsoft-acpi-dirapplaunch

These devices have an ACPI method called GHID() which suggests
it returns a value from the "HID Usage Tables" document, but these
methods simple returns a follow number for the button (1, 2 and 3).

The first 2 buttons are for what the manual calls "TOSHIBA eco button"
and "TOSHIBA Presentation button", since there is no good match for
these simply map them to KEY_PROG1 and KEY_PROG2.

The third button is intended to toggle the touchpad on/off, map
this to F21 which GNOME/KDE will interpret as touchpad toggle.

20 months agobuild(deps): bump pkg/arch from `4d1ecb0` to `3b86b91`
dependabot[bot] [Mon, 25 Mar 2024 09:13:21 +0000 (09:13 +0000)]
build(deps): bump pkg/arch from `4d1ecb0` to `3b86b91`

Bumps pkg/arch from `4d1ecb0` to `3b86b91`.

---
updated-dependencies:
- dependency-name: pkg/arch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
20 months agobuild(deps): bump pkg/fedora from `2e32a33` to `f1d3866`
dependabot[bot] [Mon, 25 Mar 2024 09:13:26 +0000 (09:13 +0000)]
build(deps): bump pkg/fedora from `2e32a33` to `f1d3866`

Bumps pkg/fedora from `2e32a33` to `f1d3866`.

---
updated-dependencies:
- dependency-name: pkg/fedora
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
20 months agobuild(deps): bump pkg/debian from `3b47281` to `1932e19`
dependabot[bot] [Mon, 25 Mar 2024 09:13:18 +0000 (09:13 +0000)]
build(deps): bump pkg/debian from `3b47281` to `1932e19`

Bumps pkg/debian from `3b47281` to `1932e19`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
20 months agobasic/virt: Fix virtualbox detection on proprietary system via board_vendor
Friedrich Altheide [Wed, 20 Mar 2024 16:48:39 +0000 (17:48 +0100)]
basic/virt: Fix virtualbox detection on proprietary system via board_vendor

Identify an virtualbox instance even if product_name, sys_vendor and bios_vendor reflect the
information of the real hardware, by checking if board_vendor == "Oracle Corporation"

This fixes #13429 again
The previous fix was removed in #21127

20 months agopo: Translated using Weblate (French)
Pierre GRASSER [Fri, 22 Mar 2024 10:36:04 +0000 (11:36 +0100)]
po: Translated using Weblate (French)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Pierre GRASSER <pierre.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main

20 months agotest: explain how Ubuntu CI log URLs are created
Luca Boccassi [Sun, 24 Mar 2024 13:02:56 +0000 (13:02 +0000)]
test: explain how Ubuntu CI log URLs are created

Not trivially obvious, so add a couple of paragraph to explain it

20 months agoshared: Fix TPM2 unsealing when PCR values change
Gabríel Arthúr Pétursson [Wed, 20 Mar 2024 16:48:36 +0000 (16:48 +0000)]
shared: Fix TPM2 unsealing when PCR values change

Recreate the encryption session on each retry. It's invalidated along
with the policy session when freed, failing subsequent retries.

Unsealing HMAC key.
WARNING:esys:src/tss2-esys/api/Esys_Unseal.c:295:Esys_Unseal_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Unseal.c:98:Esys_Unseal() Esys Finish ErrorCode (0x00000128)
A PCR value changed during the TPM2 policy session, restarting HMAC key unsealing (30 tries left).
Missing encryption session
Failed to unseal secret using TPM2: Invalid argument

Fixes #31881

20 months agoMerge pull request #31919 from YHNdnzj/analyze-verify
Luca Boccassi [Sun, 24 Mar 2024 11:50:44 +0000 (11:50 +0000)]
Merge pull request #31919 from YHNdnzj/analyze-verify

Some fixes/improvements for analyze

20 months agoMerge pull request #31916 from YHNdnzj/socket-load-service
Luca Boccassi [Sun, 24 Mar 2024 11:43:37 +0000 (11:43 +0000)]
Merge pull request #31916 from YHNdnzj/socket-load-service

core/socket: validate service unit load state before continuing

20 months agoMerge pull request #31886 from DaanDeMeyer/logind
Mike Yuan [Sun, 24 Mar 2024 11:19:12 +0000 (19:19 +0800)]
Merge pull request #31886 from DaanDeMeyer/logind

logind: Add fallback for when the PIDFDs= property is not available

20 months agoMerge pull request #31917 from keszybz/path-equal-ptr-drop
Luca Boccassi [Sun, 24 Mar 2024 11:10:58 +0000 (11:10 +0000)]
Merge pull request #31917 from keszybz/path-equal-ptr-drop

Drop unnecessary path_equal_ptr() wrapper

20 months agoMerge pull request #31913 from YHNdnzj/dynamic-user-unref
Luca Boccassi [Sun, 24 Mar 2024 11:10:10 +0000 (11:10 +0000)]
Merge pull request #31913 from YHNdnzj/dynamic-user-unref

core/dynamic-user: trivial modernization

20 months agobpf-socket-bind: fix unexpected behavior with either 0 allow or deny rules
networkException [Sun, 10 Mar 2024 17:55:06 +0000 (18:55 +0100)]
bpf-socket-bind: fix unexpected behavior with either 0 allow or deny rules

This patch fixes an issue where, when not specifiying either at least one
`SocketBindAllow` or `SocketBindDeny` rule, behavior for the bind syscall
filtering would be unexpected.

For example, when trying to bind to a port with only "SocketBindDeny=any"
given, the syscall would succeed:

> systemd-run -t -p "SocketBindDeny=any" nc -l 8080

Expected with this set of rules (also in accordance with the documentation)
would be an Operation not permitted error.

This behavior occurs because a default initialized socket_bind_rule struct
matches what "any" represents. When creating the bpf list all elements get
default initialized, as such represeting "any". Seemingly it is necressarry
to set the size of the map to at least one, as such if no allow rule is
given default initialization and minimal map size cause one any allow rule
to be in the map, causing the behavior observed above.

This patch solves this by introducing a new "match nothing" magic stored in
the rule's address family and setting such a rule as the first one if no
rule is given, making sure that default initialized rule structs are never
used.

Resolves #30556

20 months agoAdded resolution for Huion Kamvas Pro 19
mkubiak [Sat, 23 Mar 2024 16:53:01 +0000 (17:53 +0100)]
Added resolution for Huion Kamvas Pro 19

20 months agoMerge pull request #31552 from AdrianVovk/homed-update-policy-v2-split
Luca Boccassi [Sun, 24 Mar 2024 10:11:09 +0000 (10:11 +0000)]
Merge pull request #31552 from AdrianVovk/homed-update-policy-v2-split

Homed update policy: offline updates & use keyring

20 months agoanalyze: refuse --global dot/verify
Mike Yuan [Fri, 22 Mar 2024 16:35:09 +0000 (00:35 +0800)]
analyze: refuse --global dot/verify

I don't quite understand the rationale of making these
verbs work with --global back in the day. But realistically
they interact with/spawn manager, while there's no
--global runtime scope manager. And to verify/inspect user
units it's sufficient to just use --user.

Fixes #31911

20 months agoanalyze-dot: also show BindsTo= in --require
Mike Yuan [Fri, 22 Mar 2024 19:18:42 +0000 (03:18 +0800)]
analyze-dot: also show BindsTo= in --require

20 months agoanalyze-dot: minor modernization
Mike Yuan [Fri, 22 Mar 2024 16:34:53 +0000 (00:34 +0800)]
analyze-dot: minor modernization

20 months agoanalyze-security: use FOREACH_ARRAY
Mike Yuan [Fri, 22 Mar 2024 16:49:45 +0000 (00:49 +0800)]
analyze-security: use FOREACH_ARRAY

20 months agocore/socket: use FOREACH_ARRAY at one more place
Mike Yuan [Sat, 23 Mar 2024 17:07:30 +0000 (01:07 +0800)]
core/socket: use FOREACH_ARRAY at one more place

20 months agocore/socket: clean up socket peer handling a bit
Mike Yuan [Sat, 23 Mar 2024 11:55:27 +0000 (19:55 +0800)]
core/socket: clean up socket peer handling a bit

Currently, SocketPeer object acquired through
socket_acquire_peer() are referenced twice
in socket_enter_running and service_set_socket_fd,
and the reference taken by former gets dropped
through _cleanup_. This is a bit confusing.
Let's just pass ownership instead.

20 months agocore/socket: remove duplicate unit_add_two_dependencies
Mike Yuan [Sat, 23 Mar 2024 09:27:46 +0000 (17:27 +0800)]
core/socket: remove duplicate unit_add_two_dependencies

20 months agocore/socket: validate service unit load state before continuing
Mike Yuan [Sat, 23 Mar 2024 09:26:55 +0000 (17:26 +0800)]
core/socket: validate service unit load state before continuing

Fixes #31915

20 months agocore: introduce UNIT_IS_LOAD_ERROR helper
Mike Yuan [Sat, 23 Mar 2024 09:37:36 +0000 (17:37 +0800)]
core: introduce UNIT_IS_LOAD_ERROR helper

20 months agoshared/install: use PATH_IN_SET()
Zbigniew Jędrzejewski-Szmek [Sat, 23 Mar 2024 12:30:24 +0000 (13:30 +0100)]
shared/install: use PATH_IN_SET()

20 months agoDrop unnecessary path_equal_ptr() wrapper
Zbigniew Jędrzejewski-Szmek [Sat, 23 Mar 2024 12:18:24 +0000 (13:18 +0100)]
Drop unnecessary path_equal_ptr() wrapper

path_equal already works with NULL pointers.

20 months agocore/swap: another try on memory mgmt
Mike Yuan [Sat, 23 Mar 2024 08:53:50 +0000 (16:53 +0800)]
core/swap: another try on memory mgmt

Follow-up for ba31a5018f99864c22dd4e0f10712456c7abc934

Another stupid mistake... Shouldn't have
written anything when I was tired.

20 months agoFix bpf-framework build failure with gcc-bpf
Michael Biebl [Fri, 22 Mar 2024 12:26:45 +0000 (13:26 +0100)]
Fix bpf-framework build failure with gcc-bpf

The -mkernel option was dropped in
https://github.com/gcc-mirror/gcc/commit/da445a5858299ed2a72af1089c225a438ab93ce2

We also need to ensure that the include paths are properly set for the
linux kernel headers.

Fixes: #31869

20 months agoMerge pull request #31907 from mrc0mmand/efi-shenanigans
Zbigniew Jędrzejewski-Szmek [Sat, 23 Mar 2024 11:04:14 +0000 (12:04 +0100)]
Merge pull request #31907 from mrc0mmand/efi-shenanigans

efi: check if all sections of our EFI binaries are properly aligned

20 months agoMerge pull request #31779 from keszybz/elf2efi-clang-18
Zbigniew Jędrzejewski-Szmek [Sat, 23 Mar 2024 11:02:34 +0000 (12:02 +0100)]
Merge pull request #31779 from keszybz/elf2efi-clang-18

Make elf2efi work with clang-18

20 months agoTEST-46-HOMED: Disable auth rate-limiting
Adrian Vovk [Tue, 5 Mar 2024 17:25:42 +0000 (12:25 -0500)]
TEST-46-HOMED: Disable auth rate-limiting

Rate limiting authentication attempts in the test can cause somewhat
sporadic test failures: adding a test case might suddenly cause future
test cases to fail because of too many authentication attempts too
quickly

We're not trying to test the rate-limiting, we're trying to test the
functionality of homed. So we effectively disable rate-limiting on all
the home areas we create

20 months agoupdate TODO
Adrian Vovk [Thu, 1 Feb 2024 19:15:48 +0000 (14:15 -0500)]
update TODO

20 months agohomework: Implement offline updates
Adrian Vovk [Thu, 1 Feb 2024 18:35:03 +0000 (13:35 -0500)]
homework: Implement offline updates

This makes it possible to update a home record (and blob directory) of a
home area that's either completely absent (i.e. on a USB stick that's
unplugged) or just inaccessible due to lack of authentication

20 months agohomework: Accept volume key from keyring
Adrian Vovk [Thu, 1 Feb 2024 16:43:48 +0000 (11:43 -0500)]
homework: Accept volume key from keyring

This bypasses authentication (i.e. user_record_authenticate) if the
volume key was loaded from the keyring and no secret section is
provided.

This also changes Update() and Resize() to always try and load the
volume key from the keyring. This makes the secret section optional for
these methods while still letting them function (as long as the home
area is active)

20 months agohomework: Always upload volume key to keyring
Adrian Vovk [Thu, 1 Feb 2024 04:49:24 +0000 (23:49 -0500)]
homework: Always upload volume key to keyring

This commit makes homework always upload the LUKS volume key into the
kernel keyring. This is different from previous behavior in three
notable ways:

- Previously, we'd only upload if auto-resize was on. In preparation for
upcoming changes, now we always upload

- Previously, we'd upload the user's actual password (or a password
obtained from a FIDO key or similar). Now, we upload the LUKS volume key
itself, to remove a layer of unnecessary indirection.

- Previously, Lock() wouldn't remove the key from the kernel keyring.
This, of course, defeats the purpose of Lock(), so now it removes the
key

This commit also allows the LUKS volume to be unlocked using the volume
key we obtained from the keyring.

20 months agohomed: Ensure closed FD is handled before bus req
Adrian Vovk [Thu, 21 Mar 2024 17:51:16 +0000 (13:51 -0400)]
homed: Ensure closed FD is handled before bus req

Before this fix, the following sequence of events was possible:
1. A client holding a Ref() FD closes their FD
2. kernel sends notification that all clients closed their FDs
3. Another client obtains its own Ref() FD from homed
4. homed handles the notification that all clients have closed their
   Ref() FDs. Thus it loses track of the fact that the session is
   actually still being held open by the client from step 3

This change makes sure that homed won't respond to bus messages (and
thus won't open more Ref() FDs) until it has handled all notifications
about the existing FDs being closed.

logind has had a very similar fix applied to it in
e11544a8305ab9dea097c74bb16e296150c9cc10

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

20 months agocore/dynamic-user: trivial modernization
Mike Yuan [Fri, 22 Mar 2024 19:43:30 +0000 (03:43 +0800)]
core/dynamic-user: trivial modernization

20 months agocore/execute: use STR_IN_SET where appropriate
Mike Yuan [Fri, 22 Mar 2024 17:26:22 +0000 (01:26 +0800)]
core/execute: use STR_IN_SET where appropriate

20 months agoMerge pull request #31670 from CodethinkLabs/vmspawn/generate_ssh_keys
Luca Boccassi [Fri, 22 Mar 2024 16:28:03 +0000 (16:28 +0000)]
Merge pull request #31670 from CodethinkLabs/vmspawn/generate_ssh_keys

vmspawn: generate ssh keys

20 months agoMerge pull request #31908 from DaanDeMeyer/mkosi
Luca Boccassi [Fri, 22 Mar 2024 16:22:42 +0000 (16:22 +0000)]
Merge pull request #31908 from DaanDeMeyer/mkosi

Various mkosi fixes

20 months agotree-wide: Add allow_pidfd argument to bus_append_scope_pidref()
Daan De Meyer [Fri, 22 Mar 2024 16:03:35 +0000 (17:03 +0100)]
tree-wide: Add allow_pidfd argument to bus_append_scope_pidref()

20 months agomkosi: Switch to Arch Linux packaging sources main branch
Daan De Meyer [Fri, 22 Mar 2024 15:49:46 +0000 (16:49 +0100)]
mkosi: Switch to Arch Linux packaging sources main branch

https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/merge_requests/8
was merged so let's switch branches to the main branch.

20 months agomkosi: Disable debug package generation on Arch Linux
Daan De Meyer [Fri, 22 Mar 2024 15:49:10 +0000 (16:49 +0100)]
mkosi: Disable debug package generation on Arch Linux

This is extremely slow since the latest pacman release, and since
we don't strip binaries, not really needed either.

20 months agotools/elf2efi: elif→if to make pylint happy
Zbigniew Jędrzejewski-Szmek [Fri, 22 Mar 2024 14:44:17 +0000 (15:44 +0100)]
tools/elf2efi: elif→if to make pylint happy

20 months agotools/elf2efi: skip empty .got section and its .relro_padding
Zbigniew Jędrzejewski-Szmek [Thu, 14 Mar 2024 09:33:11 +0000 (10:33 +0100)]
tools/elf2efi: skip empty .got section and its .relro_padding

Resolves https://github.com/systemd/systemd/issues/31637.

lld-18 does the section setup differently than older versions. There is a bunch
of ordering chagnes, but it also inserts the following:

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
...
  9 .got          00000000  00000000000283c0  00000000000283c0  000283c0  2**3
                  CONTENTS, ALLOC, LOAD, DATA
 10 .relro_padding 00000c40  00000000000283c0  00000000000283c0  000283c0  2**0
                  ALLOC
 11 .data         00000024  00000000000293c0  00000000000293c0  000283c0  2**4
                  CONTENTS, ALLOC, LOAD, DATA
...

This causes a problem for us, because we try to map the .got to .rodata,
and the subsequent .data to .data, and round down the VMA to the nearest
page, which causes the PE sections to overlap.

https://github.com/llvm/llvm-project/pull/66042 adds .relro_padding to make
sure that the RELRO segment is properly write protected and allocated. For our
binaries, the .got section is empty, so we can skip it safely, and the
.relro_padding section is not useful once .got has been dropped.

We don't expect .got sections, but they are apparently inserted on i386 and
aarch64 builds. Emit a warning until we figure out why they are there.

20 months agomkosi: Enable log context
Daan De Meyer [Fri, 22 Mar 2024 14:15:01 +0000 (15:15 +0100)]
mkosi: Enable log context

20 months agomkosi: Make sure man and man-db are installed everywhere
Daan De Meyer [Fri, 22 Mar 2024 14:12:20 +0000 (15:12 +0100)]
mkosi: Make sure man and man-db are installed everywhere

20 months agotest: Install test journals
Daan De Meyer [Fri, 22 Mar 2024 11:08:52 +0000 (12:08 +0100)]
test: Install test journals

Let's package these just like we package other test data.

20 months agoMerge pull request #31839 from DaanDeMeyer/log
Daan De Meyer [Fri, 22 Mar 2024 14:11:11 +0000 (15:11 +0100)]
Merge pull request #31839 from DaanDeMeyer/log

log: Add per target log levels

20 months agoefi: check if all sections of our EFI binaries are properly aligned
Frantisek Sumsal [Fri, 22 Mar 2024 12:35:38 +0000 (13:35 +0100)]
efi: check if all sections of our EFI binaries are properly aligned

20 months agoAdded more ASSERT macro and also make some test file to use them
Unique-Usman [Wed, 20 Mar 2024 17:35:55 +0000 (23:05 +0530)]
Added more ASSERT macro and also make some test file to use them

20 months agoMerge pull request #31902 from YHNdnzj/swap-followup
Luca Boccassi [Fri, 22 Mar 2024 12:08:53 +0000 (12:08 +0000)]
Merge pull request #31902 from YHNdnzj/swap-followup

core: some follow-ups

20 months agolog: Add per target log levels
Daan De Meyer [Wed, 20 Mar 2024 08:34:46 +0000 (09:34 +0100)]
log: Add per target log levels

For CI in mkosi, I want to configure systemd to log at debug level
to the journal, but not to the console. While we already have max
level settings for journald's forwarding settings, not every log line
goes to the journal, specifically during early boot and when units
are connected directly to the console (think systemd-firstboot), so
let's extend the log level options we already have to allow specifying
a comma separated list of values and lets allow prefixing values with
the log target they apply to to make this possible.

20 months agoefi: fix mixed indent
Frantisek Sumsal [Fri, 22 Mar 2024 11:11:49 +0000 (12:11 +0100)]
efi: fix mixed indent

20 months agoMerge pull request #31900 from DaanDeMeyer/dissect
Yu Watanabe [Fri, 22 Mar 2024 11:07:34 +0000 (20:07 +0900)]
Merge pull request #31900 from DaanDeMeyer/dissect

nspawn logging fix

20 months agocore/mount: use ASSERT_PTR in mount_setup_new_unit
Mike Yuan [Fri, 22 Mar 2024 10:36:01 +0000 (18:36 +0800)]
core/mount: use ASSERT_PTR in mount_setup_new_unit

20 months agocore/swap: fix memory management in swap_setup_unit
Mike Yuan [Fri, 22 Mar 2024 10:26:55 +0000 (18:26 +0800)]
core/swap: fix memory management in swap_setup_unit

Follow-up for e9fa1bf704ad2f0a7e257e29889315118b0df459

20 months agonspawn: Use dissect_image_mount_and_warn()
Daan De Meyer [Fri, 22 Mar 2024 09:48:46 +0000 (10:48 +0100)]
nspawn: Use dissect_image_mount_and_warn()

20 months agodissect-image: Improve error messages
Daan De Meyer [Fri, 22 Mar 2024 09:48:35 +0000 (10:48 +0100)]
dissect-image: Improve error messages

20 months agosd-journal: introduce two helper functions for adding filter
Yu Watanabe [Thu, 21 Mar 2024 19:43:31 +0000 (04:43 +0900)]
sd-journal: introduce two helper functions for adding filter

20 months agoMerge pull request #31868 from bluca/test_cleanup
Luca Boccassi [Thu, 21 Mar 2024 23:45:49 +0000 (23:45 +0000)]
Merge pull request #31868 from bluca/test_cleanup

test: delete private images on clean-again

20 months agoMerge pull request #31892 from YHNdnzj/machinectl-minor-cleanup
Yu Watanabe [Thu, 21 Mar 2024 23:10:39 +0000 (08:10 +0900)]
Merge pull request #31892 from YHNdnzj/machinectl-minor-cleanup

machinectl: minor modernization, use FOREACH_ARRAY

20 months agosd-boot: add support for support enrolling dbx
Gerd Hoffmann [Tue, 19 Mar 2024 13:49:51 +0000 (14:49 +0100)]
sd-boot: add support for support enrolling dbx

usage:
  (1) get latest revocation list for your architecture
      from https://uefi.org/revocationlistfile
  (2) copy the file to $ESP/loader/keys/$name/dbx.auth

20 months agodocs: Add one more git submodule setting to configure
Daan De Meyer [Thu, 21 Mar 2024 15:07:58 +0000 (16:07 +0100)]
docs: Add one more git submodule setting to configure

20 months agocgroup-util: use path_find_first_component where appropriate
Mike Yuan [Thu, 21 Mar 2024 10:29:07 +0000 (18:29 +0800)]
cgroup-util: use path_find_first_component where appropriate

Prompted by 8922a728f732a716ecd17dd67cd39bc1a0fc4aa5

20 months agoMerge pull request #31890 from YHNdnzj/ASSERT_PTR
Yu Watanabe [Thu, 21 Mar 2024 22:57:46 +0000 (07:57 +0900)]
Merge pull request #31890 from YHNdnzj/ASSERT_PTR

core: use ASSERT_PTR and RET_GATHER more

20 months agodbus-exporter: Set explicit mode on output directory
Daan De Meyer [Thu, 21 Mar 2024 18:14:56 +0000 (19:14 +0100)]
dbus-exporter: Set explicit mode on output directory

Otherwise the created directory might have the sticky bit or the setgid
bit set as these are inherited from the parent directory.

20 months agomachinectl: minor modernization, use FOREACH_ARRAY
Mike Yuan [Thu, 21 Mar 2024 13:53:39 +0000 (21:53 +0800)]
machinectl: minor modernization, use FOREACH_ARRAY

Prompted by 237bbec1173b41c0e0f2eaf9c30e19ab82073b8d

20 months agonulstr-util: minor cleanup
Mike Yuan [Thu, 21 Mar 2024 11:07:23 +0000 (19:07 +0800)]
nulstr-util: minor cleanup

20 months agocore: use RET_GATHER more
Mike Yuan [Thu, 21 Mar 2024 17:23:07 +0000 (01:23 +0800)]
core: use RET_GATHER more

20 months agocore: use ASSERT_PTR(CAST(u)) everywhere
Mike Yuan [Thu, 21 Mar 2024 17:22:31 +0000 (01:22 +0800)]
core: use ASSERT_PTR(CAST(u)) everywhere

20 months agologind: Add fallback for when the PIDFDs= property is not available
Daan De Meyer [Thu, 21 Mar 2024 14:48:54 +0000 (15:48 +0100)]
logind: Add fallback for when the PIDFDs= property is not available

logind is not zero-downtime restartable yet, specifically it's not yet
restarted in the Fedora spec, so we can end up in situations where we're
running newer logind with older pid1 which doesn't know about the PIDFDs=
property, so let's make sure we have a fallback in place for when that
happens.

20 months agoMerge pull request #31880 from yuwata/network-varlink-trivial-cleanups
Yu Watanabe [Thu, 21 Mar 2024 13:00:52 +0000 (22:00 +0900)]
Merge pull request #31880 from yuwata/network-varlink-trivial-cleanups

network: trivial varlink cleanups

20 months agobuild(deps): bump pkg/fedora from `2822a03` to `2e32a33`
dependabot[bot] [Thu, 21 Mar 2024 09:39:48 +0000 (09:39 +0000)]
build(deps): bump pkg/fedora from `2822a03` to `2e32a33`

Bumps pkg/fedora from `2822a03` to `2e32a33`.

---
updated-dependencies:
- dependency-name: pkg/fedora
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>