From owner-freebsd-current@freebsd.org Wed Jul 8 10:21:58 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 DD39F9967E2 for ; Wed, 8 Jul 2015 10:21:58 +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 511A71E0C for ; Wed, 8 Jul 2015 10:21: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 t68ALb0P027857 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 8 Jul 2015 13:21:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t68ALb0P027857 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t68ALbA2027856; Wed, 8 Jul 2015 13:21:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 8 Jul 2015 13:21:37 +0300 From: Konstantin Belousov To: Oliver Pinter Cc: "O'Connor, Daniel" , Garrett Wollman , freebsd-current@freebsd.org Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT Message-ID: <20150708102137.GZ2080@kib.kiev.ua> References: <201507072241.t67MfsX5085860@hergotha.csail.mit.edu> <94BCDA65-5B86-4329-A312-4CB16E847B69@dons.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Wed, 08 Jul 2015 10:21:59 -0000 On Wed, Jul 08, 2015 at 11:53:39AM +0200, Oliver Pinter wrote: > On 7/8/15, O'Connor, Daniel wrote: > > > >> On 8 Jul 2015, at 08:11, Garrett Wollman > >> wrote: > >> Perhaps the test was (erroneously) written to assume that > >> gettimeofday() was a system call, and could therefore detect invalid > >> pointers and return [EFAULT]. This has not been the case for some > >> time. (In HEAD, not since r237434, which is three years ago.) > > > > In defence of the test, the man page says it can return EFAULT. > > That's fine, but why changed the behaviour since 2015. May 27.? I have > an older FreeBSD/HardenedBSD install, where this test passing. See > some previous email in this thread. Current implemention detail is that gettimeofday(-1) causes SIGSEGV if kern.timecounter.hardware=TSC-low and kern.timecounter.fast_gettime=1. If you timecounter changed for whatever reason, the result of that call would fluctuate between EFAULT and signal. This is not the only test in the test set which checks something that cannot be reasonably explained. > > > > > (IMO the man page and test should change..) > > > > -- > > Daniel O'Connor > > "The nice thing about standards is that there > > are so many of them to choose from." > > -- Andrew Tanenbaum > > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"