Reading memory protection
memory
Solution
Based on the answer by davidg, here's the function `unsigned int read_mprotection(void* addr)`: re_mprot.c, re_mprot.h from the reDroid project at github (the code works on Android, it should be portable to other linuxes).
Problem
I would like to know if there is for linux a way of retrieving the protection of the memory. Like, I want to restore the protection that existed after changing it with mprotect.