Skip to contentSkip to conversation

ACPI: MRRM: Check revision of MRRM table

PATCH In review Tony Luck 2 participants 5 messages Oct 22, 2025 – Oct 27, 2025 ACPI

lore
Share & tools
lore

Tony Luck

author
#0 lore raw

PATCH 1/1 ACPI: MRRM: Check revision of MRRM table

Before trying to parse the MRRM table, check that the table revision is the one that is expected.

---
 drivers/acpi/acpi_mrrm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/acpi/acpi_mrrm.c +3 -0
index 47ea3ccc2142..a6dbf623e557 100644
@@ -63,6 +63,9 @@ static __init int acpi_parse_mrrm(struct acpi_table_header *table)
 	if (!mrrm)
 		return -ENODEV;
 
+	if (mrrm->header.revision != 1)
+		return -EINVAL;
+
 	if (mrrm->flags & ACPI_MRRM_FLAGS_REGION_ASSIGNMENT_OS)
 		return -EOPNOTSUPP;
 
Signature · 1 line
2.51.0
#1 lore raw
Quoted 3 lines · Tony Luck

Before trying to parse the MRRM table, check that the table revision is the one that is expected.

OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?

Quoted 23 lines
---
 drivers/acpi/acpi_mrrm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/acpi/acpi_mrrm.c +3 -1
index 47ea3ccc2142..a6dbf623e557 100644
@@ -63,6 +63,9 @@ static __init int acpi_parse_mrrm(struct acpi_table_header *table)
        if (!mrrm)
                return -ENODEV;
 
+       if (mrrm->header.revision != 1)
+               return -EINVAL;
+
        if (mrrm->flags & ACPI_MRRM_FLAGS_REGION_ASSIGNMENT_OS)
                return -EOPNOTSUPP;
 
--

2.51.0

author
#2 lore raw
Quoted 4 lines
Quoted 2 lines

Before trying to parse the MRRM table, check that the table revision is the one that is expected.

OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?

I'd be surprised if this table changed. But the h/w team that proposed the MRRM table nagged me to check the revision "just in case". Which seems like good practice.

Might as well add a Fixes to get this back ported in case someone locks onto v6.16 or v6.17.

Fixes b9020bdb9f76 ("ACPI: MRRM: Minimal parse of ACPI MRRM table")

Would you like me to post a V2, or can you just edit this in as you apply?

-Tony

#3 lore raw
Quoted 10 lines · Tony
Quoted 5 lines
Quoted 3 lines

Before trying to parse the MRRM table, check that the table revision is the one that is expected.

OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?

I'd be surprised if this table changed. But the h/w team that proposed the MRRM table nagged me to check the revision "just in case". Which seems like good practice.

Quoted 6 lines

Might as well add a Fixes to get this back ported in case someone locks onto v6.16 or v6.17.

Fixes b9020bdb9f76 ("ACPI: MRRM: Minimal parse of ACPI MRRM table")

Would you like me to post a V2, or can you just edit this in as you apply?

No worries, I can edit it.

#4 lore raw
Quoted 12 lines · Rafael J. Wysocki
Quoted 10 lines · Tony
Quoted 5 lines
Quoted 3 lines

Before trying to parse the MRRM table, check that the table revision is the one that is expected.

OK, so should there be a Fixes: tag? Or is it just a tidy-up of the code?

I'd be surprised if this table changed. But the h/w team that proposed the MRRM table nagged me to check the revision "just in case". Which seems like good practice.

Quoted 8 lines
Quoted 6 lines

Might as well add a Fixes to get this back ported in case someone locks onto v6.16 or v6.17.

Fixes b9020bdb9f76 ("ACPI: MRRM: Minimal parse of ACPI MRRM table")

Would you like me to post a V2, or can you just edit this in as you apply?

No worries, I can edit it.

Applied with the Fixed: tag added as 6.18-rc material, thanks!