From owner-freebsd-current@freebsd.org Thu Jul 9 08:41:59 2015 Return-Path: Delivered-To: freebsd-current@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 9D371995700 for ; Thu, 9 Jul 2015 08:41:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FD7D11A3 for ; Thu, 9 Jul 2015 08:41:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t698flDN089118 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 9 Jul 2015 11:41:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t698flDN089118 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t698fjnT089117; Thu, 9 Jul 2015 11:41:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 9 Jul 2015 11:41:45 +0300 From: Konstantin Belousov To: Peter Jeremy Cc: Garrett Cooper , Doug Rabson , Jamie Landeg-Jones , FreeBSD Current Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT Message-ID: <20150709084145.GI2080@kib.kiev.ua> References: <201507072241.t67MfsX5085860@hergotha.csail.mit.edu> <94BCDA65-5B86-4329-A312-4CB16E847B69@dons.net.au> <201507081616.t68GGcY9047713@dyslexicfish.net> <0C541CE5-C322-4273-AE0B-1ACAEACCA096@gmail.com> <20150708222717.GE98562@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150708222717.GE98562@server.rulingia.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2015 08:41:59 -0000 On Thu, Jul 09, 2015 at 08:27:17AM +1000, Peter Jeremy wrote: > I'm not sure if we want to explicitly document the conditions under which > gettimeofday() (or clock_gettime()) are implemented in userland vs syscalls > because that is guaranteed to get stale over time. How about stating that Of course, we don't. There is no guarantee that the set of conditions is stable even on the stable branch. > these functions are implemented as syscalls only if the AT_TIMEKEEP value > reported by "procstat -x" is NULL. Mere presence of AT_TIMEKEEP does not imply the use of the fast path. E.g. the fast path can be disabled dynamically, or timecounter could be changed, or libc might be of the wrong version. My imagination stops there. IMO the point of this discussion is to note that test suite tests useless things. If somebody run the test suite for libc, she would immediately note another failing test for the stack protector, which is similar to the gettimeofday nonsense.