Subject: Re: IOCTL implementation and kernel/userland addresses
To: Frank van der Linden <fvdl@netbsd.org>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 02/05/2005 01:18:46
--YZ5djTAD1cGYuMQK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hiya folks,

On Sat, Feb 05, 2005 at 01:12:39AM +0100, Frank van der Linden wrote:
> On Fri, Feb 04, 2005 at 03:57:44PM -0800, Bill Studenmund wrote:
> > Things like cache control, partition info, and wedge info are device
> > abstractions that every (appropriate) device should support, and that I
> > can see file systems and other kernel-level device users wanting to 
> > access.
> > 
> > So I think the best thing to do is to come up with a clean and sane way to 
> > make all IOCTL use kernel-able and to document it. :-)
> 
> 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.

Cheers,
Reinoud

--YZ5djTAD1cGYuMQK
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQgQQ2oKcNwBDyKpoAQL7mwf/TxCcI5FgqgC1sA/4apxm+LOPzsDnpTKn
nvBS10jaIWblArm9Sx+TDd/zxlewoNbDMJJMkxrDlsJDNvDja/shuZIvocKaajIj
+1KZkAkUdfGcT0hfg3bqQuLJy8XU07xmzcLh8h83YckTH35g13bRIZNLqUFOqFTw
dMo8L+a/6nlW019vYRYxlrkPPTShwGrDr+wvgPPh5iJgYS7WEb0WVBNhzLGwmkuH
WjqwVl2yTCIyX3+nHycMbeQM/9FO2KN/R5FIoZrEpeJ6Vl0EWyOpAwmJCKV379MI
8ErEDHPAN6CC0YQWvFS+0K0VQ7wkH9tyQt11burrp+XseqaMU+UOog==
=7wzC
-----END PGP SIGNATURE-----

--YZ5djTAD1cGYuMQK--