kasan: Use vm_offset_t for the first parameter to kasan_shadow_map()
No functional change intended. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
ee8b757a94
commit
20e3b9d8bd
@ -4890,7 +4890,7 @@ pmap_growkernel(vm_offset_t addr)
|
||||
if (addr - 1 >= vm_map_max(kernel_map))
|
||||
addr = vm_map_max(kernel_map);
|
||||
if (kernel_vm_end < addr)
|
||||
kasan_shadow_map((void *)kernel_vm_end, addr - kernel_vm_end);
|
||||
kasan_shadow_map(kernel_vm_end, addr - kernel_vm_end);
|
||||
while (kernel_vm_end < addr) {
|
||||
pdpe = pmap_pdpe(kernel_pmap, kernel_vm_end);
|
||||
if ((*pdpe & X86_PG_V) == 0) {
|
||||
|
@ -97,18 +97,18 @@ static bool kasan_enabled __read_mostly = false;
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
void
|
||||
kasan_shadow_map(void *addr, size_t size)
|
||||
kasan_shadow_map(vm_offset_t addr, size_t size)
|
||||
{
|
||||
size_t sz, npages, i;
|
||||
vm_offset_t sva, eva;
|
||||
|
||||
KASSERT((vm_offset_t)addr % KASAN_SHADOW_SCALE == 0,
|
||||
("%s: invalid address %p", __func__, addr));
|
||||
KASSERT(addr % KASAN_SHADOW_SCALE == 0,
|
||||
("%s: invalid address %#lx", __func__, addr));
|
||||
|
||||
sz = roundup(size, KASAN_SHADOW_SCALE) / KASAN_SHADOW_SCALE;
|
||||
|
||||
sva = kasan_md_addr_to_shad((vm_offset_t)addr);
|
||||
eva = kasan_md_addr_to_shad((vm_offset_t)addr) + sz;
|
||||
sva = kasan_md_addr_to_shad(addr);
|
||||
eva = kasan_md_addr_to_shad(addr) + sz;
|
||||
|
||||
sva = rounddown(sva, PAGE_SIZE);
|
||||
eva = roundup(eva, PAGE_SIZE);
|
||||
|
@ -56,7 +56,7 @@
|
||||
#define KASAN_EXEC_ARGS_FREED 0xFF
|
||||
|
||||
void kasan_init(void);
|
||||
void kasan_shadow_map(void *, size_t);
|
||||
void kasan_shadow_map(vm_offset_t, size_t);
|
||||
|
||||
void kasan_mark(const void *, size_t, size_t, uint8_t);
|
||||
#else /* KASAN */
|
||||
|
Loading…
Reference in New Issue
Block a user