From owner-freebsd-current@freebsd.org Thu Jul 9 09:17:51 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 24AF4996124 for ; Thu, 9 Jul 2015 09:17:51 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (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 D0CF215DD for ; Thu, 9 Jul 2015 09:17:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by qkbp125 with SMTP id p125so181705137qkb.2 for ; Thu, 09 Jul 2015 02:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BttcQt9VBYMXdm5F3GdmPkOQwcy2WAlNEeKa5h11k+o=; b=K4ji6+vOhhyw1U0X6UbreYgEVUDXQnKxq/8l6f5fG8A4gHO8dKUw0vyb+5TCvMgShe T4iHmUtxgNbDJxd9ZWrlK13d3voNqBTSBHA/LksEdRKHpZ0/fBCppnm61XgFMmlo7+NL uXesmi/wfRU2RndcJ6SK5meI3g3ZOFBRI8kq8hDlA6TEuInapdWrJhciIcF8AUYvhjuW PMEZ6RKTBoWEDhNGTBSFSlaV0MQUCSLMkYDlHNORAsyfu9QzjWSNt0vf/SS7otTlQxZM AXzGqT2Dy7Qum0N9oV3X6K5bLIlYnsPH0asOzDRbIAPicRJKWl1DVOI5s0+xJciv2mrX sfQw== MIME-Version: 1.0 X-Received: by 10.140.237.70 with SMTP id i67mr18712114qhc.44.1436433468920; Thu, 09 Jul 2015 02:17:48 -0700 (PDT) Received: by 10.140.98.73 with HTTP; Thu, 9 Jul 2015 02:17:48 -0700 (PDT) In-Reply-To: <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> <20150709084145.GI2080@kib.kiev.ua> Date: Thu, 9 Jul 2015 02:17:48 -0700 Message-ID: Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT From: NGie Cooper To: Konstantin Belousov Cc: Peter Jeremy , Doug Rabson , Jamie Landeg-Jones , FreeBSD Current Content-Type: text/plain; charset=UTF-8 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 09:17:51 -0000 On Thu, Jul 9, 2015 at 1:41 AM, Konstantin Belousov wrote: > 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 useless -> inapplicable > things. things. -> things [for FreeBSD]. > 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. Perhaps, but that's assuming that NetBSD implemented gettimeofday in userland, which is doesn't. I agree that this is less applicable for FreeBSD than NetBSD. Please keep in mind that contrib/netbsd-tests came from NetBSD, not FreeBSD. Peter Holm and I tried our best to vet out the issues with the test suite before integrating it in, but there might be issues due to implementation discrepancies between FreeBSD and NetBSD. Thanks, -NGie