Commit 8870aa1e authored by Saied Kazemi's avatar Saied Kazemi Committed by Pavel Emelyanov

pie: A quick workaround for PR_SET_DUMPABLE == 2 restore error.

[ xemul: It's a temporary workaround not to lock the -rc2 release.
  Once we have some better solution, this will be rolled back. ]
Signed-off-by: 's avatarSaied Kazemi <saied@google.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2ad1ba72
......@@ -194,7 +194,11 @@ static int restore_dumpable_flag(MmEntry *mme)
int ret;
if (mme->has_dumpable) {
ret = sys_prctl(PR_SET_DUMPABLE, mme->dumpable, 0, 0, 0);
/*
* Allowed values for PR_SET_DUMPABLE are only
* SUID_DUMP_DISABLE (0) and SUID_DUMP_USER (1).
*/
ret = sys_prctl(PR_SET_DUMPABLE, mme->dumpable == 1 ? 1 : 0, 0, 0, 0);
if (ret) {
pr_err("Unable to set PR_SET_DUMPABLE: %d\n", ret);
return -1;
......
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