Preventing unauthorized memory access using a physical address access permissions table
Abstract
A host may use address translation to convert virtual addresses to physical addresses for endpoints, which may then submit memory access requests for physical addresses. The host may record permissions granting entities access to physical addresses in physical address access permissions tables (PAAPTs) responsive to the address translation. The security of address translation services may be increased based at least on verifying memory access requests are authorized using the PAAPTs. For example, an entity identifier included in a request may be used to locate a corresponding PAAPT, and a physical address may be extracted from the request and used to locate an entry indicating whether an entity corresponding to the entity identifier has permission to access the physical address. Where the entity has permission, the system may perform the memory access using the physical address. Otherwise an error or fault code may be provided in response to the request.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 11 · Forward citations: 0.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A method comprising: receiving, from a first entity, a translation request to translate a virtual address to a physical address, the virtual address being of a virtual memory space owned by a second entity; determining the first entity is authorized to receive the physical address responsive to the translation request; based at least on the determining and responsive to the translation request: recording, in an entry corresponding to the physical address in one or more tables at a host, a permission that enables the first entity to provide the physical address over a host controller interface of the host access to the virtual memory space of the second entity using a direct memory access, wherein a mapping table entry associated with the translation request is accessed to enable verification of the permission using one or more references to the one or more tables stored in the mapping table entry; and transmitting, to the first entity, the physical address translated from the virtual address using at least one translation table accessed from the mapping table entry; receiving, over the host controller interface, the physical address in a request from the first entity for access to the virtual memory space of the second entity using the direct memory access, the request being made using the physical address received by the first entity in response to the translation request; performing the verification that the first entity is authorized to provide the physical address over the host controller interface to access the virtual memory space of the second entity using the direct memory access, the verification including the host accessing the one or more tables using the one or more references stored in the mapping table entry for the permission based at least on associating the mapping table entry with the request; and providing, over the host controller interface and to the first entity, a response to the request based at least on a result of the verifying verification.
- Claim 2Depends on #1
The method of claim 1, wherein the accessing uses a stream identifier included in the request to locate the mapping table entry that corresponds to the stream identifier and the one or more references include one or more pointers to the one or more tables, the one or more pointers stored in the mapping table entry.
- Claim 3Depends on #2
The method of claim 2, wherein the host is configured to point each stream ID corresponding to the first entity to the one or more tables.
- Claim 4Depends on #1
The method of claim 1, wherein the mapping table entry further stores a stage configuration that disables address translation, and the host performs the verification based at least on determining the stage configuration indicates that the address translation is disabled.
- Claim 5Depends on #1
The method of claim 1, wherein the accessing includes: identifying a table from the one or more tables using an entity identifier extracted from the request; and identifying the permission using the physical address extracted from the request.
- Claim 6Depends on #1
The method of claim 1, wherein the entry corresponds to a permissions bitmap for a plurality of physical addresses, and the recording includes compressing the permissions bitmap for the plurality of physical addresses in memory.
- Claim 7Depends on #1
The method of claim 1, wherein responsive to the translation request, the one or more references are stored in the mapping table entry.
- Claim 8Depends on #1
The method of claim 1, wherein the first entity is authorized to receive the physical address responsive to the translation request based at least on the first entity being moved into a trusted execution environment (TEE) of the second entity.
- Claim 9Depends on #1
The method of claim 1, wherein the mapping table entry further stores configuration information that selectively enables and disables the verification.
- Claim 10Independent Claim
A system comprising: one or more processing units to execute operations comprising: receiving, from a first entity, a translation request to translate a virtual address to a physical address, the virtual address being of a virtual memory space owned by a second entity; determining the first entity is authorized to receive the physical address responsive to the translation request; based at least on the determining and responsive to the translation request: recording, in an entry corresponding to the physical address in one or more tables at a host, a permission that enables the first entity to provide the physical address over a host controller interface of the host access to the virtual memory space of the second entity using a direct memory access, wherein a mapping table entry associated with the translation request is accessed to enable verification of the permission using one or more references to the one or more tables stored in the mapping table entry; and transmitting, to the first entity, the physical address translated from the virtual address using at least one translation table accessed from the mapping table entry; receiving, over the host controller interface, the physical address in a request from the first entity for access to the virtual memory space of the second entity using the direct memory access; performing the verification that the first entity is authorized to provide the physical address over the host controller interface to access the virtual memory space of the second entity using the direct memory access, the verification including the host accessing the one or more tables using the one or more references stored in the mapping table entry for the permission based at least on associating the mapping table entry with the request; and enabling the direct memory access to the physical address over the host controller interface based at least on the verification.
- Claim 11Depends on #10
The system of claim 10, wherein the permission is stored in a table using one or more permissions bits indexed by one or more physical addresses.
- Claim 12Depends on #10
The system of claim 10, wherein the permission is stored in a transaction mapping table that was used to translate the physical address from a logical address.
- Claim 13Depends on #10
The system of claim 10, further comprising providing the physical address to the first entity based at least on the determining and responsive to the translation request.
- Claim 14Depends on #10
The system of claim 10, wherein the identifying of the permission uses an entity identifier extracted from the request, and the physical address extracted from the request.
- Claim 15Depends on #10
The system of claim 10, wherein the request for access to the virtual memory space of the second entity comprises a direct memory access transfer request.
- Claim 16Depends on #10
The system of claim 10, wherein the system is comprised in at least one of: a control system for an autonomous or semi-autonomous machine; a perception system for an autonomous or semi-autonomous machine; a system for performing simulation operations; a system for performing deep learning operations; a system implemented using an edge device; a system implemented using a robot; a system incorporating one or more virtual machines (VMs); a system implemented at least partially in a data center; a system including a collaborative creation platform for three-dimensional (3D) content; or a system implemented at least partially using cloud computing resources.
- Claim 17Independent Claim
A processor comprising: one or more circuits to control access to a virtual memory space of a first entity based at least on a result of a verification performed by a host accessing one or more tables from a mapping table entry for a permission based at least on associating the mapping table entry with a request over a host controller interface of the host, that a second entity is authorized to provide a physical address over the host controller interface to access the virtual memory space using a direct memory access, the request being from the second entity for access to the virtual memory space of the first entity using the direct memory access, the permission recorded in an entry in the one or more tables based at least on determining the second entity is authorized to receive the physical address responsive to a translation request from the second entity, wherein the entry is accessed for the verification from one or more references to the one or more tables stored in the mapping table entry associated with the translation request, the physical address being translated from the virtual address using at least one translation table accessed from the mapping table entry and transmitted to the second entity responsive to the translation request.
- Claim 18Depends on #17
The processor of claim 17, wherein the permission is of permissions that are stored in the one or more tables using one or more permissions bits indexed by one or more physical addresses.
- Claim 19Depends on #18
The processor of claim 18, wherein at least one of the one or more tables is stored in a transaction mapping table that was used to translate the physical address from a logical address.
- Claim 20Depends on #17
The processor of claim 17, wherein the permission is set by a host process of a host, the first entity is a virtual machine managed by the host, and the second entity corresponds to a device external to the host.
Technical Overview & Description
BACKGROUND PCI Express (PCIe) provides for Address Translation Services (ATS) where a host may use a translation agent to translate a virtual address, provided by an endpoint (e.g., a device interfacing with a root port), to a physical address in memory. The endpoint may cache translations from the translation agent and subsequently use physical addresses derived from the cached translations to request Direct Memory-Access (DMA) transfers. Thus, the translation agent may not be required to perform translation for the DMA transfers, reducing memory access latency and the burden of the translation agent performing address translation. However, when requesting a DMA transfer, there is a chance that the physical address included in the request is not one that the endpoint is authorized to access. In various circumstances, such as where the endpoint corresponds to an external device, it may not be possible to trust that the endpoint will not attempt an unauthorized access and so ATS is often disabled. As a further complication, the host may include multiple Virtual Machines (VMs) where an endpoint is part of a Trusted Execution Environment (TEE) of one VM and not the other. In this case, the host should be capable of guaranteeing that the endpoint cannot access the memory of the VM that does not include the endpoint in its TEE, but this may not be possible. SUMMARY Embodiments of the present disclosure relate to preventing unauthorized memory access using a physical address access permissions table. Systems and methods are disclosed which may use a permissions table to verify whether an entity associated with a request for memory access to a physical address is authorized to access the physical address. Disclosed approaches may be used to enhance the security of memory access, such as in Address Translation Services. In contrast to conventional systems, such as those described above, disclosed approaches may record permissions corresponding to one or more entities and on
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (11)
| Patent | Title | Year | Citations |
|---|---|---|---|
| KR 20210064525 A | A golf putting exerciser to realize various slope | — | 0 |