perf: aux buffer and mmaping PROT_WRITE

From: Vince Weaver
Date: Thu Jun 04 2015 - 16:23:42 EST



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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/