mcexec/mm: user memory policy control for heap, stack, etc.
This commit is contained in:
@@ -127,8 +127,10 @@ int prepare_process_ranges_args_envs(struct thread *thread,
|
||||
flags |= VRFLAG_PROT_TO_MAXPROT(flags);
|
||||
flags |= VR_DEMAND_PAGING;
|
||||
|
||||
/* Non-TEXT sections that are large respect user allocation policy */
|
||||
if (i >= 1 && pn->sections[i].len >= AP_USER_THRESHOLD) {
|
||||
/* Non-TEXT sections that are large respect user allocation policy
|
||||
* unless user explicitly requests otherwise */
|
||||
if (i >= 1 && pn->sections[i].len >= AP_USER_THRESHOLD &&
|
||||
!(pn->mpol_flags & MPOL_NO_BSS)) {
|
||||
dkprintf("%s: section: %d size: %d pages -> IHK_MC_AP_USER\n",
|
||||
__FUNCTION__, i, range_npages);
|
||||
ap_flags = IHK_MC_AP_USER;
|
||||
@@ -426,6 +428,7 @@ static int process_msg_prepare_process(unsigned long rphys)
|
||||
proc->sgid = pn->cred[6];
|
||||
proc->fsgid = pn->cred[7];
|
||||
proc->termsig = SIGCHLD;
|
||||
proc->mpol_flags = pn->mpol_flags;
|
||||
|
||||
vm->region.user_start = pn->user_start;
|
||||
vm->region.user_end = pn->user_end;
|
||||
|
||||
Reference in New Issue
Block a user