Skip to content

Commit 0881667

Browse files
committed
ACPI: APEI: EINJ: Check if user asked for EINJV2 injection
JIRA: https://issues.redhat.com/browse/RHEL-114092 commit 6c70585 Author: Tony Luck <tony.luck@intel.com> Date: Mon, 18 Aug 2025 18:07:38 +0000 On an EINJV2 capable system, users may still use the old injection interface but einj_get_parameter_address() takes the EINJV2 path to map the parameter structure. This results in the address the user supplied being stored to the wrong location and the BIOS injecting based on an uninitialized field (0x0 in the reported case). Check the version of the request when mapping the EINJ parameter structure in BIOS reserved memory. Fixes: 691a0f0 ("ACPI: APEI: EINJ: Discover EINJv2 parameters") Reported-by: Lai, Yi1 <yi1.lai@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Zaid Alali <zaidal@os.amperecomputing.com> Reviewed-by: Hanjun Guo <gouhanjun@huawei.com> Link: https://patch.msgid.link/20250814161706.4489-1-tony.luck@intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent 7c117e5 commit 0881667

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/apei/einj-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static void __iomem *einj_get_parameter_address(void)
315315
memcpy_fromio(&v5param, p, v5param_size);
316316
acpi5 = 1;
317317
check_vendor_extension(pa_v5, &v5param);
318-
if (available_error_type & ACPI65_EINJV2_SUPP) {
318+
if (is_v2 && available_error_type & ACPI65_EINJV2_SUPP) {
319319
len = v5param.einjv2_struct.length;
320320
offset = offsetof(struct einjv2_extension_struct, component_arr);
321321
max_nr_components = (len - offset) /

0 commit comments

Comments
 (0)