Commit Graph

4304 Commits

Author SHA1 Message Date
Richard Hughes
99cc658a75 tpm-eventlog: Add an HSI attr for reconstruction failure 2020-05-12 12:29:42 +01:00
Richard Hughes
31c1a45833 hsi: Add support for 'U' and 'A' suffixes 2020-05-12 12:29:42 +01:00
Richard Hughes
ad45158d6a hsi: Taint the result if unknown fwupd plugins are running 2020-05-12 12:29:42 +01:00
Richard Hughes
399859e48b trivial: Allow plugins to signal that the security status has changed 2020-05-11 22:11:49 +01:00
Richard Hughes
196c6c69db Add support for the Host Security ID
The HSI specification assigns a simple text ID to the current state of firmware
security. As new vulnerabilities are found, and as protection measures are
updated, new requirements will be added to the required firmware behaviours for
each HSI value.

The HSI specification is currently incomplete and in active development, and
so the --force flag is required in all command line tools. The current ID value
will probably change on a given platform so please do not start using the result
for any kind of compliance requirements.
2020-05-11 22:11:49 +01:00
Richard Hughes
c1407ed14f trivial: Add a --force argument to fwupdagent to match the other tools 2020-05-11 17:54:25 +01:00
Richard Hughes
a715791707 Add a new path enum of FU_PATH_KIND_ACPI_TABLES 2020-05-11 17:53:50 +01:00
Richard Hughes
173acd2e07 Add FwupdSecurityAttr to libfwupd
This will be used to store security attributes about platform security.
2020-05-11 17:52:41 +01:00
Subhendu Ghosh
d1d83c083e ata: Add OUI quirk for Western Digital 2020-05-11 08:15:43 +01:00
Richard Hughes
6a07870fa2 Add a vfunc that gets run after the device has been added
This allows per-plugin actions after the device has been open()ed and started.
2020-05-10 20:34:56 +01:00
Richard Hughes
9223c89019 trivial: Add a helper method to check for an Intel CPU
Some plugins will be Intel specific.
2020-05-10 17:49:13 +01:00
Ilya Guterman
46f5415eda dfu: Support MATEKF722SE quirk
MATEKF722SE has unconvetional behavior for dfu protocol, where the sector size
isn't specified and sector type is shiffted left by 1. This happens only for
one sector.

Sector parsing from MATEKF722SE:

 * `016Kg`
 * `64Kg`
 * `128Kg`
 * `048 e`
 * `528e`
 * `004 e`
2020-05-09 20:19:57 +01:00
Mario Limonciello
cb6ec2b18e trivial: uefi-dbx: correct error message on missing file
```
unset error in plugin uefi_dbx for add_security_attrs()
```
2020-05-07 13:02:57 -05:00
Richard Hughes
b9640a28ec uefi-dbx: Add a plugin that analyses the UEFI dbx variable
This will be used for future functionality.
2020-05-07 16:59:36 +01:00
Richard Hughes
a84d7a7e2a trivial: Add fu_common_filename_glob() for future use 2020-05-07 16:59:36 +01:00
Richard Hughes
9ed79ae644 Fix various build issues with -Wdiscarded-qualifiers
Fixes https://github.com/fwupd/fwupd/issues/2068
2020-05-07 16:15:30 +01:00
Richard Hughes
d744fe8b67 linux-swap: Rename the plugin as it is Linux specific
We'll be adding other linux-foo plugins in the future, so it makes sense to get
the namespace correct now.
2020-05-07 12:42:34 +01:00
Mario Limonciello
768a2680a6 Introduce a new flag skips-restart
This flag is used internally by plugins to indicate that they will
skip the phase of firmware installation that power cycles a device.

It is intended to be set by quirks or other environment settings.
2020-05-06 15:13:40 -05:00
Richard Hughes
2d6456e019 cpu: Parse the CPU flags to detect the CET status
New enough hardware to have this feature isn't going to be in the marketplace
for a while. To use that newer hardware requires a very recent kernel (5.6 at
least, although it will probably be at least 5.9 by the time the hardware is
released).

The CET status will be used in future functionality.
2020-05-06 18:15:28 +01:00
Mario Limonciello
0cd2f10711 trivial: dell-dock: delay activation of the thunderbolt updates
There was some regression between 1.4.0 and now that prevented updates
containing a Thunderbolt controller from finishing.  They would just
sit pending Thunderbolt replug without ever finishing.

Remove the old hack for replug and instead push activation to the end
of the composite steps.

This is to avoid the device tree from changing significantly during
the update process.

This still isn't really ideal, we want to be able to add the flag
usable-during-update to the thunderbolt controller, but this requires
some extra work in the kernel.
2020-05-06 11:13:51 -05:00
Mario Limonciello
da0d1880e1 trivial: fu-engine: return firmware gtypes in a sorted list
This makes the output in `firmware-parse` more predictable
2020-05-06 11:13:51 -05:00
Mario Limonciello
94874cd067 thunderbolt: Add a new subclassed thunderbolt firmware update type
Thunderbolt images brought in from the SPI don't have a FARB header.
Thunderbolt update images do.

So these two types of images need to be handled separately from the
firmware parser.
2020-05-06 11:13:51 -05:00
Richard Hughes
c368958518 swap: Add a plugin that parses /proc/swaps
This will be used for future functionality.
2020-05-06 15:09:59 +01:00
Mario Limonciello
3838b22a7c trivial: add missing changelog entry for 1.3.9
This release came out after 1_3_X branched but long before 1.40 release
so these entries are confusing to be missing.
Fixes: #2059
2020-05-05 13:14:22 -05:00
Richard Hughes
748a65f3c7 trivial: Post branch version bump
We're planning to ship fwupd 1.4.x in RHEL 8 and so it makes sense to have a
stable branch to do point releases. I don't intend to release versions 1.5.x
any time soon, so moderately-agressive backporting to 1_4_X is okay.
2020-05-05 11:34:17 +01:00
Richard Hughes
86f6324a26 Switch the default of EnumerateAllDevices to false
This was causing dozens of regressions to be reported.
2020-05-03 06:47:40 +01:00
Jakob
f4b843db43 Add OUI quirk for SanDisk 2020-05-02 08:51:53 +01:00
Richard Hughes
0258c12af3 uefi: Manually call fu_device_setup() during coldplug
This forces the daemon to convert the main-system-firmware instance ID to a
GUID, which allows us to find it using fu_device_list_get_by_guid()
2020-05-01 19:26:52 +01:00
Mario Limonciello
890963108e Clarify invalid arguments display (Fixes: #2045)
Avoid a wall of text and instead direct people to `--help` output.
Also sync up this section of code between `fu-util.c` and `fu-tool.c`
2020-04-30 14:20:36 -05:00
Richard Hughes
af917f558b vli: Add two standard USB instance IDs for shared-PD devices 2020-04-30 11:06:28 +01:00
Richard Hughes
cbc65bc071 vli: Use GPIOB to reset the VL817 found in two Lenovo products 2020-04-30 11:06:28 +01:00
Mario Limonciello
825c04df73 trivial: tpm-eventlog: Modify -p argument behavior
If using this argument, only display the final calculated value.
2020-04-29 13:18:53 -05:00
Mario Limonciello
38c80baff5 tpm-eventlog: Disambiguate the output at the end of fwupdtpmevlog
It's not obvious to users if this is the same value as tpm2-tools or the reconstructed value.
2020-04-29 13:18:53 -05:00
Mario Limonciello
e1c8c018a5 tpm-eventlog: Correct the display of final calculated PCRs
Although the calculation matched on my machine the actual numbers didn't
match PCR0 values from the tpm2-tools.  This was a display error.
2020-04-29 13:18:53 -05:00
Mario Limonciello
16a96fbbe7 thunderbolt: Allow quirks to skip the authentication step
This will allow being able to PoC some future kernel work to split
up steps.
2020-04-29 13:15:45 -05:00
Mario Limonciello
6358e23490 thunderbolt: drop support for force power
The kernel interface for force power doesn't support tracking the state
of the device, and so this had to be tracked by fwupd.

Unfortunately due to system and thunderbolt controller firmware behavior
on some systems the thunderbolt controller /still/ didn't return even
when force power state was accurately tracked.

The device model for the uevent related to the device removal being ignored
doesn't really fit into the current fwupd architecture anymore either.

Lastly this is a very legacy feature at this point.  Thunderbolt3 controllers
distributed in the last 3 years all operate in 'native' mode meaning that
they will always be powered and use runtime power management.

USB4 controllers won't have a concept of being force powered.
USB4 reimers will have this concept, but the state will be tracked by the
kernel and obfuscated from userspace.

So with all that said, tear out all of the force power related code.
2020-04-29 13:15:45 -05:00
Mario Limonciello
ec44dd3353 Modernize the thunderbolt plugin.
Remove it's references to it's own GUdevclient and instead use
FuUdevDevice.

Some intentional casualties of the move:
* Plugin metadata around native and safe mode dropped.
  - These haven't been useful in debugging anything and aren't relevant
    on new hardware
* Extra GUID for 2 host controllers in same system dropped
  - Although this was normally static information BIOS operations like
    turning off PCI-E SD card reader or LAN controller changed things.
* The NVM version is parsed directly instead of through gudev to prevent
  cached data breaking change events.

Remaining TODO:
* Force power w/ thunderbolt-power doesn't work
2020-04-29 13:15:45 -05:00
Mario Limonciello
767c29e2cc trivial: make building plugins without gudev more obvious failures 2020-04-29 13:15:45 -05:00
Mario Limonciello
096e3cfbb6 fu-plugin: add a new udev_device_changed function that calls rescan 2020-04-29 13:15:45 -05:00
Mario Limonciello
0d207d8dea fu-udev-device: add fu_udev_device_get_parent_name
This will fetch the name from parent device
2020-04-29 13:15:45 -05:00
Mario Limonciello
224b685fae fu-udev-device: Add support for reading arbitrary sysfs attributes
Some devices provide 'non-standard' attributes that are relevant
for use.
2020-04-29 13:15:45 -05:00
Crag Wang
e010c606e4 wacom-raw: fixup switching to bootloader mode 2020-04-28 10:19:38 -05:00
Mario Limonciello
89130342bc Generate a body for github releases (Fixes: #2034) 2020-04-28 09:56:02 -05:00
Richard Hughes
02930f1f23 trivial: Fix DFU debug output 2020-04-28 13:38:48 +01:00
Richard Hughes
4eaf882911 trivial: Fix a potential NULL deref spotted by Coverity 2020-04-27 16:12:55 +01:00
Richard Hughes
11a42d29a9 trivial: Fix another merge-conflict remnant spotted by Coverity 2020-04-27 16:11:48 +01:00
Richard Hughes
daf5ebb294 trivial: Do not build flashrom on all architectures 2020-04-27 11:58:30 +01:00
Richard Hughes
09e63cd45d trivial: post release version bump 2020-04-27 11:12:27 +01:00
Richard Hughes
ad113b931f Release fwupd 1.4.1 2020-04-27 11:05:41 +01:00
Mario Limonciello
55a42ddcbb thunderbolt: Don't show safe mode errors for USB4 host controllers
USB4 Controllers were showing up like this:

USB4 Controller:
     Device ID:           3df660bc4bdb67fd6fc101b34c6fd8cd235e3f97
     Summary:             Unmatched performance for high-speed I/O
     Current version:     00.00
     Update Error:        Device is in safe mode
     GUID:                4d86f168-e1cc-5995-afd3-ae9df6a14f5e -> TBT-safemode
     Device Flags:         Internal device
                           Requires AC power
2020-04-23 14:13:38 -05:00