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

Introduce ELF binfmt loader #79

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from

Conversation

michpappas
Copy link
Member

unikraft/unikraft#1386 implements execve() via the newly introduced libukbinfmt, which allows the registration of loaders of different binary file formats. This PR introduces the ELF binfmt loader, which is used internally by execve().

GitHub-Depends-On: #73
GitHub-Depends-On: #77

mogasergiu and others added 4 commits April 16, 2024 18:02
POSIX defines the minimum total size of argv + envp to ARG_MAX,
and leaves the inclusion of NULL terminators, pointers and / or
alignment bytes as implementation defined. The policy we implement is:

- Permit the total length to exceed ARG_MAX as long as it's not
  greater than 1/4 of the stack size. This is essentially the same
  policy as linux (see execve(2)), with the difference that we
  don't apply the MAX_ARG_STRLEN floor of 32 pages.

- Exclude auxv, NULL, andlignment bytes from the checked size, as
  these are of fixed size and occupy an insignificant portion of
  the stack.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Add binfmt loader for ELF. This is the default loader used on
execve().

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
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.

None yet

2 participants