summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* build(deps): bump meson from 0.63.2 to 0.63.3 in /.github/workflowsdependabot[bot]2022-11-011-3/+3
| | | | | | | | | | | | | | Bumps [meson](https://github.com/mesonbuild/meson) from 0.63.2 to 0.63.3. - [Release notes](https://github.com/mesonbuild/meson/releases) - [Commits](https://github.com/mesonbuild/meson/compare/0.63.2...0.63.3) --- updated-dependencies: - dependency-name: meson dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* network: forcibly reconfigure all interfaces after sleepYu Watanabe2022-11-012-65/+11
| | | | | | | Previously, interfaces are partially reconfigured in a spurious way. Let's use the same way as `networkctl reconfigure`. Hopefully fixes #14987 and #24997.
* test-network: add a testcase that all bound interfaces removedYu Watanabe2022-11-011-25/+49
| | | | Closes #4202.
* build(deps): bump systemd/mkosidependabot[bot]2022-11-011-1/+1
| | | | | | | | | | | | | | Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from 792cbc60eb2dc4a58d66bb3c212bf92f8d50f6ea to 14. This release includes the previously tagged commit. - [Release notes](https://github.com/systemd/mkosi/releases) - [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md) - [Commits](https://github.com/systemd/mkosi/compare/792cbc60eb2dc4a58d66bb3c212bf92f8d50f6ea...c9772ec920f1cd03181ba14e6fe2c3d35ccb4f92) --- updated-dependencies: - dependency-name: systemd/mkosi dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* build(deps): bump ossf/scorecard-action from 2.0.4 to 2.0.6dependabot[bot]2022-11-011-1/+1
| | | | | | | | | | | | | | | Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.4 to 2.0.6. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](https://github.com/ossf/scorecard-action/compare/e363bfca00e752f91de7b7d2a77340e2e523cb18...99c53751e09b9529366343771cc321ec74e9bd3d) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
* coverage: Mark _coverage__exit as noreturnJan Janssen2022-11-011-1/+1
| | | | | ../src/basic/coverage.h:15:48: warning: function '_coverage__exit' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
* resolved: fix typo in feature level tableYoufu Zhang2022-11-011-1/+1
|
* Merge pull request #25206 from p-fpv/mainYu Watanabe2022-11-012-1/+8
|\ | | | | hwdb: Add Lenovo G580
| * hwdb: Add Lenovo G580p-fpv2022-11-011-0/+7
| | | | | | | | Fixes #23066.
| * parse_hwdb: allow negative value for EVDEV_ABS_ propertiesYu Watanabe2022-11-011-1/+1
|/
* Merge pull request #25207 from bluca/typoLuca Boccassi2022-10-312-1/+1
|\ | | | | Typo in manpage, missing +x
| * test: add +x to assert.shLuca Boccassi2022-10-311-0/+0
| | | | | | | | | | | | The script has a shebang and .sh extension, so make it executable W: systemd-tests: script-not-executable [usr/lib/systemd/tests/testdata/units/assert.sh]
| * man: fix typo found by LintianLuca Boccassi2022-10-311-1/+1
|/
* Merge pull request #25143 from yuwata/network-reconfigure-interface-when-renamedLuca Boccassi2022-10-319-46/+180
|\ | | | | network: reconfigure interface when renamed
| * test-network: add testcase for reconfiguring interfaceYu Watanabe2022-10-317-0/+96
| |
| * network: try to reconfigure when some information is updatedYu Watanabe2022-10-311-25/+36
| | | | | | | | | | | | | | | | When at least one of the name, MAC address, udev properties, and so on for an interface is updated, try to find a matching .network file, and reconfigure if a new .network file is assigned. Fixes #24975.
| * network: simplify the logic of reading driver and permanent HW addressYu Watanabe2022-10-312-11/+41
| | | | | | | | | | | | | | | | No functional changes, just refactoring and preparation for later commits. Note, `link->dev` should always exist when link state is initialized or later.
| * network: allow to (automatically) reconfigure failed interfaceYu Watanabe2022-10-281-1/+1
| | | | | | | | | | | | | | | | We have already allowed to reconfigure failed interface manually, but not allowed to do automatically, e.g. on carrier gain. This makes that failed interfaces also reconfigured automatically. Note, the condition is inversed to shorten the condition.
| * network: drop redundant conditionYu Watanabe2022-10-281-9/+6
| | | | | | | | | | The function `link_reconfigure_impl()` has the same condition at the beginning.
* | network: skip to reassign master ifindex if already setYu Watanabe2022-10-311-0/+8
| | | | | | | | | | | | | | Otherwise, the slave interface may go down, especially when the master is bond. Fixes #25067.
* | meson: systemd-repart.standaloneZbigniew Jędrzejewski-Szmek2022-10-311-0/+19
| | | | | | | | | | | | | | | | Repart is growing into an important tool on its own, and users might want to install newer versions on systems that have older systemd. Let's make this easier by providing a standalone binary. Related to https://github.com/systemd/mkosi/issues/1228.
* | udev: drop trivial wrapper for udev_watch_begin()Yu Watanabe2022-10-314-23/+9
| |
* | udev: Handle AMBA bus the same way as generic platform busMarek Vasut2022-10-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On various ARM systems, it is possible to find devices on AMBA bus. This is defined in Linux kernel drivers/amba/bus.c as separate bus type. Udev currently does not recognize this when building ID_PATH which leads to ID_PATH containing the suffix from next recognized parent device. On ST STM32MP15xx with SDIO WiFi, the ID_PATH looks like 'platform-soc', which is not unique and basically useless. On NXP i.MX8M Plus with SDIO WiFi, ID_PATH is 'platform-30b40000.mmc' which is far more useful. Add the 'amba' subsystem handling the same way 'platform' subsystem is handled to get ID_PATH 'platform-soc-amba-48004000.sdmmc' on the former, which is far more useful compared to 'platform-soc'. --- ``` $ udevadm info --attribute-walk --path=/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan0 Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1/net/wlan0': KERNEL=="wlan0" SUBSYSTEM=="net" DRIVER=="" ATTR{addr_assign_type}=="0" ATTR{addr_len}=="6" ATTR{address}=="10:98:c3:5f:4b:80" ATTR{broadcast}=="ff:ff:ff:ff:ff:ff" ATTR{carrier_changes}=="1" ATTR{carrier_down_count}=="1" ATTR{carrier_up_count}=="0" ATTR{dev_id}=="0x0" ATTR{dev_port}=="0" ATTR{flags}=="0x1002" ATTR{gro_flush_timeout}=="0" ATTR{ifalias}=="" ATTR{ifindex}=="3" ATTR{iflink}=="3" ATTR{link_mode}=="0" ATTR{mtu}=="1500" ATTR{napi_defer_hard_irqs}=="0" ATTR{netdev_group}=="0" ATTR{operstate}=="down" ATTR{power/control}=="auto" ATTR{power/runtime_active_time}=="0" ATTR{power/runtime_status}=="unsupported" ATTR{power/runtime_suspended_time}=="0" ATTR{proto_down}=="0" ATTR{queues/rx-0/rps_cpus}=="0" ATTR{queues/rx-0/rps_flow_cnt}=="0" ATTR{queues/tx-0/byte_queue_limits/hold_time}=="1000" ATTR{queues/tx-0/byte_queue_limits/inflight}=="0" ATTR{queues/tx-0/byte_queue_limits/limit}=="0" ATTR{queues/tx-0/byte_queue_limits/limit_max}=="1879048192" ATTR{queues/tx-0/byte_queue_limits/limit_min}=="0" ATTR{queues/tx-0/tx_maxrate}=="0" ATTR{queues/tx-0/tx_timeout}=="0" ATTR{queues/tx-0/xps_rxqs}=="0" ATTR{statistics/collisions}=="0" ATTR{statistics/multicast}=="0" ATTR{statistics/rx_bytes}=="0" ATTR{statistics/rx_compressed}=="0" ATTR{statistics/rx_crc_errors}=="0" ATTR{statistics/rx_dropped}=="0" ATTR{statistics/rx_errors}=="0" ATTR{statistics/rx_fifo_errors}=="0" ATTR{statistics/rx_frame_errors}=="0" ATTR{statistics/rx_length_errors}=="0" ATTR{statistics/rx_missed_errors}=="0" ATTR{statistics/rx_nohandler}=="0" ATTR{statistics/rx_over_errors}=="0" ATTR{statistics/rx_packets}=="0" ATTR{statistics/tx_aborted_errors}=="0" ATTR{statistics/tx_bytes}=="0" ATTR{statistics/tx_carrier_errors}=="0" ATTR{statistics/tx_compressed}=="0" ATTR{statistics/tx_dropped}=="0" ATTR{statistics/tx_errors}=="0" ATTR{statistics/tx_fifo_errors}=="0" ATTR{statistics/tx_heartbeat_errors}=="0" ATTR{statistics/tx_packets}=="0" ATTR{statistics/tx_window_errors}=="0" ATTR{threaded}=="0" ATTR{tx_queue_len}=="1000" ATTR{type}=="1" looking at parent device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1': KERNELS=="mmc1:0001:1" SUBSYSTEMS=="sdio" DRIVERS=="brcmfmac" ATTRS{class}=="0x00" ATTRS{coredump}=="(write-only)" ATTRS{device}=="0xa9bf" ATTRS{power/control}=="auto" ATTRS{power/runtime_active_time}=="0" ATTRS{power/runtime_status}=="unsupported" ATTRS{power/runtime_suspended_time}=="0" ATTRS{revision}=="0.0" ATTRS{vendor}=="0x02d0" looking at parent device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1/mmc1:0001': KERNELS=="mmc1:0001" SUBSYSTEMS=="mmc" DRIVERS=="" ATTRS{device}=="0xa9bf" ATTRS{ocr}=="0x00200000" ATTRS{power/control}=="auto" ATTRS{power/runtime_active_time}=="0" ATTRS{power/runtime_status}=="unsupported" ATTRS{power/runtime_suspended_time}=="0" ATTRS{rca}=="0x0001" ATTRS{revision}=="0.0" ATTRS{type}=="SDIO" ATTRS{vendor}=="0x02d0" looking at parent device '/devices/platform/soc/48004000.mmc/mmc_host/mmc1': KERNELS=="mmc1" SUBSYSTEMS=="mmc_host" DRIVERS=="" ATTRS{power/control}=="auto" ATTRS{power/runtime_active_time}=="0" ATTRS{power/runtime_status}=="unsupported" ATTRS{power/runtime_suspended_time}=="0" looking at parent device '/devices/platform/soc/48004000.mmc': KERNELS=="48004000.mmc" SUBSYSTEMS=="amba" <------------------------------------------------------- AMBA is here DRIVERS=="mmci-pl18x" ATTRS{driver_override}=="(null)" ATTRS{id}=="00253180" ATTRS{power/autosuspend_delay_ms}=="50" ATTRS{power/control}=="on" ATTRS{power/runtime_active_time}=="666709" ATTRS{power/runtime_status}=="active" ATTRS{power/runtime_suspended_time}=="0" looking at parent device '/devices/platform/soc': KERNELS=="soc" SUBSYSTEMS=="platform" DRIVERS=="simple-pm-bus" ATTRS{driver_override}=="(null)" ATTRS{power/control}=="auto" ATTRS{power/runtime_active_time}=="0" ATTRS{power/runtime_status}=="unsupported" ATTRS{power/runtime_suspended_time}=="0" looking at parent device '/devices/platform': KERNELS=="platform" SUBSYSTEMS=="" DRIVERS=="" ATTRS{power/control}=="auto" ATTRS{power/runtime_active_time}=="0" ATTRS{power/runtime_status}=="unsupported" ATTRS{power/runtime_suspended_time}=="0" ```
* | sd-bus: convenience functions to emit a signal to a destination (#25123)Erik Moqvist2022-10-318-4/+138
| | | | | | * sd-bus: convenience functions to emit a signal to a destination
* | udev-builtin-net_id: support getting usb path off the hostCharles Hardin2022-10-314-2/+28
| | | | | | | | | | | | | | | | | | | | | | To support predictable interface names in various embeeded systems add support for an additional naming scheming using the USB host interface. Several asics have usb controllers that are platform devices and not children of a pci interface. These embedded systems should be able to enumerate interfaces by udev path as well to support configurations and policies. Signed-off-by: Charles Hardin <charles.hardin@chargepoint.com>
* | dissect: add --list optionAntonio Alvarez Feijoo2022-10-313-7/+71
| | | | | | | | | | New option to print the paths of all the files and directories in the image to stdout.
* | Merge pull request #25092 from fbuihuu/random-seed-tweaksLuca Boccassi2022-10-311-176/+314
|\ \ | | | | | | Random seed tweaks
| * | random-seed: clarify one commentFranck Bui2022-10-251-3/+4
| | |
| * | random-seed: downgrade some messagesFranck Bui2022-10-251-2/+2
| | | | | | | | | | | | | | | In these cases, we eat up the error and propagate success so we should log at warning level only.
| * | random_seed: minor improvement in run()Franck Bui2022-10-251-5/+5
| | |
| * | random-seed: split out run()Franck Bui2022-10-251-143/+184
| | | | | | | | | | | | No functional change.
| * | random-seed: no need to pass 'mode' argument when opening /dev/urandomFranck Bui2022-10-251-1/+1
| | | | | | | | | | | | | | | | | | The open() call is not supposed to create /dev/urandom. No functional change.
| * | random-seed: make the logic to calculate the number of bytes read from the ↵Franck Bui2022-10-251-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | random seed file clearer We want the size to lie within [/proc/sys/kernel/random/poolsize,RANDOM_POOL_SIZE_MAX] interval. Let's make it more obvious. Also move the logic in a dedicated function.
| * | random-seed: use getopt()Franck Bui2022-10-251-13/+103
| | | | | | | | | | | | | | | | | | | | | | | | It's not really necessary since systemd-random-seed is an internal tool for the moment but this might change in future (to allow system installers to initialize a random seed file for example). Also introducing new options will be easier.
| * | random-seed: make one more use of random_write_entropy()Franck Bui2022-10-211-1/+1
| | | | | | | | | | | | No functional change.
| * | random-seed: shorten a bit may_credit()Franck Bui2022-10-211-11/+8
| | | | | | | | | | | | No functional change.
* | | Merge pull request #24958 from Werkov/meson-generated-directivesLuca Boccassi2022-10-3116-2304/+125
|\ \ \ | | | | | | | | Generate dirrectives for fuzzer tests
| * | | meson: Generate fuzzer inputs with directivesMichal Koutný2022-10-2016-2265/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lists of directives for fuzzer tests are maintained manually in the repo. There is a tools/check-directives.sh script that runs during test phase and reports stale directive lists. Let's rework the script into a generator so that these directive files are created on-the-flight and needn't be updated whenever a unit file directives change. The scripts is rewritten in Python to get rid of gawk dependency and each generated file is a separate meson target so that incremental builds refresh what is just necessary (and parallelize (negligible)). Note: test/fuzz/fuzz-unit-file/directives-all.slice is kept since there is not automated way to generate it (it is not covered by the check script neither).
| * | | meson: Store fuzz tests in structured wayMichal Koutný2022-10-112-46/+45
| | | | | | | | | | | | | | | | | | | | | | | | Put fuzzer tests into dictionary that maps `fuzzer->list of inputs` instead of the flat list. This is just refactoring with no intentional .
* | | | Merge pull request #25134 from medhefgo/macroLuca Boccassi2022-10-312-28/+35
|\ \ \ \ | | | | | | | | | | macro: Small IN_SET improvements
| * | | | test: add test for IN_SET() with bitfield specifierYu Watanabe2022-10-271-0/+10
| | | | |
| * | | | macro: fix indentationYu Watanabe2022-10-261-1/+1
| | | | |
| * | | | macro: Simply case macros for IN_SETJan Janssen2022-10-261-22/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CASE param would normally provide the operation for the compiler to do in this macro magic. But in this case CASE_F_1 was hardcoding the operation, making the parameter moot. This just removes the somewhat pointless parameter instead of fixing the one case. These macros are used for IN_SET case labels only and not named generically anyways.
| * | | | macro: Use more correct type in IN_SETJan Janssen2022-10-261-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will now catch mistakes like this: struct s { int i:2; } s = { 1 }; assert_se(IN_SET(s.i, ULLONG_MAX)); > warning: implicit conversion from 'unsigned long long' to > 'typeof (+s.i)' (aka 'int') changes value from 18446744073709551615 > to -1 [-Wconstant-conversion]
* | | | | Merge pull request #25136 from yuwata/udev-id-renamingLuca Boccassi2022-10-311-21/+10
|\ \ \ \ \ | | | | | | | | | | | | udev: cleanup for ID_RENAMING property
| * | | | | udev: use ASSERT_PTR() at one more placeYu Watanabe2022-10-261-4/+2
| | | | | |
| * | | | | udev: drop ID_RENAMING from UdevEvent.dev_db_clone instead of UdevEvent.devYu Watanabe2022-10-261-17/+8
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the properties loaded from the database are stored to UdevEvent.dev_db_clone, instead of UdevEvent.dev. This also makes the removal done unconditionally, for safety.
* | | | | Merge pull request #25142 from ↵Luca Boccassi2022-10-3111-50/+61
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | yuwata/network-fix-race-in-device-renaming-vs-dhcp network,dhcp: fix theoretical race in device renaming
| * | | | | dhcp: use the attached sd_device object when generating IAIDYu Watanabe2022-10-276-50/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note, previously `use_mac` set with `test_mode`. As `dev`, which is set with `client->dev`, is not set when running test or fuzzer. Hence, the condition ``` if (udev_available() && !use_mac) ``` is effectively equivalent to ``` if (dev) ``` So, this commit mostly does not change behavior. Except for the following corner case. The sd_device object assigned from networkd (that is, Link.dev) never has ID_RENAMING udev property, as sd_device objects which has the property are filtered out at `link_check_initialized()` or `manager_udev_process_link()` in networkd-link.c. However, sd_device object created in `dhcp_identifier_set_iaid()` in the previous code may have it. Such situation may (at least, theoretically) happen when the network interface is renamed after initialized, e.g. by creating the following spurious .link file: ``` [Match] OriginalName=eno1 [Link] Name=lan ``` and then trigger uevent for the network interface while systemd-networkd calling `dhcp_identifier_set_iaid()`.
| * | | | | network: attach device to DHCP clientsYu Watanabe2022-10-263-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | The attached sd_device object will be used later.