Refactor - Virtual Address Constants #615
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.