| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
|
|
|
| |
Previously, there was no way to override the log level for test and
test-builtin commands. Let's re-parse environment after setting the log
level to debug. Then, we can control the log level through environment
variable.
|
|
|
|
|
|
| |
Follow-up for b16c6076cb334c9da9602d4bafbf60381d6d630e
CID#1533111
|
|\
| |
| | |
udev: extend timeout to prevent kill worker
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise, udev workers cannot detect slow programs invoked by
IMPORT{program}=, PROGRAM=, or RUN=, and whole worker process may be
killed.
Fixes #30436.
Co-authored-by: sushmbha <sushmita.bhattacharya@oracle.com>
|
| |
| |
| |
| | |
To prevent the worker process killed by the manager.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also, calculate the timeout for warning based on the remaining time for
the timeout of the event, rather than the timeout itself.
Currently, udev manager kills the worker if the timeout exceeds. So,
this does not change anything except for the timing of the warning.
Just refactoring and preparation for later commits.
|
|/
|
|
| |
Closes #30699.
|
|\
| |
| | |
device-util: introduce device_in_subsystem() and device_is_devtype() helper functions
|
| | |
|
|\ \
| | |
| | | |
udev: make UdevEvent take UdevWorker object
|
| | |
| | |
| | |
| | |
| | |
| | | |
Many functions take timeout_usec and friends, but those are equivalent
to the Worker elements.
No functional change, just refactoring.
|
| | |
| | |
| | |
| | | |
No functional change, just refactoring.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
udevadm lock did not propagate the return code from the child process
because all positive values were treated as success.
v2:
Now 'udevadm test-builtin' ignores all positive return values from the
builtin commands. Otherwise, as the hwdb builtin returns an positive value
when a matching entry found, 'udevadm test-builtin hwdb' will fail.
v3:
Initialize partition table before calling 'sfdisk --delete'.
Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
|
|\ \ \
| | | |
| | | | |
coccinelle: rework how we run the Coccinelle transformations
|
| |/ / |
|
|/ / |
|
|\ \
| | |
| | | |
udev: several cleanups for timeout settings
|
| | |
| | |
| | |
| | |
| | | |
- Add full stop to the messages.
- Do not kill commands before logging "killing", but do after.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Setting zero or too short timeout for each uevent is meaningless, and
causes the system fails to boot. Let's refuse such values.
Also, delaying execution of RUN= commands too long also makes many
uevents enter the failed state. So, let's refuse such misconfiguration.
|
| | |
| | |
| | |
| | |
| | | |
This is a paranoia, as even USEC_INFINITY / 3 is finite, it is still so large
in general.
|
| |/ |
|
|/ |
|
|
|
|
|
| |
When running tests in a container, /sys might not be mounted, so
let's make sure we skip tests that depend on /sys in this case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Users can currently pick specific versions of NIC naming, but that
does not guarantee that NIC names won't change after the kernel adds
a new sysfs attribute.
This patch allows for an allow/deny list of sysfs attributes
that could be used when composing the name.
These lists can be supplied as an hwdb entry in the form of
/etc/udev/hwdb.d/50-net-naming-allowlist.hwdb
net:naming:drvirtio_net
ID_NET_NAME_ALLOW=0
ID_NET_NAME_ALLOW_ACPI_INDEX=1
ID_NET_NAME_ALLOW_ADDR_ASSIGN_TYPE=1
ID_NET_NAME_ALLOW_ADDRESS=1
ID_NET_NAME_ALLOW_ARI_ENABLED=1
ID_NET_NAME_ALLOW_DEV_PORT=1
ID_NET_NAME_ALLOW_FUNCTION_ID=1
ID_NET_NAME_ALLOW_IFLINK=1
ID_NET_NAME_ALLOW_INDEX=1
ID_NET_NAME_ALLOW_LABEL=1
ID_NET_NAME_ALLOW_PHYS_PORT_NAME=1
ID_NET_NAME_ALLOW_TYPE=1
|
|
|
|
|
|
| |
Same as $KERNEL_INSTALL_BYPASS, but for hwdb. This will speed up
cross architecture image builds in mkosi as I can disable package
managers from running the costly hwdb update stuff in qemu user
mode and run it myself with a native systemd-hwdb with --root=.
|
|
|
|
| |
Under SIGTERM or SIGINT, exit event and release resources, and exit udevadm monitor normally.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Before, handling of global properties (set on systemd-udevd by `udevadm
control -p FOO=foo`) was inconsistent. They were honored in ENV matches,
but not in any assignment. This meant that any use of $env{FOO} (where
FOO was a global property) expanded to an empty string.
|
| |
|
|
|
|
|
| |
We chck the same props in various places, add a single implementation of
a call to inquire this.
|
| |
|
|
|
|
|
|
|
|
| |
AFAICT there's no reason to keep removed entries in the Hashmap
(although it doesn't break anything either). The only use of this
hashmap is in udev_rule_apply_token_to_event(), which just retrieves the
value using hashmap_get(), hence there's no difference there between an
existing entry with a NULL value and a missing entry.
|
|
|
|
| |
Lintian flags it as a typo of 'resize', so rename it and make it clearer too
|
|
|
|
|
|
|
|
| |
sd_device_monitor_new()
As suggested at https://github.com/systemd/systemd/pull/29872#discussion_r1382932633:
> socket memory is these days accounted to the process that owns a socket,
> hence we shouldn't be too concerned that this might waste memory.
|
|
|
|
|
|
|
| |
We may trigger huge number of devices and will receive many events.
Let's extend the buffer size, otherwise the buffer may be filled.
Fixes #29863.
|
|
|
|
| |
Follow-up to e4080a6d97.
|
|
|
|
| |
Follow-up to e4080a6d97.
|
| |
|
|
|
|
|
|
| |
All the following commands would just fail with -ENOANO anyway, hence
there's no point in sending them. And it allows us to shave off some
error handling code.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly just refactoring to make the code more manageable and
extendable. It doesn't introduce any semantic changes, but it
"optimizes" the communication with udevd a bit:
* If an option is used multiple times, only one command will be sent. If
the option takes a value, the value of the final appearance of the
option is used. The only exception is --property, which is additive by
nature.
* Options --start-exec-queue and --stop-exec-queue are handled together.
Only one of START_QUEUE/STOP_QUEUE commands will be sent to udevd even
if both options appear on the command line.
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the local implementation of a timeout file lock with our
new generic one.
Note that a comment in the old code claimed we couldn't use alarm()-like timeouts,
but htat's not entirely true: we can if we use SIGKILL, and thus know
for sure that the process will be dead in case the timer is hit before
we actually enter the file lock syscall. But we also know it will be
delivered if we hit after.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FORK_DEATHSIG_SIGTERM
Sometimes it makes sense to hard kill a client if we die. Let's hence
add a third FORK_DEATHSIG flag for this purpose: FORK_DEATHSIG_SIGKILL.
To make things less confusing this also renames FORK_DEATHSIG to
FORK_DEATHSIG_SIGTERM to make clear it sends SIGTERM. We already had
FORK_DEATHSIG_SIGINT, hence this makes things nicely symmetric.
A bunch of users are switched over for FORK_DEATHSIG_SIGKILL where we
know it's safe to abort things abruptly. This should make some kernel
cases more robust, since we cannot get confused by signal masks or such.
While we are at it, also fix a bunch of bugs where we didn't take
FORK_DEATHSIG_SIGINT into account in safe_fork()
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Currently the ID_NET_DRIVER is set in net_setup_link builtin.
But this is called pretty late in the udev processing chain.
Right now in some custom rules it was workarounded by calling ethtool
binary directly, which is ugly.
So let's split this code to a separate builtin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several udev rules depends on the previous behavior, i.e. that udev
replaces the devlink with the newer device node when the priority is
equivalent. Let's relax the optimization done by
331aa7aa15ee5dd12b369b276f575d521435eb52.
Follow-up for 331aa7aa15ee5dd12b369b276f575d521435eb52.
Note, the offending commit drops O(N) of file reads per uevent, and this
commit does not change the computational order. So, hopefully the
performance impact of this change is small enough.
Fixes #28141.
|
|
|
|
| |
Prompted by #29500.
|
|
|
|
|
|
| |
Follow-up for 1baeee5784f1b859d2a1446f6776efe6d7fde7b6.
Fixes #29779.
|
|
|
| |
The 'parsistent' adjective is misspelt.
|