Access control method implemented by means of hardware firewall, and hardware firewall in chip

By introducing multiple firewall filtering layers into the chip, precise control of the access end and area is achieved, and the problems of single hardware firewall functions and limited permission control are solved, improving the security and functional security of the chip.

WO2024244701A1PCT designated stage expired Publication Date: 2024-12-05SANECHIPS TECH CO LTD

Patent Information

Application Number
PCT/CN2024/086659
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2024-04-08
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The existing hardware firewall has a single function, limited authority control and functional security effects, and cannot effectively protect multiple security-level areas in high-performance chips, resulting in the inability to guarantee the security level.

Method used

By introducing multiple firewall filtering layers into the chip, each firewall filtering layer corresponds to one or more access ends and multiple access areas, pre-configures the mapping relationship between permission identification and access permissions, and based on the permission identification and access address in the access request Determine the target access area and access permissions, thereby achieving precise control of different access ends and regions.

Benefits of technology

It improves the information security and functional security of the chip, reduces the theft of sensitive information by external attacks and the permission control and intrusion of key security areas, realizes precise control of different functional security levels, and enhances the security of the entire chip system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024086659_05122024_PF_FP_ABST
    Figure CN2024086659_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are an access control method implemented by means of a hardware firewall, and a hardware firewall in a chip. The method comprises: by means of a firewall filtering layer corresponding to an access end, receiving an access request which is initiated by the access end to an accessed end, wherein the access request carries a permissions identifier and an access address; according to the access address, determining a target access area from among a plurality of access areas of the accessed end corresponding to the firewall filtering layer; and according to the permissions identifier and the target access area, determining access permissions of the access request, wherein each access area is pre-configured with a mapping relationship between permissions identifiers for allowing access and corresponding access permissions.
Need to check novelty before this filing date? Find Prior Art

Description

An access control method implemented by hardware firewall and an in-chip hardware firewall

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure is based on Chinese patent application CN202310645888.3 filed on June 1, 2023, entitled “An access control method implemented by a hardware firewall and a hardware firewall in a chip”, and claims the priority of the patent application, and all the contents disclosed therein are incorporated into this disclosure by reference. Technical Field

[0003] The present disclosure relates to the field of hardware firewalls, and in particular to an access control method for a hardware firewall and an in-chip hardware firewall. Background Art

[0004] As smart chips become increasingly integrated and performant, the security threats they face are becoming increasingly severe. During the use of high-performance chips, attackers could use software or hardware to implant dangerous code into modules in low-security functional areas. This could allow attackers to launch attacks from these low-security areas to high-security areas during chip operation, tampering with relevant information and permissions, and compromising chip functionality. If the attack extends to the vehicle's control area, it could cause serious personal and financial losses.

[0005] Firewalls typically filter transmitted information based on security policies. Using software-only firewalls has drawbacks such as low filtering efficiency, poor stability, incomplete protection capabilities, and heavy CPU load. Integrating hardware firewall functionality within a chip can effectively improve filtering capabilities, reduce CPU burden, and enhance intrusion detection and protection. However, most on-chip hardware firewalls are relatively simple, primarily restricting CPU access to memory. They offer limited control over access to other master nodes, such as the graphics processing unit (GPU), video processing unit (VPU), and direct memory access (DMA). They are ineffective at controlling the permissions of various chip peripherals beyond memory. Firewalls also offer relatively crude and simple isolation of memory information, dividing it into secure and non-secure zones. This has limited security implications for the permissions and interactions between zones with multiple security levels, resulting in a lack of guaranteed security levels for each zone.

[0006] In summary, a solution is urgently needed to address the problems in related technologies such as the single function of hardware firewalls and their limited authority control and functional security.

[0007] Summary of the Invention

[0008] The embodiments of the present disclosure provide an access control method implemented by a hardware firewall and an in-chip hardware firewall, so as to at least solve the problem in the related art that the hardware firewall has simple functions and limited authority control and functional security effects.

[0009] According to one embodiment of the present disclosure, there is provided an access control method implemented by a hardware firewall, the method comprising: receiving an access request initiated by an access end to an accessed end through a firewall filtering layer corresponding to the access end, wherein the access request carries an authority identifier and an access address; determining a target access area from a plurality of access areas of the accessed end corresponding to the firewall filtering layer according to the access address; determining the access rights of the access request according to the authority identifier and the target access area, wherein each access area is pre-configured with a mapping relationship between an authority identifier for allowed access and a corresponding access right.

[0010] According to another embodiment of the present disclosure, an in-chip hardware firewall is provided, comprising: a plurality of firewall filter layers, wherein each firewall filter layer corresponds to one or more access terminals, each firewall filter layer corresponds to a plurality of access areas, and each access area is pre-configured with a mapping relationship between a permission identifier for allowing access and a corresponding access permission; the firewall filter layer is configured to receive an access request for accessing an accessed terminal from a corresponding access terminal, and determine a target access area from the plurality of access areas of the corresponding accessed terminal according to the permission identifier and the access address carried in the access request, and determine the access permission of the access request according to the permission identifier and the target access area.

[0011] According to another embodiment of the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above method embodiments are executed.

[0012] According to another embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] FIG1 is a block diagram of the hardware structure of the access control method of the hardware firewall according to an embodiment of the present disclosure;

[0014] FIG2 is a flow chart of a method for controlling access to a hardware firewall according to an embodiment of the present disclosure;

[0015] FIG3 is a schematic structural diagram of an automotive intelligent chip system according to an embodiment of the present disclosure;

[0016] FIG4 is a schematic diagram of a process for implementing access control through a page table in the related art;

[0017] FIG5 is a schematic diagram of a flow chart of access control when a page table is tampered with according to an embodiment of the present disclosure;

[0018] FIG6 is a schematic diagram of a process for implementing access control through a hardware firewall according to an embodiment of the present disclosure (I);

[0019] FIG7 is a schematic diagram of a process for implementing access control through a hardware firewall according to an embodiment of the present disclosure (II);

[0020] FIG8 is a schematic diagram of the structure of an on-chip hardware firewall according to an embodiment of the present disclosure;

[0021] FIG9 is a schematic diagram of configuring multiple access terminal authority identifiers according to an embodiment of the present disclosure;

[0022] FIG10 is a schematic diagram of a detailed flow of firewall access control according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0025] The method embodiments provided in the embodiments of the present disclosure can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a computer terminal as an example, FIG1 is a hardware structure block diagram of the access control method of the hardware firewall of the embodiment of the present disclosure. As shown in FIG1 , the hardware board may include one or more (only one is shown in FIG1 ) processors 12 (the processor 12 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device) and a memory 14 for storing data, wherein the above-mentioned mobile terminal may also include a transmission device 16 and an input and output device 18 for communication functions. It can be understood by those skilled in the art that the structure shown in FIG1 is only for illustration and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .

[0026] The memory 14 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the access control method of the hardware firewall in the embodiment of the present disclosure. The processor 12 executes various functional applications and the access control method of the hardware firewall by running the computer program stored in the memory 14, that is, implementing the above-mentioned method. The memory 14 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 14 may further include a memory remotely located relative to the processor 12, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0027] The transmission device 16 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communications provider. In one embodiment, the transmission device 16 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 16 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0028] In one embodiment of the present disclosure, a method for access control of a hardware firewall is provided. FIG2 is a flow chart of the method for access control of a hardware firewall according to an embodiment of the present disclosure. As shown in FIG2 , the flow chart includes the following steps:

[0029] Step S202: receiving an access request from the access terminal to the accessed terminal through the firewall filtering layer corresponding to the access terminal, wherein the access request carries an authority identifier and an access address;

[0030] Step S204, determining a target access area from a plurality of access areas of the accessed terminal corresponding to the firewall filtering layer according to the access address;

[0031] Step S206: determining the access rights of the access request according to the permission identifier and the target access area, wherein each access area is pre-configured with a mapping relationship between the permission identifier allowed to access and the corresponding access rights.

[0032] In the embodiment of the present disclosure, through steps S202 to S206, the problem of single hardware firewall function and limited authority control and functional security in related technologies can be solved. By setting authority identification and access areas to simultaneously control the access end and the accessed end, the information security and functional security of the chip can be effectively improved, and the theft of sensitive information by external attacks and the authority control and intrusion into key security areas can be reduced.

[0033] In an exemplary embodiment, before step S202, the filtering function of the firewall needs to be configured, which may specifically include the following steps:

[0034] Set up firewall filter layers corresponding to each device type according to the device type at the access end;

[0035] Configuring a plurality of access zones for each of the firewall filtering layers, wherein the plurality of access zones have different address ranges;

[0036] A mapping relationship between the permission identifier for access and the access permission is configured for each access area.

[0037] Furthermore, taking Double Data Rate SDRAM (DDR SDRAM) as an example, DDR is the accessed end and can be divided into Region 0 and Region 1. Region 0 has a high security level and Region 1 has a low security level and is used for data sharing.

[0038] In the embodiments of the present disclosure, by assigning memory access permissions and memory attributes to each area, user applications can be prevented from damaging data used by the operating system; untrusted applications can be prevented from accessing protected memory areas for the purpose of infringing intellectual property rights; memory areas can be defined as read-only to protect important data; abnormal access is blocked, and storage protection, peripheral protection, and privileged code access control protection are provided.

[0039] In an exemplary embodiment, each firewall can support 4 filter layers and 9 access regions, but the present disclosure is not limited thereto.

[0040] In an exemplary embodiment, step S204 may include the following steps:

[0041] Step S2042, matching the access address with the address range of each access area in the multiple access areas;

[0042] Step S2044: determine the access area whose address range includes the access address as the target access area.

[0043] In an exemplary embodiment, step S204 may further include:

[0044] Step S2046, when the address ranges of the multiple access areas do not include the access address, the preset basic access area is determined as the target access area, wherein the basic access area is a part of the access area of ​​the accessed end, and the basic access area is pre-configured with a mapping relationship between the permission identifier allowed to access and the corresponding access permission.

[0045] In an exemplary embodiment, step S206 may include: querying the pre-configured mapping relationship according to the target access area, and determining the access permission corresponding to the permission identifier as the access permission of the access request.

[0046] Furthermore, in the access area, you can configure only the permission identifiers that allow access, or you can choose to configure all IDs that allow access and IDs that deny access. The access permissions for IDs that allow access are read / write / read and write, and the access permissions for IDs that deny access are not read or write.

[0047] In another exemplary embodiment, the access request also carries the security attributes of the access terminal or service module. Further, step S206 may include the following steps:

[0048] Step S2062: if the security attribute is secure, determining that the access permission of the access request is a predetermined permission corresponding to the target access area;

[0049] Step S2064: When the security attribute is non-secure, the pre-configured mapping relationship is searched according to the target access area, and the access permission corresponding to the permission identifier is determined as the access permission of the access request.

[0050] Furthermore, each access zone can implement unified access control for access terminals (masters) with higher security levels. Based on the security level of each access zone, the corresponding predetermined permissions (i.e., the highest access permissions) can be set to non-readable, read-only, readable and writable, etc. This allows for faster determination of access permissions and improves the response speed of access requests. For other non-secure access terminals / business modules, fine-grained control is implemented through permission identification, ensuring effective security control.

[0051] Through the embodiments of the present disclosure, group control and granularity control methods can be supported, which can effectively reduce the complexity of permission control, improve the control accuracy of address ranges, and reduce resource usage.

[0052] In an exemplary embodiment, the method further comprises:

[0053] If the access permission of the access request is determined to be unreadable and unwritable, denying the access request;

[0054] In a case where the access permission of the access request is determined to be at least one of read or write, the access request is permitted.

[0055] In an exemplary embodiment, the access terminal includes one or more business modules; the access terminals and / or business modules with the same access rights have the same corresponding permission identifiers; the access terminals and / or business modules with different access rights have different corresponding permission identifiers.

[0056] Furthermore, to facilitate access rights management, a preset number of permission identifiers can be set. If the number of access terminals is less than the preset number, a different permission identifier can be assigned to each access terminal. However, if the number of access terminals is large, access terminals with the same security level or access rights can be grouped together, with each group assigned a single permission identifier. If an access terminal contains business modules with different security levels, a separate permission identifier must be configured for each business module.

[0057] In an exemplary embodiment, according to a preset security level specification, the chip system is divided into multiple preset functional safety level domains, wherein each functional safety level domain includes multiple access terminals and multiple accessed terminals; each functional safety level domain has a hardware firewall, wherein the hardware firewall is used to perform access control on the accessed terminals within the corresponding functional safety level domain; the permission identifier of the access terminal and / or business module is configured by the business module with the highest security level in the functional safety level domain.

[0058] Furthermore, taking the field of automotive smart chips as an example, the preset safety level specification may be the Automotive Safety Integration Level (ASIL).

[0059] In the embodiment of the present disclosure, a hardware firewall is configured for each functional safety level domain, and the mapping relationship between the access area (region), identification (ID) and corresponding access rights of each hardware firewall is configured respectively, thereby achieving hardware isolation and control of different functional safety level domains, thereby preventing high functional safety areas from being affected by low functional safety areas, and also preventing high functional safety services from being affected by low functional safety services.

[0060] In an exemplary embodiment, before step S204, the method further includes: converting the virtual address in the access request into a physical address through a page table in a memory management unit (MMU) or a system memory management unit (SMMU), wherein the access address is a physical address.

[0061] In this embodiment, the MMU / SMMU can convert virtual addresses and physical addresses and perform access control through the page table. It maps virtual addresses of user state, kernel state, and peripherals respectively, converts them to corresponding physical addresses, and sets permission attributes in the page table to perform access control and regional isolation.

[0062] In an exemplary embodiment, the access end (master) may include at least one of the following: a central processing unit (CPU), a graphics processing unit (GPU), a video processing unit (VPU), a storage device, a neural network processing unit (NPU), a hardware security module (HSM), a security encryption and decryption engine, a direct memory access (DMA), and an external device.

[0063] Furthermore, the access terminal may also include an image signal processing (ISP), a digital signal processing (DSP), and a data processing unit (DPU).

[0064] In an exemplary embodiment, the accessed end may include at least one of the following: a storage device and a peripheral register.

[0065] In an exemplary embodiment, the hardware firewall may support a bypass debugging mode, which allows system function debugging to be performed by bypassing the firewall, thereby reducing the complexity of troubleshooting.

[0066] In one exemplary embodiment, the hardware firewall can support an error reporting mechanism that can promptly and accurately report the error location and access information (address, attributes, etc.), improving diagnostic efficiency. Furthermore, the firewall can also record and report rejected access requests, allowing users to promptly identify and address potential risks.

[0067] Through the embodiments disclosed herein, the functions of access control and permission setting can be achieved, solving the problems in related technologies such as simple hardware firewall functions and limited permission control and functional security effects. Precise control can be performed on permissions of different functional security level domains and secure / non-secure services, thereby improving the information security and functional security of the entire chip system.

[0068] The disclosed embodiments can be applied to multifunctional, high-performance integrated chips, particularly in the field of chip security protection, including but not limited to cockpit chips, autonomous driving chips, mobile phone chips, computer chips, and artificial intelligence chips. Taking the automotive intelligent chip field as an example, current automotive intelligent chip systems mainly include digital instrument systems, driver assistance systems, and infotainment systems, each with different functions and security levels.

[0069] FIG3 is a schematic diagram of the structure of an automotive smart chip system according to an embodiment of the present disclosure. As shown in FIG3 , the automotive smart chip system can be divided into the following functional safety level domains according to its functions and safety attributes:

[0070] High-performance computing domain 32, automotive domain (ASIL-B) 34, automotive domain (ASIL-D) 36, and safety island (ASIL-D) 38.

[0071] In this embodiment, the high-performance computing domain 32 only involves information security, the automotive domain (ASIL-B), automotive domain (ASIL-D) and safety island (ASIL-D) involve functional safety, and the safety island (ASIL-D) has the highest safety level.

[0072] In this embodiment, each domain contains a high-computing-power CPU, GPU, storage device, NPU device, multiple display interfaces, and supports a variety of rich automotive peripherals, and can support various complex functions such as 3D graphics display, deep learning, computer vision, audio and video encoding and decoding, etc.

[0073] In this embodiment, the hardware of the high-performance computing domain 32 consists of a high-performance A-core processor and various peripheral modules. The A-core high-performance processor has a lower security level but relatively high performance and computing power. It runs a high-performance operating system (HLOS) such as Linux or Android, and is primarily responsible for running high-computing functions such as the entertainment system, instrument display, and environmental perception.

[0074] In this embodiment, the automotive domain (ASIL-B) 34 consists of four real-time computing R cores, which run the FreeRTOS operating system and are mainly responsible for sensor signal acquisition, body comfort system, regulation and control, air conditioning windows and suspension control and other functions.

[0075] In this embodiment, the automotive domain (ASIL-D) 36 uses two R-cores in a dual-core lock to achieve ASIL-D functional safety. These cores run the AUTOSAR OS, a general automotive control system. This OS is primarily responsible for safety-critical functions such as vehicle control, powertrain control, energy management, and chassis functions.

[0076] In this embodiment, the safety island (ASIL-D) 38 also uses two R cores for dual-core locking to achieve ASIL-D functions. All its system components are independent of other domains and are not affected by the functions of other domains. It mainly performs safety monitoring and key data storage.

[0077] Applying the access control method in any of the above application embodiments to the automotive smart chip system can ensure that each domain does not affect each other's functional safety level during the interaction process. By setting the permission identification (ID) and access rights, the high-performance computing domain can be controlled not to affect the functional safety area, and the low-functional security domain is allowed to access the high-functional security domain, allowing reading but not writing. Furthermore, if reading will cause other side effects, such as reading the first-in-first-out queue (First In First Out, referred to as FIFO), access should be prohibited. At the same time, the services within the same functional safety domain can be distinguished, and isolation can be achieved between low-functional safety services and high-functional safety services.

[0078] Figure 4 is a schematic diagram of the process of implementing access control through page tables in related technologies. As shown in Figure 4, the MMU / SMMU uses page tables to convert virtual addresses to physical addresses and perform access control. It maps virtual addresses such as user mode, kernel mode, and peripherals to corresponding physical addresses, and sets permission attributes in the page tables to perform access control and regional isolation.

[0079] Furthermore, memory and page tables are managed by the operating system (OS) running on the A core. The OS controls the access scope and permissions of access sources by manipulating the page tables, including those of the MMU and SMMU. Page tables are stored in the DDR, and the cache used to store page tables in the MMU is the Translation Look-aside Buffer (TLB). Page table control permissions include data read, write, and execute. The first two correspond to the data path, while the latter corresponds to the instruction path.

[0080] Figure 5 is a flowchart of access control when the page table is tampered according to an embodiment of the present disclosure. As shown in Figure 5, the left side is an example of directly accessing the memory after querying the page table, and the right side is an example of accessing the memory through the firewall after querying the page table.

[0081] In this embodiment, when the page table function is normal and has not been tampered with, when a non-secure access terminal (master) accesses memory, it first uses the MMU to query the page table. If the access address is in the non-secure area, the MMU will convert the virtual address to a physical address and access the data in the non-secure area of ​​memory. If the access address is in the secure area, the MMU will deny access to the non-secure access terminal based on the page table permission attributes, thereby isolating the access between the secure and non-secure areas.

[0082] In this embodiment, when the MMU / SMMU page table permissions are illegally tampered with, if the memory is directly accessed after querying the page table, the non-secure access end can access the secure data in the DDR through the tampered page table, thereby posing a security risk.

[0083] In this embodiment, if a firewall is used to perform access filtering on the DDR interface, for a non-secure access end, even if the page table is illegally tampered with, its access to secure data will still be blocked and it can only access specific areas for which it has permission.

[0084] Through the embodiments of the present disclosure, data security protection is further strengthened from the accessed end, and security risks generated in the data transfer process (such as illegal tampering of page tables) can be avoided.

[0085] Figure 6 is a schematic diagram (I) of a process for implementing access control through a hardware firewall according to an embodiment of the present disclosure, applied to a high-performance computing domain. As shown in Figure 6, within the high-performance computing domain (core A), the firewall can separately control the access permissions of different access terminals to the computing domain DDR.

[0086] In this embodiment, the access end in the high-performance computing domain includes: A core processor, secure OS, non-secure OS, hardware security module HSM, encryption and decryption engine, direct memory access DMA; the accessed end includes DDR and peripherals.

[0087] In this embodiment, the memory DDR is divided into a secure access area (region) and a non-secure access area by a firewall, thereby achieving physical isolation of secure data and non-secure data.

[0088] Furthermore, the memory DDR can be divided into multiple access regions with different security levels, and distinguished by the number "region+number", where region0 can be a preset basic access region. The present disclosure does not limit the number of access regions.

[0089] In this embodiment, the A core processor has two states: secure state and non-secure state, namely secure OS and non-secure OS. The secure state can access the entire DDR data, while the non-secure state can only access non-secure data and is prohibited from reading and writing secure data.

[0090] In this embodiment, security modules such as the hardware security module HSM and the encryption and decryption engine are mainly responsible for high-security information and encryption and decryption services. Their security level is relatively high and they can normally access the entire DDR data. Non-security modules such as DMA are mainly responsible for moving data and can only operate on non-security data. Reading and writing of security data is prohibited.

[0091] In the disclosed embodiments, information security within the high-performance computing domain can be protected by a hardware firewall, ensuring that secure data cannot be obtained / destroyed by non-secure access terminals.

[0092] Figure 7 is a schematic diagram (Part 2) of the access control process implemented through a hardware firewall according to an embodiment of the present disclosure, applied to the high-performance computing domain and the automotive domain (ASIL-B). As shown in Figure 7, firewall read and write permission control is performed when the high-performance computing domain (A core) and the automotive domain (R core) simultaneously access the DDR in the automotive domain (ASIL-B).

[0093] In this embodiment, a hardware firewall is provided in each of the high-performance computing domain and the automotive-standard domain (ASIL-B) to perform access control on the accessed end in the current domain.

[0094] In this embodiment, the DDR in the automotive domain (ASIL-B) is divided into two parts: Region 0, which has a high security level, and Region 1, which has a low security level and is used for data sharing. However, this disclosure is not limited to this, and the number of access regions and the corresponding security levels can be adjusted according to actual needs.

[0095] In this embodiment, when the A core and DMA in the high-performance computing domain access the memory of the automotive domain (ASIL-B), the firewall will control the access area and permissions based on the access source. Since the security level of the A core is lower than that of the automotive domain, the firewall can be configured as follows: the A core can only read the Region0 area and cannot write to the Region0 area, but can freely read and write the Region1 area, which facilitates data interaction with the R core.

[0096] In this embodiment, when the R core accesses the vehicle-specification domain memory, it can freely read and write Region0 and Region1 because the safety level is ASIL-B and meets the requirements.

[0097] In another exemplary embodiment, the memory access of the R core in the automotive domain (ASIL-B) to a higher-level safety domain (such as the automotive domain ASIL-D) will be restricted by the firewall within the automotive domain (ASIL-D).

[0098] Furthermore, the firewall controls access based on the permission identifier (ID) of the access source, which can be achieved by setting different permission tags for the A core and the R core.

[0099] In the disclosed embodiment, hardware isolation of domains with different functional safety levels can be achieved through a hardware firewall, thereby ensuring functional safety, that is, areas with high functional safety cannot be affected by areas with low functional safety, and functional safety areas cannot be affected by computing domains.

[0100] FIG8 is a schematic diagram of the structure of an on-chip hardware firewall according to an embodiment of the present disclosure.

[0101] As shown in Figure 8, the on-chip hardware firewall includes multiple firewall filter layers (Filter0 to Filter3). Each firewall filter layer corresponds to a different type of access point. For example, the firewall filter layer corresponding to the CPU is Filter0, the firewall filter layer corresponding to the GPU is Filter1, and the firewall filter layer corresponding to the DMA / DPC is Filter2. Filter3 is not shown. This disclosure is not limited to this, and the number of firewalls and the corresponding access point types can be adjusted according to actual needs.

[0102] In this embodiment, each firewall filter layer corresponds to one or more access terminals, each of the firewall filter layer corresponds to multiple access areas, and each of the access areas is pre-configured with a mapping relationship between a permission identifier for allowed access and the corresponding access permission.

[0103] In this embodiment, the firewall filtering layer is configured to receive an access request for accessing the accessed end from the corresponding access end, and determine the target access area from multiple access areas of the corresponding accessed end based on the permission identifier and access address carried in the access request, and determine the access rights of the access request based on the permission identifier and the target access area.

[0104] Furthermore, each access area corresponds to an address range of the accessed end (such as DDR memory). The address ranges corresponding to the access areas in different firewall filtering layers may overlap. For example, region1 and region3 in Figure 8 both correspond to the DDR address range A1 to A2.

[0105] In an exemplary embodiment, the firewall can be set to support 4 filter layers (Filter) and 9 access areas (regions). The filter external access terminal (master), such as CPU, GPU, DPC, VPU, etc., can confirm whether it can read and write the corresponding access area based on the access address and ID.

[0106] In an exemplary embodiment, a common basic access region (e.g., region 0) can be set for multiple firewall filter layers. Addresses outside the range of Region 1 to Region 8 all belong to region 0. Furthermore, this basic access region can be set to the lowest permissions, retaining only read and write permissions for the data sharing area, but the present disclosure is not limited to this, and the permissions can be adjusted according to actual needs.

[0107] In an exemplary embodiment, a hardware firewall is located between an accessed end and a Network On Chip (NoC); the hardware firewall and the accessed end are in the same functional safety level domain, which is divided according to a preset safety level specification.

[0108] Furthermore, a firewall filter layer can be set at the interface of the memory DDR. The on-chip network will send the access request to the firewall filter layer corresponding to the access end according to the device type of the access end, and control the access rights through the firewall filter layer.

[0109] In an exemplary embodiment, the firewall filtering layer further includes: an access register configured to store mapping relationships between corresponding permission identifiers of allowed access and access permissions in the multiple access areas.

[0110] In an exemplary embodiment, if a region is to restrict access to a specific ID and deny access to all other IDs, the region must cross all valid filters. Each region can control all 16 IDs.

[0111] Furthermore, if the number of access points is greater than a preset number, such as 16, multiple access points with the same permissions can share one ID. Access points with the same ID can be divided into different filtering layers according to device type.

[0112] In one exemplary embodiment, access can be divided into secure access and non-secure access, with the security attributes determined by the access terminal or business module initiating the access request. Typically, firewalls control secure access permissions as read / write; for non-secure access, further permissions are controlled based on the ID to read / write.

[0113] In an exemplary embodiment, the ID of each access terminal is software-configurable, that is, it can be statically configured when the system starts.

[0114] Figure 9 is a schematic diagram of configuring multiple access point authorization identifiers according to an embodiment of the present disclosure. As shown in Figure 9, the authorization identifier (ID) of the access point in each functional security level domain is configured by the business module with the highest security level in the domain, namely the IDs_conf module.

[0115] In an exemplary embodiment, the entire system is divided into two parts: a high-performance computing domain (on the left) and an automotive-standard domain (on the right). A set of registers is set in each functional safety level domain to configure the IDs of all access terminals / business modules in the area.

[0116] Furthermore, the high-performance computing domain can be configured with a high-security hardware security module (HSM), while the automotive domain can be configured with an R-core processor. This configuration is highly flexible and versatile.

[0117] In one exemplary embodiment, the ID configuration for the high-performance computing domain (left) primarily involves information security, such as the GPU, VPU, and DMA. Its IDs are generally fixed before shipment. The automotive domain (right) has higher security requirements, primarily related to functional safety. The access end services include both secure and non-secure services, and services vary from manufacturer to manufacturer. Therefore, the ID for the automotive domain does not require fixed security and can be statically configured at system startup.

[0118] In an exemplary embodiment, when the number of access terminals / business modules that require ID configuration is small, each module can be configured with a different ID. When there are more modules that require ID configuration, a group control method can be used to configure the same ID for business modules with the same access rights, thereby reducing the complexity of access control and permission determination.

[0119] Figure 10 is a detailed flow diagram of firewall access control according to an embodiment of the present disclosure. As shown in Figure 10, the process includes the following steps:

[0120] Step S1001: For each access request coming in through the filter, the address is compared starting from Region 1. If the address is located in the region and the region is valid in the current filter, the next step is started.

[0121] Step S1002: If Region 1 does not match, then M+1 is performed to compare the next Region, and the process is repeated in sequence. If all Regions cannot match, then Region 0 is used to perform permission control on the Filter.

[0122] Step S1003, determine the security attribute of the access. If it is a secure state, read the access register of the region to check whether the current access is allowed, where 1 is allowed and 0 is denied.

[0123] Step S1004: If it is a non-secure access, determine whether the ID of the access source is configured in the region according to the access register of the region. If it is configured, further check the access rights of the ID, whether it is read / write or read-write.

[0124] In an exemplary embodiment, step S1001 and step S1002 may also specifically match the Region configured in the Filter. If no Region is matched, the basic access region (Region 0) is used for permission control.

[0125] In this embodiment, the access register in step S1004 is configured only for the IDs that are allowed to access the access area. If the ID is not configured in the access area, the access request is rejected.

[0126] Through the disclosed embodiments, it is possible to filter information on the accessed end, ensure data security in key security areas, and prevent access rights from being tampered with. By combining ID and Region, fine-grained access control can be achieved, which can more safely and effectively protect access areas of different security levels.

[0127] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above method embodiments are executed.

[0128] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0129] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0130] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0131] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0132] Obviously, those skilled in the art should understand that the modules or steps of the present disclosure described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any particular combination of hardware and software.

[0133] The foregoing description is merely a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Those skilled in the art will readily appreciate that various modifications and variations of the present disclosure are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present disclosure shall be included within the scope of protection of the present disclosure.

Claims

1. An access control method implemented by a hardware firewall, the method comprising: Receiving, through a firewall filtering layer corresponding to the access end, an access request initiated by the access end to the accessed end, wherein the access request carries an authority identifier and an access address; Determine a target access area from a plurality of access areas of the accessed end corresponding to the firewall filtering layer according to the access address; The access permission of the access request is determined according to the permission identifier and the target access area, wherein each access area is pre-configured with a mapping relationship between the permission identifier allowed to access and the corresponding access permission.

2. The method according to claim 1, wherein: Before receiving, through the firewall filtering layer corresponding to the access terminal, an access request initiated by the access terminal to the accessed terminal, the method further includes: Set the firewall filter layer corresponding to each device type according to the device type of the access end; Configuring a plurality of access zones for each of the firewall filter layers, wherein the plurality of access zones have different address ranges; A mapping relationship between an access permission identifier and the access permission is configured for each access area.

3. The method according to claim 1, wherein: Determining a target access area from a plurality of access areas corresponding to the firewall filtering layer according to the access address includes: matching the access address with the address range of each access area in the plurality of access areas respectively; An access area whose address range includes the access address is determined as a target access area.

4. The method according to claim 3, further comprising: When the address ranges of the multiple access areas do not include the access address, a preset basic access area is determined as the target access area, wherein the basic access area is a part of the access area of ​​the accessed end, and the basic access area is pre-configured with a mapping relationship between the permission identifier allowed to access and the corresponding access permission.

5. The method according to claim 1, wherein: Determining the access permission of the access request according to the permission identifier and the target access area includes: The pre-configured mapping relationship is queried according to the target access area, and the access permission corresponding to the permission identifier is determined as the access permission of the access request.

6. The method according to claim 1, wherein: Determining the access permission of the access request according to the permission identifier and the target access area includes: The access request also carries the security attributes of the access terminal or service module; In a case where the security attribute is secure, determining that the access permission of the access request is a predetermined permission corresponding to the target access area; In the case where the security attribute is non-secure, the pre-configured mapping relationship is queried according to the target access area, and the access permission corresponding to the permission identifier is determined as the access permission of the access request.

7. The method according to claim 1, further comprising: If the access permission of the access request is determined to be not readable or writable, denying the access request; In a case where the access right of the access request is determined to be at least one of read or write, the access request is permitted.

8. The method according to claim 1, wherein: The access terminal includes one or more service modules; The access terminals and / or business modules with the same access rights have the same permission identifiers; Access terminals and / or business modules with different access rights have different corresponding permission identifiers.

9. The method according to claim 8, wherein: According to the preset safety level specification, the chip system is divided into a plurality of preset functional safety level domains, wherein each functional safety level domain includes a plurality of access terminals and a plurality of accessed terminals; Each functional safety level domain has a hardware firewall, wherein the hardware firewall is used to perform access control on the accessed end within the corresponding functional safety level domain; The permission identifier of the access terminal and / or business module is configured by the business module with the highest security level in the functional security level domain.

10. The method according to claim 1, wherein: Before determining the access permission of the access request according to the permission identifier and the target access area, the method further includes: The virtual address in the access request is converted into a physical address through a page table in a memory management unit MMU or a system management unit SMMU, wherein the access address is a physical address.

11. The method according to any one of claims 1 to 10, wherein: The access end includes at least one of the following: a central processing unit CPU, a graphics processing unit GPU, a video processing unit VPU, a storage device, a neural network processor NPU, a hardware security module HSM, a security encryption and decryption engine, a direct memory access DMA and an external device; The accessed end includes at least one of the following: a storage device and a peripheral register.

12. An on-chip hardware firewall, comprising: Multiple firewall filter layers, wherein each of the firewall filter layers corresponds to one or more access terminals, each of the firewall filter layers corresponds to multiple access areas, and each of the access areas is pre-configured with a mapping relationship between a permission identifier allowed to access and a corresponding access permission; The firewall filtering layer is configured to receive an access request for accessing the accessed end from the corresponding access end, and determine a target access area from multiple access areas of the corresponding accessed end according to the permission identifier and access address carried in the access request, and determine the access rights of the access request according to the permission identifier and the target access area.

13. The hardware firewall according to claim 12, wherein: The hardware firewall is located between the accessed end and the on-chip network; The hardware firewall and the accessed end are in the same functional safety level domain, and the functional safety level domain is divided according to a preset security level specification.

14. The hardware firewall according to claim 12, wherein: The firewall filtering layer also includes: The access register is configured to store the mapping relationship between the corresponding permission identifiers and access permissions of the multiple access areas.

15. A computer-readable storage medium, wherein: The storage medium stores a computer program, wherein the computer program executes the method described in any one of claims 1 to 11 when executed by a processor.

16. An electronic device comprising a memory and a processor, wherein: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Intelligent card hardware firewall system and realizing method thereof

    CN103136124A

  • Memory access control method and apparatus

    CN106469124A

  • A chip access safety control device and a chip system

    CN109886035A

  • Firewall implementation method, chip, electronic equipment and computer readable storage medium

    CN114844726A

  • Whitelisting of trusted accessors to restricted web pages

    US20200014697A1

Cited By

  • End side model calling system and method and computer readable storage medium

    CN119312353A

  • Limited access system of GPU (Graphics Processing Unit) register

    CN120124030A

  • Identifying firewall issues impacting communication sessions

    US12776943B2

  • Identifying Firewall Issues Impacting Communication Sessions

    US20260095366A1