Instead of using S_I* flags, or hardcoded octal literals, use helpers such as PERM_rwxrwxr_x. These are proposed in a Linux patch by Ingo Molnar: https://lwn.net/Articles/696231/
loader.pal_internal_mem_size