SBPFv1 allows multiple readonly sections and a single text section. All of them are concatenated and mapped into the same memory region named MM_PROGRAM_START.
Going forward we want to separate the bytecode (of the text section) out into its own (unmapped) region named MM_BYTECODE_START, which will only be executable and neither readable nor writable for memory accesses.
The MM_PROGRAM_START region will then become MM_RODATA_START because it will be readable only, and not executable anymore.
Also exports a constant MM_REGION_SIZE to make it easier to have multiple input sections MM_INPUT_START + MM_REGION_SIZE * index.
SBPFv1 allows multiple readonly sections and a single text section. All of them are concatenated and mapped into the same memory region named
MM_PROGRAM_START
.Going forward we want to separate the bytecode (of the text section) out into its own (unmapped) region named
MM_BYTECODE_START
, which will only be executable and neither readable nor writable for memory accesses.The
MM_PROGRAM_START
region will then becomeMM_RODATA_START
because it will be readable only, and not executable anymore.Also exports a constant
MM_REGION_SIZE
to make it easier to have multiple input sectionsMM_INPUT_START + MM_REGION_SIZE * index
.