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:	Wed, 05 Jun 2013 13:19:12 -0700
From:	"H. Peter Anvin" <hpa@...ux.intel.com>
To:	Matt Fleming <matt@...sole-pimps.org>
CC:	Matthew Garrett <matthew.garrett@...ula.com>,
	"Fleming, Matt" <matt.fleming@...el.com>, joeyli <jlee@...e.com>,
	"rja@....com" <rja@....com>, "mingo@...nel.org" <mingo@...nel.org>,
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"bp@...en8.de" <bp@...en8.de>, "jkosina@...e.cz" <jkosina@...e.cz>,
	"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
	"x86@...nel.org" <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"oneukum@...e.de" <oneukum@...e.de>
Subject: Re: [PATCH] Modify UEFI anti-bricking code

On 06/05/2013 08:59 AM, Matt Fleming wrote:
> +		 * There still isn't enough room, so return an error
> +		 */
> +		if (remaining_size - size < 5120)
> +			return EFI_OUT_OF_RESOURCES;
> +	}

Please don't open-code the constant 5120 in this case.  We may easily
run into a system which needs, say, 7K, and it is error-prone to just
replace numbers.

	-hpa


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