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>] [day] [month] [year] [list]
Message-ID: <20211101091854.190982-1-cuigaosheng1@huawei.com>
Date:   Mon, 1 Nov 2021 17:18:54 +0800
From:   Gaosheng Cui <cuigaosheng1@...wei.com>
To:     <ardb@...nel.org>, <cuigaosheng1@...wei.com>
CC:     <linux-efi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <wangweiyang2@...wei.com>
Subject: [PATCH -next] efi/libstub: arm32: Use "align" for the size alignment

We are doing page-based allocations, and both the address
and size must meet alignment constraints, so using "align"
for the size alignment is a better choice.

Signed-off-by: Gaosheng Cui <cuigaosheng1@...wei.com>
---
 drivers/firmware/efi/libstub/relocate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/libstub/relocate.c b/drivers/firmware/efi/libstub/relocate.c
index 8ee9eb2b9039..d6d27e8c23f8 100644
--- a/drivers/firmware/efi/libstub/relocate.c
+++ b/drivers/firmware/efi/libstub/relocate.c
@@ -50,7 +50,7 @@ efi_status_t efi_low_alloc_above(unsigned long size, unsigned long align,
 	if (align < EFI_ALLOC_ALIGN)
 		align = EFI_ALLOC_ALIGN;
 
-	size = round_up(size, EFI_ALLOC_ALIGN);
+	size = round_up(size, align);
 	nr_pages = size / EFI_PAGE_SIZE;
 	for (i = 0; i < map_size / desc_size; i++) {
 		efi_memory_desc_t *desc;
-- 
2.30.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ