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]
Date:   Fri, 13 Apr 2018 09:08:28 -0700
From:   Darren Hart <dvhart@...radead.org>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>
Cc:     Pali Rohár <pali.rohar@...il.com>,
        Takashi Iwai <tiwai@...e.de>, Lukas Wunner <lukas@...ner.de>,
        mario.limonciello@...l.com, andy@...radead.org,
        mjg59@...f.ucam.org, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH v3 3/3] ALSA: hda: Disabled unused audio controller for
 Dell platforms with Switchable Graphics

On Thu, Apr 12, 2018 at 10:15:41PM +0800, Kai-Heng Feng wrote:
> at 6:59 PM, Pali Rohár <pali.rohar@...il.com> wrote:
> 
> > On Thursday 12 April 2018 12:50:02 Takashi Iwai wrote:
> > > > +#if IS_ENABLED(CONFIG_DELL_LAPTOP)
> > > > +static bool check_dell_switchable_gfx(struct pci_dev *pdev)
> > > > +{
> > > > +	bool (*dell_switchable_gfx_is_enabled_func)(void);
> > > > +	bool enabled;
> > > > +
> > > > +	/* Only need to check for Dell laptops and AIOs */
> > > > +	if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) ||
> > > > +	    !(dmi_match(DMI_CHASSIS_TYPE, "10") ||
> > > > +	      dmi_match(DMI_CHASSIS_TYPE, "13")) ||
> > > > +	    !(pdev->vendor == PCI_VENDOR_ID_ATI ||
> > > > +	      pdev->vendor == PCI_VENDOR_ID_NVIDIA))
> > > > +		return false;
> > ...
> > > > @@ -1711,6 +1745,11 @@ static int azx_create(struct snd_card
> > > > *card, struct pci_dev *pci,
> > > >  	if (err < 0)
> > > >  		return err;
> > > > 
> > > > +	if (check_dell_switchable_gfx(pci)) {
> > > > +		pci_disable_device(pci);
> > 
> > Hi!
> > 
> > Now looking at it again... This code disables all ATI and NVIDIA sound
> > cards available in any Dell System (laptop or AIO) if system says that
> > SG is enabled, right?
> 
> Yes.
> 
> > 
> > It means that also any external ATI or NVIDIA PCI card with audio device
> > connected to Thunderbolt (e.g. via PCI <--> TB bridge) is always
> > unconditionally disabled too?
> 
> I never thought of this case, thanks for bringing this up.
> Do you have any suggestion to check if it connects to the system via
> Thunderbolt?

Is there any kind of indicator for a PCI device if it is a removable
device?  Only disabling those PCI devices which are wholly integrated
with the platform would be ideal.

Failing that, is there an indicator in the PCI configuration which will
distinguish such devices? Are the integrated devices using specific
lanes, are the external devices behind a switch? etc. And can we do this
in a generic way for all relevant platforms.

-- 
Darren Hart
VMware Open Source Technology Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ