Commit Graph
55426 Commits
Author SHA1 Message Date
Yu Watanabe d96ad9e8cb missing-syscall: add __NR_openat2 2022-01-03 03:48:37 +09:00
Yu Watanabe 0c718b1a67 syscalls: update syscall definitions 2022-01-03 03:48:37 +09:00
Yu Watanabe 3c80c7bacf Merge pull request #21928 from medhefgo/boot-meson
meson: Boot
2022-01-02 23:40:46 +09:00
Jan Janssen d9fd84fc5d boot: Add disabled secure boot mode without setup mode 2022-01-02 23:31:23 +09:00
Marco Scardovi 7bd3d6e35a make HP 15s-eq0xxx changes specific to sku9MG38EA#ABZ
Signed-Off-By: Marco Scardovi <marco@scardovi.com>
2022-01-02 12:22:07 +00:00
Frantisek Sumsal 3b5816ba33 Merge pull request #21915 from evverx/fuzz-bcd
tests: add fuzz-bcd
2022-01-02 10:05:13 +00:00
Jan Janssen 2f2b072267 meson: Get objcopy location from compiler 2022-01-02 10:18:26 +01:00
Jan Janssen 52adf0e91e meson: Remove efi-cc option
Changing the efi compiler this way doesn't really work. The gnu-efi
header checks as well as supported compiler flag checks use the
regular cc that meson detects. Changing the compiler this way will
end up with bad compiler flags. For the very same reason, this does
not work with a cross-compiler without going through proper meson
cross-compilation steps either.

The proper way to build systemd-boot with a different compiler is to
use a different build folder and then just use the proper ninja build
target to only build the bootloader/stub.
2022-01-02 10:18:26 +01:00
dependabot[bot] b774de1883 build(deps): bump meson from 0.60.2 to 0.60.3 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 0.60.2 to 0.60.3.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.60.2...0.60.3)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-01 17:40:39 +03:00
Yu Watanabe 60e930fc3e udev: fix ID_NET_NAME_MAC= udev property
This fixes a bug introduced by eaba9bb3e6.

The commit mistakenly drops 'x' in ID_NET_NAME_MAC, and adds colons.
The colons were dropped by the commit dfa4876c41,
but the missing 'x' was not added at that time.

Follow-up for dfa4876c41.
2021-12-31 13:21:12 +00:00
Zbigniew Jędrzejewski-Szmek aac8071730 meson: fix detection of libcryptsetup functions
Meson would generate the following compile test:

  #define crypt_set_metadata_size meson_disable_define_of_crypt_set_metadata_size

  #include <limits.h>
  #undef crypt_set_metadata_size

  #ifdef __cplusplus
  extern "C"
  #endif
  char crypt_set_metadata_size (void);

  #if defined __stub_crypt_set_metadata_size || defined __stub___crypt_set_metadata_size
  fail fail fail this function is not going to work
  #endif

  int main(void) {
    return crypt_set_metadata_size ();
  }

This works fine when the identifier being queried is an actual function. But
crypt_token_max() is an inline function, so getting the address would fail,
leading to a false negative result. Complation would fail because the function
would be defined twice.

With this patch, the check is changed to include the header:

  #include <libcryptsetup.h>
  #include <limits.h>

  #if defined __stub_crypt_set_metadata_size || defined __stub___crypt_set_metadata_size
  fail fail fail this function is not going to work
  #endif

  int main(void) {
    void *a = (void*) &crypt_set_metadata_size;
    long long b = (long long) a;
    return (int) b;
  }

which seems to work correctly.
2021-12-31 07:02:29 +09:00
Luca Boccassi af73d8bd83 Merge pull request #21940 from yuwata/network-wireguard-mask-allowed-ips
network: wireguard: handle invalid AllowedIPs= gracefully
2021-12-30 21:18:05 +00:00
Yu Watanabe 1e65eb8f9b nss-systemd: fix required buffer size calculation
This also fixes the pointer assigned to the gr_mem element of struct group.

Fixes a bug introduced by 47fd7fa6c6.

Fixes #21935.
2021-12-31 03:12:09 +09:00
Yu Watanabe b78d7f2468 sysusers: use filename if /proc is not mounted
During system install, /proc may not be mounted yet.

Fixes RHBZ#2036217 (https://bugzilla.redhat.com/show_bug.cgi?id=2036217).
2021-12-31 03:11:43 +09:00
Yu Watanabe 14b451f20a test-network: add testcase for invalid AllowedIPs= 2021-12-31 02:31:12 +09:00
Yu Watanabe af670fc635 network: wireguard: warn about invalid allowed IP addresses
But handle them gracefully. Otherwise, when the route to the address is
being configured, kernel refuse the route.

Note that kernel's wireguard module handle e.g. 192.168.10.3/24 as
192.168.10.0/24.

Fixes #21929.
2021-12-31 02:31:09 +09:00
Noel Kuntze 0d03e672a9 network: complete example for xfrm setup 2021-12-30 23:52:28 +09:00
Luca Boccassi 466f2351bb systemd-run: ensure error logs suggest to use '--user' when appropriate
Before:

$ systemd-run --service-type=notify --user false
Job for run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service failed because the control process exited with error code.
See "systemctl status run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service" and "journalctl -xeu run-rc3fe52ee6ddd4a6eaaf1a20e0a949cdf.service" for details.

After:

$ systemd-run --service-type=notify --user false
Job for run-r7791e380a7b6400ea01d6a0e5a458b23.service failed because the control process exited with error code.
See "systemctl --user status run-r7791e380a7b6400ea01d6a0e5a458b23.service" and "journalctl --user -xeu run-r7791e380a7b6400ea01d6a0e5a458b23.service" for details.

Fixes https://github.com/systemd/systemd/issues/21933
2021-12-30 23:50:45 +09:00
Luca Boccassi 86980de64b dbus-wait-for-jobs: add extra_args to bus_wait_for_jobs_one()
And pass it through to bus_wait_for_jobs()
2021-12-30 23:50:45 +09:00
Luca Boccassi b3bfe6b9e1 Merge pull request #21922 from medhefgo/boot-fix
boot: More BCD parser fixes
2021-12-29 19:35:42 +00:00
Ludwig Nussel b13a8b5b37 test: mark partition bootable
Make test suite partition bootable so nspawn can use the image directly.
Useful for local testing.

https://systemd.io/DISCOVERABLE_PARTITIONS/
2021-12-29 19:23:26 +00:00
Jan Janssen aa1d0f2587 boot: Introduce helper macros for offset checking
This fixes a subtle sizeof overflow on 32bit machines.
2021-12-29 14:39:54 +01:00
Jan Janssen 1cadb35fd6 boot: Reject unaligned data
The data seems to be properly aligned in real BCD stores, so it
should be fine to just reject bad ones.

Fixes: #21917
2021-12-29 14:39:54 +01:00
Jan Janssen 77fcf28cb8 boot: Build BCD parser only on arches supported by Windows 2021-12-29 14:39:54 +01:00
Luca Boccassi d39d3696c0 Merge pull request #21898 from yuwata/meson-dbus-interfaces-dir
meson: obtain dbus related directories from pkg-config
2021-12-29 12:39:50 +00:00
Yu Watanabe 9c1b17c3dc manager: always close idle pipe when sending ready notification
This fixes a bug introduced by 6d93265955.

The commit makes several functions skipped if the manager is already
in finished state, as
> In manager_check_finished(), more steps are skipped if MANAGER_IS_FINISHED().
> Those steps are idempotent, but no need to waste cycles trying to do them
> more than once.

However, the idle pipe may be re-opened after manager is finished:
manager_dispatch_run_queue() -> manager_watch_idle_pipe().
So, the closing the pipe is not idempotent here.

Fixes #21889.
2021-12-29 12:35:48 +00:00
Evgeny Vereshchagin c84059f16e oss-fuzz: turn on the alignment check 2021-12-29 10:39:06 +00:00
Evgeny Vereshchagin 4b65fc8725 tests: add fuzz-bcd 2021-12-29 10:39:06 +00:00
ksa678491784 5204355861 stub: Do not assume having DeviceHandle 2021-12-29 11:59:57 +09:00
Yu Watanabe 80bfc3b901 network: ndisc: ignore route prefix to ::/0
Fixes #21912.
2021-12-28 21:00:49 +00:00
Luca Boccassi 69b5c7cf2a Merge pull request #21925 from yuwata/unit-file-symlinked-drop-in-directory
unit-file: fix symlinked drop-in directory handling
2021-12-28 20:38:24 +00:00
Yu Watanabe cf6562e456 test: add testcases of symlinked drop-in directories 2021-12-29 01:29:21 +09:00
Yu Watanabe 7f304b8561 unti-file: fix symlinked drop-in directory handling
This fixes a bug introduced by 95ef0eaf0d.

Fixes #21920.
2021-12-29 01:29:17 +09:00
Yu Watanabe 1bd0cc452c meson: obtain dbus directories from pkg-config 2021-12-28 23:00:58 +09:00
Yu Watanabe 7e560e79eb meson: show dbus interfaces directory in summary 2021-12-28 22:52:24 +09:00
Yu Watanabe 320848a6ba meson: move dbus-interfaces-dir 2021-12-28 22:52:24 +09:00
Luca Boccassi 4b3ad81bfa core: do not touch /run/systemd/systemd-units-load from user session instances
Follow-up for: https://github.com/systemd/systemd/commit/15b9243c0d7f6d1531fa65dbc01bd11e8e6c12ca
Fixes: https://github.com/systemd/systemd/issues/21911
2021-12-28 22:07:02 +09:00
Luca Boccassi e99f8605e2 Merge pull request #21916 from medhefgo/boot-fix
boot: Fixes
2021-12-28 11:48:19 +00:00
Jan Janssen 2198a77391 boot: Fix name length comparison 2021-12-27 22:49:02 +01:00
Jan Janssen c3c5b93a0c boot: Fix off-by-one offset sanity checks 2021-12-27 22:46:40 +01:00
Jan Janssen fab8275646 boot: Fix off-by-one NUL-termination 2021-12-27 22:41:50 +01:00
dependabot[bot] 987202b2c1 build(deps): bump github/super-linter from 4.8.4 to 4.8.5
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.4 to 4.8.5.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/563be7dc5568017515b9e700329e9c6d3862f2b7...b8641364ca9a79b3cf07f3c4c59a82709cd39094)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-27 12:33:34 +03:00
Luca Boccassi 7c3b51c469 chrattr-util: return EOPNOTSUPP from chrattr_full if no other failure was observed
When chattr_full tries to apply flags one-by-one, and one fails,
record which errno was returned. But record EOPNOTSUPP(&friends)
only if no other error is observed, and return it only in that case
(otherwise keep returning ENOANO), so that callers can respond
appropriately to EOPNOTSUPP vs more relevant errors.
For example, this lets tmpfiles.d log at debug level when a filesystem
flag cannot be applied because the filesystem does not support it,
but at warning level if something else went wrong when applying it.
Restores logging behaviour of tmpfiles.d to pre-250.

Follow-up for: https://github.com/systemd/systemd/commit/c1631ee124a30abfb9c71e2a1534b8afffc3b6a7

Fixes: https://github.com/systemd/systemd/issues/21901
2021-12-27 08:28:26 +09:00
Luca Boccassi a2ccfc9ccb Merge pull request #21881 from yuwata/update-linux-headers
Update linux headers
2021-12-26 17:30:47 +00:00
Luca Boccassi 4ac8526215 Merge pull request #21892 from yuwata/network-vxlan-automatic-local-address-selection
network: vxlan: automatic local address selection
2021-12-26 17:27:41 +00:00
Evgeny Vereshchagin bfa6bd1be0 ci: replace apt-key with signed-by
to limit the scope of the key to apt.llvm.org only.

This is mostly inspired by https://blog.cloudflare.com/dont-use-apt-key/
2021-12-26 15:38:42 +00:00
Hans de Goede 04b457d8ef hwdb: 60-keyboard: Fix volume-button mapping on Asus TF103C
The Asus TF103C misses the home button in its PNP0C40 GPIO resources
causing the button mappings for the volume buttons to be off by one,
leading to the volume-up button sending home button presses and the
volume-down button sending volume-up button presses.

Add a 60-keyboard hwdb entry to correct the mappings. Note this is
split over 2 input devices because the soc_button_array driver
creates separate input devices for power + home and vol up/down.
This is done because power/home act as wakeup buttons where as
the volume buttons do not.

This means that after this fixup the home -> volume-up button
still acts as a wakeup button, there is nothing which can be done
about this without adding a kludge to the kernel which is not
worth the trouble (IMHO).
2021-12-26 10:15:25 +09:00
Mike Gilbert 289b41aae7 random-util: use ssize_t for getrandom return value
This matches the prototype provided by glibc.
2021-12-26 10:13:56 +09:00
James Hilliard 4b7b73c714 meson: don't try to guess versioned clang/llvm-strip bins for cross compile
This should simplify overriding the program locations as the binary
names should now not change if cross compiling.

It's likely any attempts at autodetecting these in cross environments will
be brittle at best so lets just disable it.
2021-12-25 22:37:04 +09:00
Yu Watanabe 3e7bf8535f tree-wide: fix typo 2021-12-25 18:32:22 +09:00