I am using mmap for allocation memory and mark some pages as PROT_READ and few as PROT_NONE using mprotect. my implementation has logic based on the memory permission. Currently I have the memory location info, how do I get its current protection state? (PROT_READ/PROT_NONE)
For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...