Linux Integrity Measurement development
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: "Rafael J. Wysocki (Intel)" <rafael@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Julien <julien82453@gmail.com>,
	jarkko@kernel.org, linux-integrity@vger.kernel.org
Subject: Re: [PATCH v3] ACPI: scan: Avoid registering platform devices with resource overlaps
Date: Wed, 19 Aug 2026 12:40:39 -0700	[thread overview]
Message-ID: <20260819194039.GA3686901@ax162> (raw)
In-Reply-To: <CAJZ5v0jpBNEjQqbJq3hrNqCAG_TWkv8SikWB9c8i_V5xZS9Q7Q@mail.gmail.com>

On Wed, Aug 19, 2026 at 09:00:09PM +0200, Rafael J. Wysocki (Intel) wrote:
> On Wed, Aug 19, 2026 at 7:32 PM Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > On Wed, Aug 19, 2026 at 03:55:43PM +0200, Rafael J. Wysocki wrote:
> > > And below is one to try.
> > >
> > > ---
> > >  drivers/acpi/acpi_platform.c |    7 ++++++-
> > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > --- a/drivers/acpi/acpi_platform.c
> > > +++ b/drivers/acpi/acpi_platform.c
> > > @@ -85,7 +85,12 @@ static unsigned int acpi_platform_adjust
> > >       for (i = 0; i < count; ) {
> > >               struct resource *res = &resources[i];
> > >
> > > -             if (resource_type(new_res) != resource_type(res) ||
> > > +             /*
> > > +              * Look for overlaps of resources of the same type that
> > > +              * would cause resource insertion to fail.
> > > +              */
> > > +             if (__resource_contains_unbound(new_res, res) ||
> > > +                 resource_type(new_res) != resource_type(res) ||
> > >                   !resource_union(new_res, res, new_res)) {
> > >                       i++;
> > >                       continue;
> > >
> > >
> > >
> >
> > This does not appear to resolve the probe failure for me.
> 
> So can you please try to reverse new_res and res in the
> __resource_contains_unbound() check in the patch and try again?

Can confirm that

diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
index fffdd4f011b2..ea3b2e03ebae 100644
--- a/drivers/acpi/acpi_platform.c
+++ b/drivers/acpi/acpi_platform.c
@@ -85,7 +85,12 @@ static unsigned int acpi_platform_adjust_resources(struct acpi_device *adev,
 	for (i = 0; i < count; ) {
 		struct resource *res = &resources[i];
 
-		if (resource_type(new_res) != resource_type(res) ||
+		/*
+		 * Look for overlaps of resources of the same type that
+		 * would cause resource insertion to fail.
+		 */
+		if (__resource_contains_unbound(res, new_res) ||
+		    resource_type(new_res) != resource_type(res) ||
 		    !resource_union(new_res, res, new_res)) {
 			i++;
 			continue;
--

resolves the probe failure for me.

-- 
Cheers,
Nathan

  reply	other threads:[~2026-08-19 19:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 10:22 [PATCH v3] ACPI: scan: Avoid registering platform devices with resource overlaps Rafael J. Wysocki
2026-08-07 12:57 ` Paul Menzel
2026-08-07 13:31   ` Rafael J. Wysocki (Intel)
2026-08-08 20:04 ` Andy Shevchenko
2026-08-10 10:41   ` Rafael J. Wysocki (Intel)
2026-08-10 15:35 ` Jarkko Sakkinen
2026-08-12 11:58   ` Rafael J. Wysocki (Intel)
2026-08-19  0:37 ` Nathan Chancellor
2026-08-19  7:46   ` Andy Shevchenko
2026-08-19 10:35     ` Rafael J. Wysocki (Intel)
2026-08-19 13:36       ` Andy Shevchenko
2026-08-19 10:18   ` Rafael J. Wysocki (Intel)
2026-08-19 11:06     ` Rafael J. Wysocki (Intel)
2026-08-19 13:55       ` Rafael J. Wysocki
2026-08-19 17:31         ` Nathan Chancellor
2026-08-19 19:00           ` Rafael J. Wysocki (Intel)
2026-08-19 19:40             ` Nathan Chancellor [this message]
2026-08-19 19:53               ` Rafael J. Wysocki (Intel)

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=20260819194039.GA3686901@ax162 \
    --to=nathan@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko@kernel.org \
    --cc=julien82453@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael@kernel.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox