Paul,

> xulari wrote:
>   
>> thanks for advice!
>>         anyway,is there a way to load the driver once ,and system will not 
>> detach the diver?
>>  
>>     
>
> Yes, write your driver to return failure from it's detach(9e) routine: 
> it's then no longer possible for the system to detach and unload your 
> driver.
> (If you ever want to unload your driver then I suggest you use a global 
> value to determine whether detach(9e) fails, then you can patch it using 
> mdb so that you can unload your driver when you want to).

The fact that if a driver returns a fail on detach() then it will not be 
unloaded strikes me as being nasty. The phrase "trojan horse" comes to 
mind... Whilst I guess that it is not straightforward for the kernel to 
"decide" when a manlfunctioning (or malevolent (or just badly coded ;-) 
)) driver should be forcibly ejected, I suspect that there should be 
some means of achieving this.

Thoughts?

Thanks and regards... Sean.

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to