Skip to content

seccomp: support notify listener#627

Merged
rhatdan merged 15 commits into
containers:masterfrom
giuseppe:seccomp-notifications-oci
Mar 23, 2021
Merged

seccomp: support notify listener#627
rhatdan merged 15 commits into
containers:masterfrom
giuseppe:seccomp-notifications-oci

Conversation

@giuseppe

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

rebased

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

Copy link
Copy Markdown
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?

Comment thread src/libcrun/container.c

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
Copy Markdown
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?

Comment thread src/libcrun/container.c Outdated
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
Copy Markdown
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?

Comment thread src/libcrun/container.c Outdated
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Magic number?

Comment thread tests/init.c Outdated
if (strcmp (argv[1], "check-feature") == 0)
{
if (argc < 2)
if (argc <= 2)

Copy link
Copy Markdown
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
giuseppe added 13 commits March 23, 2021 19:55
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
giuseppe force-pushed the seccomp-notifications-oci branch from 1cac654 to 9aa382b Compare March 23, 2021 18:58
@giuseppe

Copy link
Copy Markdown
Member Author

addressed the comments and pushed a new version

@rhatdan

rhatdan commented Mar 23, 2021

Copy link
Copy Markdown
Member

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.

2 participants