From owner-freebsd-stable@freebsd.org Mon Aug 17 05:50:09 2015 Return-Path: Delivered-To: freebsd-stable@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 382FF9B92D6 for ; Mon, 17 Aug 2015 05:50:09 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id C723A12E7; Mon, 17 Aug 2015 05:50:08 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id RDIzZU33G4kukRDJ1ZBSmT; Sun, 16 Aug 2015 23:50:01 -0600 X-Authority-Analysis: v=2.1 cv=T55GNa+Q c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=BWvPGDcYAAAA:8 a=VxmjJ2MpAAAA:8 a=kj9zAlcOel0A:10 a=uRRa74qj2VoA:10 a=6I5d2MoRAAAA:8 a=85N1-lAfAAAA:8 a=YxBL1-UpAAAA:8 a=14Cs1veZNTOHoESaBl4A:9 a=LdHzSKrN11lvHwWH:21 a=nkdFCgSthkO_pVVD:21 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id BAE489BF9; Sun, 16 Aug 2015 22:49:57 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id t7H5nvxD009140; Sun, 16 Aug 2015 22:49:57 -0700 (PDT) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201508170549.t7H5nvxD009140@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Ian Lepore cc: Matthew Seaman , freebsd-stable@freebsd.org, Cy Schubert , roberto@freebd.org, phk@freebsd.org, delphij@freebsd.org Subject: Re: 10.2: ntp update breaks DCF77 clock In-Reply-To: Message from Ian Lepore of "Sun, 16 Aug 2015 10:57:00 -0600." <1439744220.242.87.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 16 Aug 2015 22:49:57 -0700 X-CMAE-Envelope: MS4wfPSXLjH992U3JBwr9w8vDJeGRxUCafZSwiZjvT7IHiJXwc4aiuQ0rZbF7tejZwd+O8RFDKZBXMicNPVRl7yxsHEvxn0J089iBFoh8fcZd4QICN77/mkLlniWeFqxRgnD5SympHAYyrikqP+QrBYQuXYMFk+4svDe8+lQPThOwVwh/kiyzo0HCDHEiDey0Ie1UJwuoe3D9NK2Xb/bbY8c0v3aseKfk+A2z7ve/rh7NVCWJug6mBgruTahD6BRzNv1B5fqSA3rMqw3bPfvtnDffWk7PvZqJmZFpdBIdwDOHgXqH4ofLMATaNHJdJKW0uO0fg== X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Aug 2015 05:50:09 -0000 In message <1439744220.242.87.camel@freebsd.org>, Ian Lepore writes: > > > --=-yOSDvPzQIQnw2oRARoLp > Content-Type: text/plain; charset="us-ascii" > Content-Transfer-Encoding: 7bit > > On Sun, 2015-08-16 at 08:10 +0100, Matthew Seaman wrote: > > On 15/08/2015 16:46, Christian Weisgerber wrote: > > > The ntp code is not very transparent, but I think the root cause > > > are the ntp/config.h changes that came with the 4.2.8p3 update. A > > > number of previously disabled obscure clock drivers were enabled, > > > but crucially CLOCK_RAWDCF was disabled, and this is the PARSE > > > subdriver needed to use the popular DCF77 serial receivers. > > > > > > Frankly, it looks like we used to have a carefully considered > > > selection of clock drivers which has been blindly splattered with > > > the upstream defaults in the last update. > > > > Hmmm.... I suggest raising a PR with patches to revert the changes in > > the set of enabled clock drivers (or merge with the current list). It's > > not going to get you a working DCF77 receiver in a -RELEASE version any > > time soon, I'm afraid, as you'll have to wait until the next release for > > the changes to percolate down, but having a sensible list of enabled > > clock drivers in base is definitely a good move. > > > > I wonder: is there a reason to not enable all (or most of) the refclocks > in base and in ports? Well, at least all the ones that build on > freebsd... a disturbing number of them fail to compile because they > include linux-specific header files. Hmm, I just noticed that we > actually compile most of the refclocks, but we don't enable them in the > config. The reason not to include all drivers is fourfold. 1. Support of all drivers does increase the risk out-of-the-box breakage and security exposure. Not often used drivers may contain additional security exposures. 2. IMO, a client-only configuration should be supported. I've been told via email (which I was cc'd) exchanged between a person on the project and our NTP upline (at ntp.org) that a timekeeping client able of understanding multiple protocols (e.g. PTP) is in the works and will someday (soon?) replace ntp in base. Avoiding too much function creep may avoid POLA when that occurs. 3. Some drivers may interfere with each other. This is why ntp as distributed by our upline does not turn them all on, and which is why the port allows a user to install them as required. I've heard of occasional conflicts over the years. Turning them all on could be a risk for the project, as in someone may have to needlessly fix something that has not been tested or supported by our upline. With the port OTOH, it's easy to tell a user to turn off whatever they don't need. 4. Also IMO, that's what the port is for. If a person wants to use ntp as a server, e.g. to serve time to other computers, i.e. not simply use ntp as a consumer, then the port is always available. (Also juxtapositioned to this point, the port is updated before base because testing and commit [commit to vendor branch, MFV, build tinderbox, run for a while, MFC] is much simpler with the port than in base.) As to why, historically, not all drivers have been built and installed is something I cannot answer, though I hazard to guess it may be due to one or more of the above. IMO I'd prefer to keep ntp minimal within base and direct people who want more to one of the ports. (The ports collection has a -rc incarnation when release candidates are available.) > > It looks like the cost of enabling all the refclocks that compile > properly is pretty small... doing so increased the size of ntpd from > 745K to 801K for me. I'll attach the diff just to save someone else the > trouble of iteratively figuring out which ones won't build, but I think > there may be a more-proper way to generate this config by tweaking the > autotools stuff. Size of the binary is not an issue. I'll be working on generating config.h. The issue here is that config.h is different for each supported FreeBSD platform (32bit, 64bit, little and big endian, etc.). The plan is to make config the port on each supported platform using qemu-sbruno and steal ^W borrow the config.h and import into base, using a master config.h (actually called config.h) to include via #ifdef definitions the appropriate config.h.. Qemu (and qemu-sbruno) doesn't support all our supported platforms, especially the multitude of ARM platforms, so holes in our auto-generated config.h support will exist. Thanks for the diff. I think the place to start is to enable them in a (new) dependent port (ntp-all and ntp-devel-all for the lack of better names) and see what fallout comes from it. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.