On Fri, 2007-06-29 at 17:08 +0200, Rodolfo Giometti wrote: > > +asmlinkage long sys_time_pps_fetch(int source, const int tsformat, > + struct pps_info __user *info, > + const struct timespec __user *timeout) > +{ > + int ret; > + struct timespec to; > + > + if (timeout) { > + ret = copy_from_user(&to, timeout, sizeof(struct timespec)); > + if (ret) > + return ret; You missed one. This should be -EFAULT too. And there's not a huge amount of point in keeping the access_ok() checks elsewhere, since copy_to_user() does that for itself. Oh, and I think you do need compat magic for 'struct pps_info' and 'struct pps_params' too -- there's a struct timespec hidden deep in there, as well as 'unsigned long longpad[3]'. Can you explain the 'union pps_timeu'? It seems very odd. How do we know which member of the union should be used? -- dwmw2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] LinuxPPS (with new syscalls API) - new version
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API) - new version
- References:
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: David Woodhouse <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: David Woodhouse <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: David Woodhouse <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- From: David Woodhouse <[email protected]>
- [PATCH] LinuxPPS (with new syscalls API) - new version
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API) - new version
- From: David Woodhouse <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API) - new version
- From: Rodolfo Giometti <[email protected]>
- Re: [PATCH] LinuxPPS (with new syscalls API)
- Prev by Date: Assistance debugging a Micrel network driver
- Next by Date: Re: Is it time for remove (crap) ALSA from kernel tree ?
- Previous by thread: Re: [PATCH] LinuxPPS (with new syscalls API) - new version
- Next by thread: Re: [PATCH] LinuxPPS (with new syscalls API) - new version
- Index(es):