Skip to content

libct/seccomp/patchbpf: rm duplicated code#3635

Merged
cyphar merged 1 commit intoopencontainers:mainfrom
kolyshkin:ebpf-dup-code
Nov 2, 2022
Merged

libct/seccomp/patchbpf: rm duplicated code#3635
cyphar merged 1 commit intoopencontainers:mainfrom
kolyshkin:ebpf-dup-code

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

In findLastSyscalls, we convert libseccomp.ArchNative to the real libseccomp architecture, but archToNative already does that, so this code is redundant.

Remove the redundant code, and move its comment to archToNative.

Fixes: 7a8d716

@kolyshkin kolyshkin requested a review from cyphar October 17, 2022 16:57
@kolyshkin kolyshkin marked this pull request as ready for review October 17, 2022 17:22
Copy link
Copy Markdown
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

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

LGTM, good catch.

@kolyshkin
Copy link
Copy Markdown
Contributor Author

@thaJeztah PTAL

@kolyshkin
Copy link
Copy Markdown
Contributor Author

@thaJeztah @AkihiroSuda PTAL

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

thanks for the ping, was reading it from my phone last week, and wanted to check on my computer 😂

In findLastSyscalls, we convert libseccomp.ArchNative to the real
libseccomp architecture, but archToNative already does that, so
this code is redundant.

Remove the redundant code, and move its comment to archToNative.

Fixes: 7a8d716
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@cyphar cyphar closed this in df2043a Nov 2, 2022
@cyphar cyphar merged commit df2043a into opencontainers:main Nov 2, 2022
@kolyshkin kolyshkin deleted the ebpf-dup-code branch November 2, 2022 17:05
@kolyshkin kolyshkin added the backport/1.1-done A PR in main branch which has been backported to release-1.1 label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/seccomp backport/1.1-done A PR in main branch which has been backported to release-1.1 easy-to-review kind/refactor refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants