[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Grab the physical address of a label
On Fri, 2012-06-08 at 19:15 +0100, Zeinab Alebouyeh wrote: > Because currently I'm not in lab I don't know my hypervisor is 32b or > 64 bit. > I'm working in a security project. for improve security of > applications running in virtualized environment. I want to use the > security instruction of AMD SVM named SKINIT. > because this instruction must run in ring0, I add a hypercall in xen > and write my codes in my hypercall function. > The skinit instruction takes the physical address of a block as an > input operand( in the eax register) and establish a secure execution > environment for a software component(block) > I have a label in my hypercall function that is the start of my block. > In order to use skinit I want grab the physical address of my label to > save in eax register. Rather than use a label in the current function for this magic block you should use a separate function, either in a .S or a .c file. Then you can simply use &function_name to get the address and you don't run the risk of accidentally falling through into the special code from the non-skinit context etc. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |