HomeFreeBSD

kevent: Prohibit negative change and event list lengths

Description

kevent: Prohibit negative change and event list lengths

Previously, a negative change list length would be treated the same as
an empty change list. A negative event list length would result in
bogus copyouts. Make kevent(2) return EINVAL for both cases so that
application bugs are more easily found, and to be more robust against
future changes to kevent internals.

Reviewed by: imp, kib
Sponsored by: The FreeBSD Foundation

(cherry picked from commit e00bae5c181ac8282caf41cd33a076da03cf8ac9)

Details

Provenance
markjAuthored on May 27 2021, 7:49 PM
Parents
rG8a206a22654f: kern: ether_gen_addr: randomize on default hostuuid, too
Branches
Unknown
Tags
Unknown