Protection key management and prefixing in virtual address space legacy emulation system
AssigneeLzlabs GmbH
InventorJan Jaeger
Life of this patent
Estimating the term…
Abstract
A system is described to provide protection key access control in a system whose operating system and processor were not designed to provide a protection key memory access control mechanism. Such a system can be applied to an emulator or to enable a system that executes native applications to be interoperable with a legacy system that employs protection key memory access control.
Claims20
A method of implementing protection key memory access control in a computing system having a processor not adapted to support protection key memory access control, the processor including a memory management unit (MMU) and executing an operating system that manages virtual memory, the processor adapted to execute user processes comprising tasks, the method comprising:
- assigning a contiguous range of addressable virtual memory containing blocks to each user process;
- assigning a storage access key to each task;
- initiating execution of a specific task in a specific user process using the storage access key assigned to that specific task by assigning a first virtual address mapping in the contiguous range of addressable virtual memory to that specific task with its assigned storage access key;
- in response to a subsequent memory access by the specific task, if the subsequent memory access uses a storage access key different from any storage access key previously used by the specific task, determining whether the specific task is authorized to use the different storage access key, and if the specific task is authorized, assigning a subsequent virtual address mapping to the specific task and the different storage access key;
- in response to a command to allocate or to free storage used by the specific task, setting control bytes including setting storage key data and an indicator that a page comprising data associated with each control byte is valid;
- and
- upon execution of a computer instruction of the specific task using any storage access key,
- generating a virtual address associated with the specific task;
- determining whether the virtual address associated with the specific task lies within the contiguous range of virtual address memory;
- and
- if the address lies within the contiguous range of addressable virtual memory:
- generating by the MMU a segmentation fault;
- verifying by an exception handler that said storage access key has a value of zero or that said task is authorized to access the virtual address using that said storage access key;
- upon said verifying an exception handler, changing native protection settings associated with the page stored in the virtual memory and associated with the task to allow access to the associated virtual address;
- and
- subsequently re-executing the computer instruction of the specific task to allow access to the page.
A computing system comprising:
- a processor not adapted to support protection key memory access control, the processor including a memory management unit (MMU) and executing an operating system that manages addressable virtual memory, the processor adapted to execute user processes comprising tasks;
- and
- a non-transient memory storing instructions which, when executed on the processor, cause the processor to:
- assign to a user process, a contiguous range of addressable virtual memory containing blocks and assign a storage key to each block;
- assign a storage access key to each task;
- initiate execution of a specific task in a specific user process using a specific storage access key assigned to that specific task by assigning a first virtual address mapping in the contiguous range of addressable virtual memory to that specific task with its assigned storage access key;
- in response to a subsequent memory access by the specific task, if the subsequent memory access uses a storage access key different from any storage access keys previously used by the specific task, determine whether the specific task is authorized to use the different storage access key, and if the specific task is authorized, assign a subsequent virtual address mapping to the specific task and different storage access key;
- in response to a command to allocate or to free storage by the specific task, set control bytes including setting the storage key data and an indicator that a page comprising data associated with each control byte is valid;
- and
- upon execution of a computer instruction of the specific task using any storage access key:
- generate a virtual address in the address associated with the specific task;
- determine whether the virtual address associated with the specific task lies within the range of contiguous range of addressable virtual memory;
- and
- if the address lies within the contiguous range of addressable virtual memory:
- generate by the MMU a segmentation fault;
- verify by an exception handler that said storage access key has a value of zero or that said task is authorized to access the virtual address in the addressable virtual memory using that said storage access key;
- upon said verifying an exception handler, change native protection settings associated with the page stored in the virtual memory and associated with the task to allow access to the associated virtual address;
- and
- subsequently re-execute the computer instruction of the specific task to allow access to the page.
Dependencies are inferred from the claim text.