]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: APEI: EINJ: Fix EINJV2 initialization and injection
authorTony Luck <tony.luck@intel.com>
Wed, 19 Nov 2025 01:27:12 +0000 (17:27 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 19 Nov 2025 12:36:29 +0000 (13:36 +0100)
commitd2932a59c2d4fb364396f21df58431c44918dd47
tree50f2976f04dc1fb3bbfc38807cc1198d23e01ff4
parent6a23ae0a96a600d1d12557add110e0bb6e32730c
ACPI: APEI: EINJ: Fix EINJV2 initialization and injection

ACPI 6.6 specification for EINJV2 appends an extra structure to
the end of the existing struct set_error_type_with_address.

Several issues showed up in testing.

 1) Initialization was broken by an earlier fix [1] since is_v2 is only
    set while performing an injection, not during initialization.

 2) A buggy BIOS provided invalid "revision" and "length" for the
    extension structure. Add several sanity checks.

 3) When injecting legacy error types on an EINJV2 capable system,
    don't copy the component arrays.

Fixes: 6c7058514991 ("ACPI: APEI: EINJ: Check if user asked for EINJV2 injection") # [1]
Fixes: b47610296d17 ("ACPI: APEI: EINJ: Enable EINJv2 error injections")
Signed-off-by: Tony Luck <tony.luck@intel.com>
[ rjw: Changelog edits ]
Cc: 6.17+ <stable@vger.kernel.org> # 6.17+
Link: https://patch.msgid.link/20251119012712.178715-1-tony.luck@intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/apei/einj-core.c