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

refactor: remove wrapperd in favor launcher #9472

Open
smira opened this issue Oct 8, 2024 · 2 comments · May be fixed by #9489
Open

refactor: remove wrapperd in favor launcher #9472

smira opened this issue Oct 8, 2024 · 2 comments · May be fixed by #9489
Assignees

Comments

@smira
Copy link
Member

smira commented Oct 8, 2024

Experiment, remove wrapperd completely replacing it with https://pkg.go.dev/kernel.org/pub/linux/libs/security/libcap/cap#NewLauncher

The idea is that we should be able to set most (if not all) of wrapperd stuff by using Launcher.

This should cut our latency to fork/exec child programs.

@dsseng
Copy link
Member

dsseng commented Oct 9, 2024

As far as I understand, we cannot set ctty from our callback context before fork-exec, so we would likely need to fork kernel.org/pub/linux/libs/security/libcap/cap (GPL-2.0-only or BSD licensed) to implement ctty by modifying SysProcAttr. Apparently we use this feature to set controlling TTY for dashboard process.

@dsseng
Copy link
Member

dsseng commented Oct 9, 2024

Nvm, apparently *pa is given in the callback. Let me try that tomorrow. Also, do we have tests for dropping capabilities? I believe I should create one, just to be sure and test my changes.

cat /proc/1324/status | grep Cap and /sbin/capsh --decode=000001f3fdfeffff can be used to get and decode capability sets, respectively, so using API to get processes and then get their caps from sysfs should work just fine.

@dsseng dsseng linked a pull request Oct 11, 2024 that will close this issue
2 tasks
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 a pull request may close this issue.

2 participants