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

Hard-coded page sizes #271

Open
hmelder opened this issue Jan 20, 2024 · 0 comments
Open

Hard-coded page sizes #271

hmelder opened this issue Jan 20, 2024 · 0 comments

Comments

@hmelder
Copy link
Collaborator

hmelder commented Jan 20, 2024

On 64-bit POWER platforms, a page is 64 KB in size (at least on Linux by default). Similarly, Asahi Linux uses a 16 KB page size.

Currently, a page size of 4k is hard-coded in the block trampolines and block_to_imp.c. In alloc_trampolines we set PROT_EXEC for rx_buffer, but this assumes that rx_buffer points to the beginning of a 4k page.

There is one proper solution, and one duck tape fix:

  1. Determine page size on runtime. Requires restructuring of block_to_imp.c as struct fields are determined based on PAGE_SIZE.
  2. Determine page size during configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant