#define VMALLOC_OFFSET (8*1024*1024)

This gap acts as a safeguard against any kernel faults. If out of bound addresses are accessed (these are unintentional accesses to memory areas that are no longer physically present), access fails and an exception is generated to report the error. If the vmalloc area were to immediately follow the direct mappings, access would be successful and the error would not be noticed. There should be no need for this additional safeguard in stable operation, but it is useful when developing new kernel features that are not yet mature.

vmalloc_start and vmalloc_end define the start and end of the vmalloc area used for physically noncontiguous kernel mappings. The values are not defined directly as constants but depend on several parameters.

Continue reading here: Includeasmx86pgtable32h

Was this article helpful?

0 0