-
Notifications
You must be signed in to change notification settings - Fork 72
quotes_handler: Rewind measured boot log file #384
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
Conversation
|
The measured boot log should never change after boot, so we just could keep it in memory instead of reading it again. |
|
I can confirm this single line change indeed fixes the problem. LGTM |
This is probably the best solution. I'll make the changes towards this. |
|
Just a nit, can the unwrap be error handled instead (I figure rewind is an Option or Result). Perhaps even .except with a meaningful error message. EDIT: just noticed its a draft, so the above might already be your intent. |
b381fdd to
aa02df4
Compare
|
@maugustosilva Could you please check if this fixes the issue? |
Rewind the file before reading its content. Fixes: keylime#383 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
|
After some discussion, it was decided to revert the change to simply add a rewind. There is no clear benefit on holding several KB of data on memory all the time to avoid rewinding and re-reading the file which is on a memory-based file system. |
|
Tested both solutions, and both pass all my tests. |
|
@lkatalin @lukehinds @ashcrow Could you review/approve this? |
Rewind the file before reading its content.
Fixes: #383
Signed-off-by: Anderson Toshiyuki Sasaki ansasaki@redhat.com