# mprotect ```text usage: mprotect [-h] addr length prot ``` Calls the mprotect syscall and prints its result value. Note that the mprotect syscall may fail for various reasons (see `man mprotect`) and a non-zero error return value can be decoded with the `errno ` command. ### Positional arguments |Positional Argument|Help| | :--- | :--- | |addr|Page-aligned address to all mprotect on.| |length|Count of bytes to call mprotect on. Needs to be multiple of page size.| |prot|Prot string as in mprotect(2). Eg. "PROT_READ\|PROT_EXEC", "rx", or "5"| ### Optional arguments |Short|Long|Help| | :--- | :--- | :--- | |-h|--help|show this help message and exit| ### Examples ```text mprotect $rsp 4096 PROT_READ|PROT_WRITE|PROT_EXEC mprotect $rsp 4096 rwx mprotect $rsp 4096 7 mprotect some_symbol 0x1000 PROT_NONE ```