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

Add support for seccomp actions ActKillThread and ActKillProcess #3204

Merged
merged 2 commits into from
Sep 9, 2021
Merged

Add support for seccomp actions ActKillThread and ActKillProcess #3204

merged 2 commits into from
Sep 9, 2021

Conversation

cyphar
Copy link
Member

@cyphar cyphar commented Sep 9, 2021

Carry of #2564.

Two new seccomp actions have been added to the libseccomp-golang
dependency, which can be now supported by runc, too.

ActKillThread kills the thread that violated the rule. It is the same as
ActKill. All other threads from the same thread group will continue to
execute.

ActKillProcess kills the process that violated the rule. All threads in
the thread group are also terminated. This action is only usable when
libseccomp API level 3 or higher is supported.

Signed-off-by: Sascha Grunert [email protected]
Signed-off-by: Aleksa Sarai [email protected]

AkihiroSuda
AkihiroSuda previously approved these changes Sep 9, 2021
kolyshkin
kolyshkin previously approved these changes Sep 9, 2021
Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would structure this the other way around (drop unnecessary defines first, add ActKill{Thread,Process} next) -- will be cleaner this way, and less git history to dig through.

But it's a teeny tiny change and thus it's fine with it as it is.

LGTM

cyphar and others added 2 commits September 9, 2021 17:46
These are just boilerplate and are only really useful for the two
actions which require us to set a default errno/aux value (ActErrno and
ActTrace).

Signed-off-by: Aleksa Sarai <[email protected]>
Two new seccomp actions have been added to the libseccomp-golang
dependency, which can be now supported by runc, too.

ActKillThread kills the thread that violated the rule. It is the same as
ActKill. All other threads from the same thread group will continue to
execute.

ActKillProcess kills the process that violated the rule. All threads in
the thread group are also terminated. This action is only usable when
libseccomp API level 3 or higher is supported.

Signed-off-by: Sascha Grunert <[email protected]>
Signed-off-by: Aleksa Sarai <[email protected]>
@cyphar
Copy link
Member Author

cyphar commented Sep 9, 2021

Ah you're quite right @kolyshkin, fixed.

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kolyshkin kolyshkin merged commit 9e22bca into opencontainers:master Sep 9, 2021
@cyphar cyphar deleted the seccomp-kill-thread-process branch September 10, 2021 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants