Method for address space layout randomization in execute-in-place code
AssigneeBlackBerry Limited
InventorsOliver Whitehouse, Benjamin Winston, Michael E. McCallum
Life of this patent
Estimating the term…
Abstract
A method for dynamically (i.e., upon boot) rewriting, in a failure resistant manner, of part of, or the entirety of, the flash memory for a device allows for a changing of location for logical blocks of execute-in-place code. Conveniently, the rewriting results in a randomization, of varying degree, of the address space layout upon each boot up cycle.
Claims10
A method of address space layout randomization for execute-in-place code, said method comprising:
- storing an execute-in-place code image in a plurality of logical memory blocks occupying memory spaces having uniform dimensions;
- provisioning, as a swap memory block, at least one memory space having said uniform dimensions, wherein said at least one memory space is among, and in addition to, said memory spaces storing said execute-in-place code;
- maintaining a table of references to said plurality of logical memory blocks and said swap memory block;
- receiving an indication of a boot;
- and
- responsive to said receiving:
- selecting a candidate logical memory block from among said plurality of logical memory blocks;
- reading contents of a memory space occupied by said candidate logical memory block;
- and
- writing said contents to said memory space provisioned as said swap memory block.
A computing apparatus comprising a processor adapted to:
- store an execute-in-place code image in a plurality of logical memory blocks occupying memory spaces having uniform dimensions;
- provision, as a swap memory block, at least one memory space having said uniform dimensions, wherein said at least one memory space is among, and in addition to, said memory spaces storing said execute-in-place code;
- maintain a table of references to said plurality of logical memory blocks and said swap memory block;
- receive an indication of a boot;
- and
- responsive to said receiving:
- select a candidate logical memory block from among said plurality of logical memory blocks;
- read contents of a memory space occupied by said candidate logical memory block;
- and
- write said contents to said memory space provisioned as said swap memory block.
A non-transitory computer-readable medium containing computer-executable instructions that, when performed by a processor, cause said processor to:
- store an execute-in-place code image in a plurality of logical memory blocks occupying memory spaces having uniform dimensions;
- provision, as a swap memory block, at least one memory space having said uniform dimensions, wherein said at least one memory space is among, and in addition to, said memory spaces storing said execute-in-place code;
- maintain a table of references to said plurality of logical memory blocks and said swap memory block;
- receive an indication of a boot;
- and
- responsive to said receiving:
- select a candidate logical memory block from among said plurality of logical memory blocks;
- read contents of a memory space occupied by said candidate logical memory block;
- and
- write said contents to said memory space provisioned as said swap memory block.
Dependencies are inferred from the claim text.