Mind asking a few things? What's the purpose of this line
void *call_addr = (void *)CHECKSUM_CALL_ADDR;
to then casting the rvalue to a double void pointer here: void **target = (void **)CHECKSUM_CALL_ADDR;
(why not just void*) ? Also, even though mprotect() succeeds, I got a segfault.