add generic system call forwarding

This commit is contained in:
NAKAMURA Gou
2013-04-17 20:26:19 +09:00
parent d55bc511ea
commit e09160cce7
11 changed files with 212 additions and 17 deletions

View File

@@ -50,6 +50,11 @@ static long mcexec_prepare_image(ihk_os_t os,
pdesc->pid = task_tgid_vnr(current);
if (reserve_user_space(usrdata, &pdesc->user_start, &pdesc->user_end)) {
kfree(pdesc);
return -ENOMEM;
}
args = kmalloc(pdesc->args_len, GFP_KERNEL);
if (copy_from_user(args, pdesc->args, pdesc->args_len)) {
kfree(args);
@@ -82,6 +87,7 @@ static long mcexec_prepare_image(ihk_os_t os,
wait_event_interruptible(usrdata->wq_prepare, pdesc->status);
usrdata->rpgtable = pdesc->rpgtable;
if (copy_to_user(udesc, pdesc, sizeof(struct program_load_desc) +
sizeof(struct program_image_section) * desc.num_sections)) {
ret = -EFAULT;