1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00
Commit Graph

40434 Commits

Author SHA1 Message Date
Michal Sekletar
3f09629c22
Merge pull request #12628 from keszybz/dbus-execute
Rework cpu affinity parsing
2019-05-30 12:32:53 +02:00
Yu Watanabe
a0267b30f8 nspawn: also support ifindex when specifying network interface 2019-05-30 11:04:05 +02:00
Zbigniew Jędrzejewski-Szmek
7895b07a72
Merge pull request #12646 from yuwata/networkctl-use-table
networkctl: use Table
2019-05-30 11:02:03 +02:00
Yu Watanabe
ea082dda71 dhcp4: use memdup_suffix0() instead of strndup() for binary data
C.f. ac0a94f743.

Fixes #12693.
2019-05-30 09:55:57 +02:00
Felix Riemann
d8f8b18cdb pager: Fix deadlock when using built-in pager
The parent is waiting for an EOF on the pipe transmitting the pager name
before starting to send data. With external pagers this happens due to
execlp() CLOEXEC'ing the pipe, so the internal pager needs to close it
manually.
2019-05-30 09:54:54 +02:00
Roberto Santalla
38ab1ec9c8 cryptsetup: Add dependency for detached header
Fixes #12650

cryptsetup: Extract dependency check to a separate function

cryptsetup: style improvements, error checking
Return early on failure/nothing to do
Removed braces from single-line ifs
Check return value of  fstab_filter_options

cryptsetup: code style
2019-05-30 09:42:50 +02:00
Evgeny Vereshchagin
6bd1457afe tests: skip test-bpf only when we're 100% sure it's run in containers
This is just a follow-up to https://github.com/systemd/systemd/pull/12617.
2019-05-30 06:11:35 +03:00
Evgeny Vereshchagin
0813a5efb2
Merge pull request #12617 from mbiebl/skip-test-bpf-containers
test-bpf: skip test when run inside containers
2019-05-29 23:11:01 +03:00
Zbigniew Jędrzejewski-Szmek
1f57a176af shared/cpu-set-util: only force range printing one time
The idea is to have at least one range to make the new format clearly
distinguishable from the old. But it is enough to just do it once.
In particular, in case the affinity would be specified like 0, 2, 4, 6…,
this gives much shorter output.
2019-05-29 17:02:24 +02:00
Michal Sekletar
a047f4f10e systemctl: present CPUAffinity mask as a list of CPU index ranges 2019-05-29 17:02:24 +02:00
Michal Sekletar
71b28519b5 shared/cpu-set-util: introduce cpu_set_to_range() 2019-05-29 17:02:21 +02:00
Zbigniew Jędrzejewski-Szmek
1bf0d6c28f test-cpu-set-util: add test for dbus conversions 2019-05-29 16:54:49 +02:00
Michal Sekletar
c367f996f5 shared/cpu-set-util: make transfer of cpu_set_t over bus endian safe 2019-05-29 16:12:23 +02:00
Zbigniew Jędrzejewski-Szmek
8e30a1af24
Merge pull request #12690 from yuwata/test-network-and-man-netdev
test-network,man: trivial cleanups
2019-05-29 12:39:58 +02:00
Feldwor
f3f8cd8c81 hwdb: add axis range corrections for the Asus N53SV 2019-05-29 12:39:11 +02:00
Yu Watanabe
53c32c2b9b test-network: bump time limit for wait_address()
Maximum time interval of DHCPv4 request is 63sec.
So, setting 100sec is enough.
2019-05-29 12:37:41 +02:00
Lennart Poettering
3987598ca0
Merge pull request #12449 from ljmf00/hwdb-accel-location-patch
hwdb: Add support for Teclast F6 Pro base sensor
2019-05-29 12:23:13 +02:00
Zbigniew Jędrzejewski-Szmek
cb0d3acf55 shared/cpu-set-util: drop now-unused cleanup function 2019-05-29 10:29:28 +02:00
Zbigniew Jędrzejewski-Szmek
167a776dbe test-execute: use CPUSet too
cpu_set_malloc() was the last user. It doesn't seem useful to keep
it just to save the allocation of a few hundred bytes in a test, so
it is dropped and a fixed maximum is allocated (1024 bytes).
2019-05-29 10:29:28 +02:00
Zbigniew Jędrzejewski-Szmek
fb39af4ce4 pid1: when reloading configuration, forget old settings
If we had a configuration setting from a configuration file, and it was
removed, we'd still remember the old value, because there's was no mechanism to
"reset" everything, just to assign new values.

Note that the effect of this is limited. For settings that have an "ongoing" effect,
like systemd.confirm_spawn, the new value is simply used. But some settings can only
be set at start.

In particular, CPUAffinity= will be updated if set to a new value, but if
CPUAffinity= is fully removed, it will not be reset, simply because we don't
know what to reset it to. We might have inherited a setting, or we might have
set it ourselves. In principle we could remember the "original" value that was
set when we were executed, but propagate this over reloads and reexecs, but
that would be a lot of work for little gain. So this corner case of removal of
CPUAffinity= is not handled fully, and a reboot is needed to execute the
change. As a work-around, a full mask of CPUAffinity=0-8191 can be specified.
2019-05-29 10:29:28 +02:00
Zbigniew Jędrzejewski-Szmek
470a5e6dce pid1: don't reset setting from /proc/cmdline upon restart
We have settings which may be set on the kernel command line, and also
in /proc/cmdline (for pid1). The settings in /proc/cmdline have higher priority
of course. When a reload was done, we'd reload just the configuration file,
losing the overrides.

So read /proc/cmdline again during reload.

Also, when initially reading the configuration file when program starts,
don't treat any errors as fatal. The configuration done in there doesn't
seem important enough to refuse boot.
2019-05-29 10:29:28 +02:00
Zbigniew Jędrzejewski-Szmek
61fbbac1d5 pid1: parse CPUAffinity= in incremental fashion
This makes the handling of this option match what we do in unit files. I think
consistency is important here. (As it happens, it is the only option in
system.conf that is "non-atomic", i.e. where there's a list of things which can
be split over multiple assignments. All other options are single-valued, so
there's no issue of how to handle multiple assignments.)
2019-05-29 10:29:28 +02:00
Zbigniew Jędrzejewski-Szmek
b54d7241f2 test-cpu-set-util: add a smoke test for test_parse_cpu_set_extend() 2019-05-29 10:29:24 +02:00
Zbigniew Jędrzejewski-Szmek
9d1345f065 test-cpu-set-util: add simple test for cpus_in_affinity_mask() 2019-05-29 10:28:11 +02:00
Zbigniew Jędrzejewski-Szmek
f44b3035d4 Move cpus_in_affinity_mask() to cpu-set-util.[ch]
It just seems to fit better there and it's always better to have things
in shared/ rather than basic/.
2019-05-29 10:26:00 +02:00
Zbigniew Jędrzejewski-Szmek
0985c7c4e2 Rework cpu affinity parsing
The CPU_SET_S api is pretty bad. In particular, it has a parameter for the size
of the array, but operations which take two (CPU_EQUAL_S) or even three arrays
(CPU_{AND,OR,XOR}_S) still take just one size. This means that all arrays must
be of the same size, or buffer overruns will occur. This is exactly what our
code would do, if it received an array of unexpected size over the network.
("Unexpected" here means anything different from what cpu_set_malloc() detects
as the "right" size.)

Let's rework this, and store the size in bytes of the allocated storage area.

The code will now parse any number up to 8191, independently of what the current
kernel supports. This matches the kernel maximum setting for any architecture,
to make things more portable.

Fixes #12605.
2019-05-29 10:20:42 +02:00
Yu Watanabe
488d0ba10a man: re-indent systemd.netdev.xml 2019-05-29 17:17:08 +09:00
Yu Watanabe
931d11057c test-network: drop 25-nlmon.network 2019-05-29 17:07:06 +09:00
Franz Pletz
b8d88b26f3 man: add vrf section 2019-05-29 17:06:29 +09:00
Yu Watanabe
518a66ec08 tree-wide: replace if_indextoname() with format_ifname() 2019-05-29 14:21:19 +09:00
Yu Watanabe
7f686722f7 util: introduce format_ifname() 2019-05-29 14:21:19 +09:00
Yu Watanabe
658e910640 networkctl: use Table for 'lldp' command 2019-05-29 14:21:19 +09:00
Yu Watanabe
0232beed9c networkctl: use Table for 'label' command 2019-05-29 14:21:19 +09:00
Yu Watanabe
98d5bef3c5 networkctl: use Table for 'status' command 2019-05-29 14:21:19 +09:00
Yu Watanabe
ff7c88a2f3 networkctl: use Table for 'list' command 2019-05-29 14:21:19 +09:00
Yu Watanabe
8390d39165 table: add TABLE_IFINDEX type 2019-05-29 14:21:19 +09:00
Yu Watanabe
d553832698 table: add more basic types 2019-05-29 14:21:19 +09:00
Yu Watanabe
5896e03c6f table: add teble_add_string_cell() 2019-05-29 14:21:19 +09:00
Yu Watanabe
f1bc253efa
Merge pull request #12687 from yuwata/parse_ifindex_or_ifname
util: introduce parse_ifindex_or_ifname() and use it in networkctl and resolvectl
2019-05-29 14:20:36 +09:00
Yu Watanabe
4bddccc684 networkctl: use parse_ifindex_or_ifname() 2019-05-29 13:22:01 +09:00
Yu Watanabe
8e5385b485 resolvectl: use parse_ifindex_or_ifname() 2019-05-29 13:22:01 +09:00
Yu Watanabe
f5072281ba util: add assertions 2019-05-29 13:21:51 +09:00
Yu Watanabe
88465a4ee7 util: introduce parse_ifindex_or_ifname() 2019-05-29 13:21:18 +09:00
Susant Sahani
9cd8c76661 networkctl: add support to delete virtual netdevs
We now don't have the support to delete netdevs and dependent
upon iproute to delete. With this we can delete via networkctl
and use in our test cases too.

Note that it supports deleting multiple links at once.

```
 sudo ./networkctl delete test1 test2 test3 test4
```
2019-05-29 11:00:37 +09:00
Yu Watanabe
0feeac6418
Merge pull request #12635 from yuwata/nlmon-support
network: add nlmon support
2019-05-29 10:22:09 +09:00
Yu Watanabe
77ce4dbb93
Merge pull request #12573 from yuwata/network-dhcp-issue-12490
network: set preferred source in removing route entry on address lost
2019-05-29 10:21:31 +09:00
Zach Smith
1bbbefe7a6 systemd-sleep: replace rtc wakealarm with CLOCK_BOOTTIME_ALARM s2h
refactor to use timerfd in place of rtc wakealarm

confirm CLOCK_BOOTTIME_ALARM support in can_s2h

Remove CLOCK_BOOTTIME_ALARM task from TODO

remove unnecessary check on clock_supported return
2019-05-28 17:02:36 +02:00
Lennart Poettering
46fcf95dbe seccomp: add new 5.1 syscall pidfd_send_signal() to filter set list 2019-05-28 17:01:05 +02:00
Lennart Poettering
c22f885e4e test: exit cleanly on success 2019-05-28 16:14:02 +02:00
Milan Broz
894bb3ca4c cryptsetup: Add LUKS2 token support.
LUKS2 supports so-called tokens. The libcryptsetup internally
support keyring token (it tries to open device using specified
keyring entry).
Only if all token fails (or are not available), it uses a passphrase.

This patch aligns the functionality with the cryptsetup utility
(cryptsetup luksOpen tries tokens first) but does not replace
the systemd native ask-password function (can be used the same in
combination with this patch).
2019-05-28 15:49:16 +02:00