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: <alpine.LFD.1.00.0803271529100.14670@woody.linux-foundation.org>
Date:	Thu, 27 Mar 2008 15:34:41 -0700 (PDT)
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Ivan Kokshaysky <ink@...assic.park.msu.ru>
cc:	Gary Hade <garyhade@...ibm.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Meyer <thomas@...3r.de>,
	Stefan Richter <stefanr@...6.in-berlin.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	LKML <linux-kernel@...r.kernel.org>,
	Adrian Bunk <bunk@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Natalie Protasevich <protasnb@...il.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	pm@...ian.org
Subject: Re: [patch] pci: revert "PCI: remove transparent bridge sizing"



On Fri, 28 Mar 2008, Ivan Kokshaysky wrote:
> 
> Sounds good to me. So here we go (completely untested, just for review).
[...]
> -	/* The bridge resources are special, as their
> -	   size != alignment. Sizing routines return
> -	   required alignment in the "start" field. */
> -	align = (resno < PCI_BRIDGE_RESOURCES) ? size : res->start;
> +
> +	align = resource_alignment(res);
> +	BUG_ON(!align);

Don't do the BUG_ON(). That would just cause a broken machine, and makes 
it much harder to report this issue. BUG_ON() should be used only for 
totally unfixable things.

In this case, the easy thing to do is to just return an error, possibly 
with a printk() about bogus resources (ignoring it as a resource, the way 
we do it in pdev_sort_resource()).

But other than that, the thing doesn't look horrible.

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