Hello Phillipe,

in __t_start() in /ksrc/skins/psos+/syscall.c the pointer to the
(user-space) tasks argument is directly used for the (kernel-space)
t_start() call.

u_long *argp;
argp = (u_long *)__xn_reg_arg4(regs);
return t_start((u_long)task, mode, startaddr, argp);


I think the arguments must be copied to kernel-space, so isn't it better to
do it this way?

u_long arg[4];
if (!__xn_access_ok
    (curr, VERIFY_READ, __xn_reg_arg4(regs), sizeof(u_long[4])))
      return -EFAULT;
__xn_copy_from_user(curr, arg, (void __user *)__xn_reg_arg4(regs),
                   sizeof(u_long[4]));
return t_start((u_long)task, mode, startaddr, arg);


Thank you.
Markus




_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to