drivers/acpi/acpi_mrrm.c | 3 +++ 1 file changed, 3 insertions(+)
Before trying to parse the MRRM table, check that the table revision
is the one that is expected.
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
drivers/acpi/acpi_mrrm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/acpi_mrrm.c b/drivers/acpi/acpi_mrrm.c
index 47ea3ccc2142..a6dbf623e557 100644
--- a/drivers/acpi/acpi_mrrm.c
+++ b/drivers/acpi/acpi_mrrm.c
@@ -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
On Wed, Oct 22, 2025 at 10:45 PM Tony Luck <tony.luck@intel.com> wrote: > > 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? > Signed-off-by: Tony Luck <tony.luck@intel.com> > --- > drivers/acpi/acpi_mrrm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/acpi/acpi_mrrm.c b/drivers/acpi/acpi_mrrm.c > index 47ea3ccc2142..a6dbf623e557 100644 > --- a/drivers/acpi/acpi_mrrm.c > +++ b/drivers/acpi/acpi_mrrm.c > @@ -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 > >
>> 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
On Thu, Oct 23, 2025 at 5:56 PM Luck, Tony <tony.luck@intel.com> wrote:
>
> >> 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?
No worries, I can edit it.
On Thu, Oct 23, 2025 at 6:01 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Thu, Oct 23, 2025 at 5:56 PM Luck, Tony <tony.luck@intel.com> wrote:
> >
> > >> 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?
>
> No worries, I can edit it.
Applied with the Fixed: tag added as 6.18-rc material, thanks!
© 2016 - 2026 Red Hat, Inc.