WO2018090934A1 - 事件上报方法及装置 - Google Patents

事件上报方法及装置 Download PDF

Info

Publication number
WO2018090934A1
WO2018090934A1 PCT/CN2017/111151 CN2017111151W WO2018090934A1 WO 2018090934 A1 WO2018090934 A1 WO 2018090934A1 CN 2017111151 W CN2017111151 W CN 2017111151W WO 2018090934 A1 WO2018090934 A1 WO 2018090934A1
Authority
WO
WIPO (PCT)
Prior art keywords
abnormal event
event
target
related information
information
Prior art date
Application number
PCT/CN2017/111151
Other languages
English (en)
French (fr)
Inventor
祝锂
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2018090934A1 publication Critical patent/WO2018090934A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0681Configuration of triggering conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to an event reporting method and apparatus.
  • the design of the operating system of the intelligent terminal mainly focuses on the functional requirements, not from the perspective of security, and the openness, bulkiness and complexity of the entire system cannot eliminate the corresponding system vulnerabilities, resulting in some utilization.
  • the malicious programs of these vulnerabilities continue to appear, causing applications to be at risk.
  • some software protection methods such as firewalls and anti-virus software, can be used for corresponding protection, due to the emergence of new virus programs and frequent system updates and upgrades, complete protection on the software cannot be achieved.
  • Rich execution environments are also known as normal execution environments.
  • the software and hardware resources on the platform can be identified as two execution environment states respectively.
  • the software and hardware resources identified as the security execution state can only be accessed by the trusted execution environment, and the software and hardware resources identified as the normal execution state can be two types. Access by the execution environment.
  • REE runs the current popular mobile operating system such as Android.
  • the TEE runs a secure operating system with simple functions, small code size, closed and humanized audit control.
  • TEE's hardware and software execution environment is similar to REE.
  • the chip's unique technology such as ARM's Trustzone technology or Intel multi-CPU technology
  • the physical operating environment of TEE and REE is isolated to ensure the security of applications in TEE. Sex.
  • the peripherals used by TEE need to have security attributes to avoid the risk of security data leakage caused by TEE access to peripherals.
  • TEE Trusted Application
  • CA Client Application
  • Customer applications are also known as general applications.
  • the main functions implemented by TA include encryption and decryption, authentication and data storage, etc., and its role is to serve as a security extension function of CA.
  • the TA stores keys and certificates to perform data encryption and decryption and authentication operations.
  • TA stores such as fingerprint data, bank accounts, etc. Key data.
  • the TA usually manages and verifies the validity of the security data, including the correctness, completeness, and timeliness of the data.
  • the TA when the TA detects that some abnormal event (for example, the certificate stored by the TA has expired) occurs, the TA saves the relevant data of the abnormal event, waits for the REE query, and then reports it to the corresponding CA.
  • the CA uses a timed polling method to query for the presence of an anomalous event. The CA starts a timer, and sends a query request to the TA when the timer expires. If the TA detects that an abnormal event has occurred before, the related data of the saved abnormal event is sent to the CA. After the CA receives the relevant data of the abnormal event, it processes the abnormal event.
  • the event reporting method provided by the above-mentioned prior art does not enable the TA to report an abnormal event to the CA in time.
  • the embodiment of the invention provides an event reporting method and device, which are used to solve the problem that the abnormal event reporting is not timely in the existing solution.
  • the embodiment of the present invention provides an event reporting method, where the method includes: receiving, by the TA, a detection indication sent by the TEE, where the detection indication is sent by the TEE after monitoring the preset event, and the preset event is provided according to the target object.
  • the event set by the requirement for detecting an abnormal event is a target CA or a Communication Processor (CP); the TA detects whether there is an abnormal event according to the detection indication; if there is an abnormal event, the TA will information about the abnormal event.
  • the TA when the TA detects that an abnormal event exists, the information about the abnormal event is actively sent to the target object, which solves the problem that the abnormal event is reported in time in the existing solution, and improves the TA. Report the timeliness of abnormal events to the CA or CP.
  • the target object is the target CA
  • the TA sends the information about the abnormal event to the target object, including: the TA sends the application identifier of the target CA and the information about the abnormal event to the trusted zone driver (TZ Driver).
  • the TZ Driver is configured to send information about an abnormal event to the target CA according to the application identifier of the target CA. Accordingly, the target CA receives information about the abnormal event from the TZ Driver.
  • the TA is configured to report an abnormal event to the target CA through the TZ Driver.
  • the target object is the target CA
  • the TA sends information about the abnormal event to the target object, including: the TA sends information about the abnormal event to the TZ Driver.
  • the TZ Driver is used to broadcast information about abnormal events to multiple CAs including the target CA. Accordingly, the target CA receives information about an abnormal event that is broadcasted by the TZ Driver.
  • the TA can broadcast an abnormal event to the target CA through the TZ Driver, and can implement an function of sending an abnormal event to multiple target CAs.
  • the broadcast method to report an abnormal event it is possible to prevent the abnormal event from being intercepted by the illegal software during the reporting process, and the target CA cannot receive the abnormal event, and the abnormal event can be successfully reported to the target CA.
  • the target object is the target CA
  • the TA sends information about the abnormal event to the target object, including: the TA writes information about the abnormal event to the secure shared memory, and sends a security interrupt to the CP.
  • Secure shared memory refers to shared memory whose physical properties are set to a secure open state in the Memory Management Unit (MMU).
  • MMU Memory Management Unit
  • the security interrupt is used to trigger the CP to read information about the abnormal event from the secure shared memory while in the secure mode, and to send information about the abnormal event to multiple CAs including the target CA in a broadcast manner. Accordingly, the CA receives information about an abnormal event transmitted by the CP in a broadcast manner.
  • the TA can broadcast an abnormal event to the target CA through the CP, and can implement an function of sending an abnormal event to multiple target CAs.
  • the broadcast method to report an abnormal event, it is possible to prevent the abnormal event from being intercepted by the illegal software during the reporting process, and the target CA cannot receive the abnormal event, and the abnormal event can be successfully reported to the target CA.
  • the TA securely sends information about abnormal events to the CP without going through the REE, preventing the illegal program or external physical attacks from causing data to be leaked or destroyed during transmission.
  • the data between the TA and the CP can be transmitted in clear text, improving efficiency without reducing security.
  • the target object is a CP
  • the TA sends information about the abnormal event to the target object, including: the TA writes information about the abnormal event to the secure shared memory, and sends a security interrupt to the CP, the security interrupt. It is used to trigger the CP to read related information of the abnormal event from the secure shared memory while in the safe mode, and process the abnormal event according to the related information of the abnormal event.
  • the TA actively reports an abnormal event to the CP, and can ensure that the related information of the abnormal event is securely sent to the CP.
  • an embodiment of the present invention provides an event reporting apparatus, which has a function of implementing a TA side behavior in the above method example.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • an embodiment of the present invention provides an event reporting apparatus, which has a function of implementing a CA side behavior in the above method example.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • an embodiment of the present invention provides a terminal, where the terminal has a TEE and a REE, and the structure of the terminal includes a processor, and the processor is configured to support the terminal to perform a corresponding function in the foregoing method.
  • the structure of the terminal further includes a communication interface, where the communication interface is used to support communication between the terminal and other devices.
  • the terminal may further include a memory for coupling with the processor, which stores program instructions and data necessary for the terminal.
  • an embodiment of the present invention provides a computer storage medium for storing the above-mentioned computer software instructions for a terminal, which includes a program designed to execute the above aspects.
  • the TA actively sends the information about the abnormal event to the target object when the TA detects that the abnormal event exists, and solves the problem that the abnormal event is reported in time in the existing solution.
  • the problem improves the timeliness of the TA reporting abnormal events to the CA or CP.
  • FIG. 1 is a schematic structural diagram of a terminal that may be applicable to an embodiment of the present invention
  • FIG. 2 is a flowchart of an event reporting method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • FIG. 3B is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • FIG. 4A is a flowchart of another event reporting method according to an embodiment of the present invention.
  • 4B is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • FIG. 5A is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • FIG. 5B exemplarily shows a schematic diagram of a connection relationship between an AP, a CP, and a shared memory
  • FIG. 5C is a flowchart of another method for reporting an event according to an embodiment of the present disclosure.
  • FIG. 6 is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • FIG. 8 is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • FIG. 9 is a block diagram of an event reporting apparatus according to an embodiment of the present invention.
  • FIG. 10 is a block diagram of another event reporting apparatus according to an embodiment of the present invention.
  • FIG. 11 is a block diagram of a terminal according to an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram of a terminal that may be applicable to an embodiment of the present invention.
  • the terminal includes an application processor (AP).
  • the AP may be a Central Processing Unit (CPU), and the AP may also include a CPU and CPU peripheral hardware.
  • CPU Central Processing Unit
  • the terminal is deployed with TEE and REE. Both TA and CA can be run in the AP.
  • the terminal also includes peripherals such as a microphone, a screen, and a CP.
  • peripherals such as a microphone, a screen, and a CP.
  • the TA or CA running on the AP can access the peripheral through an interface with the peripheral. It should be noted that when the TA accesses the peripheral, it triggers the peripheral to enter the safe mode. In this case, the peripheral can only be accessed by the TA and cannot be accessed by the CA.
  • the terminal also includes some necessary TEE hardware and REE hardware, etc., which are not shown in the figure.
  • the terminal may include various handheld devices having wireless communication functions, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to the wireless modem, and various forms of User Equipment (UE), mobile stations (Mobile) Station, MS), terminal device, etc.
  • UE User Equipment
  • MS mobile stations
  • terminals etc.
  • the devices mentioned above are collectively referred to as terminals.
  • an embodiment of the present invention provides an event reporting method, and a device and a terminal based on the method.
  • the core idea of the technical solution provided by the embodiment of the present invention is that when the abnormal event is detected, the TA actively reports an abnormal event to the CA to improve timeliness.
  • FIG. 2 is a flowchart of an event reporting method according to an embodiment of the present invention, and the method may include the following steps.
  • step 201 the TA receives the detection indication sent by the TEE.
  • the detection indication is sent by the TEE after monitoring the preset event.
  • the preset event is an event set according to the requirement of the target object to detect an abnormal event.
  • the preset event may be an interrupt sent by hardware or software, or it may be a timer timeout.
  • the target object can be the target CA or CP. In the present embodiment, the target object is mainly referred to as the target CA as an example.
  • the detection indication is used to indicate whether the TA detects an abnormal event.
  • the detection indication carries relevant information of the abnormal event to be detected, so that the TA determines the abnormal event to be detected accordingly.
  • the TEE sends the TA corresponding to the type of the preset event according to the type of the preset event. Detection indication.
  • the correspondence between the type of the preset event and the TA may be configured in advance in the TEE.
  • Step 202 The TA detects whether an abnormal event exists according to the detection indication.
  • the TA After receiving the detection indication sent by the TEE, the TA detects whether there is an abnormal event according to the detection indication. E.g, The TA determines the abnormal event to be detected according to the information related to the abnormal event that needs to be detected in the detection indication, and then detects whether the abnormal event exists.
  • An anomaly event is an event that does not match the normal working state.
  • the type of the abnormal event is not limited.
  • the abnormal event may be that the data of the secure storage area is illegally modified, the data of the secure storage area is incorrect, the certificate has expired, and the like.
  • Step 203 If there is an abnormal event, the TA sends information about the abnormal event to the target CA.
  • the target CA receives information about the abnormal event transmitted by the TA.
  • the TA when the TA detects that there is an abnormal event, the TA actively sends the related information of the abnormal event to the target CA, thereby improving the timeliness of the event reporting.
  • the target CA is a CA associated with an abnormal event, that is, a CA that provides a requirement for detecting an abnormal event and is used to process the abnormal event.
  • the target CA can be one CA or multiple CAs.
  • the information related to the abnormal event includes the type of the abnormal event or other information used to describe the abnormal event.
  • the TA when the TA detects that there is no abnormal event, the TA transmits a detection result indicating that there is no abnormal event to the TEE.
  • Step 204 The target CA processes the abnormal event according to the related information of the abnormal event.
  • the target CA After the target CA receives the information about the abnormal event sent by the TA, it processes the abnormal event accordingly.
  • the processing method adopted by the target CA is also different for different types of abnormal events. For related content, refer to the following exemplary embodiments.
  • the TA sends information about the abnormal event to the CP.
  • the CP receives information about the abnormal event sent by the TA, and processes the abnormal event according to the related information of the abnormal event.
  • the processing of the abnormal event by the CP is a process related to the communication function, such as turning off the communication service.
  • the method provided in this embodiment actively sends the information about the abnormal event to the target object when the TA detects that the abnormal event exists, and solves the problem that the abnormal event is not reported in time in the existing solution. Improve the timeliness of TA reporting abnormal events to CA or CP.
  • the TA is reported to report the abnormal event to the target CA through the TZ Driver.
  • the introduction TA broadcasts an abnormal event to the target CA through the TZ Driver.
  • the TA is reported to report an abnormal event to the target CA through the CP.
  • FIG. 3 is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • the same or similar content as the method shown in FIG. 2 can be referred to the detailed description in FIG. 2, and details are not described herein.
  • the method can include the following steps.
  • Step 301 After detecting the preset event, the TEE sends a detection indication to the TA.
  • the TA receives a detection indication sent by the TEE.
  • Step 302 The TA detects whether an abnormal event exists according to the detection indication.
  • Step 303 If there is an abnormal event, the TA sends the application identifier of the target CA and related information of the abnormal event to the TZ Driver.
  • the TZ Driver receives the application identifier of the target CA and the related information of the abnormal event sent by the TA.
  • TZ Driver is used to realize the data communication function between REE and TEE, so TA can use TZ Driver to
  • the standard CA reports an abnormal event.
  • the TA sends the application identifier of the target CA and related information of the abnormal event to the TZ Driver.
  • the target CA is a CA associated with an abnormal event.
  • the application ID of the target CA is used to uniquely identify the target CA.
  • Step 304 The TZ Driver sends related information of the abnormal event to the target CA according to the application identifier of the target CA.
  • the target CA receives information about the abnormal event from the TZ Driver.
  • step 305 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the related information of the abnormal event is sent to the target CA through a callback manner, and the corresponding procedure is as follows:
  • step 31 the target CA invokes the registration interface and sends a registration request to the TZ Driver.
  • the TZ Driver receives the registration request sent by the target CA.
  • the registration request is used to request a registration callback function.
  • the registration request carries the application ID of the target CA.
  • the registration request also carries the type of the abnormal event.
  • step 32 the TZ Driver registers the callback function according to the application identifier of the target CA.
  • the TZ Driver records the processing relationship between the type of the exception event and the callback function.
  • step 33 after detecting the preset event, the TEE sends a detection indication to the TA.
  • the TA receives a detection indication sent by the TEE.
  • step 34 the TA detects whether there is an abnormal event according to the detection indication.
  • Step 35 If there is an abnormal event, the TA sends the application identifier of the target CA and the information about the abnormal event to the TZ Driver.
  • the TZ Driver receives the application identifier of the target CA and the related information of the abnormal event sent by the TA.
  • step 36 the TZ Driver queries the corresponding callback function according to the application identifier of the target CA.
  • step 37 the TZ Driver calls the queried callback function, and sends the information about the abnormal event to the target CA through the callback function.
  • the target CA receives information about the abnormal event from the TZ Driver.
  • step 38 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the method provided in this embodiment implements the TA to report an abnormal event to the target CA through the TZ Driver.
  • FIG. 4A is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • the same or similar content as the method shown in FIG. 2 can be referred to the detailed description in FIG. 2, and details are not described herein.
  • the method can include the following steps.
  • Step 401 After detecting the preset event, the TEE sends a detection indication to the TA.
  • the TA receives a detection indication sent by the TEE.
  • Step 402 The TA detects whether an abnormal event exists according to the detection indication.
  • Step 403 If there is an abnormal event, the TA sends information about the abnormal event to the TZ Driver.
  • the TZ Driver receives information about an abnormal event sent by the TA.
  • the TA since the abnormal event is reported to the target CA through the TZ Driver, the TA only needs to send the information about the abnormal event to the TZ Driver without sending the application identifier of the target CA to the TZ Driver.
  • Step 404 The TZ Driver sends a broadcast event to the abnormality of multiple CAs including the target CA. information.
  • the target CA receives information about an abnormal event that is broadcasted by the TZ Driver.
  • the target CA is a CA associated with an abnormal event.
  • the broadcast reporting method since the broadcast reporting method is adopted, a function of sending an abnormal event to a plurality of target CAs can be realized.
  • step 405 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the TZ Driver sends a related information of an abnormal event to a plurality of CAs including the target CA by broadcast, and the corresponding procedure is as follows:
  • Step 41 After detecting the preset event, the TEE sends a detection indication to the TA.
  • the TA receives a detection indication sent by the TEE.
  • step 42 the TA detects whether there is an abnormal event according to the detection indication.
  • step 43 if there is an abnormal event, the TA sends information about the abnormal event to the TZ Driver.
  • the TZ Driver receives information about an abnormal event sent by the TA.
  • step 44 the TZ Driver converts information about the abnormal event into an AT (Attention) command.
  • step 45 the TZ Driver sends the AT command to the Radio Interface Layer (RIL) through the AT sending interface.
  • RIL Radio Interface Layer
  • the RIL receives the AT command sent by the TZ Driver.
  • step 46 the RIL parses the AT command to obtain information about the abnormal event.
  • step 47 the RIL sends information about the abnormal event to the operating system framework (Framework) running in the REE.
  • the operating system framework Framework
  • the Framework receives information about the abnormal events sent by the RIL.
  • step 48 the framework broadcasts information about the abnormal event to the plurality of CAs including the target CA.
  • the target CA receives information about an anomaly event sent by the framework in a broadcast manner.
  • step 49 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the method provided in this embodiment implements the function that the TA broadcasts an abnormal event to the target CA through the TZ Driver, and can implement an abnormal event to be sent to multiple target CAs.
  • the broadcast method to report an abnormal event it is possible to prevent the abnormal event from being intercepted by the illegal software during the reporting process, and the target CA cannot receive the abnormal event, and the abnormal event can be successfully reported to the target CA.
  • FIG. 5A is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • the same or similar content as the method shown in FIG. 2 can be referred to the detailed description in FIG. 2, and details are not described herein.
  • the method can include the following steps.
  • Step 501 After detecting the preset event, the TEE sends a detection indication to the TA.
  • the TA receives a detection indication sent by the TEE.
  • Step 502 The TA detects whether an abnormal event exists according to the detection indication.
  • step 503 if there is an abnormal event, the TA writes information about the abnormal event to the secure shared memory.
  • Secure shared memory refers to shared memory whose physical properties are set to a secure open state in the MMU.
  • the physical property of the shared memory is a secure open state
  • only the AP driven by the TA or the CP in the secure mode can access the shared memory through the bus. That is to say, only the TEE and TA running by the AP can access the shared memory, and the REE and CA running by the AP cannot access the shared memory. In this way, the REE and CA running by the AP have no way to access the data of the shared memory, thereby ensuring the security isolation of the memory data from REE and CA.
  • the physical attribute of the memory is the non-secure open state (that is, the normal state)
  • the REE and CA running by the AP can also access the shared memory.
  • FIG. 5B it shows a schematic diagram of a connection relationship between an AP, a CP, and a shared memory.
  • the MMU, the AP and the CP are connected by a bus two or two, and the shared memory is connected to the bus through the MMU.
  • Both the CP in secure mode and the AP driven by TA can access shared memory whose physical attributes are safely open. Specifically, the physical attribute of the shared memory can be set to a secure open state in the MMU.
  • the CP is a communication modem (Modem), a Bluetooth processor, a Wireless Fidelity (Wi-Fi) processor, or a voice processor.
  • the communication modem can be a wireless communication modem of 2G, 3G, 4G or a next-generation communication system, and the voice processor can be high fidelity (Hi-Fi) including functions such as codec or voice compression that can implement voice functions. Fi) processor.
  • Hi-Fi high fidelity
  • Fi voice compression
  • the CP and the AP can also be integrated in one processor.
  • the CP and AP in this article can be separate processors or partial functional circuits in a processor.
  • step 504 the TA sends a security interrupt to the CP.
  • the CP receives a security interrupt sent by the TA.
  • the interrupt is a safety interrupt, that is, the interrupt triggers the CP to enter the safe mode, and then the safe mode interrupt handler takes over and completes the subsequent data processing flow.
  • the security interrupt is used to trigger the CP to read information about the abnormal event from the secure shared memory while in the secure mode, and to send information about the abnormal event to multiple CAs including the target CA in a broadcast manner.
  • the TA can send a security interrupt to the CP through the Inter-Process Communication (IPC) mechanism between the AP and the CP.
  • IPC Inter-Process Communication
  • Step 505 The CP reads information about the abnormal event from the secure shared memory while in the safe mode.
  • the CP After the CP receives the security interrupt sent by the TA, if the working mode of the CP is already in the safe mode, the CP directly reads the information about the abnormal event from the secure shared memory, and the working mode of the CP does not switch; if the working mode of the CP In non-secure mode, the CP switches from non-secure mode to safe mode and then reads information about abnormal events from the secure shared memory.
  • step 505 further includes the following step 506:
  • Step 506 The CP processes the abnormal event according to related information of the abnormal event.
  • the processing of the abnormal event by the CP is different from the processing of the abnormal event by the target CA.
  • the processing of the abnormal event by the CP is processing related to the communication function, such as shutting down the communication service.
  • the processing of the abnormal event by the CP and the processing of the abnormal event by the target CA may be set according to the specific type of the abnormal event.
  • the CP performs the following step 507 after the processing is completed.
  • Step 507 The CP sends the related information of the abnormal event to the plurality of CAs including the target CA by using a broadcast manner.
  • the target CA receives information about an abnormal event transmitted by the CP in a broadcast manner.
  • the target CA is a CA associated with an abnormal event.
  • the broadcast reporting method since the broadcast reporting method is adopted, a function of sending an abnormal event to a plurality of target CAs can be realized.
  • step 508 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the CP sends a related information of an abnormal event to a plurality of CAs including the target CA by using a broadcast manner, and the corresponding procedure is as follows:
  • Step 51 After detecting the preset event, the TEE sends a detection indication to the TA.
  • the TA receives a detection indication sent by the TEE.
  • step 52 the TA detects whether there is an abnormal event according to the detection indication.
  • step 53 if there is an abnormal event, the TA writes information about the abnormal event to the secure shared memory.
  • step 54 the TA sends a security interrupt to the CP.
  • the CP receives a security interrupt sent by the TA.
  • Step 55 The CP reads information about the abnormal event from the secure shared memory while in the safe mode.
  • step 56 the CP processes the abnormal event according to related information of the abnormal event.
  • step 57 the CP converts information about the abnormal event into an AT command.
  • step 58 the CP sends an AT command to the RIL through the AT sending interface.
  • the RIL receives the AT command sent by the CP.
  • step 59 the RIL parses the AT command to obtain information about the abnormal event.
  • step 60 the RIL sends information about the abnormal event to the Framework running in the REE.
  • the Framework receives information about the abnormal events sent by the RIL.
  • step 61 the framework broadcasts information about the abnormal event to the plurality of CAs including the target CA.
  • the target CA receives information about an anomaly event sent by the framework in a broadcast manner.
  • step 62 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the method provided in this embodiment implements the function that the TA broadcasts an abnormal event to the target CA through the CP, and can implement an abnormal event to be sent to multiple target CAs.
  • the broadcast method to report an abnormal event it is possible to prevent the abnormal event from being intercepted by the illegal software during the reporting process, and the target CA cannot receive the abnormal event, and the abnormal event can be successfully reported to the target CA.
  • the TA securely sends information about abnormal events to the CP without going through the REE, preventing the illegal program or external physical attacks from causing data to be leaked or destroyed during transmission.
  • the data between the TA and the CP can be transmitted in clear text, improving efficiency without reducing security.
  • the TA may send information about the abnormal event to the CP in the following manner.
  • the TA writes information about the abnormal event to the secure shared memory, and sends a security interrupt to the CP, which is used to trigger the CP to read the information about the abnormal event from the secure shared memory while in the safe mode, and according to the abnormality.
  • Information about the event handles the anomaly.
  • the TA actively reports an abnormal event to the CP, and can ensure that the related information of the abnormal event is securely sent to the CP.
  • FIG. 6 is a flowchart of another event reporting method according to an embodiment of the present invention.
  • the TA implements data secure storage monitoring.
  • the method can include the following steps:
  • step 601 the TEE monitors that the secure storage area is accessed.
  • step 602 the TEE sends a detection indication to the TA.
  • the TA receives a detection indication sent by the TEE.
  • step 603 the TA checks the data of the secure storage area to detect whether the data is destroyed. If yes, execute The following step 605; if not, the following step 604 is performed.
  • the TA checks whether the data of the secure storage area is illegally modified or whether the data content is in error or the like.
  • Step 604 The TA sends a detection result to the TEE indicating that the data of the secure storage area is not destroyed.
  • the TEE receives a detection result sent by the TA indicating that the data of the secure storage area is not corrupted.
  • step 605 the TA sends information about the abnormal event to the TEE.
  • the related information of the abnormal event includes: a detection result indicating that the data of the secure storage area is destroyed, and information such as the type of the corrupted data.
  • the TEE receives information about the abnormal event sent by the TA, and performs the following step 606.
  • step 606 the TEE sends information about the abnormal event to the TZ Driver.
  • the TZ Driver receives information about an abnormal event sent by the TEE.
  • step 607 the TZ Driver sends information about the abnormal event to the target CA.
  • the TZ Driver can send information about abnormal events to the target CA through the orientation mode or broadcast mode described above.
  • the target CA receives information about the abnormal event sent by the TZ Driver.
  • step 608 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the target CA performs a protective process for data in the secure storage area, such as notifying the user that critical data is corrupted, or re-updating critical data content.
  • FIG. 7 is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • the TA implements certificate validity period monitoring.
  • the data exchange between the application and the server will use the certificate method.
  • the certificate generally has a validity period.
  • the TA can periodically query the validity period of the certificate stored in the TEE. If the validity period of the certificate expires, the corresponding CA triggers the process of reissuing the certificate.
  • the method can include the following steps:
  • step 701 the TEE sends a detection indication to the TA when the timer expires.
  • the TA receives a detection indication sent by the TEE.
  • step 702 the TA detects whether the validity period of the certificate expires. If yes, the following steps 705 and 706 are performed; if not, the following step 703 is performed.
  • step 703 the TA sends information indicating the restart timer to the TEE.
  • the TEE receives the information sent by the TA for indicating the restart timer, and performs the following step 704.
  • step 704 the TEE restarts the timer.
  • step 705 the TA deletes the certificate content.
  • step 706 the TA sends information to the TEE indicating that the certificate has expired.
  • the TEE receives information sent by the TA indicating that the certificate has expired, and performs the following step 707.
  • step 707 the TEE sends information about the abnormal event to the TZ Driver.
  • the related information of the abnormal event includes: information indicating that the certificate has expired, and information such as the identifier of the expired certificate.
  • the TZ Driver receives information about an abnormal event sent by the TEE.
  • step 708 the TZ Driver sends information about the abnormal event to the target CA.
  • the TZ Driver can send information about abnormal events to the target CA through the orientation mode or broadcast mode described above.
  • the target CA receives information about the abnormal event sent by the TZ Driver.
  • step 709 the target CA processes the abnormal event according to the related information of the abnormal event.
  • the target CA performs a process of requesting a reissue of a certificate from the server.
  • FIG. 8 is a flowchart of another method for reporting an event according to an embodiment of the present invention.
  • the TA implements communication service validity control.
  • the communication service may be a voice service, a roaming service, a data service, or the like.
  • the effectiveness of the communication service is controlled by the TA to have higher security than the REE side, and the TA can directly control the Modem to close related services.
  • an AT command can be generated to notify the Framework to broadcast through the RIL, prompting the user that the current communication service has lost validity, saving the user's communication fee or avoiding the increase of the communication fee caused by the illegal software.
  • the method can include the following steps:
  • step 801 the TEE sends a detection indication to the TA when the timer expires.
  • the TA receives a detection indication sent by the TEE.
  • step 802 the TA detects whether the communication service has lost validity. If yes, the following step 805 is performed; if not, the following step 803 is performed.
  • the detecting whether the communication service has lost the validity of the TA may be that the cumulative duration of the voice service has exceeded the first preset duration, or whether the accumulated duration of the roaming service has exceeded the second preset duration, or may be detected. Whether the accumulated traffic of the data service has exceeded the preset traffic, and so on.
  • step 803 the TA sends information indicating the restart timer to the TEE.
  • the TEE receives the information sent by the TA for indicating the restart timer, and performs the following step 804.
  • step 804 the TEE restarts the timer.
  • step 805 the TA sends information about the abnormal event to the Modem.
  • the related information of the abnormal event includes: a detection result indicating that the communication service has lost validity, and a service identification of the communication service that has lost validity.
  • the Modem receives information about an abnormal event sent by the TA.
  • step 806 the Modem closes the communication service that has lost its validity.
  • Step 807 The Modem converts the information about the abnormal event into an AT command, and sends an AT command to the RIL through the AT sending interface.
  • the RIL receives the AT command sent by the Modem.
  • Step 808 the RIL parses the AT command to obtain information about the abnormal event, and notifies the Framework to broadcast.
  • the step of the TA side can be separately implemented as the event reporting method on the TA side
  • the step on the CA side can be separately implemented as the event reporting method on the CA side.
  • FIG. 9 is a block diagram of an event reporting apparatus according to an embodiment of the present invention.
  • the device has an example of implementing the above method
  • the function of each step in the TA side, the function can be implemented by hardware, or can be implemented by hardware corresponding software.
  • the apparatus may include a receiving unit 910, a detecting unit 920, and a transmitting unit 930.
  • the receiving unit 910 is configured to receive a detection indication sent by the TEE, where the detection indication is sent by the TEE after detecting a preset event, where the preset event is set according to a requirement for detecting an abnormal event provided by the target object.
  • An event, the target object is a target client application CA or a communication processor CP.
  • the detecting unit 920 is configured to detect whether the abnormal event exists according to the detection indication.
  • the sending unit 930 is configured to send related information of the abnormal event to the target object when the abnormal event exists, so that the target object processes the abnormal event according to related information of the abnormal event.
  • the target object is the target CA;
  • the sending unit 930 is configured to send, to the TZ Driver, an application identifier of the target CA and related information of the abnormal event.
  • the TZ Driver is configured to send related information of the abnormal event to the target CA according to the application identifier of the target CA.
  • the target object is the target CA;
  • the sending unit 930 is configured to send related information of the abnormal event to the TZ Driver.
  • the TZ Driver is configured to send, by using a broadcast mode, related information of the abnormal event to multiple CAs including the target CA.
  • the target object is the target CA;
  • the sending unit 930 is configured to write related information of the abnormal event into the secure shared memory, and send a security interrupt to the CP.
  • the secure shared memory refers to a shared memory whose physical attribute is set to a secure open state in the MMU, and the security interrupt is used to trigger the CP to read from the secure shared memory while in a safe mode.
  • the related information of the abnormal event and transmitting, by using a broadcast manner, related information of the abnormal event to a plurality of CAs including the target CA.
  • the device provided by the embodiment actively sends the information about the abnormal event to the target object by detecting the abnormal event, and solves the problem that the abnormal event is not timely reported in the existing solution. Improve the timeliness of TA reporting abnormal events to CA or CP.
  • FIG. 10 is a block diagram of another event reporting apparatus according to an embodiment of the present invention.
  • the apparatus has a function of implementing various steps of the CA side in the above method example, and the function may be implemented by hardware or by executing corresponding software by hardware.
  • the apparatus may include a receiving unit 1010 and a processing unit 1020.
  • the receiving unit 1010 is configured to receive information about an abnormal event sent by the TA, where the related information of the abnormal event is actively received by the TA when receiving the detection indication sent by the TEE and detecting that the abnormal event exists according to the detection indication. Send to the CA.
  • the processing unit 1020 is configured to process the abnormal event according to related information of the abnormal event.
  • the receiving unit 1010 is configured to receive related information of the abnormal event from the TZ Driver.
  • the TZ Driver is configured to receive, by the TA, an application identifier of the CA and related information of the abnormal event, and send related information of the abnormal event to the CA according to the application identifier of the CA.
  • the receiving unit 1010 is configured to receive information related to the abnormal event that is sent by the TZ Driver in a broadcast manner.
  • the TZ Driver is configured to receive related information of the abnormal event from the TA, and send related information of the abnormal event to multiple CAs including the CA by using the broadcast manner.
  • the receiving unit 1010 is configured to receive related information of the abnormal event that is sent by the CP in a broadcast manner.
  • the CP is configured to read information about the abnormal event written by the TA from the secure shared memory after the CP is in the secure mode after receiving the security interrupt sent by the TA. ,and And transmitting, by using the broadcast mode, related information of the abnormal event to a plurality of CAs including the CA, where the secure shared memory refers to a shared memory whose physical attribute is set to a secure open state in the MMU.
  • the device provided in this embodiment actively sends the information about the abnormal event to the CA in the case that the abnormal event is detected by the TA, which solves the problem that the abnormal event is not reported in time in the existing solution, and improves the problem.
  • the TA reports the timeliness of the abnormal event to the CA.
  • An exemplary embodiment of the present invention also provides a terminal deployed with TEE and REE.
  • the TEE includes an event reporting device as provided by the embodiment shown in FIG. 9 or based on an alternative embodiment provided by the embodiment shown in FIG.
  • the REE includes an event reporting device as provided by the embodiment shown in FIG. 10 or based on an alternative embodiment provided by the embodiment shown in FIG.
  • the terminal includes corresponding hardware structures and/or software modules for performing various functions.
  • the embodiments of the present invention can be implemented in a combination of hardware or hardware and computer software in combination with the modules and algorithm steps of the examples described in the embodiments disclosed in the present invention. Whether a function is implemented in hardware or computer software to drive hardware depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the technical solutions of the embodiments of the present invention.
  • FIG. 11 is a block diagram of a terminal according to an embodiment of the present invention.
  • the terminal is used to implement the functions of the above method examples.
  • the terminal 1100 can include a processor 1101.
  • the processor 1101 is configured to implement various functions of the terminal 1100.
  • the processor 1101 is further configured to perform various steps in the foregoing method embodiments, or other steps of the technical solutions described in the present invention.
  • the terminal 1100 further includes a communication interface 1102.
  • Communication interface 1102 is used to support communication between terminal 1100 and other devices.
  • the terminal 1100 may further include a memory 1103 for storing program codes and data of the terminal 1100.
  • the terminal 1100 can also include a bus 1104.
  • the memory 1103 and the communication interface 1102 are connected to the processor 1101 via a bus 1104.
  • FIG. 11 only shows a simplified design of the terminal 1100.
  • the terminal 1100 can include any number of communication interfaces, processors, memories, etc., and all the devices that can implement the embodiments of the present invention are within the protection scope of the embodiments of the present invention.
  • a plurality as referred to herein means two or more.
  • "and / or” describes the association relationship of the associated object, indicating that there can be three relationships, for example, A and / or B, can mean: A exists separately, while saving In A and B, there are three cases of B alone.
  • the character "/" generally indicates that the contextual object is an "or" relationship.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Debugging And Monitoring (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种事件上报方法及装置,属于通信技术领域。所述方法包括:可信应用TA接收可信执行环境TEE发送的检测指示,检测指示由TEE在监测到预设事件后发送,预设事件是根据目标对象提供的检测异常事件的需求所设定的事件,目标对象为目标客户应用CA或通信处理器CP;TA根据检测指示检测是否存在异常事件;若存在异常事件,则TA将异常事件的相关信息发送给目标对象,以使得目标对象根据异常事件的相关信息处理异常事件。本发明通过TA在检测到存在异常事件的情况下,主动将异常事件的相关信息发送给目标对象,解决了现有方案中异常事件上报不及时的问题,提高了TA向CA或CP上报异常事件的及时性。

Description

事件上报方法及装置
本申请要求于2016年11月15日提交国家知识产权局、申请号为201611021781.8、发明名称为“事件上报方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,特别涉及一种事件上报方法及装置。
背景技术
随着移动网络和智能终端的高速发展以及消费电子产品智能化的普及,移动应用的种类和数量越来越多。当前的移动应用已经不仅限于对智能终端的基本功能、娱乐功能方面的扩展,它所涉及的领域逐渐扩大到各行各业,例如:移动支付相关的金融应用、内容版权保护应用以及云计算下瘦终端的安全应用等,这些行业应用都需要更高安全级别的终端运行环境。
然而,智能终端的操作系统本身的设计主要侧重于功能性方面要求,并非从安全性角度出发,同时加上整个系统的开放性、庞大性、复杂性而无法杜绝相应的系统漏洞,致使一些利用这些漏洞的恶意程序不断出现,从而造成应用程序处于危险之中。虽然可以利用一些软件防护手段,如防火墙、杀毒软件等进行相应的保护,但由于新型病毒程序的层出不穷以及经常性的系统更新升级,导致无法做到软件上的完全保护。
基于这些问题,业界进行了深入的研究工作,提出一种新型解决思路,即把同一硬件设备划为两种相互独立且硬件上隔离的执行环境:富执行环境(Rich Execution Environment,REE)和可信执行环境(Trusted Execution Environment,TEE)。富执行环境也称为普通执行环境。平台上的软硬件资源可以分别标识为两种执行环境状态,标识为安全执行状态的软硬件资源只能由可信执行环境所访问,而标识为普通执行状态的软硬件资源则可以为两种执行环境所访问。REE运行目前常用的移动操作系统如Android等,TEE运行一个功能简单、代码量小、封闭且可人为审核控制的安全操作系统。安全性要求较高的应用部署在安全操作系统中,并为部署在移动操作系统中的普通应用提供安全服务。当普通应用调用相应的安全应用执行时,硬件设备由REE切换到TEE执行,此时整个硬件设备处于可信状态,设备与外界的交互都得到控制,保证都是真实可信的行为。
TEE的软硬件执行环境和REE类似,通过芯片的特有技术(如ARM的Trustzone技术,或者Intel多CPU技术),实现TEE和REE的物理运行环境的隔离,从而保障在TEE中的应用程序的安全性。TEE使用的外设都需要具备安全属性,这样才可以避免TEE访问外设的时候造成的安全数据泄漏风险。
TEE中运行的应用称为可信应用(Trusted Application,TA),REE中运行的应用称为客户应用(Client Application,CA)。客户应用也称为普通应用。目前而言,TA主要实现的功能包括加解密、认证和数据存储等,其作用是作为CA的安全扩展功能。例如,TA存储密钥和证书用以完成数据的加解密和认证操作。又例如,TA存储诸如指纹数据、银行账户等 关键数据。随着TA的功能的增强,TA内部通常也会管理和校验安全数据的有效性,包括数据的正确性、完整性、时效性等。
在现有技术中,当TA检测到某些异常事件(例如TA存储的证书已过期)发生时,TA保存异常事件的相关数据,等待REE查询后再上报给相应的CA。在一个示例中,CA采用定时轮询方式查询是否存在异常事件。CA启动定时器,当定时器超时时向TA发送查询请求,如果TA之前检测到有异常事件发生,则将保存的异常事件的相关数据发送给CA。CA接收到异常事件的相关数据之后,处理该异常事件。上述现有技术提供的事件上报方式,TA并不能够及时地向CA上报异常事件。
发明内容
本发明实施例提供了一种事件上报方法及装置,用以解决现有方案中异常事件上报不及时的问题。
一方面,本发明实施例提供了一种事件上报方法,该方法包括:TA接收TEE发送的检测指示,该检测指示由TEE在监测到预设事件后发送,预设事件是根据目标对象提供的检测异常事件的需求所设定的事件,目标对象为目标CA或通信处理器(Communication Processor,CP);TA根据检测指示检测是否存在异常事件;若存在异常事件,则TA将异常事件的相关信息发送给目标对象;目标对象根据异常事件的相关信息处理异常事件。
本发明实施例提供的方案中,通过TA在检测到存在异常事件的情况下,主动将异常事件的相关信息发送给目标对象,解决了现有方案中异常事件上报不及时的问题,提高了TA向CA或者CP上报异常事件的及时性。
在一个可能的设计中,目标对象为目标CA,TA将异常事件的相关信息发送给目标对象,包括:TA向可信区域驱动(TZ Driver)发送目标CA的应用标识和异常事件的相关信息。TZ Driver用于根据目标CA的应用标识向目标CA发送异常事件的相关信息。相应地,目标CA从TZ Driver接收异常事件的相关信息。
通过上述方式,实现了TA通过TZ Driver向目标CA定向上报异常事件。
在另一个可能的设计中,目标对象为目标CA,TA将异常事件的相关信息发送给目标对象,包括:TA向TZ Driver发送异常事件的相关信息。TZ Driver用于采用广播方式向包括目标CA在内的多个CA发送异常事件的相关信息。相应地,目标CA接收由TZ Driver采用广播方式发送的异常事件的相关信息。
通过上述方式,实现了TA通过TZ Driver向目标CA广播上报异常事件,可以实现一个异常事件发送给多个目标CA的功能。另外,采用广播方式上报异常事件,可以避免异常事件在上报过程中被非法软件截取而导致目标CA无法接收到异常事件的情况发生,确保异常事件能够成功上报给目标CA。
在又一个可能的设计中,目标对象为目标CA,TA将异常事件的相关信息发送给目标对象,包括:TA将异常事件的相关信息写入安全共享内存,并向CP发送安全中断。安全共享内存是指物理属性在内存管理单元(Memory Management Unit,MMU)中被设置为安全打开状态的共享内存。安全中断用于触发CP在处于安全模式的情况下从安全共享内存中读取异常事件的相关信息,并采用广播方式向包括目标CA在内的多个CA发送异常事件的相关信息。相应地,CA接收由CP采用广播方式发送的异常事件的相关信息。
通过上述方式,实现了TA通过CP向目标CA广播上报异常事件,可以实现一个异常事件发送给多个目标CA的功能。另外,采用广播方式上报异常事件,可以避免异常事件在上报过程中被非法软件截取而导致目标CA无法接收到异常事件的情况发生,确保异常事件能够成功上报给目标CA。另外,TA通过将异常事件的相关信息安全地发送给CP,而不需要经过REE,避免非法程序或外部物理攻击造成数据在传输过程中被泄漏或破坏。TA和CP之间的数据可以明文传输,提高效率的同时也没有降低安全性。
在又一个可能的设计中,目标对象为CP,TA将异常事件的相关信息发送给目标对象,包括:TA将异常事件的相关信息写入安全共享内存,并向CP发送安全中断,该安全中断用于触发CP在处于安全模式的情况下从安全共享内存中读取异常事件的相关信息,并根据异常事件的相关信息处理该异常事件。
通过上述方式,实现了TA主动向CP上报异常事件,且能够确保将异常事件的相关信息安全地发送给CP。
另一方面,本发明实施例提供一种事件上报装置,该装置具有实现上述方法示例中TA侧行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
又一方面,本发明实施例提供一种事件上报装置,该装置具有实现上述方法示例中CA侧行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
再一方面,本发明实施例提供一种终端,该终端具有TEE和REE,终端的结构中包括处理器,所述处理器被配置为支持终端执行上述方法中相应的功能。可选地,终端的结构中还包括通信接口,所述通信接口用于支持终端与其他设备之间的通信。进一步的,终端还可以包括存储器,所述存储器用于与处理器耦合,其保存终端必要的程序指令和数据。
再一方面,本发明实施例提供一种计算机存储介质,用于储存为上述用于终端所用的计算机软件指令,其包含用于执行上述方面所设计的程序。
相较于现有技术,本发明实施例的方案中,通过TA在检测到存在异常事件的情况下,主动将异常事件的相关信息发送给目标对象,解决了现有方案中异常事件上报不及时的问题,提高了TA向CA或CP上报异常事件的及时性。
附图说明
图1是本发明实施例可能适用的一种终端的结构示意图;
图2是本发明实施例提供的一种事件上报方法的流程图;
图3A是本发明实施例提供的另一种事件上报方法的流程图;
图3B是本发明实施例提供的另一种事件上报方法的流程图;
图4A是本发明实施例提供的另一种事件上报方法的流程图;
图4B是本发明实施例提供的另一种事件上报方法的流程图;
图5A是本发明实施例提供的另一种事件上报方法的流程图;
图5B示例性示出了一种AP、CP和共享内存之间的连接关系的示意图;
图5C是本发明实施例提供的另一种事件上报方法的流程图;
图6是本发明实施例提供的另一种事件上报方法的流程图;
图7是本发明实施例提供的另一种事件上报方法的流程图;
图8是本发明实施例提供的另一种事件上报方法的流程图;
图9是本发明实施例提供的一种事件上报装置的框图;
图10是本发明实施例提供的另一种事件上报装置的框图;
图11是本发明实施例提供的一种终端的框图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
图1示出了本发明实施例可能适用的一种终端的结构示意图。如图1所示,该终端包括应用处理器(Application Processor,AP)。AP可以是中央处理器(Central Processing Unit,CPU),AP也可以包括CPU及CPU外围硬件。
在本发明实施例中,终端部署有TEE和REE。TA和CA均可在AP中运行。
如图1所示,终端还包括传声器、屏幕以及CP等外设,运行在AP上的TA或CA可以通过与外设之间的接口访问外设。需要说明的是,当TA访问外设时,会触发外设进入安全模式,在这种情况下,外设只能被TA所访问,而不能被CA所访问。
此外,终端还包括一些必要的TEE硬件和REE硬件等,图中未示出。
终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为终端。
在现有技术中,TA并不能够及时地向CA上报异常事件。有鉴于此,本发明实施例提供了一种事件上报方法,和基于这个方法的装置和终端。本发明实施例提供的技术方案,核心思想是TA在检测到异常事件时,主动向CA上报异常事件,以提高及时性。
下面将基于上面所述的本发明实施例涉及的共性方面,对本发明实施例进一步详细说明。
图2是本发明实施例提供的一种事件上报方法的流程图,该方法可以包括如下几个步骤。
步骤201,TA接收TEE发送的检测指示。
检测指示由TEE在监测到预设事件后发送。预设事件是根据目标对象提供的检测异常事件的需求所设定的事件。例如,预设事件可以是硬件或者软件发送的中断,也可以是定时器超时。目标对象可以是目标CA或CP。在本实施例中,主要以目标对象为目标CA为例进行说明。检测指示用于指示TA检测是否存在异常事件。可选地,检测指示中携带有所需检测的异常事件的相关信息,以便TA据此确定所需检测的异常事件。
另外,当TEE中存在多个不同的TA且该多个不同的TA分别用于检测不同的异常事件时,TEE根据监测到的预设事件的类型,向该预设事件的类型对应的TA发送检测指示。其中,预设事件的类型和TA之间的对应关系可预先在TEE中配置。
步骤202,TA根据检测指示检测是否存在异常事件。
TA接收到TEE发送的检测指示之后,根据该检测指示检测是否存在异常事件。例如, TA根据检测指示中携带有所需检测的异常事件的相关信息,确定所需检测的异常事件,而后检测是否存在该异常事件。
异常事件是指与正常工作状态不相符的事件。在本发明实施例中,对异常事件的类型不作限定,例如异常事件可以是安全存储区域的数据被非法修改、安全存储区域的数据出错、证书已过期,等等。
步骤203,若存在异常事件,则TA将异常事件的相关信息发送给目标CA。
相应地,目标CA接收TA发送的异常事件的相关信息。
在本发明实施例中,当TA检测到存在异常事件时,TA主动将异常事件的相关信息发送给目标CA,从而提高了事件上报的及时性。目标CA是与异常事件相关的CA,也即上述提供检测异常事件的需求并用于处理该异常事件的CA。目标CA可以是一个CA,也可以是多个CA。可选地,异常事件的相关信息包括异常事件的类型或者其它用于描述异常事件的信息。
另外,当TA检测到不存在异常事件时,TA向TEE发送用于指示不存在异常事件的检测结果。
步骤204,目标CA根据异常事件的相关信息处理异常事件。
目标CA接收到TA发送的异常事件的相关信息之后,据此处理异常事件。针对不同类型的异常事件,目标CA所采取的处理方式也有所不同,有关内容可参见下文示例性实施例。
可选地,当目标对象为CP时,若存在异常事件,则TA将异常事件的相关信息发送给CP。相应地,CP接收TA发送的异常事件的相关信息,根据异常事件的相关信息处理该异常事件。CP对异常事件所做的处理是与通信功能相关的处理,例如关闭通信业务。
综上所述,本实施例提供的方法,通过TA在检测到存在异常事件的情况下,主动将异常事件的相关信息发送给目标对象,解决了现有方案中异常事件上报不及时的问题,提高了TA向CA或CP上报异常事件的及时性。
在本发明实施例中,提供了TA向CA主动上报异常事件的3种不同实现方式。在下面图3A所示实施例中,介绍TA通过TZ Driver向目标CA定向上报异常事件。在下面图4A所示实施例中,介绍TA通过TZ Driver向目标CA广播上报异常事件。在下面图5A所示实施例中,介绍TA通过CP向目标CA广播上报异常事件。
图3A是本发明实施例提供的另一种事件上报方法的流程图。图3A所示的方法中,与图2所示方法相同或类似的内容可以参考图2中的详细描述,此处不作赘述。该方法可以包括如下几个步骤。
步骤301,TEE在监测到预设事件后,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤302,TA根据检测指示检测是否存在异常事件。
步骤303,若存在异常事件,则TA向TZ Driver发送目标CA的应用标识和异常事件的相关信息。
相应地,TZ Driver接收TA发送的目标CA的应用标识和异常事件的相关信息。
TZ Driver用于实现REE和TEE之间的数据通信功能,因此TA可通过TZ Driver向目 标CA上报异常事件。在本实施例中,TA向TZ Driver发送目标CA的应用标识和异常事件的相关信息。目标CA是与异常事件相关的CA。目标CA的应用标识用于唯一标识目标CA。
步骤304,TZ Driver根据目标CA的应用标识向目标CA发送异常事件的相关信息。
相应地,目标CA从TZ Driver接收异常事件的相关信息。
步骤305,目标CA根据异常事件的相关信息处理异常事件。
在一个示例中,如图3B所示,通过回调方式向目标CA发送异常事件的相关信息,相应的步骤流程如下:
步骤31,目标CA调用注册接口,向TZ Driver发送注册请求。
相应地,TZ Driver接收目标CA发送的注册请求。
注册请求用于请求注册回调函数。注册请求中携带有目标CA的应用标识。可选地,注册请求中还携带异常事件的类型。
步骤32,TZ Driver根据目标CA的应用标识注册回调函数。
可选地,当注册请求中还携带有异常事件的类型时,TZ Driver记录异常事件的类型与回调函数之间的处理关系。
步骤33,TEE在监测到预设事件后,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤34,TA根据检测指示检测是否存在异常事件。
步骤35,若存在异常事件,则TA向TZ Driver发送目标CA的应用标识和异常事件的相关信息。
相应地,TZ Driver接收TA发送的目标CA的应用标识和异常事件的相关信息。
步骤36,TZ Driver根据目标CA的应用标识,查询对应的回调函数。
步骤37,TZ Driver调用查询到的回调函数,通过该回调函数向目标CA发送异常事件的相关信息。
相应地,目标CA从TZ Driver接收异常事件的相关信息。
步骤38,目标CA根据异常事件的相关信息处理异常事件。
综上所述,本实施例提供的方法,实现了TA通过TZ Driver向目标CA定向上报异常事件。
图4A是本发明实施例提供的另一种事件上报方法的流程图。图4A所示的方法中,与图2所示方法相同或类似的内容可以参考图2中的详细描述,此处不作赘述。该方法可以包括如下几个步骤。
步骤401,TEE在监测到预设事件后,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤402,TA根据检测指示检测是否存在异常事件。
步骤403,若存在异常事件,则TA向TZ Driver发送异常事件的相关信息。
相应地,TZ Driver接收TA发送的异常事件的相关信息。
在本实施例中,由于通过TZ Driver向目标CA广播上报异常事件,因此TA仅需将异常事件的相关信息发送给TZ Driver即可,而无需将目标CA的应用标识发送给TZ Driver。
步骤404,TZ Driver采用广播方式向包括目标CA在内的多个CA发送异常事件的相关 信息。
相应地,目标CA接收由TZ Driver采用广播方式发送的异常事件的相关信息。
目标CA是与异常事件相关的CA。在本实施例中,由于采用广播上报方式,因此可以实现一个异常事件发送给多个目标CA的功能。
步骤405,目标CA根据异常事件的相关信息处理异常事件。
在一个示例中,如图4B所示,由TZ Driver通过广播方式向包括目标CA在内的多个CA发送异常事件的相关信息,相应的步骤流程如下:
步骤41,TEE在监测到预设事件后,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤42,TA根据检测指示检测是否存在异常事件。
步骤43,若存在异常事件,则TA向TZ Driver发送异常事件的相关信息。
相应地,TZ Driver接收TA发送的异常事件的相关信息。
步骤44,TZ Driver将异常事件的相关信息转换为AT(Attention)命令。
步骤45,TZ Driver通过AT发送接口将AT命令发送给无线接口层(Radio Interface Layer,RIL)。
相应地,RIL接收TZ Driver发送的AT命令。
步骤46,RIL解析AT命令得到异常事件的相关信息。
步骤47,RIL将异常事件的相关信息发送给REE中运行的操作系统框架(Framework)。
相应地,Framework接收RIL发送的异常事件的相关信息。
步骤48,Framework向包括目标CA在内的多个CA广播异常事件的相关信息。
相应地,目标CA接收由Framework采用广播方式发送的异常事件的相关信息。
步骤49,目标CA根据异常事件的相关信息处理异常事件。
综上所述,本实施例提供的方法,实现了TA通过TZ Driver向目标CA广播上报异常事件,可以实现一个异常事件发送给多个目标CA的功能。另外,采用广播方式上报异常事件,可以避免异常事件在上报过程中被非法软件截取而导致目标CA无法接收到异常事件的情况发生,确保异常事件能够成功上报给目标CA。
图5A是本发明实施例提供的另一种事件上报方法的流程图。图5A所示的方法中,与图2所示方法相同或类似的内容可以参考图2中的详细描述,此处不作赘述。该方法可以包括如下几个步骤。
步骤501,TEE在监测到预设事件后,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤502,TA根据检测指示检测是否存在异常事件。
步骤503,若存在异常事件,则TA将异常事件的相关信息写入安全共享内存。
安全共享内存是指物理属性在MMU中被设置为安全打开状态的共享内存。当共享内存的物理属性为安全打开状态时,只有在TA驱动下的AP或处于安全模式的CP才可以通过总线(Bus)对该共享内存进行访问。也就是说,只有AP运行的TEE和TA能够访问该共享内存,AP运行的REE和CA是不能访问该共享内存的。这样,AP运行的REE和CA就没有办法访问该共享内存的数据,也就保证了内存数据对REE和CA的安全隔离。当共 享内存的物理属性为非安全打开状态(即普通状态)时,AP运行的REE和CA也可以访问该共享内存。
示例性地,如图5B所示,其示出了一种AP、CP和共享内存之间的连接关系的示意图。其中,MMU、AP和CP之间通过总线两两连接,共享内存通过MMU与总线连接。处于安全模式的CP和在TA驱动下的AP均可以访问物理属性为安全打开状态的共享内存。具体地,可以在MMU中设置共享内存的物理属性为安全打开状态。
可选地,CP为通信调制解调器(Modem)、蓝牙处理器、无线保真(Wireless Fidelity,Wi-Fi)处理器或语音处理器。通信调制解调器可以是2G、3G、4G或下一代通信系统的无线通信调制解调器,语音处理器可以为包括可实现语音功能的编解码器(Codec)或语音压缩等功能的高保真(High Fidelity,Hi-Fi)处理器。可以理解的是,CP和AP也可以集成在一个处理器内。本文中的CP和AP可以分别是一个独立的处理器,也可以是一个处理器内的部分功能电路。
步骤504,TA向CP发送安全中断。
相应地,CP接收TA发送的安全中断。
TA将异常事件的相关信息写入安全共享内存之后,还需要通过中断触发CP处理。该中断为安全中断,也即该中断会触发CP进入安全模式,然后由安全模式的中断处理程序接管后完成后续的数据处理流程。安全中断用于触发CP在处于安全模式的情况下从安全共享内存中读取异常事件的相关信息,并采用广播方式向包括目标CA在内的多个CA发送异常事件的相关信息。
TA可以通过AP与CP之间的进程间通信(Inter-Process Communication,IPC)机制向CP发送安全中断。
步骤505,CP在处于安全模式的情况下从安全共享内存中读取异常事件的相关信息。
CP在接收到TA发送的安全中断之后,如果CP的工作模式已经处于安全模式,则CP直接从安全共享内存中读取异常事件的相关信息,CP的工作模式不会切换;如果CP的工作模式处于非安全模式,则CP从非安全模式切换至安全模式,然后从安全共享内存中读取异常事件的相关信息。
可选地,上述步骤505之后还包括如下步骤506:
步骤506,CP根据异常事件的相关信息处理该异常事件。
CP对异常事件所做的处理与目标CA对异常事件所做的处理有所不同,CP对异常事件所做的处理是与通信功能相关的处理,例如关闭通信业务。在实际应用中,可根据异常事件的具体类型,设定CP对异常事件所做的处理以及目标CA对异常事件所做的处理。CP在处理完成之后执行下述步骤507。
步骤507,CP采用广播方式向包括目标CA在内的多个CA发送异常事件的相关信息。
相应地,目标CA接收由CP采用广播方式发送的异常事件的相关信息。
目标CA是与异常事件相关的CA。在本实施例中,由于采用广播上报方式,因此可以实现一个异常事件发送给多个目标CA的功能。
步骤508,目标CA根据异常事件的相关信息处理异常事件。
在一个示例中,如图5C所示,由CP通过广播方式向包括目标CA在内的多个CA发送异常事件的相关信息,相应的步骤流程如下:
步骤51,TEE在监测到预设事件后,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤52,TA根据检测指示检测是否存在异常事件。
步骤53,若存在异常事件,则TA将异常事件的相关信息写入安全共享内存。
步骤54,TA向CP发送安全中断。
相应地,CP接收TA发送的安全中断。
步骤55,CP在处于安全模式的情况下从安全共享内存中读取异常事件的相关信息。
步骤56,CP根据异常事件的相关信息处理该异常事件。
步骤57,CP将异常事件的相关信息转换为AT命令。
步骤58,CP通过AT发送接口将AT命令发送给RIL。
相应地,RIL接收CP发送的AT命令。
步骤59,RIL解析AT命令得到异常事件的相关信息。
步骤60,RIL将异常事件的相关信息发送给REE中运行的Framework。
相应地,Framework接收RIL发送的异常事件的相关信息。
步骤61,Framework向包括目标CA在内的多个CA广播异常事件的相关信息。
相应地,目标CA接收由Framework采用广播方式发送的异常事件的相关信息。
步骤62,目标CA根据异常事件的相关信息处理异常事件。
综上所述,本实施例提供的方法,实现了TA通过CP向目标CA广播上报异常事件,可以实现一个异常事件发送给多个目标CA的功能。另外,采用广播方式上报异常事件,可以避免异常事件在上报过程中被非法软件截取而导致目标CA无法接收到异常事件的情况发生,确保异常事件能够成功上报给目标CA。
另外,TA通过将异常事件的相关信息安全地发送给CP,而不需要经过REE,避免非法程序或外部物理攻击造成数据在传输过程中被泄漏或破坏。TA和CP之间的数据可以明文传输,提高效率的同时也没有降低安全性。
需要补充说明的是,当目标对象为CP时,TA可采用如下方式将异常事件的相关信息发送给CP。TA将异常事件的相关信息写入安全共享内存,并向CP发送安全中断,该安全中断用于触发CP在处于安全模式的情况下从安全共享内存中读取异常事件的相关信息,并根据异常事件的相关信息处理该异常事件。
通过上述方式,实现了TA主动向CP上报异常事件,且能够确保将异常事件的相关信息安全地发送给CP。
下面,通过几个具体的例子对本发明实施例提供的技术方案进行介绍说明。
图6是本发明实施例提供的另一种事件上报方法的流程图。在图6所示实施例中,TA实现数据安全存储监测。该方法可以包括如下几个步骤:
步骤601,TEE监测到安全存储区域被访问。
步骤602,TEE向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤603,TA对安全存储区域的数据进行检查,检测数据是否被破坏。若是,则执行 下述步骤605;若否,则执行下述步骤604。
例如,TA检查安全存储区域的数据是否被非法修改或者数据内容是否出错等。
步骤604,TA向TEE发送用于指示安全存储区域的数据未被破坏的检测结果。
相应地,TEE接收TA发送的用于指示安全存储区域的数据未被破坏的检测结果。
步骤605,TA向TEE发送异常事件的相关信息。
例如,异常事件的相关信息包括:用于指示安全存储区域的数据被破坏的检测结果,以及被破坏的数据类型等信息。
相应地,TEE接收TA发送的异常事件的相关信息,并执行下述步骤606。
步骤606,TEE向TZ Driver发送异常事件的相关信息。
相应地,TZ Driver接收TEE发送的异常事件的相关信息。
步骤607,TZ Driver向目标CA发送异常事件的相关信息。
TZ Driver可以通过上文介绍的定向方式或者广播方式向目标CA发送异常事件的相关信息。
相应地,目标CA接收TZ Driver发送的异常事件的相关信息。
步骤608,目标CA根据异常事件的相关信息处理异常事件。
例如,目标CA执行对安全存储区域的数据的保护性流程,比如通知用户关键数据被破坏,或者重新更新关键数据内容等。
图7是本发明实施例提供的另一种事件上报方法的流程图。在图7所示实施例中,TA实现证书有效期监测。应用和服务器之间的数据交互会使用证书方式,证书一般都有有效期,证书的有效期过期需要服务器重新签发证书,使用过期的证书进行交互会存在安全风险和隐患。通过本实施例提供的方法,TA可以定时查询存储在TEE中的证书的有效期,如果证书的有效期过期,主动通知相应的CA触发重新颁发证书的流程。该方法可以包括如下几个步骤:
步骤701,TEE在监测到定时器超时时,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤702,TA检测证书的有效期是否过期。若是,则执行下述步骤705和706;若否,则执行下述步骤703。
步骤703,TA向TEE发送用于指示重启定时器的信息。
相应地,TEE接收TA发送的用于指示重启定时器的信息,并执行下述步骤704。
步骤704,TEE重启定时器。
步骤705,TA删除证书内容。
步骤706,TA向TEE发送用于指示证书已过期的信息。
相应地,TEE接收TA发送的用于指示证书已过期的信息,并执行下述步骤707。
步骤707,TEE向TZ Driver发送异常事件的相关信息。
例如,异常事件的相关信息包括:用于指示证书已过期的信息,以及已过期的证书的标识等信息。
相应地,TZ Driver接收TEE发送的异常事件的相关信息。
步骤708,TZ Driver向目标CA发送异常事件的相关信息。
TZ Driver可以通过上文介绍的定向方式或者广播方式向目标CA发送异常事件的相关信息。
相应地,目标CA接收TZ Driver发送的异常事件的相关信息。
步骤709,目标CA根据异常事件的相关信息处理异常事件。
例如,目标CA执行向服务器请求重新签发证书的流程。
图8是本发明实施例提供的另一种事件上报方法的流程图。在图8所示实施例中,TA实现通信业务有效性控制。通信业务可以是语音业务、漫游业务、数据业务等。通信业务的有效性控制在TA比REE侧具备更高的安全性,并且TA可以直接控制Modem关闭相关业务。Modem关闭业务之后可以产生一个AT命令,通过RIL通知给Framework进行广播,提示用户当前通信业务已失去有效性,节省用户的通信资费或者避免非法软件造成通信资费的上升。该方法可以包括如下几个步骤:
步骤801,TEE在监测到定时器超时时,向TA发送检测指示。
相应地,TA接收TEE发送的检测指示。
步骤802,TA检测通信业务是否已失去有效性。若是,则执行下述步骤805;若否,则执行下述步骤803。
其中,TA检测通信业务是否已失去有效性可以是检测语音业务的累计时长是否已超过第一预设时长,也可以是检测漫游业务的累计时长是否已超过第二预设时长,还可以是检测数据业务的累计流量是否已超过预设流量,等等。
步骤803,TA向TEE发送用于指示重启定时器的信息。
相应地,TEE接收TA发送的用于指示重启定时器的信息,并执行下述步骤804。
步骤804,TEE重启定时器。
步骤805,TA向Modem发送异常事件的相关信息。
例如,异常事件的相关信息包括:用于指示通信业务已失去有效性的检测结果,以及已失去有效性的通信业务的业务标识。
相应地,Modem接收TA发送的异常事件的相关信息。
步骤806,Modem关闭已失去有效性的通信业务。
步骤807,Modem将异常事件的相关信息转换为AT命令,并通过AT发送接口向RIL发送AT命令。
相应地,RIL接收Modem发送的AT命令。
步骤808,RIL解析AT命令得到异常事件的相关信息,并且通知Framework进行广播。
在上述各个方法实施例中,从多侧交互的角度对本发明技术方案进行了介绍说明。有关TA侧的步骤可以单独实现成为TA侧的事件上报方法,有关CA侧的步骤可以单独实现成为CA侧的事件上报方法。
下述为本发明装置实施例,可以用于执行本发明方法实施例。对于本发明装置实施例中未披露的细节,请参照本发明方法实施例。
图9是本发明实施例提供的一种事件上报装置的框图。该装置具有实现上述方法示例 中TA侧的各个步骤的功能,所述功能可以通过硬件实现,也可通过硬件执行相应的软件实现。该装置可以包括:接收单元910、检测单元920和发送单元930。
接收单元910,用于接收TEE发送的检测指示,所述检测指示由所述TEE在监测到预设事件后发送,所述预设事件是根据目标对象提供的检测异常事件的需求所设定的事件,所述目标对象为目标客户应用CA或通信处理器CP。
检测单元920,用于根据所述检测指示检测是否存在所述异常事件。
发送单元930,用于当存在所述异常事件时,将所述异常事件的相关信息发送给所述目标对象,以使得所述目标对象根据所述异常事件的相关信息处理所述异常事件。
在一个示例中,所述目标对象为所述目标CA;所述发送单元930,用于向TZ Driver发送所述目标CA的应用标识和所述异常事件的相关信息。其中,所述TZ Driver用于根据所述目标CA的应用标识向所述目标CA发送所述异常事件的相关信息。
在另一示例中,所述目标对象为所述目标CA;所述发送单元930,用于向TZ Driver发送所述异常事件的相关信息。其中,所述TZ Driver用于采用广播方式向包括所述目标CA在内的多个CA发送所述异常事件的相关信息。
在又一示例中,所述目标对象为所述目标CA;所述发送单元930,用于将所述异常事件的相关信息写入安全共享内存,并向CP发送安全中断。其中,所述安全共享内存是指物理属性在MMU中被设置为安全打开状态的共享内存,所述安全中断用于触发所述CP在处于安全模式的情况下从所述安全共享内存中读取所述异常事件的相关信息,并采用广播方式向包括所述目标CA在内的多个CA发送所述异常事件的相关信息。
综上所述,本实施例提供的装置,通过TA在检测到存在异常事件的情况下,主动将异常事件的相关信息发送给目标对象,解决了现有方案中异常事件上报不及时的问题,提高了TA向CA或CP上报异常事件的及时性。
图10是本发明实施例提供的另一种事件上报装置的框图。该装置具有实现上述方法示例中CA侧的各个步骤的功能,所述功能可以通过硬件实现,也可通过硬件执行相应的软件实现。该装置可以包括:接收单元1010和处理单元1020。
接收单元1010,用于接收TA发送的异常事件的相关信息,所述异常事件的相关信息由所述TA在接收到TEE发送的检测指示并根据所述检测指示检测到存在所述异常事件时主动向CA发送。
处理单元1020,用于根据所述异常事件的相关信息处理所述异常事件。
在一个示例中,所述接收单元1010,用于从TZ Driver接收所述异常事件的相关信息。其中,所述TZ Driver用于从所述TA接收所述CA的应用标识和所述异常事件的相关信息,并根据所述CA的应用标识向所述CA发送所述异常事件的相关信息。
在另一示例中,所述接收单元1010,用于接收由TZ Driver采用广播方式发送的所述异常事件的相关信息。其中,所述TZ Driver用于从所述TA接收所述异常事件的相关信息,并采用所述广播方式向包括所述CA在内的多个CA发送所述异常事件的相关信息。
在又一示例中,所述接收单元1010,用于接收由CP采用广播方式发送的所述异常事件的相关信息。其中,所述CP用于在接收到所述TA发送的安全中断之后,在所述CP处于安全模式的情况下从安全共享内存中读取由所述TA写入的所述异常事件的相关信息,并 采用所述广播方式向包括所述CA在内的多个CA发送所述异常事件的相关信息,所述安全共享内存是指物理属性在MMU中被设置为安全打开状态的共享内存。
综上所述,本实施例提供的装置,通过TA在检测到存在异常事件的情况下,主动将异常事件的相关信息发送给CA,解决了现有方案中异常事件上报不及时的问题,提高了TA向CA上报异常事件的及时性。
本发明一示例性实施例还提供了一种终端,该终端部署有TEE和REE。TEE包括如图9所示实施例或者基于图9所示实施例提供的可选实施例所提供的事件上报装置。REE包括如图10所示实施例或者基于图10所示实施例提供的可选实施例所提供的事件上报装置。
需要说明的是:上述实施例提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
上述主要从终端的角度对本发明实施例提供的方案进行了介绍。可以理解的是,终端为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。结合本发明中所公开的实施例描述的各示例的模块及算法步骤,本发明实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同的方法来实现所描述的功能,但是这种实现不应认为超出本发明实施例的技术方案的范围。
图11是本发明实施例提供的一种终端的框图。该终端用于实现上述方法示例的功能。终端1100可以包括:处理器1101。
处理器1101用于实现终端1100的各项功能。所述处理器1101还用于执行上述方法实施例中的各个步骤,或者本发明所描述的技术方案的其它步骤。
可选地,终端1100还包括通信接口1102。通信接口1102用于支持终端1100与其他设备之间的通信。
进一步地,终端1100还可以包括存储器1103,存储器1103用于存储终端1100的程序代码和数据。
此外,终端1100还可以包括总线1104。所述存储器1103和所述通信接口1102通过总线1104与所述处理器1101相连。
可以理解的是,图11仅仅示出了终端1100的简化设计。在实际应用中,终端1100可以包含任意数量的通信接口,处理器,存储器等,而所有可以实现本发明实施例的设备都在本发明实施例的保护范围之内。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存 在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (18)

  1. 一种事件上报方法,其特征在于,所述方法包括:
    可信应用TA接收可信执行环境TEE发送的检测指示,所述检测指示由所述TEE在监测到预设事件后发送,所述预设事件是根据目标对象提供的检测异常事件的需求所设定的事件,所述目标对象为目标客户应用CA或通信处理器CP;
    所述TA根据所述检测指示检测是否存在所述异常事件;
    若存在所述异常事件,则所述TA将所述异常事件的相关信息发送给所述目标对象,以使得所述目标对象根据所述异常事件的相关信息处理所述异常事件。
  2. 根据权利要求1所述的方法,其特征在于,所述目标对象为所述目标CA,所述TA将所述异常事件的相关信息发送给所述目标对象,包括:
    所述TA向可信区域驱动TZ Driver发送所述目标CA的应用标识和所述异常事件的相关信息;
    其中,所述TZ Driver用于根据所述目标CA的应用标识向所述目标CA发送所述异常事件的相关信息。
  3. 根据权利要求1所述的方法,其特征在于,所述目标对象为所述目标CA,所述TA将所述异常事件的相关信息发送给所述目标对象,包括:
    所述TA向TZ Driver发送所述异常事件的相关信息;
    其中,所述TZ Driver用于采用广播方式向包括所述目标CA在内的多个CA发送所述异常事件的相关信息。
  4. 根据权利要求1所述的方法,其特征在于,所述目标对象为所述目标CA,所述TA将所述异常事件的相关信息发送给所述目标对象,包括:
    所述TA将所述异常事件的相关信息写入安全共享内存,并向CP发送安全中断;
    其中,所述安全共享内存是指物理属性在内存管理单元MMU中被设置为安全打开状态的共享内存,所述安全中断用于触发所述CP在处于安全模式的情况下从所述安全共享内存中读取所述异常事件的相关信息,并采用广播方式向包括所述目标CA在内的多个CA发送所述异常事件的相关信息。
  5. 一种事件上报方法,其特征在于,所述方法包括:
    客户应用CA接收可信应用TA发送的异常事件的相关信息,所述异常事件的相关信息由所述TA在接收到可信执行环境TEE发送的检测指示并根据所述检测指示检测到存在所述异常事件时主动向所述CA发送;
    所述CA根据所述异常事件的相关信息处理所述异常事件。
  6. 根据权利要求5所述的方法,其特征在于,所述CA接收可信应用TA发送的异常事件的相关信息,包括:
    所述CA从可信区域驱动TZ Driver接收所述异常事件的相关信息;
    其中,所述TZ Driver用于从所述TA接收所述CA的应用标识和所述异常事件的相关信息,并根据所述CA的应用标识向所述CA发送所述异常事件的相关信息。
  7. 根据权利要求5所述的方法,其特征在于,所述CA接收可信应用TA发送的异常事件的相关信息,包括:
    所述CA接收由TZ Driver采用广播方式发送的所述异常事件的相关信息;
    其中,所述TZ Driver用于从所述TA接收所述异常事件的相关信息,并采用所述广播方式向包括所述CA在内的多个CA发送所述异常事件的相关信息。
  8. 根据权利要求5所述的方法,其特征在于,所述CA接收可信应用TA发送的异常事件的相关信息,包括:
    所述CA接收由通信处理器CP采用广播方式发送的所述异常事件的相关信息;
    其中,所述CP用于在接收到所述TA发送的安全中断之后,在所述CP处于安全模式的情况下从安全共享内存中读取由所述TA写入的所述异常事件的相关信息,并采用所述广播方式向包括所述CA在内的多个CA发送所述异常事件的相关信息,所述安全共享内存是指物理属性在内存管理单元MMU中被设置为安全打开状态的共享内存。
  9. 一种事件上报装置,其特征在于,所述装置包括:
    接收单元,用于接收可信执行环境TEE发送的检测指示,所述检测指示由所述TEE在监测到预设事件后发送,所述预设事件是根据目标对象提供的检测异常事件的需求所设定的事件,所述目标对象为目标客户应用CA或通信处理器CP;
    检测单元,用于根据所述检测指示检测是否存在所述异常事件;
    发送单元,用于当存在所述异常事件时,将所述异常事件的相关信息发送给所述目标对象,以使得所述目标对象根据所述异常事件的相关信息处理所述异常事件。
  10. 根据权利要求9所述的装置,其特征在于,所述目标对象为所述目标CA;
    所述发送单元,用于向可信区域驱动TZ Driver发送所述目标CA的应用标识和所述异常事件的相关信息;
    其中,所述TZ Driver用于根据所述目标CA的应用标识向所述目标CA发送所述异常事件的相关信息。
  11. 根据权利要求9所述的装置,其特征在于,所述目标对象为所述目标CA;
    所述发送单元,用于向TZ Driver发送所述异常事件的相关信息;
    其中,所述TZ Driver用于采用广播方式向包括所述目标CA在内的多个CA发送所述异常事件的相关信息。
  12. 根据权利要求9所述的装置,其特征在于,所述目标对象为所述目标CA;
    所述发送单元,用于将所述异常事件的相关信息写入安全共享内存,并向通信处理器 CP发送安全中断;
    其中,所述安全共享内存是指物理属性在内存管理单元MMU中被设置为安全打开状态的共享内存,所述安全中断用于触发所述CP在处于安全模式的情况下从所述安全共享内存中读取所述异常事件的相关信息,并采用广播方式向包括所述目标CA在内的多个CA发送所述异常事件的相关信息。
  13. 一种事件上报装置,其特征在于,所述装置包括:
    接收单元,用于接收可信应用TA发送的异常事件的相关信息,所述异常事件的相关信息由所述TA在接收到可信执行环境TEE发送的检测指示并根据所述检测指示检测到存在所述异常事件时主动向客户应用CA发送;
    处理单元,用于根据所述异常事件的相关信息处理所述异常事件。
  14. 根据权利要求13所述的装置,其特征在于,
    所述接收单元,用于从可信区域驱动TZ Driver接收所述异常事件的相关信息;
    其中,所述TZ Driver用于从所述TA接收所述CA的应用标识和所述异常事件的相关信息,并根据所述CA的应用标识向所述CA发送所述异常事件的相关信息。
  15. 根据权利要求13所述的装置,其特征在于,
    所述接收单元,用于接收由TZ Driver采用广播方式发送的所述异常事件的相关信息;
    其中,所述TZ Driver用于从所述TA接收所述异常事件的相关信息,并采用所述广播方式向包括所述CA在内的多个CA发送所述异常事件的相关信息。
  16. 根据权利要求13所述的装置,其特征在于,
    所述接收单元,用于接收由通信处理器CP采用广播方式发送的所述异常事件的相关信息;
    其中,所述CP用于在接收到所述TA发送的安全中断之后,在所述CP处于安全模式的情况下从安全共享内存中读取由所述TA写入的所述异常事件的相关信息,并采用所述广播方式向包括所述CA在内的多个CA发送所述异常事件的相关信息,所述安全共享内存是指物理属性在内存管理单元MMU中被设置为安全打开状态的共享内存。
  17. 一种计算机可读存储介质,包括指令,其特征在于,当其在计算机上运行时,使得计算机执行如权利要求1-4任意一项所述的方法。
  18. 一种计算机可读存储介质,包括指令,其特征在于,当其在计算机上运行时,使得计算机执行如权利要求5-8任意一项所述的方法。
PCT/CN2017/111151 2016-11-15 2017-11-15 事件上报方法及装置 WO2018090934A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611021781.8 2016-11-15
CN201611021781.8A CN106603498B (zh) 2016-11-15 2016-11-15 事件上报方法及装置

Publications (1)

Publication Number Publication Date
WO2018090934A1 true WO2018090934A1 (zh) 2018-05-24

Family

ID=58592371

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/111151 WO2018090934A1 (zh) 2016-11-15 2017-11-15 事件上报方法及装置

Country Status (2)

Country Link
CN (1) CN106603498B (zh)
WO (1) WO2018090934A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124726A (zh) * 2019-12-09 2020-05-08 上海移远通信技术股份有限公司 打开modem端口异常检测方法及装置
US11816205B2 (en) 2020-11-30 2023-11-14 Red Hat, Inc. Detecting and handling attacks on processes executing within a trusted execution environment

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603498B (zh) * 2016-11-15 2020-01-10 华为技术有限公司 事件上报方法及装置
US11693970B2 (en) * 2019-01-04 2023-07-04 Baidu Usa Llc Method and system for managing memory of data processing accelerators
EP3794477B1 (en) * 2019-01-04 2023-05-10 Baidu.com Times Technology (Beijing) Co., Ltd. Method and system for validating kernel objects to be executed by a data processing accelerator of a host system
CN113411759B (zh) * 2020-02-29 2023-03-31 华为技术有限公司 语音通话转移方法及电子设备

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016105651A1 (en) * 2014-12-24 2016-06-30 Intel Corporation System and method for providing global platform compliant trusted execution environment
CN105978917A (zh) * 2016-07-19 2016-09-28 恒宝股份有限公司 一种用于可信应用安全认证的系统和方法
CN106603498A (zh) * 2016-11-15 2017-04-26 华为技术有限公司 事件上报方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008096891A1 (ja) * 2007-02-09 2008-08-14 Ntt Docomo, Inc. 端末装置及びソフトウエア検査方法
CN102902599B (zh) * 2012-09-17 2016-08-24 华为技术有限公司 虚拟机内部故障处理方法、装置及系统
CN103746855B (zh) * 2014-01-27 2017-09-12 华为技术有限公司 电信云中异常事件的处理方法及装置
DE102015000656A1 (de) * 2015-01-20 2016-07-21 Giesecke & Devrient Gmbh Laufzeitumgebung für mobiles Endgerät, die ein Bereitstellen eines Sicherheits-Dienstes ermöglicht
CN105260663B (zh) * 2015-09-15 2017-12-01 中国科学院信息工程研究所 一种基于TrustZone技术的安全存储服务系统及方法
CN105468980B (zh) * 2015-11-16 2018-07-03 华为技术有限公司 一种安全管控的方法、装置及系统
CN109871717A (zh) * 2016-02-29 2019-06-11 华为技术有限公司 一种数据安全传输装置及方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016105651A1 (en) * 2014-12-24 2016-06-30 Intel Corporation System and method for providing global platform compliant trusted execution environment
CN105978917A (zh) * 2016-07-19 2016-09-28 恒宝股份有限公司 一种用于可信应用安全认证的系统和方法
CN106603498A (zh) * 2016-11-15 2017-04-26 华为技术有限公司 事件上报方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124726A (zh) * 2019-12-09 2020-05-08 上海移远通信技术股份有限公司 打开modem端口异常检测方法及装置
CN111124726B (zh) * 2019-12-09 2024-01-26 上海移远通信技术股份有限公司 打开modem端口异常检测方法及装置
US11816205B2 (en) 2020-11-30 2023-11-14 Red Hat, Inc. Detecting and handling attacks on processes executing within a trusted execution environment

Also Published As

Publication number Publication date
CN106603498B (zh) 2020-01-10
CN106603498A (zh) 2017-04-26

Similar Documents

Publication Publication Date Title
WO2018090934A1 (zh) 事件上报方法及装置
US11429950B2 (en) Mobile payment apparatus and method
CN107111715B (zh) 将可信执行环境用于代码和数据的安全性
EP1761837B1 (en) System and method for secure inter-platform and intra-platform communications
CN104318182B (zh) 一种基于处理器安全扩展的智能终端隔离系统及方法
US11126753B2 (en) Secure processor chip and terminal device
US10360369B2 (en) Securing sensor data
US20170262383A1 (en) Electronic apparatus and control method thereof
US8782412B2 (en) Secured privileged access to an embedded client on a mobile device
US20160378691A1 (en) System, apparatus and method for protecting a storage against an attack
EP3522441B1 (en) Securing audio communications
US9870467B2 (en) Apparatus and method for implementing a forked system call in a system with a protected region
CN105468980A (zh) 一种安全管控的方法、装置及系统
KR101654778B1 (ko) 하드웨어 강제 액세스 보호
EP2181394B1 (en) Method of protecting input/output packet of usb device and apparatus thereof
EP2225695A1 (en) Method and apparatus for delegation of secure operating mode access privilege from processor to peripheral
WO2014194793A1 (zh) 一种在能够运行两种操作系统的装置中使用共享设备的方法
US11157635B2 (en) Secure interface disablement
US20220027520A1 (en) Methods And Apparatus For In-Memory Device Access Control
CN112351022A (zh) 信任区的安全防护方法及装置
CN110276214A (zh) 一种基于从机访问保护的双核可信soc架构及方法
US20170372311A1 (en) Secure payment-protecting method and related electronic device
CN114826785A (zh) 一种动态防护方法、系统级芯片、电子设备及介质
US20150356307A1 (en) Safe input method and system
KR101805444B1 (ko) 보안 영역과 비보안 영역 사이의 보안 연동 방법 및 이를 기록한 기록매체

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17871717

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17871717

Country of ref document: EP

Kind code of ref document: A1