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

Rodolfo Giometti
2007-06-26T17:05:17Z

On Tue, Jun 26, 2007 at 11:57:07AM +0100, David Woodhouse wrote:
>
> Your syscalls blindly dereference userspace pointers instead of using
> copy_{to,from} user.

I use access_ok() to test userspace addresses. It should be ok,
shouldn't it?

> Why did you split all your syscalls into two functions?
>
> s/__FUNCTION__/__func__/

Just for an easy management of mutex locking.

> s/antennas/antennae/

Done. However I found other files in the kernel code with the same
error... ;)

> You seem to have added debugging messages mentioning 'serial8250' into
> serial_core.h

Yes! Fixed.

> You added <linux/pps.h> with #ifdef __KERNEL__ in it, but didn't export
> it to userspace. Why?

This file is called by timepps.h who exports the userland data.

> Your structures for userspace communication look OK -- I don't think you
> need special 32/64 compatibility for them. You do need it for the
> 'struct timespec' in sys_time_pps_fetch() though.

Mmm... can you please explain a bit what do you mean? Maybe just a
link...

> Must we have the ioctl-like interface to sys_time_pps_cmd()? If the

It seems to me stronger then other solutions...

> second argument is always 'struct pps_source_data_s *', why does the
> syscall pretend it's 'void *'?

Just to keep sys_time_pps_cmd() generic for future new commands.

Thanks,

Rodolfo