2015-06-04 20:23:38

by Vince Weaver

[permalink] [raw]
Subject: perf: aux buffer and mmaping PROT_WRITE


So I came across this issue when improving mmap() support in the
perf_fuzzer.

For AUX buffers, you can specify PROT_WRITE when allocating the buffer
using mmap(), and it will return a buffer just fine, but if you actually
try to write anything you get an instant SIGBUS.

Is this expected behavior? It seems like we should fail the initial
allocation if we ask for a writable buffer but it is not writable.

Vince