Re: v5.13-rcX regression - NULL pointer dereference - MFD and software node API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx/
> >
> > 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@xxxxxxxxxxxxxxxxxx/

> 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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux