Subject: Re: IOCTL implementation and kernel/userland addresses
To: Frank van der Linden <fvdl@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 02/05/2005 16:41:16
On Sat, Feb 05, 2005 at 01:18:46AM +0100, Reinoud Zandijk wrote:
> > [...]
> > Well.. you'd need an explicit kernel/userspace flag as far as I can see.
> > Like uio does.
>
> isn't there allready one? i.e the VOP_IOCTL() call does call with `struct
> proc *' being zero isn't it? i.e. its not afiliated with a process. This
> fact enough points that its kernel-called isn't it? A copyout_proc() like
> call with the proc pointer passed would then know what to do.
Would proc still be NULL if the IOCTL is called from a kernel thread ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--