Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jun 2021 11:00:32 +1200
From:      Thomas Munro <tmunro@freebsd.org>
To:        Dmitry Chagin <dchagin@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 26795a0378b5 - main - linux(4): Rework Linux ppoll system call.
Message-ID:  <CA%2BhUKGJXU-yuL4MR9BYrn4nynDxuHwGQNVtfmC%2BhLOsG8TFEXw@mail.gmail.com>
In-Reply-To: <202106211630.15LGU59S021852@gitrepo.freebsd.org>
References:  <202106211630.15LGU59S021852@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Dmitry,

On Tue, Jun 22, 2021 at 4:30 AM Dmitry Chagin <dchagin@freebsd.org> wrote:
> The branch main has been updated by dchagin:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=26795a0378b58c3e26b68577a4cc446ab527e8b5
>
> commit 26795a0378b58c3e26b68577a4cc446ab527e8b5
> Author:     Dmitry Chagin <dchagin@FreeBSD.org>
> AuthorDate: 2021-06-22 05:06:05 +0000
> Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
> CommitDate: 2021-06-22 05:06:05 +0000
>
>     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.

For the record, I wondered about adding POLLRDHUP to POLLSTANDARD, but
that didn't seem right as it's not "standard", and I wondered if the
POLLSTANDARD check mechanism should event exist at all ((1) POSIX
doesn't tell us to reject flags, its POLLNVAL is for rejecting bogus
fds, (2) it was added at the same time as POLLWRITE and other
extensions that were later reverted), but I wasn't sure enough about
that to propose those changes when adding POLLRDHUP, or at least it
seemed like an independent matter for discussion.

>     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

Note that the POLLRDHUP support is new (commit 18f21f03) and not yet
MFC'd.  I was planning to MFC to 13 in the next few days if there are
no objections.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhUKGJXU-yuL4MR9BYrn4nynDxuHwGQNVtfmC%2BhLOsG8TFEXw>