platform/x86/intel/pmt: Fix crashlog regressions and add completion uevent
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | platform/x86/intel/pmt: Fix NULL dereference when reading crashlog datadrivers/ | +3 | 1 reply | |
| 2/3 | platform/x86/intel/vsec: Fix inverted walk_header() test in get_features()drivers/ | +1 | 1 reply | |
| 3/3 | platform/x86/intel/pmt: Notify userspace when crashlogs completeDocumentation/ drivers/ | +95 | 1 reply |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Michael J. Ruhl |
|---|---|
| 1/3 | |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] platform/x86/intel/pmt: Fix crashlog regressions and add completion uevent
This series adds a uevent so userspace can find out when an Intel PMT crashlog is available without polling. It also fixes two regressions from the v7.1 vsec rework that prevent the crashlog path from being used at all.
Patches 1 and 2 are fixes, tagged for stable:
- Patch 1 fixes a NULL pointer dereference on any read of a crashlog sysfs data file. Commit 353042d54d82 ("platform/x86/intel/vsec:
Switch exported helpers from pci_dev to device") started using entry->ep->dev, but only telemetry entries allocate an endpoint.
- Patch 2 fixes an inverted return value test of intel_vsec_walk_header() in intel_vsec_get_features(). On devices without DVSEC/VSEC capabilities that describe their features through device_data, probe fails with -ENODEV and the auxiliary devices it created are torn down again.
Patch 3 is the new feature. It emits a KOBJ_CHANGE uevent on the crashlog<x> device when a completed crashlog is found at probe, or when a manually triggered capture completes. The event carries INTEL_PMT_CRASHLOG_EVENT=PRESENT and INTEL_PMT_CRASHLOG_COMPLETE=1, and the ABI documentation is updated to match.
The fixes are sent together with the feature because patch 3 cannot be tested without them. Crashlog data cannot be read without patch 1. Upcoming hardware with crashlog support has no DVSEC/VSEC capabilities and describes its features through device_data, so it hits the bug fixed by patch 2. Patches 1 and 2 do not depend on patch 3 and can be applied to the fixes branch on their own if preferred.
Testing: the series was tested in an emulated (QEMU) environment, covering both the probe-time uevent with a completed crashlog present and the uevent after a manual trigger completes. Hardware with this crashlog support is available, but testing on it is still pending.
David E. Box (3):
platform/x86/intel/pmt: Fix NULL dereference when reading crashlog
data
platform/x86/intel/vsec: Fix inverted walk_header() test in
get_features()
platform/x86/intel/pmt: Notify userspace when crashlogs complete
.../ABI/testing/sysfs-class-intel_pmt | 14 ++++ drivers/platform/x86/intel/pmt/class.c | 4 +- drivers/platform/x86/intel/pmt/crashlog.c | 84 ++++++++++++++++++- drivers/platform/x86/intel/vsec.c | 2 +- 4 files changed, 99 insertions(+), 5 deletions(-)
base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e
Signature · 1 line
2.43.0