Commit graph

71296 commits

Author SHA1 Message Date
Mike Yuan 3d3c42773d
docs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK) 2024-02-24 13:26:19 +08:00
Luca Boccassi 857945cc5f 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.
2024-02-24 12:58:13 +09:00
Georges Basile Stavracas Neto afdf63fcf2 hwdb: Add support for Elgato Stream Deck Plus
Add support for the following device:

 - ID 0fd9:0084 Elgato Systems GmbH Stream Deck Plus
2024-02-24 11:45:11 +09:00
Yu Watanabe 16a52db488 docs: fix typo 2024-02-24 11:30:39 +09:00
Luca Boccassi 6036f62c51 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.
2024-02-24 08:16:07 +08:00
Luca Boccassi bb394133cb
Merge pull request #31464 from poettering/vmspawn-limit-bank
vmspawn: disable all TPM PCR banks, except for SHA256
2024-02-23 22:04:44 +00:00
Lennart Poettering d4ece77f5e 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.
2024-02-23 21:15:25 +00:00
Luca Boccassi 461c85838e
Merge pull request #31465 from xypron/detect-virt
Detect virtualization on RISC-V
2024-02-23 20:50:51 +00:00
Lennart Poettering db7136ec73 signal-util: imply sentinel -1 in sigprocmask_many() + sigset_add_many() args list 2024-02-23 09:35:12 -08:00
Lennart Poettering f58411a22f signal-util: use RET_NERRNO() + RET_GATHER() more 2024-02-23 09:35:12 -08:00
Heinrich Schuchardt 5041e771a8 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>
2024-02-23 17:29:20 +01:00
Lennart Poettering a9791a4192 update TODO 2024-02-23 17:29:06 +01:00
Lennart Poettering 519bad6c2c 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.
2024-02-23 17:27:56 +01:00
Lennart Poettering d90a05b68f vmspawn: drop "const" from string we free
I am a bit surprised this compiled at all...
2024-02-23 17:27:18 +01:00
Heinrich Schuchardt 819874adc0 detect-virt: allow detection via device-tree on RISC-V
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-23 17:25:59 +01:00
Lennart Poettering 72bdf0ac67
Merge pull request #31455 from keszybz/restore-docs-urls
Restore docs urls
2024-02-23 15:59:44 +01:00
Lennart Poettering bebe5f1a74
Merge pull request #31456 from poettering/tpm1.2-no-more
sd-stub: drop any support for TPM 1.2
2024-02-23 14:52:20 +01:00
Sam Leonard 5df0159ef2 ssh-generator: add mention of ssh.authorized_keys.root to man page 2024-02-23 12:52:28 +00:00
Lennart Poettering 085a4d4723 update TODO 2024-02-23 13:20:19 +01:00
Luca Boccassi e0699e067e
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
2024-02-23 11:57:42 +00:00
Lennart Poettering eb9b95f9d8 update TODO 2024-02-23 11:09:08 +01:00
Lennart Poettering ffef7a68d3 update TODO 2024-02-23 11:08:14 +01:00
Zbigniew Jędrzejewski-Szmek 0ace2560ea
Merge pull request #31352 from DaanDeMeyer/versioning
Rework meson-vcs-tag.sh
2024-02-23 11:07:56 +01:00
Lennart Poettering 13fc754dc3 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.
2024-02-23 10:56:54 +01:00
Yu Watanabe d0a337bb72 sd-dhcp,sd-ndisc: drop mistakenly set copyright
Follow-ups for
  6efa51f862 (sd-dhcp-client-id.h),
  97c3506dcd (sd-dhcp-duid.h),
  461dbb2fa9 (sd-dhcp-option.h),
  dd8ab4a206 (sd-dhcp-server-lease.h),
  ca34b43481 (sd-ndisc-protocol.h and sd-ndisc-router.h).
2024-02-23 10:09:26 +01:00
Zbigniew Jędrzejewski-Szmek 1b4dc2ea28 docs: drop .md suffixes again 2024-02-23 09:56:00 +01:00
Zbigniew Jędrzejewski-Szmek 8e3fee33af Revert "docs: use collections to structure the data"
This reverts commit 5e8ff010a1.

This broke all the URLs, we can't have that. (And actually, we probably don't
_want_ to make the change either. It's nicer to have all the pages in one
directory, so one doesn't have to figure out to which collection the page
belongs.)
2024-02-23 09:48:47 +01:00
Jan Macku a62013b382 ci(freezer): use GitHub Markdown magic for messages
It should make messages easier to notice.

GitHub docs: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts
2024-02-23 08:44:10 +00:00
Max Staudt 04f19d6735 udev: Add /dev/media/by-path symlinks for media controllers
Add persistent symlinks for media controller ("mediaX") devices, based
on their ID_PATH udev properties.

For example, if the uvcvideo driver creates /dev/media0, a persistent
name may be:
/dev/media/by-path/pci-0000:04:00.3-usb-0:1:1.0-media-controller

Persistent links are a handy tool to make scripts self-documenting
during development or in tests, as well as less error prone in case of
devices changing enumeration order. For media controllers, one can
alternatively scan through all of them and look for a matching bus_info
in their struct media_device_info, but the links are much handier when
drafting something by hand.

A similar pattern already exists for Video4Linux /dev/videoX devices,
see 60-persistent-v4l.rules for those.
2024-02-22 19:27:29 +00:00
Yu Watanabe 3976c43092 network: introduce per-interface IP forwarding settings
This deprecates IPForward= setting, which unconditionally controled
the global setting, even though it is a setting in .network file.

Instead, this introduces new IPv4Forwarding= and IPv6Forwarding=
settings both in .network and networkd.conf.
If these settings are specified in a .network file, then the
per-interface forwarding setting will be configured.
If specified in networkd.conf, then the global IP forwarding setting will
be configured.

Closes #30648.
2024-02-22 19:24:12 +00:00
zzywysm 755fdfffa0 README: mention fq_codel
In 2014, systemd started choosing fq_codel as the default_qdisc in order to fight internet bufferbloat.

e6c253e363
fa98c99ea7

While the subsequent change made this change no longer trigger warnings if fq_codel wasn't present, it is still recommended to have this enabled.  Add the necessary kernel configuration to the documentation.
2024-02-22 19:14:31 +00:00
Luca Boccassi 623af61df9
Merge pull request #31441 from yuwata/sd-ndisc-fix-timer
sd-ndisc: disable timer event source only when a valid RA received
2024-02-22 18:48:43 +00:00
Luca Boccassi c0b5b74ae3
Merge pull request #31445 from keszybz/slow-tests
Mark more tests as slow
2024-02-22 14:14:23 +00:00
Luca Boccassi 909c4f8587
Merge pull request #31414 from poettering/bsod-tweaks
bsod: some small bsod tweaks
2024-02-22 12:48:38 +00:00
Zbigniew Jędrzejewski-Szmek 9df75c85a3 docs: fix typo in page name
Fixup for 163e2c8346.
2024-02-22 13:01:17 +01:00
Luca Boccassi a0d2c41ed6
Merge pull request #31432 from poettering/vmspawn-qemu-rename
vmspawn: drop "qemu" word from most switches
2024-02-22 11:04:45 +00:00
Zbigniew Jędrzejewski-Szmek c27ba8fb67
Merge pull request #31178 from neighbourhoodie/add-old-website-content
Migrate the content of the old website
2024-02-22 12:04:29 +01:00
Zbigniew Jędrzejewski-Szmek 37eba4b302 test-nss-hosts: treat negative host lookup as slow
The negative lookup can be quite slow. On my local network, skipping
this test saves about half of the runtime of test-nss-hosts.
2024-02-22 11:37:17 +01:00
Zbigniew Jędrzejewski-Szmek a181901ab2 test-ukify: skip signing in tests when slow tests are disabled
I have a large initrd (built with mkosi-initrd) and the test-ukify takes 30 s.
Let's use the usual approach of skipping the slowests tests.

(pytest has marks, and it would be nicer to mark tests with pytest.mark.slow,
and then use "-m 'not slow'" in the meson test invocation. But markers must be
pre-registered, otherwise pytest emits a warning. There are a few ways to
register markers, but they all require "project configuration", but because of
how we invoke pytest, this is hard to do. So let's just use an environment
variable.)
2024-02-22 11:37:17 +01:00
hulkoba 5e8ff010a1
docs: use collections to structure the data 2024-02-22 10:11:54 +01:00
hulkoba 4049d92fda
docs: add distributions and mastodon 2024-02-22 10:11:10 +01:00
hulkoba 6b2a277624
docs: add Manuals and Documentation for Users and Administrators 2024-02-22 10:11:10 +01:00
Mariano Giménez 163e2c8346
docs: add documentation for developers 2024-02-22 10:11:09 +01:00
Mariano Giménez 313f2ebc88
add related packages links 2024-02-22 10:11:09 +01:00
Mariano Giménez b6d06b85f0
add The systemd for Developers Series pages 2024-02-22 10:11:08 +01:00
Mariano Giménez 1c4f6bb60a
add administrators blog series links to extra_pages.json 2024-02-22 10:11:08 +01:00
Mariano Giménez 65c63edcd9
add videos and presentations 2024-02-22 10:11:07 +01:00
Mariano Giménez 7d4afa76e3
add publications to extra_pages.json 2024-02-22 10:11:05 +01:00
Yu Watanabe 189eeddaec sd-ndisc: actually refuse RA message from null address 2024-02-22 14:35:24 +09:00
Yu Watanabe e7cb80474d sd-ndisc: disable timer event source only when a valid RA received
Fixes #31439.
2024-02-22 14:35:24 +09:00