US5873124AExpiredUtility
Virtual memory scratch pages
Est. expiryFeb 6, 2017(expired)· nominal 20-yr term from priority
Inventors:Richard P. Draves, Jr.
G06F 12/145
59
PatentIndex Score
33
Cited by
4
References
27
Claims
Abstract
A computer system includes physical memory, a virtual memory system, and a protected operating system kernel. The kernel has kernel functions that accept and use virtual memory addresses from user processes. When an invalid virtual memory address is used by a kernel function, the memory address is automatically mapped to a scratch location in physical memory, so that the kernel function accesses the scratch location rather than generating an exception.
Claims
exact text as granted — not AI-modifiedI claim:
1. In a computer system having virtual memory, a method comprising the following steps: passing a virtual memory address to an executable program component; accessing the virtual memory address from the executable program component; during said accessing, detecting when the virtual memory address is invalid and in response mapping the invalid virtual memory address to a scratch location in physical memory; wherein the accessing step accesses the scratch location.
2. A method as recited in claim 1 and further comprising a step of designating a common scratch location in physical memory and mapping different invalid virtual memory addresses to said common scratch location.
3. A method as recited in claim 1 wherein the virtual memory address is within a virtual memory page, the mapping step comprising a step of mapping said virtual memory page to a physical memory page.
4. A method as recited in claim 1 and further comprising a step of generating an error indication from the executable program component in response to mapping the invalid virtual memory address to the scratch location.
5. In a computer system having user processes and protected kernel functions that access virtual memory, a method comprising the following steps: calling a protected kernel function from a user process; providing a virtual memory address as an argument when calling the protected kernel function; accessing the virtual memory address from the protected kernel function; during said accessing, generating a memory fault if the virtual memory address is invalid and in response mapping the invalid virtual memory address to a scratch location in physical memory; wherein the accessing step accesses the scratch location.
6. A method as recited in claim 5 wherein the virtual memory address is within a virtual memory page, the mapping step comprising a step of mapping said virtual memory page to a physical memory page.
7. A method as recited in claim 5 and further comprising a step of designating a common scratch location in physical memory and mapping different invalid virtual memory addresses to said common scratch location.
8. A method as recited in claim 5 and further comprising a step of generating an error indication from the protected kernel function component in response to mapping the invalid virtual memory address to the scratch location.
9. A computer-readable storage medium having computer-executable instructions for performing the steps recited in claim 5.
10. In a computer system having a user process and protected kernel functions, the computer system having a kernel address space that the user process is prevented from accessing, a method comprising the following steps: calling a protected kernel function from the user process; providing a virtual memory address as an argument when calling the protected kernel function; bounds-checking the virtual memory address to ensure that it is not part of the kernel address space; accessing the virtual memory address from the protected kernel function if the virtual memory address is not in the kernel address space; during said accessing, generating a memory fault if the virtual memory address is invalid and in response mapping the invalid virtual memory address to a scratch location in physical memory; wherein the accessing step accesses the scratch location.
11. A method as recited in claim 10 and further comprising a step of returning an error indication if the virtual memory address is in the kernel address space.
12. A method as recited in claim 10 and further comprising a step of designating a common scratch location in physical memory and mapping different invalid virtual memory addresses to said common scratch location.
13. A method as recited in claim 10 and further comprising a step of generating an error indication from the protected kernel function in response to mapping the invalid virtual memory address to the scratch location.
14. A computer-readable storage medium having computer-executable instructions for performing the steps recited in claim 10.
15. In a computer system having a plurality of user processes and having protected kernel functions, a method comprising the following steps: calling protected kernel functions from the user processes; providing virtual memory addresses as arguments when calling the protected kernel functions; accessing the virtual memory addresses from the protected kernel functions; during said accessing, detecting when virtual memory addresses are invalid and in response mapping invalid virtual memory addresses to a common scratch location in physical memory; wherein the accessing step accesses the scratch location; upon context changes from one user process to another, clearing any data that the protected kernel functions have written to the common scratch location.
16. A method as recited in claim 15 wherein the virtual memory addresses are within virtual memory pages, the mapping step comprising a step of mapping said virtual memory pages to a common physical memory page.
17. A method as recited in claim 15 and further comprising a step of generating an error indication from a particular protected kernel function when an invalid memory address is detected during execution of said particular protected kernel function.
18. A computer-readable storage medium having computer-executable instructions for performing the steps recited in claim 15.
19. A computer system comprising: physical memory having a portion that has been designated as a scratch location; a virtual memory system that supports the execution of processes that are not completely stored in the physical memory; a protected kernel including kernel functions that accept virtual memory addresses as arguments from user processes, wherein the kernel functions access such virtual memory addresses; a virtual memory fault handler that detects invalid virtual memory addresses while they are being accessed and in response maps the invalid virtual memory addresses to the scratch location in physical memory; wherein the kernel functions access the scratch location when accessing invalid virtual memory addresses.
20. A computer system as recited in claim 19, further comprising a kernel virtual address space that user processes are prevented from accessing, wherein the protected kernel is configured to bounds-check virtual memory addresses accepted from user processes to ensure that they are not part of the kernel virtual address space.
21. A computer system as recited in claim 19, further comprising a plurality of user processes, wherein the protected kernel is configured to clear any data written to the scratch location upon context changes from one user process to another.
22. A computer system as recited in claim 19, wherein the scratch location comprises a single page of the physical memory.
23. A computer system as recited in claim 19, wherein the protected kernel is configured to return an error indication to a calling user process in response to detecting an invalid virtual memory address during execution of a particular kernel function.
24. A computer-readable storage medium having instructions that are executable by a computer having virtual memory for performing steps comprising: passing a virtual memory address to an executable program component; accessing the virtual memory address from the executable program component; during said accessing, detecting when the virtual memory address is invalid and in response mapping the invalid virtual memory address to a scratch location in physical memory; wherein the accessing step accesses the scratch location.
25. A computer-readable storage medium as recited in claim 24, the steps further comprising a step of designating a common scratch location in physical memory and mapping different invalid virtual memory addresses to said common scratch location.
26. A computer-readable storage medium as recited in claim 24, wherein the virtual memory address is within a virtual memory page, the mapping step comprising a step of mapping said virtual memory page to a physical memory page.
27. A computer-readable storage medium as recited in claim 24, the steps further comprising a step of generating an error indication from the executable program component in response to mapping the invalid virtual memory address to the scratch location.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.