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:	Mon, 7 Jul 2008 10:19:14 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Grant Grundler <grundler@...isc-linux.org>
Cc:	Michael Ellerman <michael@...erman.id.au>,
	linux-pci@...r.kernel.org, kaneshige.kenji@...fujitsu.com,
	mingo@...e.hu, tglx@...utronix.de, davem@...emloft.net,
	dan.j.williams@...el.com, Martine.Silbermann@...com,
	benh@...nel.crashing.org, linux-kernel@...r.kernel.org,
	Matthew Wilcox <willy@...ux.intel.com>
Subject: Re: [PATCH 1/4] PCI MSI: Store the number of messages in the msi_desc

On Mon, Jul 07, 2008 at 10:02:03AM -0600, Grant Grundler wrote:
> > -	if (!entry->dev || entry->msi_attrib.type != PCI_CAP_ID_MSI)
> > +	if (!entry->dev || entry->msi_attrib.is_msix)
> >  		return;
> 
> This is why I don't like bit fields.
> "uninitialized" (3rd state) doesn't exist.
> Is there something else in place to catch that state?
> 
> (It's clearly a bug if someone did that and maybe I'm
> being too paranoid.)

msi_descs are only allocated in two places, one of which sets is_msix
and the other doesn't.  I wouldn't object to passing parameters to
alloc_msi_entry() so there's only one place that fills in is_msix, but
yes, I do think the current code is too paranoid.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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