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

Investigate privileged syscall for allocating large accounts #30

Open
buffalojoec opened this issue Dec 4, 2024 · 1 comment
Open
Assignees

Comments

@buffalojoec
Copy link
Contributor

buffalojoec commented Dec 4, 2024

Because it's a builtin program, the System program can allocate large accounts, beyond the limits of BPF programs. This is due to the fact that accounts for builtin programs actually live in host memory, so they can be resized with a greater delta than if they were inside the VM.

On the builtin side, host-memory account resizing is limited to MAX_PERMITTED_DATA_LENGTH (10 * 1024 * 1024), while on the BPF side, VM-memory account resizing is limited to MAX_PERMITTED_DATA_INCREASE (1_024 * 10).

Let's say we think the best solution is to introduce a syscall that can only be invoked by 11111111111111111111111111111111. The only way such a syscall and reallocation would work is if the VM input memory region starting from the target account onward was re-serialized after the account was resized. Although not ideal, it's worth noting that the only instructions in the System program that need this capability use one to three accounts.

Open to alternative suggestions!

@buffalojoec
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant