Systemd/src
Lennart Poettering e77b146f82 udev: make tags "sticky"
This tries to address the "bind"/"unbind" uevent kernel API breakage, by
changing the semantics of device tags.

Previously, tags would be applied on uevents (and the database entries
they result in) only depending on the immediate context. This means that
if one uevent causes the tag to be set and the next to be unset, this
would immediately effect what apps would see and the database entries
would contain each time. This is problematic however, as tags are a
filtering concept, and if tags vanish then clients won't hence notice
when a device stops being relevant to them since not only the tags
disappear but immediately also the uevents for it are filtered including
the one necessary for the app to notice that the device lost its tag and
hence relevance.

With this change tags become "sticky". If a tag is applied is once
applied to a device it will stay in place forever, until the device is
removed. Tags can never be removed again. This means that an app
watching a specific set of devices by filtering for a tag is guaranteed
to not only see the events where the tag is set but also all follow-up
events where the tags might be removed again.

This change of behaviour is unfortunate, but is required due to the
kernel introducing new "bind" and "unbind" uevents that generally have
the effect that tags and properties disappear and apps hence don't
notice when a device looses relevance to it. "bind"/"unbind" events were
introduced in kernel 4.12, and are now used in more and more subsystems.
The introduction broke userspace widely, and this commit is an attempt
to provide a way for apps to deal with it.

While tags are now "sticky" a new automatic device property
CURRENT_TAGS is introduced (matching the existing TAGS property) that
always reflects the precise set of tags applied on the most recent
events. Thus, when subscribing to devices through tags, all devices that
ever had the tag put on them will be be seen, and by CURRENT_TAGS it may
be checked whether the device right at the moment matches the tag
requirements.

See: #7587 #7018 #8221
2020-09-01 17:40:12 +02:00
..
ac-power
activate
analyze analyze: add 'capability' verb for dumping all known and unknown caps 2020-08-28 18:52:48 +02:00
ask-password
backlight Add simple usage message to systemd-backlight (#16709) 2020-08-28 13:50:35 +02:00
basic Merge pull request #16727 from wusto/core-fix-securebits 2020-09-01 17:21:48 +02:00
binfmt
boot tree-wide: drop pointless zero initialization (#16884) 2020-08-28 17:45:54 +02:00
busctl tree-wide: drop pointless zero initialization (#16884) 2020-08-28 17:45:54 +02:00
cgls bus: use bus_log_connect_error to print error message 2020-07-21 10:02:01 +09:00
cgroups-agent
cgtop log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
core Merge pull request #16727 from wusto/core-fix-securebits 2020-09-01 17:21:48 +02:00
coredump Merge pull request #16841 from keszybz/acl-util-bitmask 2020-08-31 16:45:13 +02:00
cryptsetup tree-wide: enable/disable libcrypsetup debug output depending on our level 2020-08-14 15:26:04 +01:00
debug-generator
delta log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
detect-virt log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
dissect dissect: add support for outputting JSON 2020-08-12 22:39:43 +02:00
environment-d-generator
escape log: introduce log_parse_environment_cli() and log_setup_cli() 2020-06-24 16:49:26 +02:00
firstboot firstboot: hook up with libpwquality 2020-08-19 10:03:56 +02:00
fsck
fstab-generator fstab-generator: introduce an helper to write extra dependencies specified via the mount options 2020-07-01 16:35:13 +02:00
fuzz fuzz-udev-rules: -ENOBUFS should be accepted too 2020-06-25 08:51:21 +02:00
getty-generator
gpt-auto-generator service: add new RootImageOptions feature 2020-07-29 17:17:32 +01:00
hibernate-resume
home homed: fix log message to honor real homework path 2020-08-30 17:04:01 +02:00
hostname bus: use bus_log_connect_error to print error message 2020-07-21 10:02:01 +09:00
hwdb Make failures of mac_selinux_init() fatal 2020-06-23 19:10:07 +02:00
id128 table use table_log_print_error() instead of table_log_show_error 2020-07-08 15:16:52 +08:00
import tree-wide: make use of new relative time events in sd-event.h 2020-07-28 11:24:55 +02:00
initctl initctl: use _cleanup_ and run() 2020-07-02 17:12:23 +02:00
journal Merge pull request #16841 from keszybz/acl-util-bitmask 2020-08-31 16:45:13 +02:00
journal-remote tree-wide: use READ_FULL_FILE_CONNECT_SOCKET at various places 2020-07-21 10:32:01 +02:00
kernel-install Merge pull request #16777 from DaanDeMeyer/kernel-install-followup 2020-08-25 09:30:44 +02:00
libsystemd udev: make tags "sticky" 2020-09-01 17:40:12 +02:00
libsystemd-network tree-wide: drop pointless zero initialization (#16900) 2020-08-30 06:21:20 +09:00
libudev tree-wide: avoid some loaded terms 2020-06-25 09:00:19 +02:00
locale bus: use bus_log_connect_error to print error message 2020-07-21 10:02:01 +09:00
login tree-wide: drop pointless zero initialization (#16900) 2020-08-30 06:21:20 +09:00
machine tree-wide: drop pointless zero initialization (#16900) 2020-08-30 06:21:20 +09:00
machine-id-setup
modules-load
mount bus: use bus_log_connect_error to print error message 2020-07-21 10:02:01 +09:00
network tree-wide: drop pointless zero initialization (#16900) 2020-08-30 06:21:20 +09:00
notify
nspawn nspawn: add --set-credential= and --load-credential= 2020-08-25 19:45:47 +02:00
nss-myhostname
nss-mymachines nss-mymachines: drop support for UID/GID resolving 2020-07-14 17:08:12 +02:00
nss-resolve nss-resolve: port over to new varlink interface 2020-08-26 16:48:16 +02:00
nss-systemd userdb: replace recursion lock 2020-06-23 17:24:24 +02:00
partition partition/makefs: Include missing sys/file.h header 2020-08-28 13:32:09 +02:00
path sd-path: drop "-dir" and "-path" suffixes from path enums 2020-05-28 23:54:35 +02:00
portable service: add new RootImageOptions feature 2020-07-29 17:17:32 +01:00
pstore Merge pull request #16057 from keszybz/resolvectl-sorted-no-nta 2020-06-04 11:30:14 +09:00
quotacheck
random-seed random-util: add common helper random_write_entropy() for crediting entropy to the kernel's pool 2020-06-24 15:33:27 +02:00
rc-local-generator
remount-fs
reply-password
resolve resolved: remove superfluous ;; 2020-08-28 22:59:26 +02:00
rfkill
run bus: use bus_log_connect_error to print error message 2020-07-21 10:02:01 +09:00
run-generator
shared socket: New option 'FlushPending' (boolean) to flush socket before entering listening state 2020-09-01 17:20:23 +02:00
shutdown
sleep various: treat BUS_ERROR_NO_SUCH_UNIT the same as SD_BUS_ERROR_SERVICE_UNKNOWN 2020-08-24 19:48:26 +02:00
socket-proxy tree-wide: make use of new relative time events in sd-event.h 2020-07-28 11:24:55 +02:00
stdio-bridge tree-wide: check POLLNVAL everywhere 2020-06-10 08:57:31 +02:00
sulogin-shell
sysctl
system-update-generator
systemctl tree-wide: drop pointless zero initialization (#16900) 2020-08-30 06:21:20 +09:00
systemd udev: make tags "sticky" 2020-09-01 17:40:12 +02:00
sysusers sysusers: add support for a --image= switch 2020-08-05 20:34:58 +02:00
sysv-generator sysv-generator: reduce scope of variables 2020-06-24 10:38:15 +02:00
test Merge pull request #16841 from keszybz/acl-util-bitmask 2020-08-31 16:45:13 +02:00
time-wait-sync basic/time-util: add function to format timestamps with different styles 2020-08-19 15:30:13 +01:00
timedate Replace gendered pronouns with gender neutral ones. (#16844) 2020-08-27 11:52:48 +09:00
timesync Merge pull request #16596 from poettering/event-time-rel 2020-08-04 16:07:03 +02:00
tmpfiles Merge pull request #16877 from poettering/tmpfiles-statx 2020-09-01 16:32:50 +02:00
tty-ask-password-agent tty-ask-pw-agent: properly propagate error 2020-08-26 23:10:50 +02:00
udev udev: make tags "sticky" 2020-09-01 17:40:12 +02:00
update-done Make failures of mac_selinux_init() fatal 2020-06-23 19:10:07 +02:00
update-utmp initctl,update-utmp: define iterator variable in loop 2020-07-02 17:12:23 +02:00
user-sessions Make failures of mac_selinux_init() fatal 2020-06-23 19:10:07 +02:00
userdb userdb: add "description" field to group records 2020-08-07 08:39:18 +02:00
vconsole vconsole-setup: downgrade log message when setting font fails on dummy console 2020-07-20 08:15:50 +02:00
veritysetup tree-wide: enable/disable libcrypsetup debug output depending on our level 2020-08-14 15:26:04 +01:00
version
volatile-root
xdg-autostart-generator xdg-autostart: ignore all empty entries in multi-string entries 2020-07-07 14:02:16 +02:00