[net.unix-wizards] Thanks for help with 4.1BSD kernel

dhb@rayssd.UUCP (11/10/83)

Thanks to all who answered my question on validating the byte
count in my device driver.  Most people correctly suggested
that I check the code in physio() and Guy Harris actually took
a look at the code and found the lines that I needed.  For those
of you who didn't know the answer but would like to, there is
a subroutine in locore.s called "useracc()" which is passed an
address, a byte count, and either B_READ or B_WRITE.  The routine
validates the fact that the user has read (write) access to the
block beginning at the base address, for the length specified.
There is also a companion routine call kernacc() which checks if
the kernel can access the specified block (same type of arguments).

I added the code to my device driver and it works fine.  Thanks
again to all who answered my question.
-- 
	Dave Brierley
	Raytheon Co.; Portsmouth RI; (401)-847-8000 x4073
	...!decvax!brunix!rayssd!dhb
	...!allegra!rayssd!dhb
	...!linus!rayssd!dhb