mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Use the correct size when checking an EFI address
Use the correct page size macro when checking if an address is with the EFI runtime map. This would previously work correctly when the page size is 4k. With a larger page size it may incorrectly detect memory as within the map when it's not. Reported by: imp Sponsored by: Innovate UK
This commit is contained in:
parent
20adba8bc1
commit
643e14d094
|
@ -137,7 +137,7 @@ efi_is_in_map(struct efi_md *map, int ndesc, int descsz, vm_offset_t addr)
|
|||
continue;
|
||||
|
||||
if (addr >= p->md_virt &&
|
||||
addr < p->md_virt + p->md_pages * PAGE_SIZE)
|
||||
addr < p->md_virt + p->md_pages * EFI_PAGE_SIZE)
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue