I attached a patch proposal, it adds mlockall_pid() and munlockall_pid() syscalls (I've included only the mm/mlock.c file). I generalized the present code to work on a pointer `p` that in case of mlockall() and munlockall() corresponds to `current`. Instead, with mlockall_pid() and munlockall_pid(), after permission checks, it gets the task_struct from find_task_by_vpid. I tested the syscalls and they seem ok, but I'm not sure how to test them thoroughly. Cheers, Federico