[Mono-devel-list] [PATCH] CAS support for stack walk on p/invoke methods

Sebastien Pouliot sebastien at ximian.com
Fri Mar 11 09:00:14 EST 2005


Hello,

This patch generates code to do a stack walk (Demand for
SecurityPermissionFlag.UnmanagedCode) before calling into p/invoke
method. This code only gets called if the security manager is active
(mono --security).

The [SuppressUnmanagedCodeSecurity] attribute can be used on the
p/invoke method declaration or on it's class to suppress the stack walk
(e.g. it can provide a nice performance boost if the assembly has a
[assembly: SecurityPermission (RequestMinimum, UnmanagedCode=true)]).

Tests have already been committed under
/mono/mono/tests/cas/demand/

Thanks for reviewing.
-- 
Sebastien Pouliot  <sebastien at ximian.com>
blog: http://pages.infinit.net/ctech/poupou.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mini.20050311.diff
Type: text/x-patch
Size: 2942 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050311/541f3a83/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metadata.20050311.diff
Type: text/x-patch
Size: 1903 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050311/541f3a83/attachment-0001.bin 


More information about the Mono-devel-list mailing list