Commit Graph
57095 Commits
Author SHA1 Message Date
Yu Watanabe 9b65490f3f man: netdev: use … to specify range 2021-12-06 16:53:35 +09:00
Yu Watanabe f3fa44cb8e man: netdev: use <varname> tag 2021-12-06 16:51:57 +09:00
Yu Watanabe 472e1349ed man: network: fix default values for DNSSEC= and DNSOverTLS= 2021-12-06 16:30:48 +09:00
Yu Watanabe dee13c2f4e man: network: rebreak lines 2021-12-06 16:28:10 +09:00
Luca Boccassi 6b12086e1f meson: remove openssl dependency from repart
No longer needed since ade99252e2
2021-12-06 16:09:45 +09:00
Yu Watanabe 6885a857e4 udev/path-id: comment why USB host number is dropped from the PATH_ID
Closes #21617.

The comment is borrowed from https://github.com/systemd/systemd/pull/21620#discussion_r762521508.
2021-12-06 16:06:04 +09:00
Yu Watanabe 56615f203b udev/path_id: fix skip_subsystem()
This partially reverts d340bdd1bd.

The function previously drops multiple except for the last parents
which matches the specified subsystem.
But the commit d340bdd1bd drops all
parents.

E.g. input is pci-pci-pci-usb-usb-usb, then
Before d340bdd: pci-pci-pci-usb
After d340bdd: pci-pci-pci
2021-12-06 16:01:33 +09:00
Frantisek Sumsal c73f413d8d tree-wide: check for NULLs in more places
Fixes issues pointed out by the `cpp/inconsistent-null-check` LGTM
query.
2021-12-06 08:50:53 +09:00
Frantisek Sumsal c8fec8bf9b lgtm: detect more possible problematic scenarios
1) don't ignore stack-allocated variables, since they may hide
   heap-allocated stuff (compound types)
2) check if there's a return between the variable declaration and its
   initialization; if so, treat the variable as uninitialized
3) introduction of 2) increased the query runtime exponentially, so
   introduce some optimizations to bring it back to some reasonable
   values
2021-12-05 22:47:14 +01:00
наб 2a0ad72611 kernel-install: fix MACHINE_ID extraction behaviour description 2021-12-05 17:00:22 +01:00
наб 22a81fe49b kernel-install: note the default $PRETTY_NAME if os-release wasn't found and that only 90-loaderentry uses it 2021-12-05 16:44:49 +01:00
наб 595fd662d4 kernel-install: note that 90-loaderentry will also use /usr/lib/k/cmdline 2021-12-05 16:44:48 +01:00
Frantisek Sumsal af18682136 lgtm: ignore certain cleanup functions
as they don't do any illegal stuff even when used with an uninitialized
variable.
2021-12-05 15:53:22 +01:00
Luca Boccassi bf71ade808 NEWS: add more entries for v250 2021-12-05 14:12:36 +00:00
Yu Watanabe a2887ec370 Merge pull request #21563 from yuwata/network-IPoIB-support
network: IPoIB support
2021-12-05 05:24:01 +09:00
Yu Watanabe a22a8698d9 sd-netlink: fix implicit cast to boolean 2021-12-05 00:19:01 +09:00
Yu Watanabe c3747f90b1 network: set MTU after IPoIB configs are applied
MTU is updated when IB mode is changed.
2021-12-05 00:19:01 +09:00
Yu Watanabe 72e65e6ffd network: add support to configure IPoIB interfaces 2021-12-05 00:18:58 +09:00
Yu Watanabe b90d0f83b2 network/netdev: add support to create IPoIB subinterface 2021-12-04 15:06:58 +09:00
Yu Watanabe a2bf1a61bc sd-netlink: add support for IPoIB 2021-12-04 15:05:33 +09:00
Yu Watanabe a8ee2b8e1f network/netdev: generate persistent MAC address when creating netdev interface
Preparation for later commits.
2021-12-04 15:05:32 +09:00
Frantisek Sumsal ab9e3bfef6 ci: consider cryptolib in the group identifier
otherwise we end up with more than one job with the same identifier in
one run, causing some of them to get cancelled unexpectedly.

A quick follow-up to 85bd394df5.
2021-12-03 20:25:06 +00:00
Luca Boccassi 09dfd918ef Merge pull request #21607 from mrc0mmand/ci-install-libbpf
ci: run build test with BPF-related stuff as well
2021-12-03 18:37:33 +00:00
Luca Boccassi 86167587c5 Merge pull request #21582 from mrc0mmand/lgtm-uninitialized
lgtm: enable more queries
2021-12-03 18:25:19 +00:00
Frantisek Sumsal 9371d44afe ci: install libbpf 2021-12-03 16:30:56 +01:00
Frantisek Sumsal 466e63a453 analyze: fix build with -Db_ndebug=true 2021-12-03 16:22:52 +01:00
Frantisek Sumsal 6108ab163e meson: support versioned llvm binaries in BPF detection 2021-12-03 16:22:52 +01:00
Franck Bui 4c733d3046 Bump the max number of inodes for /dev to 128k
Follow-up for 7d85383edb.

Apparently the previous limit set on the max number of inodes for /dev was too
small as a system with 4096 LUNs attached can consume up to 95k inodes for
symlinks:

  # /bin/df -i
  Filesystem                 Inodes  IUsed    IFree IUse% Mounted on
  devtmpfs                 49274377  95075 49179302    1% /dev

Hence this patch bumps the limit from 64k to 128k although the new limit is
still pretty arbitrary (that said, not sure if it really makes sense to put
such absolute limit number).
2021-12-03 14:23:25 +00:00
Zbigniew Jędrzejewski-Szmek 939387bdc6 Merge pull request #21170 from keszybz/delibgcryptify
Allow systemd-resolved and systemd-importd to use libgcrypt or libopenssl
2021-12-03 13:44:53 +01:00
Gibeom Gwon 4b9aa29bc9 cryptenroll: fix wrong error messages
PKCS#11 -> FIDO2 in cryptenroll-fido2.c
2021-12-03 08:12:30 +01:00
Zbigniew Jędrzejewski-Szmek e30ebc349c Merge pull request #21599 from loongarch64/dev-syscalls
Add LoongArch 64bit syscalls
2021-12-03 08:11:31 +01:00
Frantisek Sumsal ff7e7c2b3a meson: correctly display enabled features
In 9cf75222f2 the conf.get() statements for `bpf-framework` and
`valgrind` were dropped, which causes the respective features to always
show as disabled (since they don't follow the "standard" naming scheme
with HAVE_/ENABLE_ prefixes).
2021-12-02 22:41:32 +00:00
Frantisek Sumsal 38f36b9f34 lgtm: enable more (and potentially useful) queries
Not all available queries on LGTM are enabled by default, but some of
the excluded ones might come in handy, hence let's enable them
explicitly.
2021-12-02 17:22:49 +01:00
Frantisek Sumsal c7d70210fa lgtm: don't treat the custom note as a list of tags
Just a cosmetic change.
2021-12-02 16:56:54 +01:00
Frantisek Sumsal 863bff7548 lgtm: detect uninitialized variables using the __cleanup__ attribute
This is a slightly modified version of the original
`cpp/uninitialized-local` CodeQL query which focuses only on variables
using the cleanup macros. Since this has proven to cause issues in the
past, let's panic on every uninitialized variable using any of the
cleanup macros (as long as they're written using the __cleanup__
attribute).

Some test results from a test I used when writing the query:

```
 #define _cleanup_foo_ __attribute__((__cleanup__(foo)))
 #define _cleanup_(x) __attribute__((__cleanup__(x)))

 static inline void freep(void *p) {
         *(void**)p = mfree(*(void**) p);
 }

 #define _cleanup_free_ _cleanup_(freep)

 static inline void foo(char **p) {
     if (*p)
         *p = free(*p);
 }

 int main(void) {
     __attribute__((__cleanup__(foo))) char *a;
     char *b;
     _cleanup_foo_ char *c;
     char **d;
     _cleanup_free_ char *e;
     int r;

     r = fun(&e);
     if (r < 0)
         return 1;

     puts(a);
     puts(b);
     puts(c);
     puts(*d);
     puts(e);

     return 0;
 }
```

```
+| test.c:23:14:23:14 | e | The variable $@ may not be initialized here, but has a cleanup handler. | test.c:20:26:20:26 | e | e |
+| test.c:27:10:27:10 | a | The variable $@ may not be initialized here, but has a cleanup handler. | test.c:16:45:16:45 | a | a |
+| test.c:29:10:29:10 | c | The variable $@ may not be initialized here, but has a cleanup handler. | test.c:18:25:18:25 | c | c |
```
2021-12-02 16:56:54 +01:00
Luca Boccassi 68ee5d774c core: support user manager with Condition[Memory/CPU/IO]Pressure
Get the cgroup root path from the current PID, so that when
ran by the user manager we can get to the right path.
Eg: foo.slice:10% will check under:

/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/foo.slice/cpu.pressure

Follow-up for 81513b382b
2021-12-02 11:21:06 +00:00
Zbigniew Jędrzejewski-Szmek e37ad765c8 meson: disallow the combination of cryptolib=openssl and dns-over-tls=gnutls
It could work, but it doesn't make much sense. If we already have openssl as
the cryptolib that provides the necessary support, let's not bring in another
library. Disallowing this simplifies things and reduces our support matrix.
2021-12-02 11:31:20 +01:00
Zbigniew Jędrzejewski-Szmek 85bd394df5 ci: expand the test framework to cover openssl 2021-12-02 11:31:20 +01:00
Yu Watanabe 8feb9fa4f8 Merge pull request #21584 from yuwata/network-wireguard-cleanups
network: cleanups for wireguard
2021-12-02 15:53:57 +09:00
Yu Watanabe 4a410adae6 Revert "network: address: drop deprecated temporary address"
This reverts commit 528da64a0c.

The commit is a bad way to fix #19838, and introduces #21593.

Fixes #21593.
2021-12-02 15:41:45 +09:00
Yu Watanabe 38ef464e41 network/wireguard: search valid address of the endpoint from all struct addrinfo entries 2021-12-02 08:39:37 +09:00
Yu Watanabe 8bf7e3b61c network/wireguard: cleanups for resolving endpoints
This makes
- drop peers_with_unresolved_endpoint and peers_with_failed_endpoint,
- drop destroy handler for sd_resolve_query, and manage each query by peer,
- add random fluctuation to the timeout for retry handler,
- retry timer event source is now managed by peer,
- use sd_event_source_disable_unref().
2021-12-02 08:39:32 +09:00
Yu Watanabe 4a897d29f1 network/wireguard: do not resolve Endpoint= if an IP address is specified
Also verify the domain name and port.
2021-12-02 08:36:22 +09:00
Yu Watanabe 4c9bb70854 parse-util: refuse leading white space in port number
When parse_ip_port() is directly used in a conf parser, then that's
fine, as the rvalue is already truncated.

When parse_ip_port() is used when e.g. parsing IP address with port,
then we should really refuse white space after colon.
2021-12-02 08:36:22 +09:00
Yu Watanabe bf1e65a4fd Merge pull request #21585 from yuwata/network-radv-uplink-interface-auto-with-dhcp6-pd
network: cleanups for uplink interface handling for RADV and DHCP6-PD
2021-12-02 08:16:23 +09:00
Yu Watanabe 9db6a416dd Merge pull request #21583 from bluca/bpf_assert
cgroup: don't emit BPF firewall warning when manager is in test mode
2021-12-02 07:47:17 +09:00
Luca Boccassi 6b88743c22 Merge pull request #21591 from yuwata/core-bpf-firewall-unsupported-reason
core/bpf-firewall: make bpf_firewall_supported() always set unsupport…
2021-12-01 21:20:30 +00:00
Luca Boccassi 541b127170 elf-util: do not ignore prctl() errors
We want to avoid loops, so fail and return if we can't disable
core dumping

CID#1467004
2021-12-01 16:00:26 +00:00
Xiaotian Wu 9fd3bf7733 syscalls: run ninja update-syscall-tables 2021-12-01 23:53:17 +08:00
Yu Watanabe a783421498 tree-wide: fix typo 2021-12-02 00:51:02 +09:00