[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine call.c,1.28,1.29 cvm_call.c,1.63
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine call.c,1.28,1.29 cvm_call.c,1.63,1.64 cvm_except.c,1.19,1.20 engine.h,1.69,1.70 int_proto.h,1.52,1.53 int_table.c,1.54,1.55 lib_security.c,1.1,1.2 |
Date: |
Mon, 31 Mar 2003 00:49:36 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv30510/engine
Modified Files:
call.c cvm_call.c cvm_except.c engine.h int_proto.h
int_table.c lib_security.c
Log Message:
New internalcall interface for code access security (CAS);
add an extra "permissions" field to the call frame structure to support CAS.
Index: call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/call.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** call.c 20 Feb 2003 04:54:04 -0000 1.28
--- call.c 31 Mar 2003 05:49:34 -0000 1.29
***************
*** 689,692 ****
--- 689,693 ----
frame->frame = thread->frame;
frame->exceptHeight = thread->exceptHeight;
+ frame->permissions = 0;
/* Call the method */
Index: cvm_call.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvm_call.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -r1.63 -r1.64
*** cvm_call.c 22 Feb 2003 12:02:57 -0000 1.63
--- cvm_call.c 31 Mar 2003 05:49:34 -0000 1.64
***************
*** 440,443 ****
--- 440,444 ----
callFrame->frame = frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Pass control to the new method */
***************
*** 466,469 ****
--- 467,471 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Restore the state information and jump to the new method */
***************
*** 522,525 ****
--- 524,528 ----
callFrame->frame = frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Pass control to the new method */
***************
*** 548,551 ****
--- 551,555 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Restore the state information and jump to the new method */
***************
*** 743,746 ****
--- 747,751 ----
callFrame->frame = frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Pass control to the new method */
***************
*** 769,772 ****
--- 774,778 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Restore the state information and jump to the new
method */
***************
*** 842,845 ****
--- 848,852 ----
callFrame->frame = frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Pass control to the new method */
***************
*** 868,871 ****
--- 875,879 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Restore the state information and jump to the new
method */
***************
*** 1244,1247 ****
--- 1252,1256 ----
callFrame->frame = frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Pass control to the new method */
***************
*** 1270,1273 ****
--- 1279,1283 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Restore the state information and jump to the new method */
***************
*** 1322,1325 ****
--- 1332,1336 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Restore the state information and jump to the new method */
***************
*** 1369,1372 ****
--- 1380,1384 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Restore the state information and jump to the new method */
Index: cvm_except.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvm_except.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** cvm_except.c 12 Jun 2002 03:10:42 -0000 1.19
--- cvm_except.c 31 Mar 2003 05:49:34 -0000 1.20
***************
*** 63,66 ****
--- 63,67 ----
callFrame->frame = thread->frame;
callFrame->exceptHeight = thread->exceptHeight;
+ callFrame->permissions = 0;
/* Get the stack trace and pop the frame */
Index: engine.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/engine.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -r1.69 -r1.70
*** engine.h 20 Feb 2003 04:54:04 -0000 1.69
--- engine.h 31 Mar 2003 05:49:34 -0000 1.70
***************
*** 172,175 ****
--- 172,176 ----
CVMWord *frame; /* Base of the local
variable frame */
CVMWord *exceptHeight; /* Height of the frame for
exceptions */
+ void *permissions; /* Permissions for this stack frame */
} ILCallFrame;
Index: int_proto.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_proto.h,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -r1.52 -r1.53
*** int_proto.h 29 Mar 2003 01:39:22 -0000 1.52
--- int_proto.h 31 Mar 2003 05:49:34 -0000 1.53
***************
*** 233,246 ****
extern ILString * _IL_DefaultEncoding_InternalGetString(ILExecThread *
_thread, System_Array * _p1, ILInt32 _p2, ILInt32 _p3);
! extern ILBool _IL_ClrSecurity_Assert(ILExecThread * _thread, ILObject * _p1,
ILInt32 _p2);
! extern ILBool _IL_ClrSecurity_Demand(ILExecThread * _thread, ILObject * _p1,
ILInt32 _p2);
! extern void _IL_ClrSecurity_Deny(ILExecThread * _thread, ILObject * _p1,
ILInt32 _p2);
! extern void _IL_ClrSecurity_SetPermitOnlyBlock(ILExecThread * _thread,
ILInt32 _p1);
! extern void _IL_ClrSecurity_PermitOnly(ILExecThread * _thread, ILObject *
_p1, ILInt32 _p2);
!
! extern void _IL_CodeAccessPermission_RevertAll(ILExecThread * _thread);
! extern void _IL_CodeAccessPermission_RevertAssert(ILExecThread * _thread);
! extern void _IL_CodeAccessPermission_RevertDeny(ILExecThread * _thread);
! extern void _IL_CodeAccessPermission_RevertPermitOnly(ILExecThread * _thread);
extern void _IL_GCHandle_GCFree(ILExecThread * _thread, ILInt32 _p1);
--- 233,239 ----
extern ILString * _IL_DefaultEncoding_InternalGetString(ILExecThread *
_thread, System_Array * _p1, ILInt32 _p2, ILInt32 _p3);
! extern ILObject * _IL_ClrSecurity_GetPermissionsFrom(ILExecThread * _thread,
ILInt32 _p1);
! extern ILObject * _IL_ClrSecurity_GetPermissions(ILExecThread * _thread,
ILInt32 _p1);
! extern void _IL_ClrSecurity_SetPermissions(ILExecThread * _thread, ILObject *
_p1, ILInt32 _p2);
extern void _IL_GCHandle_GCFree(ILExecThread * _thread, ILInt32 _p1);
Index: int_table.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/int_table.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -r1.54 -r1.55
*** int_table.c 29 Mar 2003 01:39:22 -0000 1.54
--- int_table.c 31 Mar 2003 05:49:34 -0000 1.55
***************
*** 1244,1263 ****
IL_METHOD_BEGIN(ClrSecurity_Methods)
! IL_METHOD("Assert", "(oSystem.Security.CodeAccessPermission;i)Z",
_IL_ClrSecurity_Assert, marshal_bppi)
! IL_METHOD("Demand", "(oSystem.Security.CodeAccessPermission;i)Z",
_IL_ClrSecurity_Demand, marshal_bppi)
! IL_METHOD("Deny", "(oSystem.Security.CodeAccessPermission;i)V",
_IL_ClrSecurity_Deny, marshal_vppi)
! IL_METHOD("SetPermitOnlyBlock", "(i)V",
_IL_ClrSecurity_SetPermitOnlyBlock, marshal_vpi)
! IL_METHOD("PermitOnly", "(oSystem.Security.CodeAccessPermission;i)V",
_IL_ClrSecurity_PermitOnly, marshal_vppi)
! IL_METHOD_END
!
! #endif
!
! #ifndef _IL_CodeAccessPermission_suppressed
!
! IL_METHOD_BEGIN(CodeAccessPermission_Methods)
! IL_METHOD("RevertAll", "()V", _IL_CodeAccessPermission_RevertAll,
marshal_vp)
! IL_METHOD("RevertAssert", "()V", _IL_CodeAccessPermission_RevertAssert,
marshal_vp)
! IL_METHOD("RevertDeny", "()V", _IL_CodeAccessPermission_RevertDeny,
marshal_vp)
! IL_METHOD("RevertPermitOnly", "()V",
_IL_CodeAccessPermission_RevertPermitOnly, marshal_vp)
IL_METHOD_END
--- 1244,1250 ----
IL_METHOD_BEGIN(ClrSecurity_Methods)
! IL_METHOD("GetPermissionsFrom", "(i)oSystem.Security.ClrPermissions;",
_IL_ClrSecurity_GetPermissionsFrom, marshal_ppi)
! IL_METHOD("GetPermissions", "(i)oSystem.Security.ClrPermissions;",
_IL_ClrSecurity_GetPermissions, marshal_ppi)
! IL_METHOD("SetPermissions", "(oSystem.Security.ClrPermissions;i)V",
_IL_ClrSecurity_SetPermissions, marshal_vppi)
IL_METHOD_END
***************
*** 2706,2712 ****
#ifndef _IL_ClrType_suppressed
{"ClrType", "System.Reflection", ClrType_Methods},
- #endif
- #ifndef _IL_CodeAccessPermission_suppressed
- {"CodeAccessPermission", "System.Security",
CodeAccessPermission_Methods},
#endif
#ifndef _IL_CryptoMethods_suppressed
--- 2693,2696 ----
Index: lib_security.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_security.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** lib_security.c 1 Apr 2002 05:23:22 -0000 1.1
--- lib_security.c 31 Mar 2003 05:49:34 -0000 1.2
***************
*** 27,110 ****
/*
! * public static bool Assert(CodeAccessPermission perm, int skipFrames);
*/
! ILBool _IL_ClrSecurity_Assert(ILExecThread *_thread,
! ILObject *perm,
! ILInt32 skipFrames)
{
! /* TODO */
! return 0;
}
/*
! * public static bool Demand(CodeAccessPermission perm, int skipFrames);
! */
! ILBool _IL_ClrSecurity_Demand(ILExecThread *_thread,
! ILObject *perm,
! ILInt32 skipFrames)
! {
! /* TODO */
! return 0;
! }
!
! /*
! * public static void Deny(CodeAccessPermission perm, int skipFrames);
! */
! void _IL_ClrSecurity_Deny(ILExecThread *_thread,
! ILObject *perm,
! ILInt32 skipFrames)
! {
! /* TODO */
! }
!
! /*
! * public static void SetPermitOnlyBlock(int skipFrames);
! */
! void _IL_ClrSecurity_SetPermitOnlyBlock(ILExecThread *_thread,
!
ILInt32 skipFrames)
! {
! /* TODO */
! }
!
! /*
! * public static void PermitOnly(CodeAccessPermission perm, int skipFrames);
! */
! void _IL_ClrSecurity_PermitOnly(ILExecThread *_thread,
! ILObject *perm,
! ILInt32
skipFrames)
! {
! /* TODO */
}
/*
! * public static void RevertAll();
! */
! void _IL_CodeAccessPermission_RevertAll(ILExecThread *_thread)
! {
! /* TODO */
! }
!
! /*
! * public static void RevertAssert();
! */
! void _IL_CodeAccessPermission_RevertAssert(ILExecThread *_thread)
! {
! /* TODO */
! }
!
! /*
! * public static void RevertDeny();
! */
! void _IL_CodeAccessPermission_RevertDeny(ILExecThread *_thread)
! {
! /* TODO */
! }
!
! /*
! * public static void RevertPermitOnly();
! */
! void _IL_CodeAccessPermission_RevertPermitOnly(ILExecThread *_thread)
! {
! /* TODO */
}
--- 27,82 ----
/*
! * public static ClrPermissions GetPermissionsFrom(int skipFrames);
*/
! ILObject *_IL_ClrSecurity_GetPermissionsFrom(ILExecThread *_thread,
!
ILInt32 skipFrames)
{
! ILCallFrame *frame = _ILGetCallFrame(_thread, skipFrames);
! if(frame)
! {
! while(frame != 0)
! {
! if(frame->permissions)
! {
! return (ILObject *)(frame->permissions);
! }
! frame = _ILGetNextCallFrame(_thread, frame);
! }
! return 0;
! }
! else
! {
! return 0;
! }
}
/*
! * public static ClrPermissions GetPermissions(int skipFrames);
! */
! ILObject *_IL_ClrSecurity_GetPermissions(ILExecThread *_thread,
!
ILInt32 skipFrames)
! {
! ILCallFrame *frame = _ILGetCallFrame(_thread, skipFrames);
! if(frame)
! {
! return (ILObject *)(frame->permissions);
! }
! else
! {
! return 0;
! }
}
/*
! * public static void SetPermissions(ClrPermissions perm, int skipFrames);
! */
! void _IL_ClrSecurity_SetPermissions(ILExecThread *_thread,
!
ILObject *perm, ILInt32 skipFrames)
! {
! ILCallFrame *frame = _ILGetCallFrame(_thread, skipFrames);
! if(frame)
! {
! frame->permissions = (void *)perm;
! }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine call.c,1.28,1.29 cvm_call.c,1.63,1.64 cvm_except.c,1.19,1.20 engine.h,1.69,1.70 int_proto.h,1.52,1.53 int_table.c,1.54,1.55 lib_security.c,1.1,1.2,
Rhys Weatherley <address@hidden> <=