linux/drivers/acpi/apei
Tony Luck 0c00cfbcfc ACPI: APEI: EINJ: Fix EINJV2 memory error injection
Error types in EINJV2 use different bit positions for each flavor of
injection from legacy EINJ.

Two issues:

 1) The address sanity checks in einj_error_inject() were skipped for
    EINJV2 injections. Noted by sashiko[1]
 2) __einj_error_trigger() failed to drop the entry of the target
    physical address from the list of resources that need to be
    requested.

Add a helper function that checks if an injection is to memory and use it
to solve each of these issues.

Note that the old test in __einj_error_trigger() checked that param2 was
not zero. This isn't needed because the sanity checks in einj_error_inject()
reject memory injections with param2 == 0.

Fixes: b47610296d ("ACPI: APEI: EINJ: Enable EINJv2 error injections")
Reported-by: sashiko <sashiko@sashiko.dev>
Reported-by: Herman Li <herman.li@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Tested-by: "Lai, Yi1" <yi1.lai@intel.com>
Link: https://sashiko.dev/#/patchset/20260415163620.12957-1-tony.luck%40intel.com # [1]
Reviewed-by: Jiaqi Yan <jiaqiyan@google.com>
Reviewed-by: Zaid Alali <zaidal@os.amperecomputing.com>
Link: https://patch.msgid.link/20260421150216.11666-3-tony.luck@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-04-27 21:42:31 +02:00
..
apei-base.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
apei-internal.h ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities 2025-06-18 20:49:31 +02:00
bert.c ACPI: APEI: mark bert_disable as __initdata 2023-06-12 19:23:25 +02:00
einj-core.c ACPI: APEI: EINJ: Fix EINJV2 memory error injection 2026-04-27 21:42:31 +02:00
einj-cxl.c ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities 2025-06-18 20:49:31 +02:00
erst-dbg.c ACPI: APEI: Remove redundant assignments in erst_dbg_{ioctl|write}() 2025-09-15 21:21:57 +02:00
erst.c ACPI: APEI: Use ERST timeout for slow devices 2023-10-24 20:50:17 +02:00
ghes_helpers.c ACPI: APEI: GHES: Add helper to copy CPER CXL protocol error info to work struct 2026-01-14 17:09:34 +01:00
ghes-nvidia.c ACPI: APEI: GHES: Add NVIDIA vendor CPER record handler 2026-04-06 16:48:58 +02:00
ghes.c ACPI: APEI: GHES: Add devm_ghes_register_vendor_record_notifier() 2026-04-06 16:48:58 +02:00
hest.c ACPI: APEI: Skip initialization of GHES_ASSIST structures for Machine Check Architecture 2024-02-29 18:34:40 +01:00
Kconfig ACPI: APEI: GHES: Add NVIDIA vendor CPER record handler 2026-04-06 16:48:58 +02:00
Makefile ACPI: APEI: GHES: Add NVIDIA vendor CPER record handler 2026-04-06 16:48:58 +02:00