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

seccomp: support notify listener #627

Merged
merged 15 commits into from
Mar 23, 2021

Conversation

giuseppe
Copy link
Member

The OCI runtime specs[1] recently gained the support for seccomp
notifications.

[1] opencontainers/runtime-spec#1074

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

@giuseppe
Copy link
Member Author

@mauriciovasquezbernal PTAL

@giuseppe giuseppe force-pushed the seccomp-notifications-oci branch 3 times, most recently from b649c17 to 1187828 Compare March 17, 2021 13:10
@giuseppe giuseppe marked this pull request as ready for review March 17, 2021 13:16
@giuseppe giuseppe force-pushed the seccomp-notifications-oci branch 4 times, most recently from 1ecc6ba to 09ddd93 Compare March 23, 2021 11:56
@giuseppe
Copy link
Member Author

rebased

/*
* crun - OCI runtime written in C
*
* Copyright (C) 2018, 2019 Giuseppe Scrivano <giuseppe@scrivano.org>
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be updated/changed?


yajl_gen_string (gen, YAJL_STR ("pid"), strlen ("pid"));
yajl_gen_integer (gen, pid);
r = yajl_gen_string (gen, YAJL_STR ("1.0"), strlen ("1.0"));
Copy link
Member

Choose a reason for hiding this comment

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

Should you hard code the version here?

if (UNLIKELY (r != yajl_gen_status_ok))
goto exit;

r = yajl_gen_string (gen, YAJL_STR ("0.2.0"), strlen ("0.2.0"));
Copy link
Member

Choose a reason for hiding this comment

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

Majic number, should this be a const?

if (UNLIKELY (r != yajl_gen_status_ok))
goto exit;

r = yajl_gen_string (gen, YAJL_STR ("0.2.0"), strlen ("0.2.0"));
Copy link
Member

Choose a reason for hiding this comment

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

Magic number?

tests/init.c Outdated
@@ -310,7 +310,7 @@ int main (int argc, char **argv)

if (strcmp (argv[1], "check-feature") == 0)
{
if (argc < 2)
if (argc <= 2)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be just 3, would be easier to understand.

@giuseppe giuseppe force-pushed the seccomp-notifications-oci branch 2 times, most recently from c978989 to 1cac654 Compare March 23, 2021 17:32
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
The OCI runtime specs[1] recently gained the support for seccomp
notifications.

[1] opencontainers/runtime-spec#1074

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe
Copy link
Member Author

addressed the comments and pushed a new version

@rhatdan
Copy link
Member

rhatdan commented Mar 23, 2021

LGTM

@rhatdan rhatdan merged commit a1c0ef1 into containers:master Mar 23, 2021
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