[CRIU] [PATCH 8/8] pie: x86 -- Adjust size of parasite and restorer code
Cyrill Gorcunov
gorcunov at gmail.com
Fri May 15 04:35:48 PDT 2015
On Fri, May 15, 2015 at 02:25:12PM +0300, Pavel Emelyanov wrote:
> > @@ -2356,7 +2356,11 @@ static int prepare_restorer_blob(void)
> > * in turn will lead to set-exe-file prctl to fail with EBUSY.
> > */
> >
> > +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64)
> > + restorer_len = round_up(sizeof(restorer_blob) + nr_gotpcrel * sizeof(long), PAGE_SIZE);
>
> Please, define the nr_gotpcrel as 0 outside of this function for non-x32 case.
ok
> > --- a/parasite-syscall.c
> > +++ b/parasite-syscall.c
> > @@ -38,7 +38,11 @@
> > #include "asm/dump.h"
> > #include "asm/restorer.h"
> >
> > -#define parasite_size (round_up(sizeof(parasite_blob), PAGE_SIZE))
> > +#if defined(CONFIG_X86_32) || defined(CONFIG_X86_64)
> > +# define parasite_size (round_up(sizeof(parasite_blob) + nr_gotpcrel * sizeof(long), PAGE_SIZE))
>
> Hm... Don't we want the PIE_SIZE() helper to factor out all of this with restorer?
Yeah, probably. Some cleanup would help. The thing is that I don't know yet
how all this end up so imagine sometime I have to fix commits which are
way earrlier in commit queue and there is no way to merge it as a simple
fixup. That said sure this series needs cleanup simplification but i
hope we can do that on top (simply because otherwise it would take too
much time ;)
More information about the CRIU
mailing list