Hello, Everyone, "setup_arg_pages" will set "current->mm->start_stack = bprm->p;", the code: ....,, current->mm->start_stack = bprm->p; ret = expand_stack(vma, stack_base); if (ret) ret = -EFAULT; out_unlock: up_write(&mm->mmap_sem); return ret; ...... In "load_elf_binary", it's double set, ...... retval = setup_arg_pages(bprm, randomize_stack_top(STACK_TOP), executable_stack); if (retval < 0) goto out_free_dentry; current->mm->start_stack = bprm->p; ...... I'm not sure if this's right. Do we have to double set start_stack?
Thanks. I agree. I queued the below patch.
Created attachment 281773 [details] fs-binfmt_elfc-remove-unneeded-initialization-of-mm-start_stack