mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
compel: remove "addr_" from offset variable names
It removes the potential confusion when it comes to virtual address vs offsets. Further, doing so makes naming more consistent with the rest of the parasite_blob_desc struct. Signed-off-by: Nicolas Viennot <Nicolas.Viennot@twosigma.com>
This commit is contained in:
parent
a531f9a8bc
commit
d99fc1e553
@ -33,8 +33,8 @@ struct parasite_ctl {
|
||||
|
||||
unsigned long parasite_ip; /* service routine start ip */
|
||||
|
||||
unsigned int *addr_cmd; /* addr for command */
|
||||
void *addr_args; /* address for arguments */
|
||||
unsigned int *cmd; /* address for command */
|
||||
void *args; /* address for arguments */
|
||||
unsigned long args_size;
|
||||
int tsock; /* transport socket for transferring fds */
|
||||
|
||||
|
@ -152,8 +152,8 @@ struct parasite_blob_desc {
|
||||
size_t bsize;
|
||||
size_t nr_gotpcrel;
|
||||
unsigned long parasite_ip_off;
|
||||
unsigned long addr_cmd_off;
|
||||
unsigned long addr_arg_off;
|
||||
unsigned long cmd_off;
|
||||
unsigned long args_off;
|
||||
compel_reloc_t *relocs;
|
||||
unsigned int nr_relocs;
|
||||
} hdr;
|
||||
|
@ -699,9 +699,9 @@ int __handle_elf(void *mem, size_t size)
|
||||
pr_out("\t\tpbd->hdr.parasite_ip_off = "
|
||||
"%s_sym__export_parasite_head_start_compat;\n", opts.prefix);
|
||||
pr_out("#endif /* CONFIG_COMPAT */\n");
|
||||
pr_out("\tpbd->hdr.addr_cmd_off = "
|
||||
pr_out("\tpbd->hdr.cmd_off = "
|
||||
"%s_sym__export_parasite_cmd;\n", opts.prefix);
|
||||
pr_out("\tpbd->hdr.addr_arg_off = "
|
||||
pr_out("\tpbd->hdr.args_off = "
|
||||
"%s_sym__export_parasite_args;\n", opts.prefix);
|
||||
pr_out("\tpbd->hdr.relocs = %s_relocs;\n", opts.prefix);
|
||||
pr_out("\tpbd->hdr.nr_relocs = "
|
||||
|
@ -612,7 +612,7 @@ static int parasite_init_daemon(struct parasite_ctl *ctl)
|
||||
user_regs_struct_t regs;
|
||||
struct ctl_msg m = { };
|
||||
|
||||
*ctl->addr_cmd = PARASITE_CMD_INIT_DAEMON;
|
||||
*ctl->cmd = PARASITE_CMD_INIT_DAEMON;
|
||||
|
||||
args = compel_parasite_args(ctl, struct parasite_init_args);
|
||||
|
||||
@ -905,8 +905,8 @@ int compel_infect(struct parasite_ctl *ctl, unsigned long nr_threads, unsigned l
|
||||
pr_info("Putting parasite blob into %p->%p\n", ctl->local_map, ctl->remote_map);
|
||||
|
||||
ctl->parasite_ip = (unsigned long)(ctl->remote_map + ctl->pblob.hdr.parasite_ip_off);
|
||||
ctl->addr_cmd = ctl->local_map + ctl->pblob.hdr.addr_cmd_off;
|
||||
ctl->addr_args = ctl->local_map + ctl->pblob.hdr.addr_arg_off;
|
||||
ctl->cmd = ctl->local_map + ctl->pblob.hdr.cmd_off;
|
||||
ctl->args = ctl->local_map + ctl->pblob.hdr.args_off;
|
||||
|
||||
memcpy(ctl->local_map, ctl->pblob.hdr.mem, ctl->pblob.hdr.bsize);
|
||||
compel_relocs_apply(ctl->local_map, ctl->remote_map, &ctl->pblob);
|
||||
@ -1364,7 +1364,7 @@ int compel_cure(struct parasite_ctl *ctl)
|
||||
|
||||
void *compel_parasite_args_p(struct parasite_ctl *ctl)
|
||||
{
|
||||
return ctl->addr_args;
|
||||
return ctl->args;
|
||||
}
|
||||
|
||||
void *compel_parasite_args_s(struct parasite_ctl *ctl, unsigned long args_size)
|
||||
@ -1382,7 +1382,7 @@ int compel_run_in_thread(struct parasite_thread_ctl *tctl, unsigned int cmd)
|
||||
user_regs_struct_t regs = octx->regs;
|
||||
int ret;
|
||||
|
||||
*ctl->addr_cmd = cmd;
|
||||
*ctl->cmd = cmd;
|
||||
|
||||
ret = parasite_run(pid, PTRACE_CONT, ctl->parasite_ip, stack, ®s, octx);
|
||||
if (ret == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user