From owner-freebsd-arch@freebsd.org Mon Dec 7 17:31:53 2020 Return-Path: Delivered-To: freebsd-arch@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 B7AEA4AF753 for ; Mon, 7 Dec 2020 17:31:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4CqVjj3vKVz3JbV for ; Mon, 7 Dec 2020 17:31:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: by mailman.nyi.freebsd.org (Postfix) id 85CFE4AF752; Mon, 7 Dec 2020 17:31:53 +0000 (UTC) Delivered-To: arch@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 859C04AFB63 for ; Mon, 7 Dec 2020 17:31:53 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqVjh3TZyz3JVs for ; Mon, 7 Dec 2020 17:31:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id mKMXkDgosbYg3mKMZkA6Zz; Mon, 07 Dec 2020 10:31:51 -0700 X-Authority-Analysis: v=2.4 cv=Q4RsX66a c=1 sm=1 tr=0 ts=5fce6707 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=zTNgK-yGK50A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=ai8zMXekvDtU2M2YJ-wA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 45B18159 for ; Mon, 7 Dec 2020 09:31:49 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 0B7HVnkA003051 for ; Mon, 7 Dec 2020 09:31:49 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202012071731.0B7HVnkA003051@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: arch@freebsd.org Subject: pam_tally2 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 07 Dec 2020 09:31:49 -0800 X-CMAE-Envelope: MS4xfKQMatKXAr5QJrTPR0zwjXWbjopoNOYPI97tru7Ff1qKDOluzS73T+pCD9XNeUsOMS3XZ65HoY3/JaTuT3ZPPxJiRYNb5B7QbfQhuWCcDJQaqAxMBrU3 oYdWlqZy717hvQcT7lvazo917pcJUTr6JEvTfgUi8pspW7/GjeGbwlWt7JCYU9Y/qJeu3a/LAKIvTh9nPcwjrUPV2KvtX52utwg= X-Rspamd-Queue-Id: 4CqVjh3TZyz3JVs X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.138) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-1.70 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.229.168:received]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[64.59.136.138:from]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[arch@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[64.59.136.138:from:127.0.2.255]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.138:from]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; MAILMAN_DEST(0.00)[arch] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 17:31:53 -0000 How much interest would there be in the FreeBSD community for a pam_tally2-like facility for FreebSD? Not that I'm volunteering to do this right here and now, I have enough projects on the go at the moment but it's something I've been thinking about over the last couple of years. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-freebsd-arch@freebsd.org Mon Dec 7 22:35:52 2020 Return-Path: Delivered-To: freebsd-arch@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 BFCA24B92AE for ; Mon, 7 Dec 2020 22:35:52 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqdSS55zKz4QsN for ; Mon, 7 Dec 2020 22:35:52 +0000 (UTC) (envelope-from debdrup@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1607380552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VAfDSt532Fl58wudrxfpsRaG81x3I15aIdMoHoLdPgE=; b=D1FT/8+qrlJxdtrQqlmj1aznmFtA3oTCizf51krgRBEXS12CTNJykryhOHsrNbSHnDwrPr EsR0K3o+fBPBk9s+37yU5l1TaLvCkh8MsQQOjb2E30k4HbKUASwlc8O8uNXmapElWN6lIK dkMFzSb27sWSDwfb5hv6FSM0k6Ox6dJsz0RuLn7bgiui/5G2jSO+eeqKDgv+M+WS6qfjDQ F1jUU14z6tZVvcuyg653PQH75av3q5VpnqkYCkFCbEQbVq3hHJ2mhD0gRXVlBi4Az0Y22Q cUH5+3Jn9HsejdaxOrmwfHn+XcrFr7YqyPiiIxdfGL6rdbnUYVxcMneCPEUkhw== Received: by freefall.freebsd.org (Postfix, from userid 1471) id 8E72D1C286; Mon, 7 Dec 2020 22:35:52 +0000 (UTC) Date: Mon, 7 Dec 2020 23:35:50 +0100 From: Daniel Ebdrup Jensen To: freebsd-arch@freebsd.org Subject: Re: pam_tally2 Message-ID: <20201207223550.2g63qfhmtkmzjyl4@nerd-thinkpad.local> Mail-Followup-To: Daniel Ebdrup Jensen , freebsd-arch@freebsd.org References: <202012071731.0B7HVnkA003051@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ldmp5vd62h7to552" Content-Disposition: inline In-Reply-To: <202012071731.0B7HVnkA003051@slippy.cwsent.com> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1607380552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VAfDSt532Fl58wudrxfpsRaG81x3I15aIdMoHoLdPgE=; b=piY+ZFmZ565uT0/znvpY9u8EQnu0T/1skdBGq5Pby2xDrU7loH51cs/q/treycvf0rAIIt jBVXfS2JDY5CEGuNmHTmnePuoNiwHs9z1YhdCvMkoBMsowAT/axu2ZstDmcj1y9YRzxj0k fuoq0FG5BrD6joNexzw4kNMBzLtvsG57Kf7k7ZFPyxRd7meiFv+B3dVCuhrgxUlzItcIO0 D1AZN85KlFah+1HgHNZrolp4TGpvfiRiFdMSWtqM7pzI4qncVWh/xgP4R4jVLz6JT57T06 At7Ayrvzv3VGSJuyY37TYTxRCASo7m61C0Yk0zYMvoXIFeCEgzxfcmO4EW7sEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1607380552; a=rsa-sha256; cv=none; b=qrEEHn5nC4VS/Jqodg1AwqODYGY22ZpBkpIIZiNrNRdCSwg+xNdpPYD2TRPbe7zfpXb80e LVHeSaHCQbhHM3DPrehWjC8XVRtsuQcMwbMJKku9lDqEUhD4H4RGDjTzWZcJIah1a/843M zTC52WIiJ7eghAB/D4GoMn00rnxA4+QBBBl1V7p3JwwJ80cesNjmTCg7x9pdExMDd15GGJ DZtY4DprtJQlh2yyEyaK0REtqj1lddhCaNMQxWfQCyAjSaD3R6h39ahWT3iaBHO7NBZ5G2 nOHsE7Ahn24GeadU9jx0WsydH4omfnQ1Te1Qyd0Un+q8BcEx4HBZYo9b2QdW8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 22:35:52 -0000 --ldmp5vd62h7to552 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 07, 2020 at 09:31:49AM -0800, Cy Schubert wrote: >How much interest would there be in the FreeBSD community for a >pam_tally2-like facility for FreebSD? > >Not that I'm volunteering to do this right here and now, I have enough >projects on the go at the moment but it's something I've been thinking >about over the last couple of years. > > >--=20 >Cheers, >Cy Schubert >FreeBSD UNIX: Web: https://FreeBSD.org >NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > >_______________________________________________ >freebsd-arch@freebsd.org mailing list >https://lists.freebsd.org/mailman/listinfo/freebsd-arch >To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" Hi Cy, To me, pam_tally sounds useful, because while some of the functionality can= be=20 found in the form of blocklistd, which can be used to restrict abuse via a= =20 firewall, that doesn't really limit local-access attempts. So it definitely seems like something that could be useful for, for example= ,=20 laptops used by developers and users who're dog-fooding. I know I'll be usi= ng=20 it, if you do end up making it. :) Yours, Daniel Ebdrup Jensen --ldmp5vd62h7to552 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAl/OrkZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN 87rn+gf/Q9V6tTcUeXa7HGE5o+xlgbvYO5LNcSgnhQxVf42DQA7StUKlDfIPUASa b891XV0NZof0mnnGHNgWLOYJVwbIKr7w9HMGHuJwYnokA90NpL92rm6MdBiydDdU 7rTg0RaIFcFMycnt9+JeTtpF0ofrg8JtgGQobB9pXLU86Q1owvsexOBzQ6QPZVS9 Re5oc+zOTIvWJAuXHL2pyZ/T6vBjJzJj0BF3GJ/bmrLPuZ465WbvqMdfn+qqpvcf r7SA0ef0aHUvmkn43omzShUrL82npqXt6XG/VXuSk6pgn+LQpV6zHhrtCjuVz+0Y 4UrL0CdP6wiJ7rCOhkE5zsbwSfk7qg== =h49V -----END PGP SIGNATURE----- --ldmp5vd62h7to552-- From owner-freebsd-arch@freebsd.org Tue Dec 8 12:31:52 2020 Return-Path: Delivered-To: freebsd-arch@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 60CBA47DDBE for ; Tue, 8 Dec 2020 12:31:52 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from mail.0x20.net (mail.0x20.net [46.251.251.56]) (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 4Cr0133rCwz3mwZ for ; Tue, 8 Dec 2020 12:31:51 +0000 (UTC) (envelope-from lars.engels@0x20.net) Received: from 0x20.net (webs.0x20.net [46.251.251.54]) (Authenticated sender: lala) by mail.0x20.net (Postfix) with ESMTPA id BA084151182 for ; Tue, 8 Dec 2020 13:31:42 +0100 (CET) MIME-Version: 1.0 Date: Tue, 08 Dec 2020 13:31:42 +0100 From: Lars Engels To: freebsd-arch@freebsd.org Subject: Re: pam_tally2 In-Reply-To: <202012071731.0B7HVnkA003051@slippy.cwsent.com> References: <202012071731.0B7HVnkA003051@slippy.cwsent.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: X-Sender: lars.engels@0x20.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Cr0133rCwz3mwZ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of lars.engels@0x20.net designates 46.251.251.56 as permitted sender) smtp.mailfrom=lars.engels@0x20.net X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_TLS_LAST(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[46.251.251.56:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:46.251.251.56]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[46.251.251.56:from:127.0.2.255]; ARC_NA(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_NA(0.00)[0x20.net]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:31400, ipnet:46.251.251.0/24, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arch] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 12:31:52 -0000 Am 2020-12-07 18:31, schrieb Cy Schubert: > How much interest would there be in the FreeBSD community for a > pam_tally2-like facility for FreebSD? > > Not that I'm volunteering to do this right here and now, I have enough > projects on the go at the moment but it's something I've been thinking > about over the last couple of years. I would actually use this. We already do on Linux and the functionality is missing on FreeBSD so far. From owner-freebsd-arch@freebsd.org Wed Dec 9 13:35:04 2020 Return-Path: Delivered-To: freebsd-arch@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 C416347CFEA for ; Wed, 9 Dec 2020 13:35:04 +0000 (UTC) (envelope-from number201724@me.com) Received: from pv50p00im-ztdg10011301.me.com (pv50p00im-ztdg10011301.me.com [17.58.6.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrdMX0b1kz4vbc for ; Wed, 9 Dec 2020 13:35:03 +0000 (UTC) (envelope-from number201724@me.com) Received: from [10.0.0.4] (unknown [45.136.2.100]) by pv50p00im-ztdg10011301.me.com (Postfix) with ESMTPSA id 5EBCF760708; Wed, 9 Dec 2020 13:34:56 +0000 (UTC) To: freebsd-arch@freebsd.org From: YUAN RUI Subject: virtio_pci: Allow memory space for configuration Cc: freebsd-virtualization@freebsd.org Message-ID: Date: Wed, 9 Dec 2020 21:34:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-09_11:2020-12-09, 2020-12-09 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=446 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2012090097 X-Rspamd-Queue-Id: 4CrdMX0b1kz4vbc X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[me.com]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[me.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[17.58.6.40:from]; FREEMAIL_ENVFROM(0.00)[me.com]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[me.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:714, ipnet:17.58.0.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[17.58.6.40:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[17.58.6.40:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-arch] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 13:35:04 -0000 For some reasons, cloud service vendors in mainland China use modified qemu. This patch will affect whether 70% of cloud servers in mainland China can run FreeBSD. https://reviews.freebsd.org/D26915 From owner-freebsd-arch@freebsd.org Fri Dec 11 15:15:40 2020 Return-Path: Delivered-To: freebsd-arch@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 4F8A84B1D7A for ; Fri, 11 Dec 2020 15:15:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 4CsvVg1QVHz4SYk; Fri, 11 Dec 2020 15:15:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BBFFOIb019161 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 11 Dec 2020 17:15:27 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BBFFOIb019161 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BBFFNJu019123; Fri, 11 Dec 2020 17:15:23 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 Dec 2020 17:15:23 +0200 From: Konstantin Belousov To: Cy Schubert Cc: Poul-Henning Kamp , Ian Lepore , freebsd-arch@freebsd.org Subject: Re: struct timex and Linux adjtimex() Message-ID: References: <202012030523.0B35NsG7003810@slippy.cwsent.com> <4086.1606982335@critter.freebsd.dk> <5e0db735b29f1ece02521871b2cd392c3467101d.camel@freebsd.org> <25487.1607029223@critter.freebsd.dk> <202012032203.0B3M3VJx004269@slippy.cwsent.com> <25989.1607033614@critter.freebsd.dk> <202012032258.0B3MwqVQ004875@slippy.cwsent.com> <202012040114.0B41EuFc006408@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202012040114.0B41EuFc006408@slippy.cwsent.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4CsvVg1QVHz4SYk X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [0.75 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_SPAM_SHORT(0.75)[0.749]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:470:d5e7:1::1:from]; TO_DN_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; SPAMHAUS_ZRD(0.00)[2001:470:d5e7:1::1:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arch]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 15:15:40 -0000 On Thu, Dec 03, 2020 at 05:14:56PM -0800, Cy Schubert wrote: > In message , Konstantin Belousov writes: > > On Thu, Dec 03, 2020 at 02:58:52PM -0800, Cy Schubert wrote: > > > In message <25989.1607033614@critter.freebsd.dk>, "Poul-Henning Kamp" > > > writes: > > > > -------- > > > > Cy Schubert writes: > > > > > > > > > I will go back > > > > > with my initial proposal of a timespec add/subtract syscall takes a > > > > > timespec as input increments or decrements the clock by the timespec an > > d > > > > > returns a timespec with the time. > > > > > > > > I would be tempted by the clock_settime(2) "clock_id" argument. > > > > > > > > The functionality required has a LOT more commonality with > > > > clock_settime(2) than with ntp_adjtime(2), and absconding with a > > > > couple of the top bits of clock_id for "CLOCK_ADD_ADJUSTMENT" and > > > > "CLOCK_SUB_ADJUSTMENT" would be be a pretty clean solution. > > > > > > Correct. My initial proposal was: > > > > > > +.Fn clock_updtime "clockid_t clock_id" "const struct timespec *itp" > > > "struct timespec *otp" > > > > > > Briefly it does this: > > > > > > +int > > > +kern_clock_updtime(struct thread *td, clockid_t clock_id, > > > + const struct timespec *its, struct timespec *ots) > > Note that phk suggested using specific clock id with clock_settime(), > > and I believe that you only need one such clock id. > > Correct. This is from work I stashed in my git repo from Sunday. I haven't > updated it yet with phk's suggestions. > > > > > > +{ > > > + struct timespec ats; > > > + int error; > > > + > > > + if ((error = kern_clock_gettime(td, clock_id, &ats)) != 0) > > > + return (error); > > > + > > > + timespecadd(its, &ats, &ats); > > > + > > > + if ((error = kern_clock_settime(td, clock_id, &ats)) != 0) > > > + return (error); > > > + > > > + return(kern_clock_gettime(td, clock_id, ots)); > > > +} > > This is awful, it must not be done this way. > > > > Look how tc_setclock() is implemented. It is careful to adjust time > > with interrupts and preemption disabled, and does it by adjusting the > > source of truth, not by fetching through several layers and then hoping > > that we did not get delayed too much when pushing back. > > Thanks. I'll look there. > > > > > I think you need to refactor tc_setclock() somewhat to allow to specify > > offset instead of absolute value and use it as a helper. > > I'll do that. I'll add phk and you as reviewers. > > > > > > > > > I can prepare a review if you want. I haven't touched the man page nor any > > > tests yet. > > > > > > It's affected by kib@'s https://reviews.freebsd.org/D27471, as conflicts > > > will result. I'll wait until that's committed before continuing work on it, > > > > > assuming this is the direction we want to go. > > This change does not affect *setclock() work above. > > Thanks. Ok, I went ahead and wrote https://reviews.freebsd.org/D27571 . This should handle all notes from the conversation. From owner-freebsd-arch@freebsd.org Fri Dec 11 16:18:22 2020 Return-Path: Delivered-To: freebsd-arch@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 2EE774B3E51 for ; Fri, 11 Dec 2020 16:18:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cswv20dYQz4YYp for ; Fri, 11 Dec 2020 16:18:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf35.google.com with SMTP id u16so4427009qvl.7 for ; Fri, 11 Dec 2020 08:18:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9acIYKTPu02wlEKhHHLBMqGggxvvbJWSO0tqgaooTH8=; b=KEhyhh6fHIaGFE+1H8n0Uofk9ZuIFgVrH+VDcFfLckfH/V/GfxmhTVNsf+LumSJMRd bZZ4t3wyWLCZjIZom4APBnW5enk/KSWEJ19ZZmNpxjrIsG0iYh5VUH+w7Vxuz/42j9Dt q+3aekaypdY7D82virReBjKRF2P5TcE69DGcRvRwbLcrh3OQBucjzFEyMVv2IKqFvYz4 iTQOK9lrXp7aiPPaqldG80cyYBc4JKxgcseYPSbtbOZrKp1TyoUX1thZNQh6ylvRaa1z OcpesUfCjOdHy0BW8xNqVGGIFlRIq+eacY57/AYLPWeAyWg1p7PiGKHuFxkc9gHh1Tle Ayhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9acIYKTPu02wlEKhHHLBMqGggxvvbJWSO0tqgaooTH8=; b=iOlpVo1bRMOZYCp4ikFgV5i9PlboYGZq6kYEj8Sk5N2XsMeb0MAgk6rN08PJ/a70ia vTYHsojy3yBWN5eqbam0dCLTHoQbEUJN8quiaMoWGhHrWYlE7TT5fen7oY+rON02oSi3 milngRGRNBDBPHUYNyIYLD+RDT08tzdRbR4QJlMIED9o+TprtbaVwufb5cLo+ANpAXYV 7IBFHOXT4ejeTlpSfoPff3x1WiTvv38MP3j4AFDhMZtAxbBkS4skxTTa2uYIPS0h/lEi 12l4iy6Z/H4u7jrg3MTTEfgfBDctyX1YrKUsSLoKEV17FniIK6TA9UuIJwtxywZWhDSJ Evkg== X-Gm-Message-State: AOAM530IabKw8Ilmtls1Zv8qkQDe1z/P6TAAaZYvvwM8C0pnTHWF2hjd 9r9ra2P0bAbsl9vkgRmmtVG6m8fv7qgh2nnc0Y7LYQ== X-Google-Smtp-Source: ABdhPJyqEvfG9U4Jo/V5XzqiD+ELQDOski8JA9ZVRxKTvR3bAKiJBdodn4JovQmEuczbZzwqMcJUwYJEOlpwBI2O+sw= X-Received: by 2002:a0c:b66b:: with SMTP id q43mr16604005qvf.24.1607703501153; Fri, 11 Dec 2020 08:18:21 -0800 (PST) MIME-Version: 1.0 References: <202012030523.0B35NsG7003810@slippy.cwsent.com> <4086.1606982335@critter.freebsd.dk> <5e0db735b29f1ece02521871b2cd392c3467101d.camel@freebsd.org> <25487.1607029223@critter.freebsd.dk> <202012032203.0B3M3VJx004269@slippy.cwsent.com> <25989.1607033614@critter.freebsd.dk> <202012032258.0B3MwqVQ004875@slippy.cwsent.com> <202012040114.0B41EuFc006408@slippy.cwsent.com> In-Reply-To: From: Warner Losh Date: Fri, 11 Dec 2020 09:18:09 -0700 Message-ID: Subject: Re: struct timex and Linux adjtimex() To: Konstantin Belousov Cc: Cy Schubert , Poul-Henning Kamp , Ian Lepore , freebsd-arch@freebsd.org X-Rspamd-Queue-Id: 4Cswv20dYQz4YYp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 16:18:22 -0000 On Fri, Dec 11, 2020, 8:15 AM Konstantin Belousov wrote: > On Thu, Dec 03, 2020 at 05:14:56PM -0800, Cy Schubert wrote: > > In message , Konstantin Belousov writes: > > > On Thu, Dec 03, 2020 at 02:58:52PM -0800, Cy Schubert wrote: > > > > In message <25989.1607033614@critter.freebsd.dk>, "Poul-Henning > Kamp" > > > > writes: > > > > > -------- > > > > > Cy Schubert writes: > > > > > > > > > > > I will go back > > > > > > with my initial proposal of a timespec add/subtract syscall > takes a > > > > > > timespec as input increments or decrements the clock by the > timespec an > > > d > > > > > > returns a timespec with the time. > > > > > > > > > > I would be tempted by the clock_settime(2) "clock_id" argument. > > > > > > > > > > The functionality required has a LOT more commonality with > > > > > clock_settime(2) than with ntp_adjtime(2), and absconding with a > > > > > couple of the top bits of clock_id for "CLOCK_ADD_ADJUSTMENT" and > > > > > "CLOCK_SUB_ADJUSTMENT" would be be a pretty clean solution. > > > > > > > > Correct. My initial proposal was: > > > > > > > > +.Fn clock_updtime "clockid_t clock_id" "const struct timespec *itp" > > > > "struct timespec *otp" > > > > > > > > Briefly it does this: > > > > > > > > +int > > > > +kern_clock_updtime(struct thread *td, clockid_t clock_id, > > > > + const struct timespec *its, struct timespec *ots) > > > Note that phk suggested using specific clock id with clock_settime(), > > > and I believe that you only need one such clock id. > > > > Correct. This is from work I stashed in my git repo from Sunday. I > haven't > > updated it yet with phk's suggestions. > > > > > > > > > +{ > > > > + struct timespec ats; > > > > + int error; > > > > + > > > > + if ((error = kern_clock_gettime(td, clock_id, &ats)) != 0) > > > > + return (error); > > > > + > > > > + timespecadd(its, &ats, &ats); > > > > + > > > > + if ((error = kern_clock_settime(td, clock_id, &ats)) != 0) > > > > + return (error); > > > > + > > > > + return(kern_clock_gettime(td, clock_id, ots)); > > > > +} > > > This is awful, it must not be done this way. > > > > > > Look how tc_setclock() is implemented. It is careful to adjust time > > > with interrupts and preemption disabled, and does it by adjusting the > > > source of truth, not by fetching through several layers and then hoping > > > that we did not get delayed too much when pushing back. > > > > Thanks. I'll look there. > > > > > > > > I think you need to refactor tc_setclock() somewhat to allow to specify > > > offset instead of absolute value and use it as a helper. > > > > I'll do that. I'll add phk and you as reviewers. > > > > > > > > > > > > > I can prepare a review if you want. I haven't touched the man page > nor any > > > > tests yet. > > > > > > > > It's affected by kib@'s https://reviews.freebsd.org/D27471, as > conflicts > > > > will result. I'll wait until that's committed before continuing work > on it, > > > > > > > assuming this is the direction we want to go. > > > This change does not affect *setclock() work above. > > > > Thanks. > > Ok, I went ahead and wrote https://reviews.freebsd.org/D27571 . > This should handle all notes from the conversation. > Apart from two arbitrary limits that aren't explained, I like this. Warner _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > From owner-freebsd-arch@freebsd.org Fri Dec 11 17:16:56 2020 Return-Path: Delivered-To: freebsd-arch@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 9893B4B59C6 for ; Fri, 11 Dec 2020 17:16:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CsyBc23WKz4dkM; Fri, 11 Dec 2020 17:16:55 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id nm2FkkXGwbYg3nm2HkPExc; Fri, 11 Dec 2020 10:16:54 -0700 X-Authority-Analysis: v=2.4 cv=Q4RsX66a c=1 sm=1 tr=0 ts=5fd3a986 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=zTNgK-yGK50A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=Ob6Gysnb11nFkN38hccA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id AF748A34; Fri, 11 Dec 2020 09:16:50 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 0BBHGo3v069667; Fri, 11 Dec 2020 09:16:50 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202012111716.0BBHGo3v069667@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Konstantin Belousov cc: Cy Schubert , Poul-Henning Kamp , Ian Lepore , freebsd-arch@freebsd.org Subject: Re: struct timex and Linux adjtimex() In-reply-to: References: <202012030523.0B35NsG7003810@slippy.cwsent.com> <4086.1606982335@critter.freebsd.dk> <5e0db735b29f1ece02521871b2cd392c3467101d.camel@freebsd.org> <25487.1607029223@critter.freebsd.dk> <202012032203.0B3M3VJx004269@slippy.cwsent.com> <25989.1607033614@critter.freebsd.dk> <202012032258.0B3MwqVQ004875@slippy.cwsent.com> <202012040114.0B41EuFc006408@slippy.cwsent.com> Comments: In-reply-to Konstantin Belousov message dated "Fri, 11 Dec 2020 17:15:23 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 11 Dec 2020 09:16:49 -0800 X-CMAE-Envelope: MS4xfO/t65nYGZI13jZChNDBBp8+/Rg1VsFqZCt9PwVCpeGd+EqgHGiIunb3yiafLrZYMoGGKED3IiVdi6rtuSgMPkZA2oIsJzvK14MXC7lyNdlhTtclfBwd YxlCyR7CXS3E/EsUvYv3f9jeAd++Z41zoY1vWZpFp/mUyTxOjzdBW9zZ6zI3dEUvM2pkK1BOMSjWdJNuuwVjxnoYNb5+Gv5qcE22UKmr2fMTMMqQxrfshYrz 57crZLLIJzAhP+0RQRTfmTF9YSJY/VEphsae0t2T+kP2i1KFGvwMJZVMjLdYnB9t X-Rspamd-Queue-Id: 4CsyBc23WKz4dkM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2020 17:16:56 -0000 In message , Konstantin Belousov writes: > On Thu, Dec 03, 2020 at 05:14:56PM -0800, Cy Schubert wrote: > > In message , Konstantin Belousov writes: > > > On Thu, Dec 03, 2020 at 02:58:52PM -0800, Cy Schubert wrote: > > > > In message <25989.1607033614@critter.freebsd.dk>, "Poul-Henning Kamp" > > > > writes: > > > > > -------- > > > > > Cy Schubert writes: > > > > > > > > > > > I will go back > > > > > > with my initial proposal of a timespec add/subtract syscall takes a > > > > > > > timespec as input increments or decrements the clock by the timespe > c an > > > d > > > > > > returns a timespec with the time. > > > > > > > > > > I would be tempted by the clock_settime(2) "clock_id" argument. > > > > > > > > > > The functionality required has a LOT more commonality with > > > > > clock_settime(2) than with ntp_adjtime(2), and absconding with a > > > > > couple of the top bits of clock_id for "CLOCK_ADD_ADJUSTMENT" and > > > > > "CLOCK_SUB_ADJUSTMENT" would be be a pretty clean solution. > > > > > > > > Correct. My initial proposal was: > > > > > > > > +.Fn clock_updtime "clockid_t clock_id" "const struct timespec *itp" > > > > "struct timespec *otp" > > > > > > > > Briefly it does this: > > > > > > > > +int > > > > +kern_clock_updtime(struct thread *td, clockid_t clock_id, > > > > + const struct timespec *its, struct timespec *ots) > > > Note that phk suggested using specific clock id with clock_settime(), > > > and I believe that you only need one such clock id. > > > > Correct. This is from work I stashed in my git repo from Sunday. I haven't > > updated it yet with phk's suggestions. > > > > > > > > > +{ > > > > + struct timespec ats; > > > > + int error; > > > > + > > > > + if ((error = kern_clock_gettime(td, clock_id, &ats)) != 0) > > > > + return (error); > > > > + > > > > + timespecadd(its, &ats, &ats); > > > > + > > > > + if ((error = kern_clock_settime(td, clock_id, &ats)) != 0) > > > > + return (error); > > > > + > > > > + return(kern_clock_gettime(td, clock_id, ots)); > > > > +} > > > This is awful, it must not be done this way. > > > > > > Look how tc_setclock() is implemented. It is careful to adjust time > > > with interrupts and preemption disabled, and does it by adjusting the > > > source of truth, not by fetching through several layers and then hoping > > > that we did not get delayed too much when pushing back. > > > > Thanks. I'll look there. > > > > > > > > I think you need to refactor tc_setclock() somewhat to allow to specify > > > offset instead of absolute value and use it as a helper. > > > > I'll do that. I'll add phk and you as reviewers. > > > > > > > > > > > > > I can prepare a review if you want. I haven't touched the man page nor > any > > > > tests yet. > > > > > > > > It's affected by kib@'s https://reviews.freebsd.org/D27471, as conflict > s > > > > will result. I'll wait until that's committed before continuing work on > it, > > > > > > > assuming this is the direction we want to go. > > > This change does not affect *setclock() work above. > > > > Thanks. > > Ok, I went ahead and wrote https://reviews.freebsd.org/D27571 . > This should handle all notes from the conversation. Thanks. I just finished mine and tested it last night. BTW, they want it to return clock_gettime() output atomically. I suppose I could add that later. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.