Commit 92b26d88 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

check: prctl -- Add PR_SET_MM_AUXV test

The ability to set PR_SET_MM_AUXV is implemented
in kernel as a separate PR_SET_MM extension, so
we need to test if the kernel patch is applied
on a running system.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b264c6e2
......@@ -77,6 +77,7 @@ static int check_kcmp(void)
static int check_prctl(void)
{
unsigned long user_auxv = 0;
unsigned int *tid_addr;
int ret;
......@@ -98,6 +99,12 @@ static int check_prctl(void)
return -1;
}
ret = sys_prctl(PR_SET_MM, PR_SET_MM_AUXV, (long)&user_auxv, sizeof(user_auxv), 0);
if (ret) {
pr_msg("prctl: PR_SET_MM_AUXV is not supported\n");
return -1;
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment