public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: MRRM: Check revision of MRRM table
@ 2025-10-22 20:45 Tony Luck
  2025-10-23  9:58 ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Luck @ 2025-10-22 20:45 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-acpi, linux-kernel, patches, Tony Luck

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI: MRRM: Check revision of MRRM table
  2025-10-22 20:45 [PATCH] ACPI: MRRM: Check revision of MRRM table Tony Luck
@ 2025-10-23  9:58 ` Rafael J. Wysocki
  2025-10-23 15:56   ` Luck, Tony
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2025-10-23  9:58 UTC (permalink / raw)
  To: Tony Luck; +Cc: Rafael J. Wysocki, linux-acpi, linux-kernel, patches

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
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] ACPI: MRRM: Check revision of MRRM table
  2025-10-23  9:58 ` Rafael J. Wysocki
@ 2025-10-23 15:56   ` Luck, Tony
  2025-10-23 16:01     ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2025-10-23 15:56 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Wysocki, Rafael J, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev

>> 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI: MRRM: Check revision of MRRM table
  2025-10-23 15:56   ` Luck, Tony
@ 2025-10-23 16:01     ` Rafael J. Wysocki
  2025-10-27 19:38       ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2025-10-23 16:01 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Rafael J. Wysocki, Wysocki, Rafael J, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI: MRRM: Check revision of MRRM table
  2025-10-23 16:01     ` Rafael J. Wysocki
@ 2025-10-27 19:38       ` Rafael J. Wysocki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2025-10-27 19:38 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Wysocki, Rafael J, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev

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!

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-27 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-22 20:45 [PATCH] ACPI: MRRM: Check revision of MRRM table Tony Luck
2025-10-23  9:58 ` Rafael J. Wysocki
2025-10-23 15:56   ` Luck, Tony
2025-10-23 16:01     ` Rafael J. Wysocki
2025-10-27 19:38       ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox