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

Do not enforce representability for hybrid binaries in elf imgact. #1741

Merged
merged 2 commits into from
Jul 13, 2023

Conversation

qwattash
Copy link
Contributor

When loading hybrid position-dependent binaries, we do not care about the representability of the ELF sections. The reservation creation will skip the representability alignment enforcement as well, so avoid complaining about alignment when creating the imgact_capability.

This should fix #1700.

@jrtc27
Copy link
Member

jrtc27 commented Jul 10, 2023

Use the __ELF_CHERI or whatever ifdef? We compile imgact_elf once for each ELF type.

@qwattash
Copy link
Contributor Author

Use the __ELF_CHERI or whatever ifdef? We compile imgact_elf once for each ELF type.

Done

sys/kern/imgact_elf.c Outdated Show resolved Hide resolved
sys/kern/imgact_elf.c Outdated Show resolved Hide resolved
sys/kern/imgact_elf.c Outdated Show resolved Hide resolved
@bsdjhb
Copy link
Collaborator

bsdjhb commented Jul 12, 2023

One nit: s/commont/comment/ in the second log message.

When loading hybrid position-dependent binaries, we do not care about the
representability of the ELF sections. The reservation creation will skip the
representability alignment enforcement as well, so avoid complaining about
alignment when creating the imgact_capability.
@qwattash qwattash merged commit cd2c740 into dev Jul 13, 2023
@qwattash qwattash deleted the fix-non-cheri-bin-loading branch July 13, 2023 17:22
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.

4 participants