The application relates to a method for remote function calling in a security application based on TEE specification, which comprises the following steps: 1) a
client application calls TEEC_InvokeCommand, and a security application backs up an entry function context; 2) the security application executes
business logic and judges whether remote function calling is needed, if not, the execution is completed, and a calling result is returned; if yes, calling parameters are encapsulated, an interrupt function context is backed up, and the
client application is quickly returned; 3) the
client application analyzes the calling parameters,
system calling and encapsulated calling result, and calls TEEC_InvokeCommand; 4) the security application acquires a remote function calling context, restores a calling site, analyzes a remote calling result, and executes step 2). Compared with the prior art, the application has the advantages that the security application can use the function in a rich execution environment through a remote calling mode at any time, and parameters of any type and in any direction can be transmitted.