| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
And add --no-style switch that make style issues not critical.
|
| |
|
|
|
|
| |
Instead of _cleanup_(set_freep) or so.
|
|
|
|
|
|
|
|
|
| |
By default, label_ops is initialized with a NULL pointer which translates
to noop labelling operations. In mac_selinux_init() and the new mac_smack_init(),
we initialize label_ops with a MAC specific LabelOps pointer.
We also introduce mac_init() to initialize any configured MACs and replace all
usages of mac_selinux_init() with mac_init().
|
| |
|
|\
| |
| | |
udev: include USB revision in ID_PATH
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
xHCI host controller may register two (or more?) USB root hubs for USB
2.0 and USB 3.0, and devices under the hubs may have same ID_PATH.
So, to avoid the conflict, let's introduce ID_PATH_WITH_USB_REVISION
that includes the USB revision.
Closes #19406.
|
| |
| |
| |
| | |
No functional change, just refactoring.
|
| |
| |
| |
| |
| |
| | |
Let's make debugging udev triggering a bit easier, by generating debug
log messages whenever we trigger a device, and also when we see the
event in pid1.
|
|/
|
|
|
|
| |
When udevadm verify is invoked by an analyzer tool like rpminspect
to verify individual udev rules files, the summary just clutters the
output, so provide an option to turn the summary off.
|
|
|
|
|
|
|
| |
When an argument specified to udevadm verify is a directory,
verify all *.rules files in that directory.
Suggested-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When udevadm verify is given an argument that doesn't point to an
existing file, there used to be two diagnostics messages, the first one
at a warning level, and the second one at an error level:
$ build/udevadm verify /no/such/directory
Failed to open /no/such/directory, ignoring: No such file or directory
Failed to parse rules file /no/such/directory: No such file or directory
Fix this by issuing just the error message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we first assign alternative names to a network interface,
then later change its main name if requested. So, we could not assign
the name that currently assigned as the main name of an interface as an
alternative name. So, we retry to assign the previous main name as an
alternative name on later move uevent.
However, that causes some confusing situation. E.g. if a .link file has
```
Name=foo
AlternativeNames=foo baz
```
then even if the interface is renamed by a user e.g. by invoking 'ip link'
command manually, the interface can be still referenced as 'foo', as the
name is now assigned as an alternative name.
This makes the order of name assignment inverse: the main name is first
changed, and then the requested alternative names are assigned. And
udevd do not assign alternative names on move uevent.
Replaces #27506.
|
| |
|
|
|
|
|
| |
On other uevents, the name will be anyway ignored in rename_netif() in
udev-event.c.
|
| |
|
|
|
|
| |
No functional change, preparation for later commits.
|
| |
|
| |
|
|
|
|
| |
Prompted by #27391.
|
| |
|
|\
| |
| | |
udev-rule: fix negative match
|
| |
| |
| |
| | |
Fixes #27396.
|
|\ \
| | |
| | | |
udev/iocost: several follow ups
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Then, the solution name can be logged.
|
| | |
| | |
| | |
| | |
| | | |
As these are always called sequentially.
No functional change, just refactoring.
|
| | | |
|
| | | |
|
| |/
| |
| |
| | |
And make the failure in parsing config critical.
|
|/
|
|
| |
Fixes #27382.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Meta's resource control demo project[0] includes a benchmark tool that can
be used to calculate the best iocost solutions for a given SSD.
[0]: https://github.com/facebookexperimental/resctl-demo
A project[1] has now been started to create a publicly available database
of results that can be used to apply them automatically.
[1]: https://github.com/iocost-benchmark/iocost-benchmarks
This change adds a new tool that gets triggered by a udev rule for any
block device and queries the hwdb for known solutions. The format for
the hwdb file that is currently generated by the github action looks like
this:
# This file was auto-generated on Tue, 23 Aug 2022 13:03:57 +0000.
# From the following commit:
# https://github.com/iocost-benchmark/iocost-benchmarks/commit/ca82acfe93c40f21d3b513c055779f43f1126f88
#
# Match key format:
# block:<devpath>:name:<model name>:
# 12 points, MOF=[1.346,1.346], aMOF=[1.249,1.249]
block:*:name:HFS256GD9TNG-62A0A:fwver:*:
IOCOST_SOLUTIONS=isolation isolated-bandwidth bandwidth naive
IOCOST_MODEL_ISOLATION=rbps=1091439492 rseqiops=52286 rrandiops=63784 wbps=192329466 wseqiops=12309 wrandiops=16119
IOCOST_QOS_ISOLATION=rpct=0.00 rlat=8807 wpct=0.00 wlat=59023 min=100.00 max=100.00
IOCOST_MODEL_ISOLATED_BANDWIDTH=rbps=1091439492 rseqiops=52286 rrandiops=63784 wbps=192329466 wseqiops=12309 wrandiops=16119
IOCOST_QOS_ISOLATED_BANDWIDTH=rpct=0.00 rlat=8807 wpct=0.00 wlat=59023 min=100.00 max=100.00
IOCOST_MODEL_BANDWIDTH=rbps=1091439492 rseqiops=52286 rrandiops=63784 wbps=192329466 wseqiops=12309 wrandiops=16119
IOCOST_QOS_BANDWIDTH=rpct=0.00 rlat=8807 wpct=0.00 wlat=59023 min=100.00 max=100.00
IOCOST_MODEL_NAIVE=rbps=1091439492 rseqiops=52286 rrandiops=63784 wbps=192329466 wseqiops=12309 wrandiops=16119
IOCOST_QOS_NAIVE=rpct=99.00 rlat=8807 wpct=99.00 wlat=59023 min=75.00 max=100.00
The IOCOST_SOLUTIONS key lists the solutions available for that device
in the preferred order for higher isolation, which is a reasonable
default for most client systems. This can be overriden to choose better
defaults for custom use cases, like the various data center workloads.
The tool can also be used to query the known solutions for a specific
device or to apply a non-default solution (say, isolation or bandwidth).
Co-authored-by: Santosh Mahto <santosh.mahto@collabora.com>
|
|
|
|
|
|
|
|
| |
Propagating $NOTIFY_SOCKET is typically dangerous. Let's unset it unless
explicitly requested to keep it.
Fixes #27288.
Replaces #27291.
|
| |
|
|\
| |
| | |
sd-device,udev: refuse unsafe path in SYMLINK= and TAG=
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All tags are managed under /run/udev/tags, and the directories there are
named with tags. Hence, each tag must be a valid filename.
This also makes all validity check moved to sd-device side, and
makes failure caused by setting invalid tags non-critical.
With this change, an empty string cannot be assigned to TAG=, hence the
test cases are adjusted.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is especially for the case that the path contains "..".
Prompted by https://github.com/systemd/systemd/pull/27164#issuecomment-1498863858.
This also makes SYMLINK= gracefully handle paths prefixed with "/dev/",
and manage devlink paths with path_hash_ops.
|
| |
| |
| |
| | |
No functional change, just refactoring.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
proc-cmdline: filter PID1 arguments on container
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise, if getopt() and friends are used before parse_argv(), then
the GNU extensions may be ignored.
This should not change any behavior at least now, as we usually use
getopt_long() only once per invocation. But in the next commit,
getopt_long() will be used for other arrays, hence this change will
become necessary.
|
| |
| |
| |
| |
| | |
When invoked by udevadm verify, warn about rules that have PROGRAM
assignments specified after RESULT checks.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Make sure the ENOENT exception reintroduced by commit
9db7081d83d56cd2523b03f9eb9d67ef1c93c55f is not applied when the parser
is invoked by udevadm verify.
|
|/
|
|
|
|
|
|
|
| |
This reverts commit 42a467b55219384c7c3b137ab3cc8b6a309a8a14.
We need to skip -ENOENT when loading udev rules because new files with rules
may be added or removed at any time, and the loading of rules is triggered
asynchronously. Even though the window is fairly narrow, udev shouldn't throw
an error if a rules file is removed.
|
|
|
|
| |
Fixes: 25de7aa7b90c ("udev: modernize udev-rules.c")
|