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

Fix compilation and JIT support on NetBSD #187

Merged
merged 1 commit into from
Jun 28, 2020
Merged

Fix compilation and JIT support on NetBSD #187

merged 1 commit into from
Jun 28, 2020

Conversation

tevador
Copy link
Owner

@tevador tevador commented Jun 25, 2020

Fixes #186

  1. Disables hugepages (not supported).
  2. Force W^X (required).
  3. When allocating JIT memory, PROT_EXEC must be reserved in order to set the pages executable later.

@tevador tevador mentioned this pull request Jun 25, 2020
@tevador tevador force-pushed the pr-netbsd branch 2 times, most recently from 7210184 to 1b5301f Compare June 27, 2020 18:28
@hyc
Copy link
Collaborator

hyc commented Jun 28, 2020

Could you please provide a more descriptive comment? It looks to me like two separate items are fixed:

  1. NetBSD doesn't support hugepages
  2. NetBSD/OpenBSD require PROT_EXEC and PROT_WRITE to be exclusive

Is that correct?

@tevador
Copy link
Owner Author

tevador commented Jun 28, 2020

@hyc It's actually 3 separate changes that are needed to make RandomX work on NetBSD. I have edited the first comment.

@hyc
Copy link
Collaborator

hyc commented Jun 28, 2020

Would like that in the actual commit comment, not just this PR comment, thanks.

1. Disable hugepages (not supported).
2. Force W^X (required).
3. When allocating JIT memory, PROT_EXEC must be reserved
   in order to set the pages executable later.
@tevador
Copy link
Owner Author

tevador commented Jun 28, 2020

Done.

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.

NetBSD mmap()
3 participants