Skip to content

Avoid repeating original argv[0] #7

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

es-fabricemarie
Copy link

resolves #6
binfmt-dispatcher gets typically registered to binfmt-misc with flags POCF.

  • P will preserve the original argv[0] used
  • O will give the resolved binary (e.g. after symlink derefence) as an open file in fd 3
  • but we can't use it as-is as FEX (at least) doesn't support taking "pathname" (execve) as an open file descriptor.
  • C and F are irrelevant here.

To support properly binary file already open as fd 3, FEX needs to be patched to use fexecve(3, argv, env) kind of call when requested, it doesn't appear to support it yet.

Signed-off-by: Fabrice A. Marie [email protected]

resolves AsahiLinux#6
binfmt-dispatcher gets typically registered to binfmt-misc with flags `POCF`.
- `P` will preserve the original argv[0] used
- `O` will give the resolved binary (e.g. after symlink derefence) as an open file in fd 3
- but we can't use it as-is as FEX (at least) doesn't support taking "pathname" (execve) as an open file descriptor.
- `C` and `F` are irrelevant here.

To support properly binary file already open as fd 3, FEX needs to be patched to use
`fexecve(3, argv, env)` kind of call when requested, it doesn't appear to support it yet.

Signed-off-by: Fabrice A. Marie <[email protected]>
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.

strange argv handling / mangled argv ?
1 participant