Hope this is the right place for this kind of questions.

I'm trying to create a kernel instrumentation tool on Solaris 10.  It works by 
overwriting specific functions with assembly code that diverts execution path 
and later resume it.

This works well on Solaris 10 Update 4 on Intel platforms.  I've encountered a 
problem porting to SPARC (Solaris 10 6/06 on UltraSPARC-IIIi):

Apparently on SPARC, kernel text pages other than the current module are not 
writable.  Using hat_getattr() I can tell that they don't have PROT_WRITE.  
However, trying to to use hat_setattr() causes the system to crash without even 
generating a crash dump.

Doing the same to text pages that belong to the same module succeeds.  One 
thing I've noticed is that the local pages are 8K, while other kernel text 
pages are 4MB.  I'm not sure whether or not this is related.

I'll appreciate any feedback on this, what might be the cause and what other 
alternatives may be available.


Thanks
Yossi
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to