From owner-freebsd-current@freebsd.org Wed Jul 8 10:04: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 6958C99646D for ; Wed, 8 Jul 2015 10:04:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (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 4038F15A5 for ; Wed, 8 Jul 2015 10:04:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pabvl15 with SMTP id vl15so129179833pab.1 for ; Wed, 08 Jul 2015 03:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=cPAKsh04ITmsi1y1MtnpNHgLXQkHOp0u0RJ5hDJDD0Y=; b=BGOWfaXvI0quyp7NQABsfg5bHIKHtS2CIsNnAHNJbv5tgnEyRWamUQDwijVsoyT6Lo 2sfbJy+RqVEO2OnUtXCc4KEx0IU0RYos+HCENiTwVefqKkx5MDrtf7y8IbUp9khD8nxg BRDS+xmNyACwkb6VTRICS7bcCbvclfvx1BT30vItV/hQ+Zyspar2zjeXYg7CwIj0ctQy kbJOhN/V2khKVNg2BDixoU9qsT6+KGBdj3q2Z0sPnjwLETEa9Qhb+fbGA47538Qe0UHA 9eRevTabsYp7TRT6iPSa+ZOGP3YmGdsVWh0LQvJ2N818EnoAlwgUqRs3jQkiWH2KJzOX IfQw== X-Received: by 10.66.63.9 with SMTP id c9mr18802037pas.40.1436349898603; Wed, 08 Jul 2015 03:04:58 -0700 (PDT) Received: from ?IPv6:2601:602:8001:6c87:6089:bf26:e463:3672? ([2601:602:8001:6c87:6089:bf26:e463:3672]) by smtp.gmail.com with ESMTPSA id fc3sm1940531pab.16.2015.07.08.03.04.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Jul 2015 03:04:57 -0700 (PDT) Subject: Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5413CA2C-646F-4934-9336-A1108FAC9F17"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5 From: Garrett Cooper In-Reply-To: Date: Wed, 8 Jul 2015 03:04:58 -0700 Cc: "O'Connor, Daniel" , Garrett Wollman , freebsd-current@freebsd.org Message-Id: <0F09AB91-94F3-48EB-9482-D8F729FEEA5E@gmail.com> References: <201507072241.t67MfsX5085860@hergotha.csail.mit.edu> <94BCDA65-5B86-4329-A312-4CB16E847B69@dons.net.au> To: Oliver Pinter X-Mailer: Apple Mail (2.1878.6) 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:04:59 -0000 --Apple-Mail=_5413CA2C-646F-4934-9336-A1108FAC9F17 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jul 8, 2015, at 2:53, Oliver Pinter = wrote: > On 7/8/15, O'Connor, Daniel wrote: >>=20 >>> 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.) >>=20 >> In defence of the test, the man page says it can return EFAULT. >=20 > 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. Hmm=85 works for me at least (no non-upstreamed changes to the = kernel/userland as far as I remember =97 just more tests and some = related build stuff). Cheers, -NGie $ uname -a FreeBSD fuji-current-amd64.local 11.0-CURRENT FreeBSD 11.0-CURRENT #1 = r284769+70563d6(isilon-atf)-dirty: Thu Jul 2 13:19:45 PDT 2015 = ngie@fuji-current-amd64.local:/usr/obj/usr/src/sys/FUJI amd64 $ cc -Wall -g -O0 -o busted_gettimeofday busted_gettimeofday.c $ ./busted_gettimeofday busted_gettimeofday: gettimeofday: Bad address $ cc -Wall -g -o busted_gettimeofday busted_gettimeofday.c $ ./busted_gettimeofday busted_gettimeofday: gettimeofday: Bad address $ cc -Wall -o busted_gettimeofday busted_gettimeofday.c $ ./busted_gettimeofday busted_gettimeofday: gettimeofday: Bad address --Apple-Mail=_5413CA2C-646F-4934-9336-A1108FAC9F17 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVnPXLAAoJEMZr5QU6S73eDswH/iasVmQLsDRQgJ/NCkKnoHGZ 2BD1hhOEP2aLz3jfrguKf8PTG+t0/g6hl3N2LFEwThkKX7lDdUjFGnbEBvj0MfJk LXUUcffq2ytDVQ8bQeD1y87Eqv8/CiCbZeZuqjqAaTkeHamy9lIO5iN+qCHv+ALp Y4IjoHK/B7Sgy9wT2HKaXs7XjhTtph1GEbTfi1UmxIhhXXtEnOkV5w+0NWSatc/I 5HbgtKhibnwzSC6NFN/eeMfFlCGIXraGocgJGZwmOP2rABYZ9vxsicgd2cfVTyXY WHSibfRcMOln8IaVYg7TwlyO2pxX73B/CglTXekHnbtrFyKUl7E/MaBuGLpwa+Y= =Uguw -----END PGP SIGNATURE----- --Apple-Mail=_5413CA2C-646F-4934-9336-A1108FAC9F17--