lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b3bros6ztsazgzhzz3fnqg7pcv7vjyhk5fs7ne4ks6pxtneb7h@rpov3fhkbkt3>
Date: Wed, 20 Nov 2024 07:06:13 +0000
From: Shinichiro Kawasaki <shinichiro.kawasaki@....com>
To: Hans de Goede <hdegoede@...hat.com>
CC: "Daniel Walker (danielwa)" <danielwa@...co.com>, Andy Shevchenko
	<andriy.shevchenko@...ux.intel.com>, Ilpo J�rvinen
	<ilpo.jarvinen@...ux.intel.com>, Klara Modin <klarasmodin@...il.com>, Greg
 Kroah-Hartman <gregkh@...uxfoundation.org>, Danil Rybakov
	<danilrybakov249@...il.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "xe-linux-external(mailer list)"
	<xe-linux-external@...co.com>
Subject: Re: platform/x86: p2sb: Allow p2sb_bar() calls during PCI device
 probe

On Nov 19, 2024 / 19:28, Hans de Goede wrote:
> Hi,
> 
> On 19-Nov-24 3:20 AM, Shinichiro Kawasaki wrote:
> > On Nov 18, 2024 / 17:15, Daniel Walker (danielwa) wrote:
> >> On Mon, Nov 18, 2024 at 05:00:52PM +0100, Hans de Goede wrote:
> >>> Hi,
> >>>
> >>> On 18-Nov-24 4:55 PM, Andy Shevchenko wrote:
> > [...]
> >>>> Hans, there will be no need to fix anything if they implement correct access
> >>>> to the GPIO, i.e. via driver and board code with GPIO lookup tables.
> >>>
> >>> Agreed, still I'm not sure how I feel about us hiding the previously unhidden P2SB.
> >>>
> >>> OTOH I guess it may have only been unhidden in the BIOS to make the hack they
> >>> are using possible in the first place.
> >>
> >> From a flexibility POV I would suggest if you can not hide it if it's not already
> >> hidden by the BIOS that would be better since some company may have a good
> >> reason to make a custom driver or to export the pci device to userspace thru
> >> UIO. The current situation is you can't make a custom driver if p2sb is enable
> >> with this additional patch even if you unhide the device inside the BIOS.
> >>
> >> In our case it seems like we could use the already existing solution with
> >> pinctrl, but others may not be able to do that or may not want to for different
> >> reasons.
> > 
> > I don't have strong opinion about the choice, but I wonder how the p2sb code
> > will be if we keep the unhidden P2SB. I created a trial patch below. If the
> > device is not hidden, it does not call pci_scan_single_device() and
> > pci_stop_and_remove_bus_device(). Instead, it calls pci_get_slot() and
> > pci_dev_put(). I don't have the environment which unhides P2SB. Daniel, if you
> > have time to afford, please try it out.
> 
> Thank you for looking into this.
> 
> Daniel can you give this a try? It should fix the regression you are seeing
> without needing to rework your code (reworking your code to be cleaner
> might still be a good idea though).
> 
> Shinichiro, can you turn this into a proper patch without all the debug
> prints and maybe follow Andy's suggestion to just make this a separate
> function.

Sure, I have posted it [*]. Review comments will be welcomed.

Daniel, thank you for testing the trial patch. Your confirmation on the formal
patch will be appreciated also.

[*] https://lore.kernel.org/platform-driver-x86/20241120064055.245969-1-shinichiro.kawasaki@wdc.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ