add generic system call forwarding
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user