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] [day] [month] [year] [list]
Date:	Fri, 3 Jul 2009 10:05:47 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Mikael Pettersson <mikpe@...uu.se>,
	Matthew Wilcox <matthew@....cx>,
	Grant Grundler <grundler@...isc-linux.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-pci@...r.kernel.org, alex.shi@...el.com,
	Christoph Lameter <cl@...ux-foundation.org>
Subject: Re: [PATCH] x86: add boundary check for 32bit res before expand
	e820 resource to alignment -v2


* Yinghai Lu <yinghai@...nel.org> wrote:

> +#define MAX_RESOURCE_SIZE ((resource_size_t)-1)

> +		end = round_up(start, ram_alignment(start)) - 1;
> +		if (end > MAX_RESOURCE_SIZE)
> +			end = MAX_RESOURCE_SIZE;

As Andrew noted it, this should probably have a comment along the 
lines of:

		/*
		 * Clip entries that go beyond our maximum resource 
		 * awareness limit to the max. If we accepted them
		 * blindly we'd get random rounding artifacts and a 
		 * possibly messed up resource tree and boot 
		 * failures:
		 */
		if (end > MAX_RESOURCE_SIZE)
			end = MAX_RESOURCE_SIZE;

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