make perf_event_open allocate perf_event_attr struct with zmalloc

and free in ->post
after setting mapping to MAP_RW, update its prot in the map struct.