Darren J Moffat wrote:
> In my opinion the check first then try style is wrong.  It is likely 
> introducing a Time Of Check To Time Of Use (TOCTTOU) bug.  In some cases 
> this could cause a security vulnerability.  Also if the operation will 
> succeed you have wasted cycles asking first.   If it is going to fail 
> the check in ddi_copy{in,out} will be just as fast as an explicit call 
> to check it first.

I agree with you, and determined that we won't do this on Solaris. To be 
verified for Linux.

> Not knowing what you are really doing I'm guessing but I wonder if
> devmap_default_access(9F) and devmap_access(9E) might help you.

Thanks, will check them.

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to