[CRIU] [PATCH v2] parasite-syscall: make code_syscall local
Cyrill Gorcunov
gorcunov at gmail.com
Thu Mar 17 10:10:47 PDT 2016
On Thu, Mar 17, 2016 at 07:22:10PM +0300, Dmitry Safonov wrote:
> On 03/17/2016 06:10 PM, Cyrill Gorcunov wrote:
> >Please provide code_syscall_size in arguments as well, and add
> >
> >__parasite_execute_syscall
> > ...
> > BUG_ON(sizeof(code_orig) != @code_syscall_size);
> > ...
> >
> >where @code_syscall_size comes from argument.
> >
> > Cyrill
>
> Seems like, code_syscall_size was introduced because of
> PTRACE_PEEKUSER restriction:
> >PTRACE_PEEKUSER
> > Read a word at offset addr in the tracee's USER area, which
> holds the registers and other information about the process (see
> <sys/user.h>). The word is
> > returned as the result of the ptrace() call. Typically, the offset
> must be word-aligned, though this might vary by architecture.
> (ptrace(2))
>
> So, code_orig must be declared with code_syscall_size,
> because it goes to ptrace_{swap,poke}_area, where
> it goes to PTRACE_PEEKUSER.
> Or am I missing something?
>
> ITOW, what do you think about something like that?
> (on top of this v2)
Looks fine, pleas make a cummulative one and resend, I'll review.
More information about the CRIU
mailing list