On Sun, Jul 30, 2017 at 03:23:50PM -0000, Michael van Elst wrote: > So what does kmem_alloc(0, KM_SLEEP) do? fail where KM_SLEEP says it > cannot fail? I don't think that it can return a zero sized allocation > (i.e. ptr != NULL that cannot be dereferenced).
Sure it could, return a pointer inside some red zone unmapped (but reserved kva) page. On typical setups and modulo syscctl vm.user_va0_disable e.g. "return (void*)16;" just as a simple example. Martin