Rao Shoaib schrieb:
> Bill Sommerfeld wrote:
>> On Thu, 2008-05-22 at 18:15 +0200, Joachim Worringen wrote:
>>   
>>> 1. Check if a given user space address can be accessed for read or 
>>> write. I could imagine doing a dummy ddi_copyin() and check the return 
>>> code, but this seems not very elegant. It becomes worse for write 
>>> access. Linux has an "access_ok()" macro.
>>>     
>>
>> can you explain further what you're trying to do with this?  another
>> thread could get in sideways and unmap a page after your access_ok() ..
>>
>> why can't you just move data with ddi_copy*() when you have data to move?
>>   
> Thanks for pointing this out BIll. Please do not use copyin/copyout as 
> suggested im my previous email. Those interfaces are obsolete. Use 
> ddi_copyin(9f)/ddi_copyout(9F).

Yes, I'm using ddi_copy*. Conc. Bill's question: this is a valid 
concern, and I have asked this question myself. It's a porting thing - 
things are like this in the Linux version, and it would be easiest to 
mimic this 1:1. But I will see if this can be avoided.

  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