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-next>] [day] [month] [year] [list]
Date:	Mon, 29 Jul 2013 16:12:08 -0400
From:	Dave Jones <davej@...hat.com>
To:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc:	xingchao.wang@...ux.intel.com, tiwai@...e.de,
	liam.r.girdwood@...el.com, david.henningsson@...onical.com,
	daniel.vetter@...ll.ch,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: ALSA: hda - Add power-welll support for haswell HDA

On Tue, Jul 09, 2013 at 11:36:26PM +0000, Linux Kernel wrote:
 > Gitweb:     http://git.kernel.org/linus/;a=commit;h=99a2008d0b32d72dfc2a54e7be1eb698dd2e3bd6
 > Commit:     99a2008d0b32d72dfc2a54e7be1eb698dd2e3bd6
 > Parent:     5c90680e42b08a1e4a6800ca02e75ad201f8037f
 > Author:     Wang Xingchao <xingchao.wang@...ux.intel.com>
 > AuthorDate: Thu May 30 22:07:10 2013 +0800
 > Committer:  Daniel Vetter <daniel.vetter@...ll.ch>
 > CommitDate: Thu Jun 6 17:31:56 2013 +0200
 > 
 >     ALSA: hda - Add power-welll support for haswell HDA
 >     
 >     For Intel Haswell chip, HDA controller and codec have
 >     power well dependency from GPU side. This patch added support
 >     to request/release power well in audio driver. Power save
 >     feature should be enabled to get runtime power saving.
 >     
 >     There's deadlock when request_module(i915) in azx_probe.
 >     It looks like:
 >     device_lock(audio pci device) -> azx_probe -> module_request
 >     (or symbol_request) -> modprobe (userspace) -> i915 init ->
 >     drm_pci_init -> pci_register_driver -> bus_add_driver -> driver_attach ->
 >     which in turn tries all locks on pci bus, and when it tries the one on the
 >     audio device, it will deadlock.
 >     
 >     This patch introduce a work to store remaining probe stuff, and let
 >     request_module run in safe work context.

That deadlock sounds nasty, but..

 > +#ifdef CONFIG_SND_HDA_I915
 > +		probe_now = false;
 > +		schedule_work(&chip->probe_work);
 > +#else
 > +		snd_printk(KERN_ERR SFX "Haswell must build in CONFIG_SND_HDA_I915\n");
 > +#endif

runtime surprises like this are also a pain. There has to be a way in Kconfig
to express this (through addition of a new option). Though having to build this
in for distro kernels is also unfortunate. This means we'll also have to build-in
all the ALSA stuff even for users who never use it.

	Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ