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: <20141215232256.GC27822@H87M>
Date:	Mon, 15 Dec 2014 15:22:56 -0800
From:	Kevin Strasser <kevin.strasser@...ux.intel.com>
To:	Mark Brown <broonie@...nel.org>
Cc:	"Strasser, Kevin" <kevin.strasser@...el.com>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"Koul, Vinod" <vinod.koul@...el.com>,
	"Lin, Mengdong" <mengdong.lin@...el.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Fang, Yang A" <yang.a.fang@...el.com>
Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: fix possible acpi enumeration
 panic

On Mon, Dec 15, 2014 at 05:06:45PM +0000, Mark Brown wrote:
> Please fix your mailer to word wrap comfortably under 80 colums so that your
> mails are easily legible.

Understood

> > > This changes the check from verifying if a codec_id is present to
> > > verifying if the first character in the codec_id is non-NULL.  That
> > > doesn't seem obviously safer and the tables of machines seem to be
> > > terminated by having an entry with all fields set to zero (which is a
> > > common idiom in Linux) which would now crash with this change.
> 
> > In this case mach->codec_id is non-NULL, even for the terminating element,
> > because it is defined to be a fixed width. So we have to take a look at the
> > first character to see if it has been initialized.
> 
> That's a really unusual and (as you've seen) error prone idiom - is it not
> better to fix the struct to use the more common idiom?

That seems like a good idea to me. I'll prepare a new patch to change the
sst_machines definition so that codec_id gets initialized to NULL.

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