A method, apparatus, system and storage medium for inter-core communication

By identifying the target channel using the hardware identifiers of the receiving and sending cores and transmitting communication messages under permission checks, the problem of low security in inter-core communication is solved, thus achieving secure inter-core communication.

CN115048333BActive Publication Date: 2026-05-29伟光有限公司(CN)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
伟光有限公司(CN)
Filing Date
2022-07-22
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Inter-core communication has low security; the sending and receiving cores are easily forged or impersonated, leading to message leakage and malicious message transmission.

Method used

The target channel is determined by the hardware identifier of the receiving and sending cores. If the receiving core has the necessary access rights, the communication message is written to and provided to the receiving core. Access checks are performed by security modules on both the sending and receiving sides to ensure the secure transmission of the communication message.

Benefits of technology

It improves the security of inter-core communication, prevents malicious message transmission by forging sending and receiving cores, and protects the integrity and privacy of communication messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048333B_ABST
    Figure CN115048333B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a kind of inter-core communication method, device, system and storage medium, method includes: receiving the communication message for receiving core sent by sending core;Communication message is written in the target channel of sending core access authority;In the case where receiving core has the access authority of target channel, communication message in target channel is provided to receiving core.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to an inter-core communication method, apparatus, system and storage medium. Background Technology

[0002] Currently, in the inter-core communication mechanism, each sending core can access different channels of the message mailbox, thereby sending messages to different receiving cores. Each receiving core can receive messages sent from different channels in the message mailbox, such as... Figure 1 As shown.

[0003] However, the security of inter-core communication mechanisms described above is relatively low. Specifically, the sending core can be forged or impersonated to send forged or malicious messages. For example, in normal operations, a malicious sending core or a compromised sending core can impersonate a legitimate sending core and send malicious messages through any channel. Similarly, the receiving core can also be forged or impersonated to steal messages, leading to message leakage. Summary of the Invention

[0004] This application provides an inter-core communication method, apparatus, system, and storage medium, which improves the security of inter-core communication.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] This application provides an inter-core communication method, the method comprising:

[0007] Receive communication messages sent by the sending core to the receiving core;

[0008] The communication message is written into a target channel that the sending core has access to;

[0009] If the receiving core has access to the target channel, the communication messages in the target channel are provided to the receiving core.

[0010] In the above method, before writing the communication message into the target channel that the sending core has access to, the method further includes:

[0011] Receive a first hardware identifier sent by the transmitting core; the first hardware identifier is information characterizing the hardware attributes of the transmitting core.

[0012] The target channel is determined using the first hardware identifier.

[0013] In the above method, determining the target channel using the first hardware identifier includes:

[0014] Read channel indication information from the communication message, and determine the channel indicated by the channel indication information as the first channel;

[0015] Obtain the hardware identifier of the kernel that grants access permission to the first channel from the preset authorization relationship table; the preset authorization relationship table contains the correspondence between different channels and the hardware identifiers of the kernels that grant access permission.

[0016] If the obtained hardware identifier includes the first hardware identifier, the first channel is determined as the target channel.

[0017] In the above method, determining the target channel using the first hardware identifier includes:

[0018] Based on the first hardware identifier, locate the channel pre-bound to the sending core;

[0019] The found channel is identified as the target channel.

[0020] In the above method, before providing the communication message in the target channel to the receiving core when the receiving core has access to the target channel, the method further includes:

[0021] Receive a second hardware identifier sent by the receiving core; the second hardware identifier is information characterizing the hardware attributes of the receiving core.

[0022] Using the second hardware identifier, an access check of the target channel is performed on the receiving core.

[0023] In the above method, the step of using the second hardware identifier to perform an access check on the target channel for the receiving core includes:

[0024] Obtain the hardware identifier of the kernel that grants access permissions to the target channel from the preset authorization relationship table; the preset authorization relationship table contains the correspondence between different channels and the hardware identifiers of the kernels that grant access permissions.

[0025] If the acquired hardware identifier includes the second hardware identifier, it is determined that the receiving core has access rights to the target channel.

[0026] In the above method, the step of using the second hardware identifier to perform an access check on the target channel for the receiving core includes:

[0027] Based on the second hardware identifier, locate the channel pre-bound to the receiving core;

[0028] The found channel is designated as the second channel;

[0029] If the second channel and the target channel are the same channel, it is determined that the receiving core has access to the target channel.

[0030] In the above method, before receiving the second hardware identifier sent by the receiving core, the method further includes:

[0031] An interrupt signal is sent to the receiving core to trigger the receiving core to send the second hardware identifier.

[0032] In the above method, after writing the communication message into the target channel that the sending core has access to, the method further includes:

[0033] If the receiving core does not have access to the target channel, the communication messages in the target channel shall not be provided to the receiving core.

[0034] This application provides an inter-core communication device, which includes: a transmitting-side security module and a receiving-side security module;

[0035] The sending-side security module is used to receive communication messages from the sending core to the receiving core; and to write the communication messages into a target channel that the sending core has access to.

[0036] The receiving-side security module is used to provide the communication messages in the target channel to the receiving core when the receiving core has access to the target channel.

[0037] This application provides an inter-core communication device, which includes a processor, a memory, and a communication bus.

[0038] The communication bus is used to realize the communication connection between the processor and the memory;

[0039] The processor is used to execute one or more computer programs stored in the memory to implement the above-described inter-core communication method.

[0040] This application provides an inter-core communication system, including: a transmitting core, a receiving core, and an inter-core communication device;

[0041] The sending core is used to send communication messages to the inter-core communication device for the receiving core;

[0042] The inter-core communication device is configured to write the communication message into a target channel that the sending core has access to; and, if the receiving core has access to the target channel, to provide the communication message in the target channel to the receiving core.

[0043] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described inter-core communication method.

[0044] This application provides an inter-core communication method, comprising: receiving a communication message sent by a sending core to a receiving core; writing the communication message into a target channel to which the sending core has access permissions; and, if the receiving core has access permissions to the target channel, providing the communication message in the target channel to the receiving core. The inter-core communication method provided in this application allows the sending core and receiving core to transmit communication messages through a channel with access permissions, preventing malicious communication messages from being transmitted through the channel and preventing the theft of normal communication messages in the channel, thus improving the security of inter-core communication. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of inter-core communication in existing technology;

[0046] Figure 2 A flowchart illustrating an inter-core communication method provided in an embodiment of this application;

[0047] Figure 3 This is an exemplary diagram illustrating inter-core communication as provided in an embodiment of this application.

[0048] Figure 4 A schematic diagram illustrating an exemplary inter-core communication process provided in this application embodiment;

[0049] Figure 5 A schematic diagram of the structure of an inter-core communication device provided in this application embodiment. Figure 1 ;

[0050] Figure 6 A schematic diagram of the structure of an inter-core communication device provided in this application embodiment. Figure 2 ;

[0051] Figure 7 This is a schematic diagram of an inter-core communication system provided in an embodiment of this application. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0053] The technical solutions of this application and how they solve the aforementioned technical problems will be described in detail below through embodiments and in conjunction with the accompanying drawings. The embodiments below can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0054] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0055] This application provides an inter-core communication method implemented through an inter-core communication device. The inter-core channel device is pre-configured with multiple channels, and the specific number of channels is not limited in this application. The specific inter-core communication device can be a message mailbox.

[0056] Figure 2 This is a flowchart illustrating an inter-core communication method provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the inter-core communication method mainly includes the following steps:

[0057] S101, Receive communication messages sent by the sending core to the receiving core.

[0058] In embodiments of this application, the inter-core communication device can receive communication messages sent by the sending core to the receiving core.

[0059] It should be noted that, in the embodiments of this application, the sending core is the sender of communication messages in inter-core communication, and the receiving core is the receiver of communication messages in inter-core communication. The sending core and the receiving core are each a separate kernel. The specific sending core and receiving core are not limited in the embodiments of this application.

[0060] It should be noted that in the embodiments of this application, in the inter-core communication scenario, the sending core and the receiving core cannot communicate directly and need to forward communication messages through an inter-core communication device.

[0061] S102. Write the communication message to the target channel that the sending core has access to.

[0062] In the embodiments of this application, when the inter-core communication device receives a communication message, it writes the communication message into a target channel that the sending core has access to.

[0063] In the embodiments of this application, before the inter-core communication device writes the communication message into the target channel that the sending core has access to, it is necessary to perform the following steps: receiving a first hardware identifier sent by the sending core; the first hardware identifier is information characterizing the hardware attributes of the sending core; and using the first hardware identifier to determine the target channel.

[0064] It should be noted that, in the embodiments of this application, when the sending core intends to transmit a communication message to the receiving core, it not only sends the communication message to the inter-core communication device but also sends a first hardware identifier to the inter-core communication device. The inter-core communication device can then receive the first hardware identifier and the communication message. The first hardware identifier is information characterizing the hardware attributes of the sending core; it represents the hardware design of the sending core and cannot be tampered with by software. Specifically, the first hardware identifier can be the hardware identity identifier of the sending core or a hardware signal of the sending core on the bus; this embodiment of the application does not limit this.

[0065] It should be noted that, in the embodiments of this application, when the inter-core communication device receives the first hardware identifier, it needs to first use the first hardware identifier to determine the target channel that the sending core has access to, and then write the communication message into the target channel, that is, write the communication message into the channel that the sending core has access to. In this way, it can prevent forged or fake sending cores from sending fake communication messages through the channel, thereby improving the security of writing communication messages in inter-core communication.

[0066] In embodiments of this application, the inter-core communication device uses a first hardware identifier to determine a target channel, including: reading channel indication information from a communication message and determining the channel indicated by the channel indication information as a first channel; obtaining the hardware identifier of the kernel that grants access permissions to the first channel from a preset authorization relationship table; and determining the first channel as the target channel if the obtained hardware identifier includes the first hardware identifier.

[0067] It should be noted that, in the embodiments of this application, the communication message from the sending core to the receiving core may include channel indication information. The channel indicated by this channel indication information is the channel through which the sending core requests to write the communication message. The inter-core channel device can read the channel indication information from the communication message, determine the channel through which the sending core requests to write the communication message, and designate it as the first channel, thereby further checking whether the sending core has access permission to the first channel. If the sending core has access permission to the first channel, the first channel can be used as the target channel for writing the communication message.

[0068] It should be noted that, in the embodiments of this application, the inter-core communication device may store a preset authorization relationship table, specifically containing the correspondence between different channels and the hardware identifiers of the kernels granted access permissions. The inter-core communication device can obtain the hardware identifier of the kernel granted access permissions for the first channel from this table. If the obtained hardware identifier includes the first hardware identifier, it means that the sending kernel has access permissions for the first channel. Of course, if the obtained hardware identifier does not include the first hardware identifier, it means that the sending kernel does not have access permissions for the first channel. Therefore, the inter-core communication device will not determine the first channel as the target channel.

[0069] In the embodiments of this application, the above-described method of determining the target channel is only one possible method. The inter-core communication device uses the first hardware identifier to determine the target channel, and further includes: based on the first hardware identifier, searching for a channel pre-bound to the sending core; and determining the found channel as the target channel.

[0070] It should be noted that, in the embodiments of this application, each channel in the inter-core communication device can be pre-bound to a specific kernel. The kernel bound to each channel, that is, the kernel that the channel is allowed to access, is a kernel capable of secure communication. For each channel, when it is pre-bound to a certain kernel, the hardware identifier of that kernel actually corresponds to the channel.

[0071] It is understood that, in the embodiments of this application, the inter-core communication device can search for a channel pre-bound to the sending core based on the first hardware identifier. If a channel is found to be pre-bound to the sending core, the sending core has access to the channel because of the binding relationship between the sending core and the channel, and can therefore use the channel as the target channel.

[0072] It should be noted that, in the embodiments of this application, the two methods for determining the target channel described above are only two optional methods. Of course, other methods can also be used to determine the target channel. The specific method for determining the target channel can be selected according to actual needs and application scenarios, and this embodiment of the application does not limit it.

[0073] It is understood that, in the embodiments of this application, since the first hardware identifier of the sending core reflects the hardware design of the sending core and is fixed and cannot be tampered with by software, using the first hardware identifier corresponding to the sending core as the benchmark for channel permission checking can effectively protect the security of writing communication messages.

[0074] It should be noted that, in the embodiments of this application, once the target channel is determined, the inter-core communication device can write the communication message for the sending core into the target channel so that the receiving core can subsequently read it from the target channel.

[0075] S103. If the receiving core has access to the target channel, provide the communication messages in the target channel to the receiving core.

[0076] In the embodiments of this application, when the inter-core communication device writes communication messages into the target channel, if the receiving core also has access to the target channel, it can provide the communication messages in the target channel to the receiving core.

[0077] In the embodiments of this application, before the inter-core communication device provides the communication message in the target channel to the receiving core when the receiving core has access to the target channel, it further performs the following steps: receiving a second hardware identifier sent by the receiving core; the second hardware identifier is information characterizing the hardware attributes of the receiving core; and using the second hardware identifier, performing an access check on the target channel for the receiving core.

[0078] It should be noted that, in the embodiments of this application, the inter-core communication device also needs to receive the second hardware identifier of the receiving core to facilitate subsequent checks on its access rights to the target channel. Based on this, before receiving the second hardware identifier sent by the receiving core, the inter-core communication device also needs to perform the following steps: send an interrupt signal to the receiving core to trigger the receiving core to send the second hardware identifier.

[0079] It should be noted that, in the embodiments of this application, the second hardware identifier is information characterizing the hardware attributes of the receiving core, which corresponds to the hardware design of the receiving core and cannot be tampered with by software. Specifically, the second hardware identifier can be the hardware identity identifier of the receiving core, or it can be a hardware signal of the receiving core on the bus; this embodiment of the application does not limit this.

[0080] It should be noted that, in the embodiments of this application, when the receiving core receives an interrupt signal sent by the inter-core communication device, it can trigger the receiving core to request data reading from the inter-core communication device, that is, to send a second hardware identifier to the inter-core communication device to request access to the target channel and read the communication messages therein.

[0081] In embodiments of this application, the inter-core communication device uses a second hardware identifier to perform a permission check on the target channel for the receiving core, including: obtaining the hardware identifier of the core that has been granted access permission to the target channel from a preset authorization relationship table; and determining that the receiving core has access permission to the target channel if the obtained hardware identifier includes the second hardware identifier.

[0082] It should be noted that, in the embodiments of this application, the inter-core communication device may store a preset authorization relationship table, specifically containing the correspondence between different channels and the hardware identifiers of the kernels granted access permissions. The inter-core communication device can obtain the hardware identifier of the kernel granted access permissions for the target channel from this table. If the obtained hardware identifier includes a second hardware identifier, it means that the receiving kernel has access permissions for the second channel. Of course, if the obtained hardware identifier does not include the second hardware identifier, it means that the receiving kernel does not have access permissions for the target channel.

[0083] In the embodiments of this application, the above-described method of using the second hardware identifier to perform permission checks on the target channel for the receiving core is only one feasible method. The inter-core communication device may further include: using the second hardware identifier to perform permission checks on the target channel for the receiving core, and further including: finding a channel pre-bound to the receiving core based on the second hardware identifier; determining the found channel as the second channel; and determining that the receiving core has access to the target channel if the second channel and the target channel are the same channel.

[0084] It should be noted that, in the embodiments of this application, each channel in the inter-core communication device can be pre-bound to a specific kernel. The kernel bound to each channel, that is, the kernel that the channel is allowed to access, is a kernel capable of secure communication. For each channel, when it is pre-bound to a certain kernel, the hardware identifier of that kernel actually corresponds to the channel.

[0085] It is understood that, in the embodiments of this application, the inter-core communication device can locate a channel pre-bound to the receiving core based on the second hardware identifier. If a channel is found to be pre-bound to the receiving core, that channel is identified as the second channel. Since the receiving core and the second channel are bound together, the receiving core has access to the second channel. Therefore, if the target channel and the second channel are the same channel, the inter-core communication device can determine that the receiving core has access to the target channel; if the target channel and the second channel are different channels, the inter-core channel device can determine that the receiving core does not have access to the target channel.

[0086] It should be noted that, in the embodiments of this application, the two specific permission checking methods mentioned above are only two optional permission checking methods. Of course, other methods can be used for permission checking according to actual needs and application scenarios, and the embodiments of this application do not limit them.

[0087] It is understood that, in the embodiments of this application, since the second hardware identifier of the sending core reflects the hardware design of the sending core and is fixed and cannot be tampered with by software, using the second hardware identifier corresponding to the receiving core as the benchmark for channel permission checking can effectively protect the security of reading communication messages.

[0088] It is understood that, in the embodiments of this application, the inter-core communication device will only provide the communication messages in the target channel to the receiving core if it is determined that the receiving core has the access permission to the target channel. In this way, the security of reading the communication messages can be effectively guaranteed.

[0089] It should be noted that, in the embodiments of this application, after the inter-core communication device writes the communication message into the target channel that the sending core has access to, it can also perform the following steps: if it is determined that the receiving core does not have access to the target channel, it prohibits the communication message in the target channel from being provided to the receiving core.

[0090] It is understood that in the embodiments of this application, if the receiving core does not have access to the target channel, it will be prohibited from reading communication messages from the target channel in order to prevent the communication messages in the target channel from being maliciously read and used.

[0091] Figure 3 This is an exemplary diagram illustrating inter-core communication as provided in an embodiment of this application. Figure 3 As shown, the inter-core communication scenario includes N sending cores, N receiving cores, and an inter-core communication device. The inter-core communication device is pre-configured with N channels, where N is a natural number greater than 1. Compared to the above inter-core communication method... Figure 1 The diagram illustrating the inter-core communication interaction shows that permission checks are performed on the sending and receiving cores. Each channel can only be accessed by specific kernels with the required permissions, thus preventing unauthorized access to channels and ensuring the security of inter-core communication.

[0092] In the embodiments of this application, in the inter-core communication scenario, the inter-core communication device is a message mailbox. The mailbox includes a security check module. The sending core (transmitter) needs to send communication messages to the receiving core (receiver). Specifically, the transmitter's own hardware identifier (HWID) and the communication message for the receiver are sent to the mailbox. The security check module in the mailbox performs an access check based on the transmitter's HWID to determine whether the information can be written to the channel requested by the transmitter. Alternatively, the security check module in the mailbox performs an access check based on the transmitter's HWID and directly writes the communication message to the bound channel. Then, the mailbox sends an interrupt to the corresponding receiver. The receiver accesses the mailbox, sends its own HWID to the mailbox, and requests access to the communication messages in the corresponding channel. Finally, the security check module in the mailbox performs an access check based on the receiver's HWID to determine whether the receiver can read the information from the channel. The check module performs permission checks based on the receiver's HWID. The receiver can only read information from the channel it is bound to. If the bound channel is different from the channel used to write communication messages, the receiver cannot obtain the communication messages.

[0093] Figure 4 This is a schematic diagram illustrating an exemplary communication interaction process provided for an embodiment of this application. For example... Figure 4As shown, in the embodiments of this application, the communication interaction mainly includes: a) the sending core sends a first hardware identifier and a communication message for the receiving core to the inter-core communication device, and then executes step b1 or b2, the specific steps of which are as follows: b1. The inter-core communication device uses the first hardware identifier to check whether it has access rights to the requested channel, and writes a communication message (the channel for writing the communication message is the target channel) if it has access rights to the requested channel; b2. The inter-core communication device uses the first hardware identifier to find the channel bound to the sending core and writes a communication message (the channel for writing the communication message is the target channel). After executing step b1 or b2, the following steps are executed: c) the inter-core communication device sends a first hardware identifier and a communication message for the receiving core to the receiving core. The receiving core sends an interrupt signal. Based on the interrupt signal, the receiving core sends a second hardware identifier to the inter-core communication device. Finally, it executes either step d1 or d2, with the specific steps as follows: d1: The inter-core communication device determines whether the receiving core has access to the target channel based on whether the second hardware identifier is included in the hardware identifier of the kernel that grants access to the target channel. If it determines that the receiving core has access to the target channel, it provides the communication message in the target channel to the receiving core. d2: The inter-core communication device determines whether the receiving core has access to the target channel based on whether the second hardware identifier is bound to the target channel. If it determines that the receiving core has access to the target channel, it provides the communication message in the target channel to the receiving core.

[0094] It is understood that, in the embodiments of this application, the sending core and the receiving core provide hardware identifiers for the inter-core communication device. During inter-core communication, the hardware identifiers are synchronously sent to the inter-core communication device for permission checks. The inter-core communication device adds a permission check function to perform permission checks / isolation binding on the sending core and the receiving core, preventing unauthorized access to the channel and spoofed access.

[0095] In the embodiments of this application, the sending core can transmit its first hardware identifier to the inter-core communication device. The inter-core communication device uses the first hardware identifier to perform permission checks to write communication messages into a target channel that the sending core has access to. Furthermore, when the inter-core communication device sends communication messages written in the target channel to the receiving core, it also performs permission checks; only those that pass the checks can receive the communication messages. For both the sending and receiving cores, their hardware identifiers are determined by their own hardware design and are fixed and cannot be tampered with by software. Therefore, this effectively guarantees the authenticity of the sending and receiving cores and improves the security of inter-core communication.

[0096] This application provides an inter-core communication method, comprising: receiving a communication message sent by a sending core to a receiving core; writing the communication message into a target channel to which the sending core has access permissions; and, if the receiving core has access permissions to the target channel, providing the communication message in the target channel to the receiving core. The inter-core communication method provided in this application allows the sending core and receiving core to transmit communication messages through a channel with access permissions, preventing malicious communication messages from being transmitted through the channel and preventing the theft of normal communication messages in the channel, thus improving the security of inter-core communication.

[0097] This application also provides an inter-core communication device. Figure 5 A schematic diagram of the structure of an inter-core communication device provided in this application embodiment. Figure 1 .like Figure 5 As shown in the embodiments of this application, the inter-core communication device includes: a transmitting-side security module 201 and a receiving-side security module 202;

[0098] The transmitting-side security module 201 is used to receive communication messages from the transmitting core to the receiving core; and to write the communication messages into a target channel that the transmitting core has access to.

[0099] The receiving-side security module 202 is used to provide the communication messages in the target channel to the receiving core when the receiving core has access to the target channel.

[0100] In one embodiment of this application, the transmitting-side security module 201 is further configured to:

[0101] Receive a first hardware identifier sent by the transmitting core; the first hardware identifier is information characterizing the hardware attributes of the transmitting core.

[0102] The target channel is determined using the first hardware identifier.

[0103] In one embodiment of this application, the transmitting-side security module 201 is further configured to:

[0104] Read channel indication information from the communication message, and determine the channel indicated by the channel indication information as the first channel;

[0105] Obtain the hardware identifier of the kernel that grants access permission to the first channel from the preset authorization relationship table; the preset authorization relationship table contains the correspondence between different channels and the hardware identifiers of the kernels that grant access permission.

[0106] If the obtained hardware identifier includes the first hardware identifier, the first channel is determined as the target channel.

[0107] In one embodiment of this application, the transmitting-side security module 201 is further configured to:

[0108] Based on the first hardware identifier, locate the channel pre-bound to the sending core;

[0109] The found channel is identified as the target channel.

[0110] In one embodiment of this application, the receiving-side security module 202 is further configured to:

[0111] Receive a second hardware identifier sent by the receiving core; the second hardware identifier is information characterizing the hardware attributes of the receiving core.

[0112] Using the second hardware identifier, an access check of the target channel is performed on the receiving core.

[0113] In one embodiment of this application, the receiving-side security module 202 is further configured to:

[0114] Obtain the hardware identifier of the kernel that grants access permissions to the target channel from the preset authorization relationship table; the preset authorization relationship table contains the correspondence between different channels and the hardware identifiers of the kernels that grant access permissions.

[0115] If the acquired hardware identifier includes the second hardware identifier, it is determined that the receiving core has access rights to the target channel.

[0116] In one embodiment of this application, the receiving-side security module 202 is further configured to:

[0117] Based on the second hardware identifier, locate the channel pre-bound to the receiving core;

[0118] The found channel is designated as the second channel;

[0119] If the second channel and the target channel are the same channel, it is determined that the receiving core has access to the target channel.

[0120] In one embodiment of this application, the receiving-side security module 202 is further configured to send an interrupt signal to the receiving core to trigger the receiving core to send the second hardware identifier.

[0121] In one embodiment of this application, the receiving-side security module 202 is further configured to prohibit the communication messages in the target channel from being provided to the receiving core when the receiving core does not have access to the target channel.

[0122] Figure 6 A schematic diagram of the structure of an inter-core communication device provided in this application embodiment. Figure 2 .like Figure 6 As shown in the embodiments of this application, the inter-core communication device includes: a processor 301, a memory 302, and a communication bus 303.

[0123] The communication bus 303 is used to realize the communication connection between the processor 301 and the memory 302;

[0124] The processor 301 is used to execute one or more computer programs stored in the memory 302 to implement the above-described inter-core communication method.

[0125] This application provides an inter-core communication device that receives communication messages sent by a sending core to a receiving core; writes the communication messages into a target channel that the sending core has access to; and, if the receiving core has access to the target channel, provides the communication messages in the target channel to the receiving core. The inter-core communication device provided in this application allows the sending and receiving cores to transmit communication messages through a channel with access permissions, preventing malicious communication messages from being transmitted through the channel and preventing the theft of normal communication messages in the channel, thus improving the security of inter-core communication.

[0126] This application also provides an inter-core communication system. Figure 7 This is a schematic diagram of an inter-core communication system provided in an embodiment of this application. Figure 7 As shown, the inter-core communication system includes: a transmitting core 401, a receiving core 402, and an inter-core communication device 403;

[0127] The sending core 401 is used to send communication messages to the inter-core communication device 403 for the receiving core 402;

[0128] The inter-core communication device 403 is used to write the communication message into a target channel that the sending core 401 has access to; and, if the receiving core 402 has access to the target channel, to provide the communication message in the target channel to the receiving core 402.

[0129] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned inter-core communication method. The computer-readable storage medium may be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or it may be a device including one or any combination of the above-mentioned memories, such as a mobile phone, computer, tablet device, or personal digital assistant.

[0130] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0131] This application is described with reference to schematic and / or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the schematic and / or block diagrams can be implemented by computer program instructions, and combinations of blocks in the schematic and / or block diagrams can be implemented. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the schematic and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0132] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the implementation flow diagram. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0133] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for inter-core communication, characterized in that, The method includes: The receiving core communicates messages with the sending core to the receiving core; The communication message is written into a target channel that the sending core has access to; If the receiving core has access to the target channel, the communication message in the target channel is provided to the receiving core; Wherein, each channel to which the transmitting core has access is determined based on the first hardware identifier of the transmitting core, and corresponds to or is bound to the first hardware identifier of the transmitting core; each channel to which the receiving core has access is determined based on the second hardware identifier of the receiving core, and corresponds to or is bound to the second hardware identifier of the receiving core. The hardware identifiers of the sending core and the receiving core are fixed and cannot be tampered with by software, depending on their respective hardware designs.

2. The method according to claim 1, characterized in that, Before writing the communication message into the target channel that the sending core has access to, the method further includes: Receive a first hardware identifier sent by the transmitting core; the first hardware identifier is information characterizing the hardware attributes of the transmitting core. The target channel is determined using the first hardware identifier.

3. The method according to claim 2, characterized in that, The step of determining the target channel using the first hardware identifier includes: Obtain channel indication information from the communication message, and determine the channel indicated by the channel indication information as the first channel; Obtain the hardware identifier of the kernel that grants access permission to the first channel from the preset authorization relationship table; the preset authorization relationship table contains the correspondence between different channels and the hardware identifiers of the kernels that grant access permission. If the obtained hardware identifier includes the first hardware identifier, the first channel is determined as the target channel.

4. The method according to claim 2, characterized in that, The step of determining the target channel using the first hardware identifier includes: Based on the first hardware identifier, locate the channel pre-bound to the sending core; The found channel is identified as the target channel.

5. The method according to claim 1, characterized in that, Before providing the communication message in the target channel to the receiving core when the receiving core has access to the target channel, the method further includes: Receive a second hardware identifier sent by the receiving core; the second hardware identifier is information characterizing the hardware attributes of the receiving core. Using the second hardware identifier, an access check of the target channel is performed on the receiving core.

6. The method according to claim 5, characterized in that, The step of using the second hardware identifier to perform an access check on the target channel for the receiving core includes: Obtain the hardware identifier of the kernel that grants access permissions to the target channel from the preset authorization relationship table; the preset authorization relationship table contains the correspondence between different channels and the hardware identifiers of the kernels that grant access permissions. If the acquired hardware identifier includes the second hardware identifier, it is determined that the receiving core has access rights to the target channel.

7. The method according to claim 5, characterized in that, The step of using the second hardware identifier to perform an access check on the target channel for the receiving core includes: Based on the second hardware identifier, locate the channel pre-bound to the receiving core; The found channel is designated as the second channel; If the second channel and the target channel are the same channel, it is determined that the receiving core has access to the target channel.

8. The method according to claim 5, characterized in that, Before receiving the second hardware identifier sent by the receiving core, the method further includes: An interrupt signal is sent to the receiving core to trigger the receiving core to send the second hardware identifier.

9. The method according to claim 1, characterized in that, After writing the communication message into the target channel that the sending core has access to, the method further includes: If the receiving core does not have access to the target channel, the communication messages in the target channel shall not be provided to the receiving core.

10. An inter-nuclear communication device, characterized in that, The inter-nuclear communication device includes: a transmitting-side security module and a receiving-side security module; The sending-side security module is used to receive communication messages sent by the sending core to the receiving core; and to write the communication messages into a target channel that the sending core has access to. The receiving-side security module is used to provide the communication messages in the target channel to the receiving core when the receiving core has access to the target channel; Wherein, each channel to which the transmitting core has access is determined based on the first hardware identifier of the transmitting core, and corresponds to or is bound to the first hardware identifier of the transmitting core; each channel to which the receiving core has access is determined based on the second hardware identifier of the receiving core, and corresponds to or is bound to the second hardware identifier of the receiving core. The hardware identifiers of the sending core and the receiving core are fixed and cannot be tampered with by software, depending on their respective hardware designs.

11. An inter-nuclear communication device, characterized in that, The inter-core communication device includes: a processor, a memory, and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is configured to execute one or more computer programs stored in the memory to implement the inter-core communication method according to any one of claims 1-9.

12. An inter-nuclear communication system, characterized in that, include: Transmitting core, receiving core, and inter-core communication device; The sending core is used to send communication messages to the inter-core communication device for the receiving core; The inter-core communication device is configured to write the communication message into a target channel that the sending core has access to; and, if the receiving core has access to the target channel, to provide the communication message in the target channel to the receiving core. Wherein, each channel to which the transmitting core has access is determined based on the first hardware identifier of the transmitting core, and corresponds to or is bound to the first hardware identifier of the transmitting core; each channel to which the receiving core has access is determined based on the second hardware identifier of the receiving core, and corresponds to or is bound to the second hardware identifier of the receiving core. The hardware identifiers of the sending core and the receiving core are fixed and cannot be tampered with by software, depending on their respective hardware designs.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the inter-core communication method as described in any one of claims 1-9.