[CRIU] [PATCH 0/3] prctl: Implement PR_SET_MM_MAP, rebase on lates master

Cyrill Gorcunov gorcunov at gmail.com
Mon Oct 27 12:05:24 PDT 2014


On Mon, Oct 27, 2014 at 09:26:11PM +0400, Pavel Emelyanov wrote:
> On 10/24/2014 02:10 PM, Cyrill Gorcunov wrote:
> > Cyrill Gorcunov (3):
> >   prctl: Add new interface constants
> >   prctl: restore -- Use new PR_SET_MM_MAP if kernel supports
> >   prctl: check -- Try new interface as well
> > 
> >  cr-check.c      | 40 +++++++++++++++++++++--------------
> >  include/prctl.h | 24 +++++++++++++++++++++
> >  pie/restorer.c  | 65 ++++++++++++++++++++++++++++++++++++++++-----------------
> >  3 files changed, 94 insertions(+), 35 deletions(-)
> > 
> Applied, thanks.
> 
> In patch #2 however:
> 
> > +	} else
> > +		sys_close(args->fd_exe_link);
> 
> Is this new API difference? New prctl does NOT close the fd?

no, it's criu specific, both api do not close file descriptor,
but previously we've beem closing it in

restore_self_exe_late
  ...
  ret = sys_prctl_safe(PR_SET_MM, PR_SET_MM_EXE_FILE, fd, 0);
  sys_close(fd);


More information about the CRIU mailing list