[CRIU] [PATCH] vdso: When put vdso mark don't forget to make area writable

Cyrill Gorcunov gorcunov at openvz.org
Mon May 27 04:59:52 EDT 2013


On Mon, May 27, 2013 at 12:57:32PM +0400, Cyrill Gorcunov wrote:
> On Mon, May 27, 2013 at 12:49:56PM +0400, Pavel Emelyanov wrote:
> > > +	sys_mprotect((void *)vdso_rt_parked_at,  vdso_vma_size(sym_rt), PROT_WRITE);
> > >  	vdso_put_mark((void *)vdso_rt_parked_at, vma->start);
> > > +	sys_mprotect((void *)vdso_rt_parked_at,  vdso_vma_size(sym_rt), VDSO_PROT);
> > >  	return 0;
> > >  }
> > 
> > BTW, shouldn't we put marking VDSO under "if (!we_just_remapped_existing_vdso)"?
> 
> If I understand you correctly -- it's exactly what we do now. This patch
> modifies vdso_proxify call which is called from restorer code only if
> proxy is needed. In most cases this code won't be called and mark is not
> needed.

Sorry for confusion -- vdso_proxify does check self which vdso mode is needed.
Anyway -- this put-mark is done in lazy fasion, we call it only if proxy
is needed already.


More information about the CRIU mailing list