these variables represent sizes in one capacity or another. There is
no reason to allow negative numbers. Change userspace shared structure
elements that get used for the modified functions from int to uint32_t,
since it's not clear what userspace programs use these fields, and we
do not want to break binary compatibility. This fixes a panic when
corrupt or bogus data is passed into the kernel.
Obtained from: NetBSD
MFC after: 3 weeks