1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00
Commit Graph

35527 Commits

Author SHA1 Message Date
Tony Asleson
1f1a2243c0 Add stand-alone dm-integrity support
This adds support for dm integrity targets and an associated
/etc/integritytab file which is required as the dm integrity device
super block doesn't include all of the required metadata to bring up
the device correctly.  See integritytab man page for details.
2021-10-15 10:19:54 -05:00
Lennart Poettering
0a51337df1
Merge pull request #20983 from mxre/feature/aarch64
[sd-stub] Add support for aarch64 booting via pe-entry point
2021-10-15 10:26:10 +02:00
Zbigniew Jędrzejewski-Szmek
6b292fa17b
Merge pull request #20996 from yuwata/udevadm-trigger-debug
test: show debug and verbose message
2021-10-15 09:44:59 +02:00
Tony Asleson
9a2a6ec4e3 dm-verity: Remove usage of integrity
There is a difference between dm-verity and dm-integrity.  Remove
usage of integrity from verity documentation in man pages and
target files.
2021-10-14 12:17:02 -05:00
Yu Watanabe
81218ac1e1
Merge pull request #21001 from poettering/alloca-safe
honour ALLOCA_MAX limit on all alloca() allocations, not just some
2021-10-15 00:57:27 +09:00
Lennart Poettering
82fb0911fc homework: fix incorrect error variable use 2021-10-15 00:56:57 +09:00
Lennart Poettering
2f82562bad alloc-util: add strdupa_safe() + strndupa_safe() and use it everywhere
Let's define two helpers strdupa_safe() + strndupa_safe() which do the
same as their non-safe counterparts, except that they abort if called
with allocations larger than ALLOCA_MAX.

This should ensure that all our alloca() based allocations are subject
to this limit.

afaics glibc offers three alloca() based APIs: alloca() itself,
strndupa() + strdupa(). With this we have now replacements for all of
them, that take the limit into account.
2021-10-14 15:57:52 +02:00
Lennart Poettering
5222651ecc journal: drop unnecessary +1 in newa() expression
newa() does this internally anyway, no need to do this explicitly.
2021-10-14 15:57:52 +02:00
Lennart Poettering
698cec65c4 tree-wide: port all calls to alloca() to alloca_safe() 2021-10-14 15:57:52 +02:00
Lennart Poettering
5e76324eea alloca-util: drop two unnecessary casts
memset() already returns void*, no need to cast it to that.
2021-10-14 15:57:52 +02:00
Lennart Poettering
9e1a759903 alloc-util: introduce new helper alloca_safe()
This is like alloca(), but does two things:

1. Verifies the allocation is smaller than ALLOCA_MAX
2. Ensures we allocate at least one byte

This was previously done manually in all invocations. This adds a handy
helper that does that implicitly.
2021-10-14 15:57:52 +02:00
Dan Streetman
a69f1dd9ca cgroup: when checking for legacy controllers, ignore any we don't care about 2021-10-14 14:57:49 +02:00
Boqun Feng
506bbc8569 virt: Support detection for ARM64 Hyper-V guests
The detection of Microsoft Hyper-V VMs is done by cpuid currently,
however there is no cpuid on ARM64. And since ARM64 is now a supported
architecture for Microsoft Hyper-V guests[1], then use DMI tables to
detect a Hyper-V guest, which is more generic and works for ARM64.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7aff79e297ee1aa0126924921fd87a4ae59d2467
2021-10-13 22:22:24 +02:00
Max Resch
dc46792831 [sd-stub] Add support for aarch64 booting via pe-entry point 2021-10-13 18:20:32 +02:00
Lennart Poettering
c91c95e66c core: allow "off" as special watchdog time to be specified
Right now we already understand "default" as special string for enabling
the watchdog but not reconfiguring its timeout (it is internally mapped
to USEC_MAX). To be systematic this adds "off" as special string for
disabling the watchdog logic (it is internally mapped to 0, which is how
this behaviour was previously requested).
2021-10-13 13:10:34 +02:00
Lennart Poettering
b6e44cd934
Merge pull request #20787 from fbuihuu/watchdog-more-rework
Watchdog more rework
2021-10-13 12:56:44 +02:00
Yu Watanabe
f25e10b1c9 core/bpf-firewall: add missing oom check
Fixes CID#1464627.
2021-10-13 18:06:04 +09:00
Franck Bui
8a85c5b616 watchdog: rename special string "infinity" taken by the watchdog timeout options to "default" 2021-10-13 08:58:36 +02:00
Franck Bui
0ffdfe7d68 watchdog: handle timeout programming errors more safely
If an error happened while the timeout value was being programmed, the error
was ignored and the watchdog module used the new timeout value whereas the
watchdog device was left with the previous one.

Now in cases of error, the device is now disabled and closed if it wasn't
opened already otherwise the previous timeout value is kept so the device is
still pinged at correct intervals.
2021-10-13 08:58:36 +02:00
Franck Bui
b3aa73e4de core: introduce systemd.watchdog_sec=<sec> option 2021-10-13 08:58:36 +02:00
Franck Bui
f16890f8d2 watchdog: passing 0 to watchdog_setup now closes the watchdog
Passing 0 meant "disable the watchdog although still kept it opened". However
this case didn't seem to be useful especially since PID1 closes the device if
it is passed the nul timeout.

Hence let's change the meaning of watchdog_setup(0) to match PID1's behavior
which allows to simplify the code a bit.

Hence this patch also drops enable_watchdog().
2021-10-13 08:58:30 +02:00
Franck Bui
c1a08a76ab watchdog: pass USEC_INFINITY to watchdog_setup() to reuse the programmed timeout value
This patch changes the meaning of USEC_INFINITY value for the watchdog
module.

Previously passing this value was a NOP. It now has a special meaning: it
requests the watchdog module to read the programmed timeout value and reuse it
for pinging the device.

This is mostly useful when the watchdog is started by the firmware and there's
no way to reconfigure the timeout with a different value
afterwards. "RuntimeWatchdogSec=infinity" in system.conf can now be used rather
than putting an arbitrary value that PID1 will fail to set (even if it still
felt back to the programmed timeout).

Please note that "infinity" is not supposed to restore the default value of the
firmware. If the value is changed after booting then "infinity" would simply
reuse the current programmed value. IOW it's a NOP unless the watchdog was
previously closed and in that case it will be reopened and the last programmed
value reused.
2021-10-13 08:51:15 +02:00
Franck Bui
ef1d5f3c5c watchdog: configuring a timeout value might not be supported by the HW
In that case we should hanlde this case more gracefully by reusing the
programmed value.

Fixes: #20683
2021-10-13 08:51:13 +02:00
Franck Bui
fcbf2c64f5 watchdog: minor optimization in watchdog_setup() 2021-10-13 08:50:08 +02:00
Franck Bui
85e5613cf3 watchdog: cleanup: create an helper for each ioctl
No functional changes.
2021-10-13 08:50:04 +02:00
Zbigniew Jędrzejewski-Szmek
df618f259a
Merge pull request #20987 from yuwata/sd-dhcp6-enum-cleanups
sd-dhcp6-client: enum cleanups
2021-10-13 08:25:37 +02:00
Yu Watanabe
6b652c03a4 sd-device-monitor: update log message to clarify the error will be ignored 2021-10-13 12:57:40 +09:00
Dan Streetman
22eeada935 cgroup: check if any controller is in use as v1
Check if any cgroup controller is currently being used as v1, and if so don't
use cgroup unified mode. This is only checked when there is no cgroup already
mounted, and is most useful when running in a container where the host is using
a legacy or hybrid cgroup, since we can't (fully) use unified cgroup, as the
host kernel has the cgroup controllers in use by v1.

This shouldn't be needed if the container manager has pre-mounted cgroups
appropriately based on the host system cgroup setup, but we can't rely
on that always being the case.
2021-10-13 12:24:33 +09:00
Anita Zhang
0b4f8d9498 core: serialize device cgroup bpf progs across daemon-reload/reexec
Follows what was done in b57d752326 and
adds a test that verifies the device BPF program is not detached during
reload/reexec.
2021-10-13 11:13:56 +09:00
Yu Watanabe
7502812c92 sd-dhcp6-client: max_retransmit_time must be positive
Found by LGTM.com analysis.
2021-10-13 02:49:49 +09:00
Yu Watanabe
fea8c18085 sd-dhcp6-client: introduce dhcp6_option_can_request() 2021-10-13 02:49:49 +09:00
Zbigniew Jędrzejewski-Szmek
384c620766 coredumpctl: stop truncating information about coredump
With the changes to limit that print 'Found module …' over and over, we were
hitting the journal field message limit, effectively truncating the info output.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1998488.
2021-10-12 19:48:20 +02:00
Yu Watanabe
308d01f3c4 network: do not request RAPID_COMMIT option
The option must not be included in OPTION_REQUEST option.
See the "Client ORO" field in
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2

This deprecates RapidCommit= setting. Note that sd-dhcp6-client always
sets the RAPID_COMMIT option in the solicit message.
2021-10-13 02:46:24 +09:00
Max Resch
200b1d997d move mfree to macro-fundamentals.h 2021-10-12 18:31:57 +02:00
Zbigniew Jędrzejewski-Szmek
cc7ac73ddb shared/dissect-image: reword debug message
I read the message and initially thought that there's some bug in time
subtraction. Let's make it clear that the message is about what we'll
do in the future, and not a report on how we waited up until now.
2021-10-12 13:56:57 +02:00
Yu Watanabe
f5e3619b70 sd-dhcp6-client: add missing options 2021-10-12 20:48:19 +09:00
Yu Watanabe
ac94edc857 sd-dhcp6-client: add missing parenthesis 2021-10-12 20:48:19 +09:00
Yu Watanabe
59f1ded834 sd-dhcp6-client: add missing message types
This also changes the prefix: DHCP6_ -> DHCP6_MESSAGE_.
2021-10-12 20:48:19 +09:00
Yu Watanabe
b261b5f416 sd-dhcp6-client: name one more enum 2021-10-12 20:48:19 +09:00
Yu Watanabe
dd5e9378a2 sd-dhcp6-client: typedef several enums
Also introduces _MAX and _INVALID for several enums.
2021-10-12 20:48:19 +09:00
alexlzhu
76dc17254f core: remove refcount for bpf program
Currently ref count of bpf-program is kept in user space. However, the
kernel already implements its own ref count. Thus the ref count we keep for
bpf-program is redundant.

This PR removes ref count for bpf program as part of a task to simplify
bpf-program and remove redundancies, which will make the switch to
code-compiled BPF programs easier.

Part of #19270
2021-10-12 12:48:23 +02:00
Yu Watanabe
d92681a65e network: dhcp6-pd: also assign addresses in IA_PD prefixes on uplink interface
Closes #20808.
2021-10-12 11:13:25 +01:00
Zbigniew Jędrzejewski-Szmek
78ae9d3100
Merge pull request #20853 from yuwata/network-radv-set-default-timeouts
network: RADV: set default timeouts
2021-10-12 10:49:03 +02:00
Jan Janssen
a69702c5ea sd-boot: Move security and console control protocol to missing_efi.h
This also fixes a broken #ifdefs in the header itself.
2021-10-12 09:56:54 +02:00
Jan Janssen
4ec9d873f3 sd-boot: Use _cleanup_ in more places 2021-10-12 09:56:23 +02:00
Jan Janssen
19dd3995aa sd-boot: Remove unnecessary TPM conditionalization
This is already done in measure.h.
2021-10-12 09:56:02 +02:00
Jan Janssen
d09065f894 sd-boot: Use backup LBA location from first GPT header
If a disk were dd'd to a lager block device, the last block on it
is not necessarily the backup header.
2021-10-12 09:55:49 +02:00
Jan Janssen
393955fd21 sd-boot: Split up xbootldr_open() 2021-10-12 09:55:21 +02:00
Jan Janssen
423523e063 sd-boot: Fix xbootldr detection
The broken crc32 calculation was a copy pasta error introduced in
87167331c9 and luckily has never been
shipped yet.
2021-10-12 09:54:04 +02:00
Jan Janssen
bcbc3e81d3 sd-boot: Move xbootldr code into its own file 2021-10-12 09:53:48 +02:00
Jan Janssen
6e7bb7d3ee sd-boot: Invert if in disk_get_part_uuid() 2021-10-12 09:53:16 +02:00
Yu Watanabe
6f47ab1bb1
Merge pull request #20985 from yuwata/test-bus-node-enumerator
test: add more tests for sd-bus node enumerator
2021-10-12 15:20:47 +09:00
Yu Watanabe
f21b863eeb test: use assert_se() instead of assert() 2021-10-12 15:20:28 +09:00
Lennart Poettering
de3ef2524e
Merge pull request #20968 from poettering/homed-pin
homed: pin+lock homes while logged in + keep trying to unmount on logging out + optionally drop caches on logging out
2021-10-11 23:11:03 +02:00
Lennart Poettering
5c791053e3
Merge pull request #20776 from medhefgo/boot-timeout
sd-boot: Allow disabling timeout
2021-10-11 23:05:37 +02:00
Yu Watanabe
16614bebd8 test: shorten code a bit 2021-10-12 03:31:54 +09:00
Yu Watanabe
165a654e29 network: radv: extends lifetime for DNS servers or domains propagated from uplink
Previously, the lifetime was 30 minutes. But it is not necessary to set
to such short time compared with prefix or route prefix lifetime.
Note that the propagated DNS servers and domains are all 'static',
that is, configured in a .network file, and not provided dynamically.
So, it should be safe to use longer lifetime.
2021-10-12 03:10:30 +09:00
Yu Watanabe
9fa25e0791 network: radv: set non-zero lifetime for DNS servers and domains by default
Closes #20850.
2021-10-12 03:10:30 +09:00
Yu Watanabe
2110040b2d network: radv: verify [IPv6Prefix] and [IPv6RoutePrefix] sections 2021-10-12 03:10:30 +09:00
Yu Watanabe
cf72568ae4 network: radv: mask unnecessary part of specified addresses 2021-10-12 03:10:30 +09:00
Yu Watanabe
2ac4167900 network: radv: make conf parsers not set values into sd_radv_prefix/sd_radv_route_prefix
Preparation for later commits.
2021-10-12 03:10:30 +09:00
Yu Watanabe
7ebb14313f sd-radv: rename sd_radv_prefix_set_route_prefix() -> sd_radv_route_prefix_set_prefix() 2021-10-12 03:10:30 +09:00
Yu Watanabe
e660d66e1c test: add more node enumerator tests 2021-10-12 03:05:24 +09:00
Yu Watanabe
f533135c6c
Merge pull request #20981 from poettering/glibc-less-internal
various clean-ups: use less glibc internal symbols, modernize some other stuff
2021-10-12 02:10:49 +09:00
Yu Watanabe
10285219ea
Merge pull request #20965 from poettering/getdents
recurse-dir: use getdents64()
2021-10-12 02:03:12 +09:00
Lennart Poettering
40258ae061
Merge pull request #20970 from poettering/token-timeout
cryptsetup: add a timeout for waiting for FIDO2/PKCS#11/TPM2 devices
2021-10-11 16:28:58 +02:00
Lennart Poettering
2700fecdb3 homed: allow overriding the root directory for home dirs via env var (i.e. use a different path than /home/)
This is a debugging feature. It's sometimes incredibly useful to be able
to run a second instance of homed that operates on another dir than
/home/.

Specifically, if you build homed from the source tree you can now run an
instance of it pretty reasonably directly from the build tree via:

  sudo SYSTEMD_HOME_DEBUG_SUFFIX=foo SYSTEMD_HOMEWORK_PATH=$(pwd)/build/systemd-homework SYSTEMD_HOME_ROOT=/home/foo ./build/systemd-homed

And then talk to it via

  sudo SYSTEMD_HOME_DEBUG_SUFFIX=foo homectl …

(you might need to tweak your dbus policy for this to work fully though)
2021-10-11 16:00:34 +02:00
Lennart Poettering
86019efa44 homed: optionally, drop caches on logout
Fixes: #20857
2021-10-11 16:00:34 +02:00
Lennart Poettering
2aaf565a2d homed: take BSD file lock on LUKS file while activated
Fixes: #19758
2021-10-11 16:00:34 +02:00
Lennart Poettering
23cff6d4fe homed: retry deactivation every 15s until successful
Fixes: #17445
2021-10-11 16:00:34 +02:00
Lennart Poettering
0c71e3ef24 homed: keep "pinning" fd open while home dir active
The pin fd keeps the mount busy, ensuring that unmount requests need to
go through us.

Note that this doesn't change too much IRL, since a logged in user
generally has processes keeping the home dir busy anyway. However, in
some corner cases it is safer to protect from accidental unmounts this
way. (e.g. if user manually called "homectl activate" first).
2021-10-11 16:00:34 +02:00
Lennart Poettering
bdfe7ada0d rm-rf: optionally fsync() after removing directory tree 2021-10-11 16:00:34 +02:00
Lennart Poettering
678ca2133c varlink: make one more parameter const 2021-10-11 15:37:59 +02:00
Lennart Poettering
a995ce4768 util: define initializer for 'struct ucred' that properly invalidates all fields
i.e. let's make sure to invalid uid/gid to UID_INVAID + GID_INVALID
instead of zero.
2021-10-11 15:37:37 +02:00
Bogdan Seniuc
599be274c1 virt: Fix Xen PV detection when nested inside another hypervisor
Currently, when Xen PV domains are nested within a hypervisor which is
detected through CPUID (such as VMware), the detected hypervisor might
not be Xen, because we don't check for Xen until after the CPUID check.

This change moves the Xen check before CPUID checks to fix the issue,
and moves Dom0 checking to detect_vm_xen so that we keep ignoring Xen
when we are in Dom0.
2021-10-11 15:10:46 +02:00
Max Resch
a6089431d5 sd-stub: Provide initrd with LINUX_EFI_INITRD_MEDIA_GUID
Register a LINUX_EFI_INITRD_MEDIA_GUID DevicePath with a LoadFile2Protocol interface and serve the initrd to a supported Linux kernel (Version 5.8+)
Leave the x86 code for older kernels in place until supported kernels become more mainstream
2021-10-11 14:40:49 +02:00
Lennart Poettering
d8f1673700 sort-util: avoid using glibc's internal __compar_d_fn_t type 2021-10-11 14:33:02 +02:00
Lennart Poettering
6393b847f4 recuse-dir: rework to use getdents64() instead of readdir()
Let's use the underlying Linux API directly, instead of
opendir()/readdir(). This makes it possible for us to do a single memory
allocation for all directory entries in common cases, instead of one for
each entry.
2021-10-11 14:31:34 +02:00
Lennart Poettering
25d7a71774 test-recurse-dir: output some simple timing info, comparing recurse_dir() and nftw() 2021-10-11 14:31:34 +02:00
Lennart Poettering
aab35b1e59 missing: add getdents64() syscall wrapper
glibc 2.30 (Aug 2019) added a wrapper for getdents64(). For older
versions let's define our own.

(This syscall exists since Linux 2.4, hence should be safe to use for
us)
2021-10-11 14:31:34 +02:00
Lennart Poettering
11c8b1f103 localed: use PROJECT_FILE rather than __FILE__ for logging
All our log.h code uses PROJECT_FILE for this, let's hence use it here
too.
2021-10-11 14:10:48 +02:00
Lennart Poettering
95fe7b28d3 ethtool-util: let's use userspace types in userspace code
Using kernel types __u32 is fine for headers shared by the kernel, but
if we define something in userspace and only use it in userspace, in our
own .c files, let's stick to userspace fixed-length types.
2021-10-11 14:10:44 +02:00
Lennart Poettering
7fbae5b706 tree-wide: use C99 __func__ rather than obsolete __FUNCTION__
We use __func__ almost everywhere, but there are some holdouts. Fix
that.
2021-10-11 14:10:39 +02:00
Lennart Poettering
fe92eb795b network: use official bswap_32() rather than inofficial __bswap_32()
The former is a macro for the latter, but let's use the official API
(the one that has an API).
2021-10-11 14:10:07 +02:00
Lennart Poettering
899c1c0a34 macro: also use trailing __ for alignof use in attributes
While the underscore is optional, the docs say we should suffix and we
do that everywher else. Do so here too.
2021-10-11 14:09:33 +02:00
Lennart Poettering
2ccd598635 stub: also move magic string in stub into .sdmagic PE section
We already did that for sd-boot, hence do it for sd-stub the same way.

Also, move the __attribute__ stuff to the beginning of the statement,
rather than the middle. Mostly just because we usually put it first for
implementations for identifiers (for prototypes we put it last).
2021-10-11 14:09:28 +02:00
Lennart Poettering
f0c4f94453 sort-util: use comparison_fn_t instead of __compar_fn_t
Let's avoid using the internal type of glibc, and rather use the one
they officially export.

https://www.gnu.org/software/libc/manual/html_node/Comparison-Functions.html
2021-10-11 14:09:18 +02:00
Lennart Poettering
f8cc16fd53 signal-util: don't introduce symbols with double underscores
ANSI C reserves identifiers beginning with an underscore for compiler
internal stuff. We already invade that namespace plenty and probably
should not. But even going for the doubly underscore prefixed namespace
is a bit too much. Let's just rename the offending table as
"static_signal_table[]", since it lists the static defined signals
rather than the "dynamic" RTSIGMIN/RTSIGMAX signals.
2021-10-11 14:08:58 +02:00
Lennart Poettering
c19a51bec4 util: invert ac_power() source type check
So far we assumed every power source was a battery except for the ones
which definitely are not. I think this logic makes little sense, as
"battery" is kinda the exceptional case here, not the other way round.
Hence let's invert the type check, and denylist "Battery" devices rather
than allowlist "Mains" devices.

This should increase compatibility with alternative types of power
sources, in particular USB ones.

This takes into account that additional power types have been added
since we wrote the original code, and in particular should cover the
siutation discussed here OK:

https://sources.debian.org/src/powermgmt-base/1.36/power_supply.txt/#L31
https://sources.debian.org/src/powermgmt-base/1.36/on_ac_power/#L25

Also, modernizes the code in various was ways.

Inspired by and fixes: #20964
2021-10-11 11:31:52 +02:00
Lennart Poettering
a2236110c3 cryptsetup: minor modernizations 2021-10-11 11:12:29 +02:00
Lennart Poettering
5cbe70af02 cryptsetup: add a configurable token waiting timeout
Let's add  configurable timeout how long to wait for FIDO2/PKCS#11
devices to show up. Once the timeout is hit, let's automatically revert
to querying via passphrase.

Fixes: #19739
2021-10-11 11:12:29 +02:00
Lennart Poettering
40091021c3 cryptsetup: before querying user for a PIN, check if a FIDO2 device is actually plugged in
Before we'd already ask for a PIN just because we know we'll need it
when the token is plugged in. We'd only the try to talk to the device
and notice it actually isn't plugged in. This is quite confusing, as
querying for the PIN suggests we already had a device we are talking to.

Let's hence check if there's actually device before we ask the PIN
question. And if there is none, let's immediately inform the caller, so
that they watch udev and retry once a device has shown up.
2021-10-11 11:12:29 +02:00
Lennart Poettering
4f0cfa7741 libfido2-util: add helper that checks whether a FIDO2 device is plugged in 2021-10-11 11:12:29 +02:00
Lennart Poettering
64c590fb06 cryptsetup: optionally turn off token module support in libcryptsetup
This is useful for debugging purposes.
2021-10-11 11:12:29 +02:00
Lennart Poettering
92828080fb cryptsetup: don't repeat exact same code twice
let's move turning off of the cache bit into the for loop, so that we
can eliminate a copy of the loop body.
2021-10-11 11:12:29 +02:00
Lennart Poettering
6bfd44ee04 fileio: add read_virtual_file_at() flavour that takes dir_fd/path pair 2021-10-11 10:58:50 +02:00
Zbigniew Jędrzejewski-Szmek
54ccd706ba
Merge pull request #20744 from yuwata/udev-netlink
udev: use netlink more aggressively

I'm pasting the comment from https://github.com/systemd/systemd/pull/20744#issuecomment-934485287
which is quite informative. The code wasn't changed significantly since then:

atenart commented 6 days ago:
> I ran tests without (93caec7) and with this PR (06735f2) on Fedora, having a few udev rules
> using attributes eligible to be cached and creating 50 veth on 4 CPUs. Although the time spent
> running the test is variable between runs, I generally saw an improvement when using this PR, e.g:
>
> 249-910-g93caec7:
> real	0m3.691s
> user	0m0.022s
> sys	0m1.338s
> 
> 249-920-g06735f2:
> real	0m2.950s
> user	0m0.005s
> sys	0m0.399s
> 
> On a different system than the one used above, I even saw a 40% improvement; results depend
> on many parameters (distro, udev rules, concurrent daemons accessing sysfs, etc.).
> 
> Because it's quite hard to measure the improvement here (as the kernel behave differently between
> the two test cases), I also ran tests using a modified kernel not hitting the trylock logic. There was
> an improvement with this PR as well. (Take this with a grain of salt though, as the kernel was
> modified not using patches approved upstream).
2021-10-11 09:40:43 +02:00
Thomas Haller
e4d294c46d macro: fix ALIGN_TO() to use ULLONG_MAX instead of ULONGLONG_MAX
<limits.h> calls this ULLONG_MAX. It's not clear to me where ULONGLONG_MAX
can be found. This seems to be just a mistake.

Fixes: c7ed718720 ('macro: handle overflow in ALIGN_TO() somewhat reasonably')
2021-10-11 08:30:58 +02:00
Yu Watanabe
e338284f9b
Merge pull request #20973 from yuwata/busctl-trivial-cleanups
busctl: trivial cleanups
2021-10-11 14:03:48 +09:00
(GalaxyMaster)
d610e14226
Avoid passing NULL to underlying fprintf() in sysusers (#20974) 2021-10-11 14:03:15 +09:00