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

Update: use json to save opae.io driver state #3028

Merged
merged 2 commits into from
Oct 17, 2023
Merged

Conversation

tswhison
Copy link
Contributor

Description

opae.io init unbinds the target device from its driver and writes
a breadcrumb out to file so that the driver can be restored during
opae.io release. Previously, we were using the pickle module to do
this.

This github issue #3024 was filed, noting that pickle is prone to
code execution injection issues. The proposal was to use json
instead.

Collateral (docs, reports, design examples, case IDs):

#3024

  • Document Update Required? (Specify FIM/AFU/Scripts)

Tests added:

Tests run:

Manual verification using opae.io init followed by opae.io release.

@tswhison tswhison self-assigned this Oct 12, 2023
@tswhison tswhison requested a review from a team as a code owner October 12, 2023 23:38
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6502084603

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.05%) to 68.399%

Files with Coverage Reduction New Missed Lines %
binaries/fpgad/monitor_thread.c 1 85.57%
libraries/plugins/xfpga/mmio.c 2 84.72%
Totals Coverage Status
Change from base Build 6501241052: 0.05%
Covered Lines: 15768
Relevant Lines: 23053

💛 - Coveralls

Copy link
Member

@michael-adler michael-adler left a comment

Choose a reason for hiding this comment

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

Neat that replacing pickle with json is basically a switch of I/O packages, still using their dump/load methods.

@tswhison tswhison merged commit 235e16e into master Oct 17, 2023
31 checks passed
@tswhison tswhison deleted the tswhison/opae.io_json branch October 17, 2023 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants