Skip to content

Rename seccompiler binary, deprecate --basic parameter and add extra thread name validation #2628

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

Merged
merged 6 commits into from
Jun 23, 2021

Conversation

alindima
Copy link
Contributor

@alindima alindima commented Jun 17, 2021

Reason for This PR

  1. Considering the proposal of upstreaming the seccompiler library to rust-vmm,
    the seccompiler binary used by Firecracker will need a slightly different name, so that
    it doesn't clash with the library name.

  2. Also, since the only use of the --basic flag of seccompiler-bin is to support Firecracker's --seccomp-level 1, which is deprecated, we are also deprecating the --basic flag.

  3. Duplicated thread names in the JSON filter were allowed, due to the fact that the JSON spec doesn't forbid this. For the seccomp use case, however, it can result in undefined behaviour.

Description of Changes

  • rename the seccompiler binary to seccompiler-bin

  • deprecate the seccompiler-bin --basic flag. It now displays a runtime warning when used.

  • add a custom deserializer for the Json file that errors if there are duplicate thread keys in the file. also added a regression test.

  • This functionality can be added in rust-vmm.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any newly added unsafe code is properly documented.
  • Any API changes are reflected in firecracker/swagger.yaml.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

Once we upstream the seccompiler library to rust-vmm and use it
from there, the seccompiler binary in Firecracker will need a
different name, so that it doesn't create confusion.

As such, we rename the seccompiler binary to seccompiler-bin now,
so that we don't rename it later, avoiding a breaking change in naming.

The seccompiler library keeps its name and it will be used, under
the hood by the binary as well.

Signed-off-by: alindima <[email protected]>
@alindima alindima self-assigned this Jun 17, 2021
@alindima alindima added Status: Awaiting review Indicates that a pull request is ready to be reviewed NextRelease labels Jun 17, 2021
@alindima alindima requested a review from a team June 17, 2021 15:28
@alindima alindima changed the title Rename seccompiler binary and deprecate --basic parameter Rename seccompiler binary, deprecate --basic parameter and extra thread name validation Jun 18, 2021
@alindima alindima changed the title Rename seccompiler binary, deprecate --basic parameter and extra thread name validation Rename seccompiler binary, deprecate --basic parameter and add extra thread name validation Jun 18, 2021
interface, with a couple of helper functions, for deserializing and installing
the binary filters.
Besides the seccompiler-bin executable, seccompiler also exports a small
library interface, with a couple of helper functions, for deserializing and
Copy link
Contributor

Choose a reason for hiding this comment

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

seccompiler also exports a library interface, with helper functions for deserializing......

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

serban300
serban300 previously approved these changes Jun 18, 2021
alindima added 5 commits June 22, 2021 11:50
The --basic parameter is only used to support Firecracker's
deprecated --seccomp-level argument.

It makes sense to deprecate it and remove it once
--seccomp-level is removed from Firecracker.

Signed-off-by: alindima <[email protected]>
@alindima
Copy link
Contributor Author

@serban300 @AlexandruCihodaru I addressed the nits, PTAL

@serban300 serban300 merged commit 7ab8bec into firecracker-microvm:main Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants