From owner-svn-src-head@freebsd.org Thu Mar 17 20:04:39 2016 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 E4078AD45DA; Thu, 17 Mar 2016 20:04:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B3E8A3F1; Thu, 17 Mar 2016 20:04:39 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u2HK4cTe085841 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 17 Mar 2016 13:04:38 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u2HK4bGT085840; Thu, 17 Mar 2016 13:04:37 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 17 Mar 2016 13:04:37 -0700 From: Gleb Smirnoff To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r296933 - in head: share/man/man9 sys/sys Message-ID: <20160317200437.GW1328@FreeBSD.org> References: <201603160837.u2G8bqgr087126@repo.freebsd.org> <20160316203601.GO1328@FreeBSD.org> <56EA5A96.5070402@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56EA5A96.5070402@selasky.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Thu, 17 Mar 2016 20:04:40 -0000 On Thu, Mar 17, 2016 at 08:19:50AM +0100, Hans Petter Selasky wrote: H> On 03/16/16 21:36, Gleb Smirnoff wrote: H> > On Wed, Mar 16, 2016 at 08:37:52AM +0000, Hans Petter Selasky wrote: H> > H> Modified: head/sys/sys/sysctl.h H> > H> ============================================================================== H> > H> --- head/sys/sys/sysctl.h Wed Mar 16 06:42:15 2016 (r296932) H> > H> +++ head/sys/sys/sysctl.h Wed Mar 16 08:37:52 2016 (r296933) H> > H> @@ -654,8 +654,10 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e H> > H> SYSCTL_OID(parent, nbr, name, \ H> > H> CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access), \ H> > H> (ptr), (len), sysctl_handle_counter_u64_array, "S", descr); \ H> > H> - CTASSERT(((access) & CTLTYPE) == 0 || \ H> > H> - ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) H> > H> + CTASSERT((((access) & CTLTYPE) == 0 || \ H> > H> + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) && \ H> > H> + sizeof(counter_u64_t) == sizeof(*(ptr)) && \ H> > H> + sizeof(uint64_t) == sizeof(**(ptr))) H> > H> > I don't agree with the last line. Does it assert that counter_u64_t is H> > implemented using uint64_t? That is true, but that is internal detail, H> > that might be changed in future. H> > H> H> Yes, it asserts that counter_u64_t is a 64-bit counter, as the name of H> the typedef hints at. H> H> From the past experience there has been several cases where someone has H> changed a field in structure which is exported as a sysctl, and then the H> sysctls were never updated. It could be that counter_u64_t becomes a machine dependent typedef, being different size on different machines. Unlikely, but possible. -- Totus tuus, Glebius.