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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Sep 2013 13:01:18 +0100
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Roy Franz <roy.franz@...aro.org>
Cc:	linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
	matt.fleming@...el.com, leif.lindholm@...aro.org,
	grant.likely@...aro.org, msalter@...hat.com
Subject: Re: [PATCH 06/18] Enforce minimum alignment of 1 page on allocations.

On Sun, 22 Sep, at 03:45:30PM, Roy Franz wrote:
> The efi_high_alloc() and efi_low_alloc() functions
> use the EFI_ALLOCATE_ADDRESS option to the EFI
> function allocate_pages(), which requires a minimum
> of page alignment, and rejects all other requests.
> The existing code could fail to allocate depending
> on allocation size, as although repeated allocation
> attempts were made, none were guaranteed to be page
> aligned.
> 
> 
> 
> Signed-off-by: Roy Franz <roy.franz@...aro.org>
> Acked-by: Mark Salter <msalter@...hat.com>
> Reviewed-by: Grant Likely <grant.likely@...aro.org>
> ---
>  drivers/firmware/efi/efi-stub-helper.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)

[...]

> +	/* Enforce minimum alignment that EFI requires when requesting
> +	 * a specific address.  We are doing page-based allocations,
> +	 * so we must be aligned to a page.
> +	 */
> +	if (align < EFI_PAGE_SIZE)
> +		align = EFI_PAGE_SIZE;
> +

FYI I manually fixed up these comments to use the multi-line form, e.g.

	/*
	 * Enforce minimum alignment that EFI requires when requesting
	 * a specific address.  We are doing page-based allocations,
	 * so we must be aligned to a page.
	 */

so that they match the rest of the comments in the file.

-- 
Matt Fleming, Intel Open Source Technology Center
--
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