Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor - Virtual Address Constants #615

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

Lichtso
Copy link

@Lichtso Lichtso commented Oct 15, 2024

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.

@Lichtso Lichtso force-pushed the refactor/virtual_address_constants branch 2 times, most recently from c633d91 to 255752b Compare October 15, 2024 12:26
@Lichtso Lichtso force-pushed the refactor/virtual_address_constants branch from 255752b to 5fc2bdd Compare October 15, 2024 16:36
@@ -2815,27 +2812,6 @@ fn test_err_instruction_count_syscall_capped() {
);
}

#[test]
fn test_non_terminate_early() {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is a duplicate of test_err_callx_oob_low()

@Lichtso Lichtso requested a review from LucasSte October 15, 2024 16:45
@Lichtso Lichtso merged commit e1a9c32 into main Oct 17, 2024
12 checks passed
@Lichtso Lichtso deleted the refactor/virtual_address_constants branch October 17, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants