msync has some code that is based on *old* bsd behaviour where msync(size == 0) did strange things based on the original mapping segments and trying to manipulate same. This code was copied from the original vm when we moved to uvm.
msync has some code that is based on *old* bsd behaviour where
msync(size == 0) did strange things based on the original mapping
segments and trying to manipulate same. This code was copied from the
original vm when we moved to uvm.

posix says nothing about this behaviour and anything that depends on it is
systemically broken, so rip it out and make sys_msync about 30% smaller.

ok deraadt@, tedu@, guenther@.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars