lkml.org 
[lkml]   [2014]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: perf_fuzzer compiled for x32 causes reboot
On Sun, 23 Feb 2014, H. Peter Anvin wrote:

> So we do a write to the buffer rather immediately before this happens,
> and in particular that will update the head:
>
> rb->user_page->data_head = head;
>
> However, that doesn't explain what is going on and in particular the
> write to whatever address was in %rbp. The rest pretty much seems to be
> the page fault logic.

It turns out you don't even have to over-write rb->user_page->data_head.
Just touching the mmap page with a write of a single byte (it doesn't
matter where) is enough to trigger the bug.

This is a pain to track down, it would be easier if I could get a
replayable syscall trace, but even though the segfault is very
reproducible with my fuzzer, it's very sensitive to extra syscalls in the
trace path and the fuzzer logger/replayer path has a different number of
write syscalls and won't trigger the problem.

> Incidentally, I doubt that this is x32-related in any way; there seems
> to be absolutely no difference between x86-64 perf and x32 perf; more
> likely it just makes the error more reproducible because the address
> space is so much smaller.

quite possibly. I only began chasing the problem because when compiled
for x32 this bug apparently will reboot the machine now and then (not just
segfault the program). I never saw that failure mode with x86_64, but
again maybe it's just easier to hit with the reduced address space as you
say.

Vince


\
 
 \ /
  Last update: 2014-02-24 17:01    [W:0.144 / U:1.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site