tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

COMPAT_NETBSD32 broken on aarch64 due to UVM bug



Hi,

COMPAT_NETBSD32 has been broken for aarch64, since jemalloc became to
mmap 8KB-aligned anonymous memory for earm. Running 32-bit binaries
easily causes KASSERT failure like this:

panic: kernel diagnostic assertion "!topdown || hint <= orig_hint" failed: file "../../../../uvm/uvm_map.c", line 2164 hint: fbefc000, orig_hint: f2c2f000

This seems to be an MI bug, not MD; uvm_findspace() is broken in the
cases where a required alignment (8KB) is larger than the native page
size (4KB). For more details, please see kern/54395:

http://gnats.netbsd.org/54395

With the patch attached in the PR, that KASSERT does no longer fire on
aarch64 with 32-bit binaries, as far as I can see. Also, the patched
kernels just work for me on amd64, earm, and m68k.

This also affects netbsd-9 branch. I'd like to fix this before 9.0 is
released. Could anyone please review my patch, or provide a better fix?

Thanks,
rin


Home | Main Index | Thread Index | Old Index