platform/wmi: Use WMI driver core for size checks
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | platform/wmi: Add wmidev_invoke_procedure()Documentation/ drivers/ include/ | +49 | 0 replies | |
| 2/6 | platform/wmi: Convert drivers to use wmidev_invoke_procedure()drivers/ drivers/ | +10 | 0 replies | |
| 3/6 | platform/wmi: Prepare to reject undersized unmarshalling resultsdrivers/ drivers/ drivers/ +1 more | +32 | 0 replies | |
| 4/6 | platform/wmi: Extend wmidev_invoke_method() to reject undersized datadrivers/ drivers/ include/ | +14 | 0 replies | |
| 5/6 | platform/wmi: Extend wmidev_query_block() to reject undersized datadrivers/ drivers/ drivers/ +1 more | +10 | 0 replies | |
| 6/6 | platform/wmi: Replace .no_notify_data with .min_event_sizeDocumentation/ drivers/ drivers/ +10 more | +29 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] platform/wmi: Use WMI driver core for size checks
As suggested by Ilpo, the buffer-based WMI API should assist drivers in verifying the size of buffers received from WMI methods or blocks. This patch series implements this suggestion by allowing drivers to use the WMI driver core to automatically reject undersized buffers.
This avoids a memory allocation for undersized data and simplifies the size checking code in most WMI drivers. All patches except the last one have been tested using synthetic ACPI tables and appear to work just fine.
Armin Wolf (6):
platform/wmi: Add wmidev_invoke_procedure()
platform/wmi: Convert drivers to use wmidev_invoke_procedure() platform/wmi: Prepare to reject undersized unmarshalling results platform/wmi: Extend wmidev_invoke_method() to reject undersized data platform/wmi: Extend wmidev_query_block() to reject undersized data platform/wmi: Replace .no_notify_data with .min_event_size
.../wmi/driver-development-guide.rst | 11 ++- drivers/platform/wmi/core.c | 89 ++++++++++++++----- drivers/platform/wmi/internal.h | 3 +- drivers/platform/wmi/marshalling.c | 6 +- .../platform/wmi/tests/marshalling_kunit.c | 24 ++++- drivers/platform/x86/bitland-mifs-wmi.c | 24 ++--- drivers/platform/x86/dell/dell-wmi-base.c | 1 + .../platform/x86/intel/wmi/sbl-fw-update.c | 7 +- drivers/platform/x86/intel/wmi/thunderbolt.c | 2 +- drivers/platform/x86/lenovo/ideapad-laptop.c | 1 + drivers/platform/x86/lenovo/wmi-camera.c | 1 + drivers/platform/x86/lenovo/wmi-events.c | 1 + drivers/platform/x86/lenovo/ymc.c | 1 + drivers/platform/x86/lenovo/yogabook.c | 2 +- drivers/platform/x86/redmi-wmi.c | 1 + drivers/platform/x86/uniwill/uniwill-wmi.c | 1 + drivers/platform/x86/wmi-bmof.c | 2 +- drivers/platform/x86/xiaomi-wmi.c | 1 + include/linux/wmi.h | 15 +++- 19 files changed, 135 insertions(+), 58 deletions(-)
Signature · 1 line
2.39.5