From: Yazen Ghannam <Yazen.Ghannam@amd.com> To: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, rjw@rjwysocki.net, lenb@kernel.org, linux-edac@vger.kernel.org, bp@suse.de, tony.luck@intel.com, Yazen Ghannam <yazen.ghannam@amd.com> Subject: [PATCH v2] ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources Date: Mon, 28 Aug 2017 13:13:14 -0500 [thread overview] Message-ID: <1503943994-41271-1-git-send-email-Yazen.Ghannam@amd.com> (raw) From: Yazen Ghannam <yazen.ghannam@amd.com> ACPI defines a number of instructions to use for triggering errors. However we are currently removing the address resources from the trigger resources for only the WRITE_REGISTER_VALUE instruction. This leads to a resource conflict for any other valid instruction. Check that the instruction is less than or equal to the WRITE_REGISTER_VALUE instruction. This allows all valid memory access instructions and protects against invalid instructions. Fixes: b4e008dc53a3 ("ACPI, APEI, EINJ, Refine the fix of resource conflict") Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Acked-by: Tony Luck <tony.luck@intel.com> --- Link: https://lkml.kernel.org/r/1502387883-16667-1-git-send-email-Yazen.Ghannam@amd.com v1->v2: * Apply Tony's comment to restrict behavior to valid memory instructions. drivers/acpi/apei/einj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c index ec50c32ea3da..b38737c83a24 100644 --- a/drivers/acpi/apei/einj.c +++ b/drivers/acpi/apei/einj.c @@ -281,7 +281,7 @@ static struct acpi_generic_address *einj_get_trigger_parameter_region( ((char *)trigger_tab + sizeof(struct acpi_einj_trigger)); for (i = 0; i < trigger_tab->entry_count; i++) { if (entry->action == ACPI_EINJ_TRIGGER_ERROR && - entry->instruction == ACPI_EINJ_WRITE_REGISTER_VALUE && + entry->instruction <= ACPI_EINJ_WRITE_REGISTER_VALUE && entry->register_region.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY && (entry->register_region.address & param2) == (param1 & param2)) -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Yazen Ghannam <yazen.ghannam@amd.com> To: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, rjw@rjwysocki.net, lenb@kernel.org, linux-edac@vger.kernel.org, bp@suse.de, tony.luck@intel.com, Yazen Ghannam <yazen.ghannam@amd.com> Subject: [v2] ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources Date: Mon, 28 Aug 2017 13:13:14 -0500 [thread overview] Message-ID: <1503943994-41271-1-git-send-email-Yazen.Ghannam@amd.com> (raw) From: Yazen Ghannam <yazen.ghannam@amd.com> ACPI defines a number of instructions to use for triggering errors. However we are currently removing the address resources from the trigger resources for only the WRITE_REGISTER_VALUE instruction. This leads to a resource conflict for any other valid instruction. Check that the instruction is less than or equal to the WRITE_REGISTER_VALUE instruction. This allows all valid memory access instructions and protects against invalid instructions. Fixes: b4e008dc53a3 ("ACPI, APEI, EINJ, Refine the fix of resource conflict") Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Acked-by: Tony Luck <tony.luck@intel.com> --- Link: https://lkml.kernel.org/r/1502387883-16667-1-git-send-email-Yazen.Ghannam@amd.com v1->v2: * Apply Tony's comment to restrict behavior to valid memory instructions. drivers/acpi/apei/einj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c index ec50c32ea3da..b38737c83a24 100644 --- a/drivers/acpi/apei/einj.c +++ b/drivers/acpi/apei/einj.c @@ -281,7 +281,7 @@ static struct acpi_generic_address *einj_get_trigger_parameter_region( ((char *)trigger_tab + sizeof(struct acpi_einj_trigger)); for (i = 0; i < trigger_tab->entry_count; i++) { if (entry->action == ACPI_EINJ_TRIGGER_ERROR && - entry->instruction == ACPI_EINJ_WRITE_REGISTER_VALUE && + entry->instruction <= ACPI_EINJ_WRITE_REGISTER_VALUE && entry->register_region.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY && (entry->register_region.address & param2) == (param1 & param2))
next reply other threads:[~2017-08-28 18:13 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-08-28 18:13 Yazen Ghannam [this message] 2017-08-28 18:13 ` [v2] ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources Yazen Ghannam 2017-08-30 23:29 ` [PATCH v2] " Rafael J. Wysocki 2017-08-30 23:29 ` [v2] " Rafael J. Wysocki
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1503943994-41271-1-git-send-email-Yazen.Ghannam@amd.com \ --to=yazen.ghannam@amd.com \ --cc=bp@suse.de \ --cc=lenb@kernel.org \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-edac@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=rjw@rjwysocki.net \ --cc=tony.luck@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.