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, 26 Jan 2007 19:25:34 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Greg KH <greg@...ah.com>
Cc:	xiphmont@...h.org, Pierre Ossman <drzeus@...eus.cx>,
	fedora-desktop-list@...hat.com, alsa-devel@...a-project.org,
	jrb@...hat.com, linux-kernel@...r.kernel.org, mclasen@...hat.com,
	Lennart Poettering <lennart@...ttering.net>, perex@...e.cz
Subject: Re: [Alsa-devel] [PATCH] alsa: correct nonsensical sysfs device symlinks

At Fri, 26 Jan 2007 10:04:57 -0800,
Greg KH wrote:
> 
> On Fri, Jan 26, 2007 at 12:40:31PM +0100, Takashi Iwai wrote:
> > At Fri, 26 Jan 2007 05:53:36 -0500,
> > xiphmont@...h.org wrote:
> > > 
> > > On 1/25/07, Greg KH <greg@...ah.com> wrote:
> > > 
> > > > Is there anything else left to fix?
> > > 
> > > Once that testing is done, no.  But don't trust the two patches I sent
> > > yet, I'll resumbit the patch resulting from more thorough testing in a
> > > few hours (much thanks to Takashi for giving me the parent device
> > > feedback I was trolling for).
> > 
> > After rechecking the current code regarding this sysfs change at last
> > night, I found out that it's more broken for some devices like
> > sound/arm/*.  They refer to card->dev to obtain the device for memory
> > allocation, etc, and passing card* object will screw them up.
> > 
> > The below is my current fix.  Hoepfully all evils got away now...  and
> > thanks for Monty for heading up this issue!
> > 
> > 
> > Takashi
> > 
> > ====
> > [PATCH] ALSA: Fix sysfs breakage
> > 
> > The recent change for a new sysfs tree with card* object breaks the
> > /sys/class/sound tree if CONFIG_SYSFS_DEPRECATED is enabled.
> > The device in each entry doesn't point the correct device object:
> > 
> >   /sys/class/sound
> >   ...
> >   |-- pcmC0D0c
> >   |   |-- dev
> >   |   |-- device -> ../../../class/sound/card0
> >   |   |-- pcm_class
> >   |   |-- power
> >   |   |   `-- wakeup
> >   |   |-- subsystem -> ../../../class/sound
> >   |   `-- uevent
> > 
> > Also, this change breaks some drivers (like sound/arm/*) referring
> > card->dev directly to obtain the device object for memory handling.
> > 
> > This patch reverts the semantics of card->dev to the former version,
> > which points to a real device object.  The card* object is stored in a
> > new card->card_dev field, instead.  The device parent is chosen either
> > card->dev or card->card_dev according to CONFIG_SYSFS_DEPRECATED to
> > keep the tree compatibility.
> > Also, card* isn't created if CONFIG_SYSFS_DEPRECATED is enabled.  The
> > reason of card* object is a root of all beloing devices, and it makes
> > little sense if each sound device points to the real device object
> > directly.
> > 
> > Signed-off-by: Takashi Iwai <tiwai@...e.de>
> 
> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
> 
> Thanks for working on tracking this down, sorry I forgot all about this
> when doing this original conversion.

Greg, feel free to pick it up to your tree for pushing.   Since this
patch conflicts with the development tree of ALSA mm branch, it'd be
even harder to push from ALSA tree, unfortuantely...

Of course, it'd be safer after confirming that the patch works indeed.
(My brief tests show good results, though.)


thanks,

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