From owner-dev-commits-src-all@freebsd.org Tue Jun 22 16:05:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74FB565F2F5; Tue, 22 Jun 2021 16:05:00 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [IPv6:2001:19f0:6400:80a1:5054:ff:fe7a:a27d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G8WSX1Y7sz3Bxw; Tue, 22 Jun 2021 16:04:59 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.16.1/8.16.1) with ESMTP id 15MG4xwG050656; Tue, 22 Jun 2021 19:04:59 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.16.1/8.16.1/Submit) id 15MG4xA7050655; Tue, 22 Jun 2021 19:04:59 +0300 (MSK) (envelope-from dchagin) Date: Tue, 22 Jun 2021 19:04:59 +0300 From: Dmitry Chagin To: Thomas Munro Cc: src-committers , 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: References: <202106211630.15LGU59S021852@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4G8WSX1Y7sz3Bxw X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 16:05:00 -0000 On Tue, Jun 22, 2021 at 11:00:32AM +1200, Thomas Munro wrote: > Hi Dmitry, > > On Tue, Jun 22, 2021 at 4:30 AM Dmitry Chagin wrote: > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=26795a0378b58c3e26b68577a4cc446ab527e8b5 > > > > commit 26795a0378b58c3e26b68577a4cc446ab527e8b5 > > Author: Dmitry Chagin > > AuthorDate: 2021-06-22 05:06:05 +0000 > > Commit: Dmitry Chagin > > 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. > thank you for clarification > > 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. ok, what about stable/12?