All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
	Hans de Goede <hdegoede@redhat.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: v5.13-rcX regression - NULL pointer dereference - MFD and software node API
Date: Tue, 22 Jun 2021 12:48:18 +0300	[thread overview]
Message-ID: <YNGx4u79P8LXSkMk@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAHp75Vd1gvsxFZamwp5FJDHVZsvq1S3eMBiJdu+ZD7StDoeGBw@mail.gmail.com>

Hi Andy,

On Tue, Jun 22, 2021 at 12:35:46PM +0300, Andy Shevchenko wrote:
> -Lee, Hekki
> +Hans de Goede, Rafael, Laurent, Sakari
> 
> Below bug report again reminds me about the "interesting" design of
> some ACPI tables in the wild. See below for more.
> 
> On Sun, Jun 20, 2021 at 11:36 AM Dominik Brodowski wrote:
> >
> > Over a month ago, Andy Shevchenko reported and fixed a NULL pointer
> > dereference issue introduced by commit
> >         42e59982917a ("mfd: core: Add support for software nodes")
> > in v5.13-rc1:
> >         https://lore.kernel.org/lkml/20210510141552.57045-1-andriy.shevchenko@linux.intel.com/
> >
> > A bisect shows that it is indeed commit 42e59982917a which causes boot to
> > fail due to a NULL pointer dereference on my work laptop, where "intel-lpss"
> > is bound to
> >         00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
> > and fails to bind to INT3446:
> >
> > [    6.048087] intel-lpss 0000:00:15.0: enabling device (0000 -> 0002)
> > [    6.050625] idma64 idma64.0: Found Intel integrated DMA 64-bit
> > [    6.109112] intel-lpss 0000:00:15.1: enabling device (0000 -> 0002)
> > [    6.111348] idma64 idma64.1: Found Intel integrated DMA 64-bit
> > [    6.172229] intel-lpss 0000:00:15.2: enabling device (0000 -> 0002)
> > [    6.174353] idma64 idma64.2: Found Intel integrated DMA 64-bit
> > [    6.231865] intel-lpss 0000:00:15.3: enabling device (0000 -> 0002)
> > [    6.233845] idma64 idma64.3: Found Intel integrated DMA 64-bit
> 
> > [    6.287492] ACPI Warning: SystemMemory range 0x00000000FE028000-0x00000000FE0281FF conflicts with OpRegion 0x00000000FE028000-0x00000000FE028207 (\_SB.PCI0.GEXP.BAR0) (20210331/utaddress-204)
> > [    6.287704] ACPI: OSL: Resource conflict; ACPI support missing from driver?
> > [    6.289760] intel-lpss: probe of INT3446:00 failed with error -16

For the people who haven't followed this, https://lore.kernel.org/linux-acpi/20210112113538.GF4077@smile.fi.intel.com/

> Above lines appear due to the following:
> 1. In hardware we have an I²C bus with GPIO I/O expander (PCA953x
> compatible in all cases I saw so far).
> 2. The ACPI table has a "real" driver for that expander written in ASL (sic!).
> 3. Due to the above we have I²C controller resources and that driver
> in a conflict, because the driver uses I²C controller registers
> directly (sic!).
> 
> The questions for brainstorming the ideas here are:
> 1. Is it possible to blacklist the Device Node from being evaluated /
> parsed based on the ACPI DSDT path (the "real driver", of course,
> doesn't have any other means to be enumerated properly)?
> 2. Can we create the ACPI driver in the OS which will take the ACPI
> path as ID for enumeration / instantiation?
> 3. Is it possible to hook up on the methods, so we will know what to
> do when a certain method is called (like setting pin direction or so)?
> 4. Does above make any sense or we simply mark that hardware as broken
> (i.e. Windoze-only bad desing) and that's it?

The first question we need to answer is whether there's an actual
hardware conflict or not. Can the PCA953x be accessed by the ASL driver
at any point, or do those accesses only occur at early boot time or at
reboot time for instance ? If there's an actual risk of conflict at
runtime, we need to find out how this was designed to work on Windows.

> > Unfortunately, the patch by Andy Shevchenko (applied on top of Linus' tree)
> > does not fix the issue. A complete revert, however, does fix the issue, and
> > allows my laptop to boot again.
> >
> > In my opinion, it is unfortunate that although it has been known for over a
> > month that commit 42e59982917a is broken, the bugfix (though probably not
> > far-reaching enough) has not yet progressed upstream.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2021-06-22  9:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-20  8:26 v5.13-rcX regression - NULL pointer dereference - MFD and software node API Dominik Brodowski
2021-06-20 11:19 ` Andy Shevchenko
2021-06-20 11:49   ` Dominik Brodowski
2021-06-20 16:36     ` Andy Shevchenko
2021-06-20 18:27       ` Andy Shevchenko
2021-06-21  8:59         ` Dominik Brodowski
2021-06-21 10:00           ` Andy Shevchenko
2021-06-21 10:37             ` Heikki Krogerus
2021-06-21 15:31               ` Dominik Brodowski
2021-06-22  8:09                 ` Heikki Krogerus
2021-06-22 14:10                   ` Heikki Krogerus
2021-06-22 14:36                     ` Dominik Brodowski
2021-06-22 15:28                       ` Andy Shevchenko
2021-06-22 17:19                         ` Dominik Brodowski
2021-06-22 15:28                     ` Andy Shevchenko
2021-06-22 15:30                       ` Andy Shevchenko
2021-06-23 10:51                         ` Heikki Krogerus
2021-06-22  9:35 ` Andy Shevchenko
2021-06-22  9:48   ` Laurent Pinchart [this message]
2021-06-22 10:23     ` Andy Shevchenko
2021-06-22 11:03       ` Laurent Pinchart

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=YNGx4u79P8LXSkMk@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=rjw@rjwysocki.net \
    --cc=sakari.ailus@linux.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: link
Be 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.