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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZzxcV7F32K1_Oo8X@smile.fi.intel.com>
Date: Tue, 19 Nov 2024 11:37:27 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@....com>
Cc: "Daniel Walker (danielwa)" <danielwa@...co.com>,
	Hans de Goede <hdegoede@...hat.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 Tue, Nov 19, 2024 at 02:20:48AM +0000, 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:

[...]

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

...

> -	ret = p2sb_scan_and_cache(bus, devfn_p2sb);
> +	ret = p2sb_scan_and_cache(bus, devfn_p2sb, hidden);


If you still want to implement this, rather make the two different calls here

	if (hidden)
		ret = p2sb_scan_and_cache(bus, devfn_p2sb);
	else
		ret = p2sb_read_and_cache(...);

otherwise the code looks much uglier... :-(

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ