HomeFreeBSD

linux(4): Rework Linux ppoll system call.

Description

linux(4): Rework Linux ppoll system call.

For now the Linux emulation layer uses in kernel ppoll(2) without
conversion of user supplied fd 'events', and does not convert the
kernel supplied fd 'revents'.

At least POLLRDHUP is handled by FreeBSD differently than by
Linux. Seems that Linux silencly ignores POLLRDHUP on non socket fd's
unlike FreeBSD, which does more strictly check and fails.

Rework the Linux ppoll, using kern_poll and converting 'events'
and 'revents' values.
While here, move poll events defines to the MI part of code as they
mostly identical on all arches except arm.

Differential Revision: https://reviews.freebsd.org/D30716
MFC after: 2 weeks

(cherry picked from commit 26795a0378b58c3e26b68577a4cc446ab527e8b5)

Details

Provenance
dchaginAuthored on Jun 22 2021, 5:06 AM
Differential Revision
D30716: Rework Linux ppoll system call.
Parents
rGd3bd2f1f031f: sg: get rid of unused include.
Branches
Unknown
Tags
Unknown