Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-09 Thread Doug Rabson
On Thursday, July 9, 2015, Garrett Wollman woll...@hergotha.csail.mit.edu wrote: In article capq4ffvem2uzi-qptm_6msneelwft814g1ke4rgxu6mrzwy...@mail.gmail.com javascript:;, oliver.pin...@hardenedbsd.org javascript:; writes: Btw, I have found this is atf's documantation:

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-09 Thread Garrett Wollman
In article capq4ffvem2uzi-qptm_6msneelwft814g1ke4rgxu6mrzwy...@mail.gmail.com, oliver.pin...@hardenedbsd.org writes: Btw, I have found this is atf's documantation: atf_tc_expect_signal(SIGSEGV, reaseon), with this, we could mark the specific test case could fail / or expect to coredump. No. I'm

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-09 Thread Konstantin Belousov
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

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-09 Thread NGie Cooper
On Thu, Jul 9, 2015 at 1:41 AM, Konstantin Belousov kostik...@gmail.com 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

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-09 Thread Oliver Pinter
On 7/9/15, NGie Cooper yaneurab...@gmail.com wrote: On Thu, Jul 9, 2015 at 1:41 AM, Konstantin Belousov kostik...@gmail.com 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

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-09 Thread David Chisnall
On 9 Jul 2015, at 10:17, NGie Cooper yaneurab...@gmail.com wrote: 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

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Oliver Pinter
On 7/8/15, Konstantin Belousov kostik...@gmail.com wrote: On Wed, Jul 08, 2015 at 11:53:39AM +0200, Oliver Pinter wrote: On 7/8/15, O'Connor, Daniel dar...@dons.net.au wrote: On 8 Jul 2015, at 08:11, Garrett Wollman woll...@hergotha.csail.mit.edu wrote: Perhaps the test was

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Konstantin Belousov
On Wed, Jul 08, 2015 at 12:36:08PM +0200, Oliver Pinter wrote: Changing to HPET solves the problem: No, it does not solve the problem, it only hides it. The solution is to remove the test. Or, if so inclined, only run the test when gettimeofday(2) is implemented by a syscall.

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread O'Connor, Daniel
On 8 Jul 2015, at 08:11, Garrett Wollman woll...@hergotha.csail.mit.edu 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,

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Oliver Pinter
On 7/8/15, O'Connor, Daniel dar...@dons.net.au wrote: On 8 Jul 2015, at 08:11, Garrett Wollman woll...@hergotha.csail.mit.edu wrote: Perhaps the test was (erroneously) written to assume that gettimeofday() was a system call, and could therefore detect invalid pointers and return [EFAULT].

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Konstantin Belousov
On Wed, Jul 08, 2015 at 11:53:39AM +0200, Oliver Pinter wrote: On 7/8/15, O'Connor, Daniel dar...@dons.net.au wrote: On 8 Jul 2015, at 08:11, Garrett Wollman woll...@hergotha.csail.mit.edu wrote: Perhaps the test was (erroneously) written to assume that gettimeofday() was a system call,

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Jamie Landeg-Jones
Oliver Pinter oliver.pin...@hardenedbsd.org wrote: On 7/8/15, O'Connor, Daniel dar...@dons.net.au wrote: 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

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Garrett Cooper
On Jul 8, 2015, at 2:53, Oliver Pinter oliver.pin...@hardenedbsd.org wrote: On 7/8/15, O'Connor, Daniel dar...@dons.net.au wrote: On 8 Jul 2015, at 08:11, Garrett Wollman woll...@hergotha.csail.mit.edu wrote: Perhaps the test was (erroneously) written to assume that gettimeofday() was a

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Garrett Wollman
In article 559d8e55.9050...@freebsd.org a...@freebsd.org writes: I am not suggesting this but if our man pages used all capitals to signify important auxiliary verbs then the ERRORS sections would read as The following error codes MAY be set in errno: Perhaps in that case it would be more

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Garrett Cooper
On Jul 8, 2015, at 12:17, Doug Rabson d...@rabson.org wrote: As far as I can tell, POSIX doesn't require either EFAULT or any other behaviour - the text in http://www.open-std.org/jtc1/sc22/open/n4217.pdf just says, No errors are defined. Our man page is wrong and any real program which

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Andriy Gapon
On 08/07/2015 22:22, Garrett Cooper wrote: On Jul 8, 2015, at 12:17, Doug Rabson d...@rabson.org wrote: As far as I can tell, POSIX doesn't require either EFAULT or any other behaviour - the text in http://www.open-std.org/jtc1/sc22/open/n4217.pdf just says, No errors are defined. Our man

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Peter Jeremy
On 2015-Jul-08 12:22:03 -0700, Garrett Cooper yaneurab...@gmail.com wrote: On Jul 8, 2015, at 12:17, Doug Rabson d...@rabson.org wrote: As far as I can tell, POSIX doesn't require either EFAULT or any other behaviour - the text in http://www.open-std.org/jtc1/sc22/open/n4217.pdf just says, No

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-08 Thread Doug Rabson
As far as I can tell, POSIX doesn't require either EFAULT or any other behaviour - the text in http://www.open-std.org/jtc1/sc22/open/n4217.pdf just says, No errors are defined. Our man page is wrong and any real program which relies on gettimeofday not faulting when given bad inputs is broken.

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-07 Thread NGie Cooper
On Tue, Jul 7, 2015 at 3:17 PM, Oliver Pinter oliver.pin...@hardenedbsd.org wrote: ... I have no idea where this broke because the Jenkins runs have been unreliable over the past few weeks ;(... Do you have died executors too? jenkins.freebsd.org does:

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-07 Thread Garrett Wollman
In article CAPQ4ffuTcN_ytcH7GPY0s6OqWK9qo6MGaVZhOB+0ojWfd=f...@mail.gmail.com oliver.pin...@hardenedbsd.org writes: We discovered that one of the kyua test failing from gettimeofday tests. The error is reproducible on recent snapshot from 11-CURRENT:

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-07 Thread Garrett Cooper
On Jul 7, 2015, at 15:00, Oliver Pinter oliver.pin...@hardenedbsd.org wrote: Hi all! We discovered that one of the kyua test failing from gettimeofday tests. The error is reproducible on recent snapshot from 11-CURRENT:

Re: gettimeofday((void *)-1, NULL) implicates core dump on recent FreeBSD 11-CURRENT

2015-07-07 Thread Oliver Pinter
On Wed, Jul 8, 2015 at 12:09 AM, Garrett Cooper yaneurab...@gmail.com wrote: On Jul 7, 2015, at 15:00, Oliver Pinter oliver.pin...@hardenedbsd.org wrote: Hi all! We discovered that one of the kyua test failing from gettimeofday tests. The error is reproducible on recent snapshot from