-
Notifications
You must be signed in to change notification settings - Fork 32
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
Introduce ELF binfmt loader #79
Conversation
9db9fca
to
bf8b46c
Compare
bf8b46c
to
41d6132
Compare
41d6132
to
9ad500d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-by: Sergiu Moga sergiu@unikraft.io
POSIX defines the maximum 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, and alignment 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>
9ad500d
to
640621b
Compare
Rebased from |
dc8ee24
to
e60cf8a
Compare
e60cf8a
to
55acb8c
Compare
55acb8c
to
9aeb986
Compare
Add binfmt loader for ELF. This is the default loader used on execve(). Signed-off-by: Michalis Pappas <michalis@unikraft.io>
9aeb986
to
78260ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for all the work!
Reviewed-by: Andrei Tatar andrei@unikraft.io
Let's get it merged! 🎉 Approved-by: Andrei Tatar andrei@unikraft.io |
POSIX defines the maximum 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, and alignment 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> Approved-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Sergiu Moga <sergiu@unikraft.io> Reviewed-by: Andrei Tatar <andrei@unikraft.io> GitHub-Closes: #79
Add binfmt loader for ELF. This is the default loader used on execve(). Signed-off-by: Michalis Pappas <michalis@unikraft.io> Approved-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Sergiu Moga <sergiu@unikraft.io> Reviewed-by: Andrei Tatar <andrei@unikraft.io> GitHub-Closes: #79
unikraft/unikraft#1386 implements
execve()
via the newly introducedlibukbinfmt
, which allows the registration of loaders of different binary file formats. This PR introduces the ELF binfmt loader, which is used internally byexecve()
.GitHub-Depends-On: #73
GitHub-Depends-On: #77