From nobody Mon Sep 11 18:58:58 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RkwxB726Xz4tQK7 for ; Mon, 11 Sep 2023 18:59:10 +0000 (UTC) (envelope-from cglogic@protonmail.com) Received: from mail-4318.protonmail.ch (mail-4318.protonmail.ch [185.70.43.18]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rkwx93j2zz3WBv for ; Mon, 11 Sep 2023 18:59:09 +0000 (UTC) (envelope-from cglogic@protonmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=protonmail.com header.s=protonmail3 header.b=v3ZQzIiN; spf=pass (mx1.freebsd.org: domain of cglogic@protonmail.com designates 185.70.43.18 as permitted sender) smtp.mailfrom=cglogic@protonmail.com; dmarc=pass (policy=quarantine) header.from=protonmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1694458746; x=1694717946; bh=lPN3H8X3RjYeI0G2DDv0r04UTT2YaTlnM5+u71gyC5g=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=v3ZQzIiN3B6m82ROO+NJP4XSzhfpH8UZYB8aPi95TWsdhEJ0mipkWNCz/fimmaxBs zLbEWudbAMw7nBDZUB3bkjj1RtvOIgAMzEpV7IGi4moOgXqHDYp0Hkk5GV1zqRPNZa t3i2uWeM6Rq3vHKFTEzcbx0i42x6sClx9L33sErdPZP94AFsZvcWL2wKE9KQADqB4p zHqxWE6++QuvPtg6zRv4ARU6T+Iw3awOhWjg/Zyw3x+qdXr4w4DtN76VSdLXDNr55z Jq5lsl0Wa5yv6F1hZfkcIq2Fb1HHGXnCWCDDKV1Jj4tvQylxzeb1i50dHWWbV4vQGa 6Ac7bKqyp3JPQ== Date: Mon, 11 Sep 2023 18:58:58 +0000 To: dev-commits-src-main@FreeBSD.org From: cglogic Subject: Re: git: fb5daae920ba - main - timerfd: Namespace pollution adjustments Message-ID: In-Reply-To: <202309052226.385MQF5F075354@gitrepo.freebsd.org> References: <202309052226.385MQF5F075354@gitrepo.freebsd.org> Feedback-ID: 25313618:user:proton List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.38 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.99)[-0.991]; NEURAL_HAM_SHORT(-0.99)[-0.991]; DMARC_POLICY_ALLOW(-0.50)[protonmail.com,quarantine]; RWL_MAILSPIKE_EXCELLENT(-0.40)[185.70.43.18:from]; R_SPF_ALLOW(-0.20)[+ip4:185.70.43.0/24]; R_DKIM_ALLOW(-0.20)[protonmail.com:s=protonmail3]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org]; FREEMAIL_ENVFROM(0.00)[protonmail.com]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.43.0/24, country:CH]; FREEMAIL_FROM(0.00)[protonmail.com]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[protonmail.com:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4Rkwx93j2zz3WBv Is it planned to MFC this and related timerfd commits to stable/14? It should help build some ports. ------- Original Message ------- On Wednesday, September 6th, 2023 at 1:26 AM, Warner Losh = wrote: > The branch main has been updated by imp: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dfb5daae920bae84e3eec8175bf= 9e46304c3b2ae6 >=20 > commit fb5daae920bae84e3eec8175bf9e46304c3b2ae6 > Author: Jake Freeland jfree@FreeBSD.org >=20 > AuthorDate: 2023-09-05 22:11:50 +0000 > Commit: Warner Losh imp@FreeBSD.org >=20 > CommitDate: 2023-09-05 22:25:01 +0000 >=20 > timerfd: Namespace pollution adjustments >=20 > Do not pollute userspace with , instead declare struct thread >=20 > when _KERNEL is defined. >=20 > Include instead of . This causes intentional >=20 > namespace pollution that mimics Linux. g/musl libcs include in >=20 > their , exposing clock gettime, settime functions and >=20 > CLOCK_ macro constants. Ports like Chromium expect this namespace > pollution and fail without it. >=20 > MFC After: 3 days > Reviewed by: imp, markj > Differential Revision: https://reviews.freebsd.org/D41641 > --- > sys/sys/timerfd.h | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/sys/sys/timerfd.h b/sys/sys/timerfd.h > index 8cb9939ba60f..cace3b71498c 100644 > --- a/sys/sys/timerfd.h > +++ b/sys/sys/timerfd.h > @@ -30,8 +30,12 @@ >=20 > #include >=20 > #include >=20 > -#include >=20 > -#include >=20 > +/* > + * We only need , but glibc pollutes the namespace >=20 > + * with . This pollution is expected by most programs, so >=20 > + * reproduce it by including here. >=20 > + */ > +#include >=20 >=20 > typedef uint64_t timerfd_t; >=20 > @@ -54,6 +58,8 @@ __END_DECLS >=20 > #else /* _KERNEL */ >=20 > +struct thread; > + > int kern_timerfd_create(struct thread *td, int clockid, int flags); > int kern_timerfd_gettime(struct thread *td, int fd, > struct itimerspec *curr_value);