From owner-svn-src-head@freebsd.org Sat Oct 17 23:52:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 539EDA18E2C for ; Sat, 17 Oct 2015 23:52:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 286E815C5 for ; Sat, 17 Oct 2015 23:52:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by pabrc13 with SMTP id rc13so153870040pab.0 for ; Sat, 17 Oct 2015 16:52:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=XRrdVgXmEe95ixwj6YhfwlUEXrh9JLAmM46v//aXEE4=; b=Q3Hfa6szQ6CUv5RSqc/FBpeAkyUFsB98BMCWCC4RlkcM4LHczswek8W6e9J9GVWorL /jRmpJxs2+8XtaYFtQWYzGVsUrSUfj1GyzpysduDcwDEDs32SQsYqzDzPWzFqZ7n2MVR V9R4J06kRYnLgIEOXtzQ2BDk/THtS0RhkKYd1dUNDAxUBaK8dtrWow3pXwVOystWjpv5 1Ob7tapwmIhXjH4vn/ER9q6X2nmNwt62XvX1W1JgGC1XCNuAD3IrmccFsOfK+1sUr83I QeKLwRCraOYv8Oa0j3CCLWMmT54WTL76dGd0X54J3x0mHen1UWnnam4p0isDKYY5c00W fg0Q== X-Gm-Message-State: ALoCoQn1+0TfR1co1iV3eWyRk9JlkQQ0kz3G9MzPQNVOg0TjFyPRcXutbWeMAdCaGO7DSs7orL0H X-Received: by 10.67.1.73 with SMTP id be9mr25423812pad.35.1445125479832; Sat, 17 Oct 2015 16:44:39 -0700 (PDT) Received: from ip-100-127-128-53.ec2.internal ([69.53.245.5]) by smtp.gmail.com with ESMTPSA id es4sm28456206pbc.42.2015.10.17.16.44.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Oct 2015 16:44:39 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r289421 - in head/etc: . mtree ntp Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <20151017212033.GA43955@walton.maths.tcd.ie> Date: Sat, 17 Oct 2015 17:44:35 -0600 Cc: Ian Lepore , Cy Schubert , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <00150EF2-0020-42E5-A1E5-324A23975577@bsdimp.com> References: <201510161404.t9GE4GqM046436@repo.freebsd.org> <1445106350.71631.36.camel@freebsd.org> <20151017212033.GA43955@walton.maths.tcd.ie> To: David Malone X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 23:52:35 -0000 --Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Oct 17, 2015, at 3:20 PM, David Malone = wrote: >=20 > On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote: >> If the leapseconds file is present, the leap bits for reference >> clocks and downstratum servers are ignored. >>=20 >> I can't determine from casual code examination (and I don't have time >> to experiment now) whether that is true even if the file is expired. >=20 > The way the code seems to work is: >=20 > 1) Take a vote from your peers on if there is an upcoming > leap second. Refclocks can outvote other peers. (This is > in ntp_proto.c:clock_update() - search for leap_vote_ins). Assuming no bugs, yes. And assuming your peers are sending the correct information. History with ntpd and ntp serves well illustrates that these assumptions are violated often. > 2) If one seems to be pending, try to insert it into an > in-memory table for the end of the month. NTP only recognizes June and December as valid leap insertion points. This is likely safe for the foreseeable future though, even though the official standard allows leap seconds to be the end of any month. Too many things assume you only have leap seconds at these times for IERS to issue one that isn=E2=80=99t at the end of = December or June until earth rotation forces their hand sometime around the end of this century (give or take a few decades). > 3) If you find that you loaded a table and the leapsecond > you are trying to insert is within the valid range of the > table, return an error. (This is in ntp_leapsec.c:leapsec_add()) >=20 > So, I think the change should be safe, if the comments match the code. That=E2=80=99s a big if. Both Ian and I have witnessed the carnage of = incorrect leap seconds first hand and so are somewhat touchy on the subject. It is a place where getting the canonical information is 1000x better than relying on code to implement things that can=E2=80=99t go wrong. Because = they often do. Way way too often. When you have leap second info, always always always try extra hard to make sure it is as up to date as you can get it. Any =E2=80=9Cshort cut=E2=80=9D here is asking for trouble, = even if you think you can prove that no such trouble is possible. Warner --Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWIt1kAAoJEGwc0Sh9sBEAPSQQAOurNfBul18bw00iYpASv/gl lDWhyF77yd0XI7EugmZBF+jYr0jHMWlIW7ViP2qBx01aN9C3Axwz2UKzG5qZBkKl rMAsbEw7xcySbWrSu/4EtDLetr0tkXImSjon1eNpnwdrQPeklku5n+3gXJis+YF/ vG1JTc6GpoJez0HWk/DREpDwtUz3y8bHrzSPmIXcvm9OhzUDnChv2wiIZqbrK0qk wJYxkdw8rVCb8oiPMvWRlwLW7LbjzD2PkpTBlnxW1BIbXhmwslVmuYXQTXWk4fnF 6EACndACuhkIsxrfUmqrjIYqIdqAxm6YbCq0bnVv1Y+7ov1yUyk3vr57xVmrkPi7 WwbNejohjkgs0mquCp9MOvI5Z5N4kqd3/Fmh7qL51ousc5k8cZVKcF7q2sla6ahe w62+jX3mW/gtOP1hTpSnyybMHZZaxpVFzJy1tUKZF6OJF3kc4334/l1u/7b/UKvj JF5ubNkj3Rrpm3vrZVJMPZO/LTBONRsH1WItSWsQWhuX4hpXa0Po2vsnz+DFQTc8 kMO5+d3gYjsks3gGptxa3a6Y7GaXMiE5XmUfZ9AwvjjWdrK2+avUWitjrgGVAcqM EvQbSRuIIuJlP34b1hik9uDsRi+3ba4BtHre6ixSWJ9mhBETMS6Iav1n/yXpVqfM 4qyaGJ8BzskZr3euEYbm =fuAx -----END PGP SIGNATURE----- --Apple-Mail=_E8A0F81E-2334-4E56-9521-4574B2EC9B16--