Skip to content

Commit

Permalink
unit: drop ProtectClock=yes from systemd-udevd.service
Browse files Browse the repository at this point in the history
This partially reverts cabc1c6.

The setting ProtectClock= implies DeviceAllow=, which is not suitable
for udevd. Although we are slowly removing cgropsv1 support, but
DeviceAllow= with cgroupsv1 is necessarily racy, and reloading PID1
during the early boot process may cause issues like systemd#24668.

Let's disable ProtectClock= for udevd. And, if necessary, let's
explicitly drop CAP_SYS_TIME and CAP_WAKE_ALARM (and possibly others)
by using CapabilityBoundingSet= later.

Fixes systemd#24668.
  • Loading branch information
yuwata committed Sep 14, 2022
1 parent af3d387 commit b719d03
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions units/systemd-udevd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ ConditionPathIsReadWrite=/sys

[Service]
Delegate=pids
DeviceAllow=block-* rwm
DeviceAllow=char-* rwm
Type=notify
# Note that udev will reset the value internally for its workers
OOMScoreAdjust=-1000
Expand All @@ -30,7 +28,6 @@ ExecReload=udevadm control --reload --timeout 0
KillMode=mixed
TasksMax=infinity
PrivateMounts=yes
ProtectClock=yes
ProtectHostname=yes
MemoryDenyWriteExecute=yes
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
Expand Down

0 comments on commit b719d03

Please sign in to comment.