From owner-freebsd-arch@freebsd.org Thu Dec 3 17:17:43 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 E5F1C4AB70B for ; Thu, 3 Dec 2020 17:17:43 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (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 4Cn2bB6LLRz4WRF for ; Thu, 3 Dec 2020 17:17:41 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id ksEbksCzLktFkksEdk4GUf; Thu, 03 Dec 2020 10:17:40 -0700 X-Authority-Analysis: v=2.4 cv=NYRYa0P4 c=1 sm=1 tr=0 ts=5fc91db4 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=n4pyo7QS8phUtEAsigkA: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 1EBAD623; Thu, 3 Dec 2020 09:17:37 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 0B3HHalx003916; Thu, 3 Dec 2020 09:17:37 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202012031717.0B3HHalx003916@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: "Poul-Henning Kamp" cc: Konstantin Belousov , Cy Schubert , freebsd-arch@freebsd.org Subject: Re: struct timex and Linux adjtimex() In-reply-to: <60612.1606991186@critter.freebsd.dk> References: <202012030523.0B35NsG7003810@slippy.cwsent.com> <60532.1606990671@critter.freebsd.dk> <60612.1606991186@critter.freebsd.dk> Comments: In-reply-to "Poul-Henning Kamp" message dated "Thu, 03 Dec 2020 10:26:26 +0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 03 Dec 2020 09:17:36 -0800 X-CMAE-Envelope: MS4xfKK4g56e34rcLi1K9ZMLEfQatWco9qE5wHe4kaCIk3Djlu7YS2/yJwCVNtkhQ07WulTNt1i28yvR8ccj7kNpmMnsjf1EVPPmUAh7XN0O9dcMwBN1rGew /EI4uYpLC55bj7ozojuymGPm8b5etvPTLyeOOIgo9QqFddabXaFgU+KU5przynoHIqlZRn64DaEkF43fjtMOa4/qDmALStSQhVp4SbvfKm2/5g9RyBaAFqnK 0bFen41pxsVrlLGAM5okLq76aeCCynShaTOoYqTigXo= X-Rspamd-Queue-Id: 4Cn2bB6LLRz4WRF 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.139) 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)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.229.168:received]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; AUTH_NA(1.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[64.59.136.139:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_VERYGOOD(0.00)[64.59.136.139:from]; FREEMAIL_CC(0.00)[gmail.com,cschubert.com,freebsd.org]; 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: Thu, 03 Dec 2020 17:17:44 -0000 In message <60612.1606991186@critter.freebsd.dk>, "Poul-Henning Kamp" writes: > -------- > Konstantin Belousov writes: > > On Thu, Dec 03, 2020 at 10:17:51AM +0000, Poul-Henning Kamp wrote: > > > -------- > > > Konstantin Belousov writes: > > > > > > > 1. Implement new syscall, which would take extended struct timex. > > > > ntp_adjtimex() perhaps should be kept for backward compatibility. > > > > [It does not matter where struct timeval is placed in the updated > > > > struct timex, see below]. > > > > > > That would break all ports with timekeeping software. > > Why ? > > Last I looked they all had "#ifdef FreeBSD use ntp_adjtim()", so if > you rename it to ntp_adjtimex() you break them. There was no discussion about renaming ntp_adjtime() to ntp_adjtimex(). ntp_adjtime() would remain. A new adjtimex() would be added. > > I see no problem having a #define to alias timex() to ntp_adjtime(), > but I doubt it would make life easier for anybody. (I think we used > to have that and it got GC'ed.) > > *If* we want to do this, the right way is to extend struct timex and > let ntpadjtime(2) handle the new modes. > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. -- 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.