aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_asan.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2021-04-29 15:39:02 +0000
committerMark Johnston <markj@FreeBSD.org>2021-11-02 22:17:58 +0000
commit10d94487df58e286a6d29b9adf39ebcc8fd2597e (patch)
treeb47aeeeba443edbeb72ad4e9e35006ea6faad61e /sys/kern/subr_asan.c
parent380736a95d3d6d5bec929936b08a0d998a660e39 (diff)
downloadsrc-10d94487df58e286a6d29b9adf39ebcc8fd2597e.tar.gz
src-10d94487df58e286a6d29b9adf39ebcc8fd2597e.zip
kasan: Use vm_offset_t for the first parameter to kasan_shadow_map()
No functional change intended. Sponsored by: The FreeBSD Foundation (cherry picked from commit 20e3b9d8bd778445bb80b2be28d2fdedf7bae37e)
Diffstat (limited to 'sys/kern/subr_asan.c')
-rw-r--r--sys/kern/subr_asan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c
index 2967b443d5c8..825d7d4228c0 100644
--- a/sys/kern/subr_asan.c
+++ b/sys/kern/subr_asan.c
@@ -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);