Commit Graph

4425 Commits

Author SHA1 Message Date
Mario Limonciello
fe862a1d1b tpm-eventlog: Always look at all supported algorithms
This will effectively mean that both sha1 and sha256 results are
sent back to uefi plugin for analysis.
2020-06-17 15:01:34 -05:00
Richard Hughes
87143298cd pci-mei: Set the security attr result for a passed version 2020-06-17 18:37:27 +01:00
Richard Hughes
19a60e62bc trivial: Check for the _UNKNOWN enum when mashalling to GVariant 2020-06-17 18:37:27 +01:00
Mario Limonciello
8012fb3c8d trivial: dell-dock: clarify the pending update message (#2185)
To a user it's not obvious if being unplugged means host or AC adapter.
Unplugging from AC adapter will prevent the dock from completing an
update.
2020-06-17 11:49:33 -05:00
Richard Hughes
33b0f48b6f vli: Wait for the root device to be replugged when updating the MSP430
The MSP device is a virtual child of the USB hub.
2020-06-17 17:29:34 +01:00
Richard Hughes
a8610c3027 vli: Do not use GUID matching for the MSP device
Not strictly required, but it makes the FuDeviceList operation much simpler.
2020-06-17 17:29:34 +01:00
Richard Hughes
1ec96e31f5 Allow plugins to set remove delay only on the child
Force the FuDevice parent to have the largest of the child removal delays.
This avoids each plugin enumerating the children (which may not even be added
yet) to increase the length of the allowed parent delay.
2020-06-17 17:29:34 +01:00
Richard Hughes
6d9ae625ed trivial: Move the report success report to common code
This would allow us to use it from fwupdagent in the future.
2020-06-16 15:49:28 +01:00
Richard Hughes
b114661a25 Collect per-device report metadata for the history database
Add two new vfuncs that can be used to collect report metadata from devices
both before and after the update has run. This means we can remove the hacks
where we set add 'global' metadata entries and just hope that there is only one
device from the same plugin that is updated.

This also allows us to collect debugging metadata from devices after an offline
update has been run.
2020-06-16 15:49:28 +01:00
Richard Hughes
e012513bed trivial: Allow modifying the historical device metadata 2020-06-16 15:49:28 +01:00
Richard Hughes
4837ab5a22 trivial: Simplify marking devices as reported 2020-06-16 15:49:28 +01:00
Richard Hughes
589270a7c4 trivial: Simplify some reporting code
This is not a fast path, so make getting the FwupdRemote simpler.
2020-06-16 15:49:28 +01:00
Mario Limonciello
5b63015c19 tpm-eventlog: fix PCR0 calculation
One of the core problems is that systems with both sha1 and sha256
were miscalculating.

Fixes: #2181
2020-06-15 16:17:29 -05:00
Mario Limonciello
2caea54202 uefi: check for free space after cleaning up ESP
In a very small ESP situation it's possible that the amount of free
space is insufficient until it's actually been cleaned.

Fixes: #2179
2020-06-15 10:21:18 -05:00
Richard Hughes
e261bb6fa0 Record the UEFI failure in more cases
Ensure the historical error is set for failed NEEDS_REBOOT UEFI devices that do
not set LastAttemptStatus.
2020-06-15 16:16:37 +01:00
Richard Hughes
7f7f0aed1f trivial: Add more items to the kernel command line checker
This data is from Pascal Ernster, many thanks.
2020-06-15 12:11:00 +01:00
Richard Hughes
d94ce34d56 trivial: Add more items to the kernel command line checker
This data is from Pascal Ernster, many thanks.
2020-06-12 20:56:17 -05:00
Richard Hughes
4fd61e4756 vli: Use the GPIOB reset for the MiniDock VL103 2020-06-11 07:03:23 +01:00
Richard Hughes
6cd6e2adb6 vli: Set FuQuirks on the shared SPI object 2020-06-11 07:03:23 +01:00
Richard Hughes
92072b4239 vli: Add the project ID shared SPI PD controllers
The Mini-Dock and Travel-Hub accidentally share the same VID:PID and this is the
only way to tell them apart.
2020-06-11 07:03:23 +01:00
Mario Limonciello
080789916f trivial: fix news generation script 2020-06-10 13:03:14 -05:00
Richard Hughes
0143c67c76 trivial: Build a specific tag from the libjcat subproject 2020-06-10 15:21:54 +01:00
Richard Hughes
afda962cba Fix regression when checking for downgraded metadata
When verifying a signature the valid results are ordered by timestamp. The
CHECKSUM results have a zero timestamp and should have been ordered last.
The sorting callback was wrong, which explains the odd result where we could
downgrade Jcat signatures before we fixed 64ebf9, and nicely explains why we
ignored a timestamp of zero in the first place.

When getting the timestamp, ensure we actually get the newest _signature_ not
just the newest result in case checksums start having timestamps in the future
for some reason. Use new API from libjcat where available, else fall back to
sneaking it out using GObject properties and magic values.
2020-06-10 15:21:54 +01:00
Mario Limonciello
471a0e2105 fu-main: Make it clearer what lost name is and bump it to warning
This happens often enough when people switch from snap to distro
package that we should mention it in non-verbose logs.

Fixes: #2112
2020-06-09 11:05:09 -05:00
Mario Limonciello
6b9664168d trivial: checkout branch to fix changelog publishing 2020-06-09 09:42:32 -05:00
Richard Hughes
83a21cb7cd vli: Allow chained usb hub devices where the parent needs GPIOB reset
As both hub devices share a FuVliUsbhubDeviceClass instance we cannot 'hijack'
the vfuncs depending on object type. This allows the downstream hub to proxy to
the upstream hub where a GPIOB reset can be performed.
2020-06-09 11:56:30 +01:00
Richard Hughes
09950a13ce vli: Do not modify the class vfuncs depending on device type
We can have multiple FuVliPdDevice objects registered with the daemon, but they
will all share the FuVliPdDeviceClass instance. If one device requries a
silicon workaround, do not 'hijack' the vfunc for all devices of this type.

This means we do the right thing when updating both the one that requires the
workaround, and the 'normal' one.
2020-06-09 11:30:49 +01:00
Ryan Lee
59bb497a3e ccgx: modify install duration for dmc device 2020-06-09 10:37:26 +01:00
Richard Hughes
49f99d186d trivial: Fix Debian CI targets 2020-06-09 09:09:47 +01:00
Ryan Lee
0942dcc413 ccgx: Add support for HP DMC dock devices 2020-06-05 13:35:54 +01:00
Richard Hughes
2e3605ffdc trivial: Add RemoveDelay as a standard FuDevice quirk 2020-06-05 12:17:52 +01:00
Mario Limonciello
5c2c782446 trivial: add a bug report target for Dell WD19 2020-06-02 11:47:00 -05:00
Mario Limonciello
c0a2798fb5 trivial: logitech_hidpp: set the protocol properly when bootloader unknown
This appears to be a regression from c6ae0d998b
where the case of bootloader version 0 didn't get protocol set.

Fixes: #2156
2020-06-02 10:27:13 -05:00
Richard Hughes
0f6d754d5a Detect if the MEI device has known security issues
If it has, fail HSI-1.
2020-06-01 22:49:39 +01:00
Richard Hughes
bb228cbe53 pci-mei: Check the HFS register for the override strap 2020-05-29 17:34:18 +01:00
Richard Hughes
bdfccdf097 Allow multi-byte FuUdevDevice preads and writes 2020-05-29 17:34:18 +01:00
Mario Limonciello
cafea91f53 trivial: fix windows and snap CI
Introducing newer gusb caused these builds to run gusb as a subproject
and hence the introspection binaries were looked for.

Fixes: cd65ae ("Require libgusb 0.3.3")
2020-05-29 08:08:32 -05:00
Mario Limonciello
d5d496b62a trivial: uefi: fix dell TPM updates
Adding an extra header makes the firmware reject the GUID in the real
header.
2020-05-29 07:31:15 -05:00
Richard Hughes
64ebf91124 Always enforce the metadata signature has a valid timestamp
Although this is something that we have always done on the LVFS, corporate
deployments that resign the firmware or metadata might not be signing the files
in the same way.

Always require a timestamp to prevent allowing an inadvertent rollback attack.
2020-05-29 13:24:29 +01:00
Benson Leung
a22310374e cros-ec: Provide device metadata as a part of to_string
Provide the following metadata:

"Dirty firmware" bit
Protocol version
Header type
Maximum PDU Size
Flash protection status
Raw version string
Key Version
Minimum rollback
2020-05-29 06:55:40 +01:00
Benson Leung
092f87ae0c cros-ec: Add board name as a instance id and hash as metadata
These couple of extra things in the CrOS EC version string
were split off of the triplet, so give them a home.
2020-05-29 06:55:40 +01:00
Benson Leung
086d0c0eb6 cros-ec: Parse version number into triplet
Add fu_cros_ec_parse_version to common, as this will be used to
parse the firmware bundle's version string too.
2020-05-29 06:55:40 +01:00
Benson Leung
00bb3341d2 cros-ec: Add enough infrastructure for setup connection
This should do the bulk transfers using protocol 6.

The output here is now equivalent to the output of
usb_updater2 -d 18d1:501a -f

fwupdtool --plugin-whitelist cros_ec get-devices --verbose
Servo Micro
  DeviceId:             84d0e3f2a0f8b2328f7995767b23ebb40494723f
  Guid:                 8e2f7625-a164-55d7-8f09-f193c8ec33f1 <- USB\VID_18D1&PID_501A&REV_0100
  Guid:                 13564257-c649-586d-b4e4-4f048d480f36 <- USB\VID_18D1&PID_501A
  Serial:               CMO653-00166-040491U00771
  Summary:              Servo Micro (aka "uServo") Debug Board
  Plugin:               cros_ec_usb
  Flags:                registered
  Vendor:               Google Inc.
  VendorId:             USB:0x18D1
  Version:              servo_micro_v2.4.17-df61092c3
  VersionFormat:        plain
  Created:              2020-05-20
  PhysicalId:            usb:03:00:02
2020-05-29 06:55:40 +01:00
Benson Leung
7aa00f6ee8 cros-ec: Add usb_findit functionality
Find the interface and endpoint used for firmware updates.
Note: this change now requires libgusb 0.3.3 or later.
2020-05-29 06:55:40 +01:00
Benson Leung
cd65aeaa41 Require libgusb 0.3.3
Newer version of libgusb has support for a usb endpoint wrapper.
2020-05-29 06:55:40 +01:00
Benson Leung
b483044a8d cros-ec: Initial skeleton
Set it up as a USB device plugin, with the initial device in quirks
being Servo Micro debug board.
2020-05-29 06:55:40 +01:00
Mario Limonciello
838ae163e3 dell-dock: prevent updates to occur via synaptics-mst plugin
Although they normally work, some failures have been reported in the field
related to the MST hub not responding in the MST plugin.

When these failures have occurred the dell_dock plugin also fails to
enumerate.

So rather than allow some people who don't have dell_dock compiled to
update their MST hub using synaptics_mst, perform ALL updates for
mst hub via dell_dock.

```
18:06:24:0324 FuPluginSynapticsMST no device found on drm_dp_aux1: VMM5331 inside Dell dock is only supported by dell_dock
```
2020-05-28 08:59:07 -05:00
Richard Hughes
137649d9b2 Fix regression when using GetDetails on a device with _MD_SET_NAME set
In f430da0 we added code that was supposed to copy the verfmt from the component
to the device. We accidentally overwrote the component-provided <name> because
the device had _MD_SET_NAME set.

Use the specific function to just set the verfmt like we intended.
2020-05-28 08:57:30 -05:00
Richard Hughes
862ec5c65b Skip module unloading only if we are actually running under valgrind
See also: https://github.com/fwupd/fwupd/issues/2119
Reported-by: Anton Farygin <rider@altlinux.org>

Based on a patch by Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
2020-05-28 06:56:45 -05:00
Mario Limonciello
d39bcee29d trivial: detect cpuid.h and also look for host architecture
Fixes cross compilation for arm with clang which provides cpuid.h
but helpfully has this error:
```
 #if !(__x86_64__ || __i386__)
 #error this header is for x86 only
 #endif
```

Fixes: #2131
2020-05-26 15:06:08 -05:00