Re: [PATCH] LinuxPPS (with new syscalls API) - new version

From: Rodolfo Giometti
Date: Fri Jun 29 2007 - 12:33:26 EST


On Fri, Jun 29, 2007 at 04:55:47PM +0100, David Woodhouse wrote:

> 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.

Ok, fixed.

> 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]'.

Gulp! Can you please give me some advices in order to solve also this
problem? Should I use some "ifdef CONFIG_COMPAT" into those
structures? :-o

> Can you explain the 'union pps_timeu'? It seems very odd. How do we know
> which member of the union should be used?

This union is defined by the RFC 2783... we can know which member of
the union should be used by using define PPS_TSFMT_TSPEC for variable
tsformat into function time_pps_fetch().

Ciao,

Rodolfo

--

GNU/Linux Solutions e-mail: giometti@xxxxxxxxxxxx
Linux Device Driver giometti@xxxxxxxxx
Embedded Systems giometti@xxxxxxxx
UNIX programming phone: +39 349 2432127
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/