tech-kern archive

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

Re: UVM and the NULL page



Le 28/07/2016 à 20:48, Pierre Pronchery a écrit :
On 07/28/16 18:57, Maxime Villard wrote:
Currently, there is no real way to make sure a userland process won't be
able to allocate the NULL page. There is this attempt [1], but it has two
major issues. [...]

IIRC some software relies on this feature, like emulators/wine. If
really so then something like a sysctl to allow it again would be helpful.


I thought about that. The only emulator-related problem I found is [1],
because HardenedBSD too increased VM_MIN_ADDRESS [2] to 64k - like Windows.
I know that OSX too has increased the limit, but I don't know the exact
value.

It is not possible to keep a sysctl, since VM_MIN_ADDRESS is a constant
used in assembly, so it won't be turned to a variable.

Now, it is a little hard to know how many emulators or whatever rely on
null to be available. But many (most?) systems don't allow null nowadays,
and null dereferences are a well-known issue. It is more or less becoming
a standard. If a software fails on NetBSD because of a null mmap, then it
is likely to fail on many other systems.

I will commit [3] soon.

[1] http://lists.freebsd.org/pipermail/svn-src-head/2014-November/065296.html
[2] https://github.com/HardenedBSD/hardenedBSD/commit/8b22dce561d8bca4f6cf298154c70b851e43aad1
[3] http://m00nbsd.net/garbage/uvm/amd64.diff


Home | Main Index | Thread Index | Old Index