-
Notifications
You must be signed in to change notification settings - Fork 14
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
Teeerex: Be much more verbose during the process. #181
Conversation
40cd6b3
to
8e6b8dc
Compare
64464da
to
fd56641
Compare
fd56641
to
e9cd2ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, I just saw that you did not actually as for a review yet, so I stopped. :)
primitives/teerex/src/lib.rs
Outdated
@@ -143,10 +143,16 @@ impl TcbVersionStatus { | |||
|
|||
pub fn verify_examinee(&self, examinee: &TcbVersionStatus) -> bool { | |||
for (v, r) in self.cpusvn.iter().zip(examinee.cpusvn.iter()) { | |||
log::debug!("teerex: verify_examinee: v={:#?},r={:#?}", v, r); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for all these extra logs. However, I am not fond of teerex:
, it is essentially redundant information as the logger does already contain the rust module path. But we could add a target: TEEREX
as an argument, where teerex should be a const ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know about this, handy feature! Rewrote all of them to use it, thanks for the early review! :D 💯
teerex/sgx-verify/src/collateral.rs
Outdated
log::info!("teerex: called into runtime call register_tcb_info(), inside Self::is_valid."); | ||
log::info!("teerex: called into runtime call register_tcb_info(), inside Self::is_valid, self is: {:#?}" , &self); | ||
log::info!("teerex: called into runtime call register_tcb_info(), inside Self::is_valid, timestamp_millis: {:#?}" , ×tamp_millis); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Together with the above suggestion of setting a target instead of just having the teerex
in the string I suggest:
log::info!("teerex: called into runtime call register_tcb_info(), inside Self::is_valid."); | |
log::info!("teerex: called into runtime call register_tcb_info(), inside Self::is_valid, self is: {:#?}" , &self); | |
log::info!("teerex: called into runtime call register_tcb_info(), inside Self::is_valid, timestamp_millis: {:#?}" , ×tamp_millis); | |
log::info!(target: TEEREX, "Called into runtime call register_tcb_info(), inside Self::is_valid."); | |
log::info!(target: TEEREX, "self is: {:#?}" , &self); | |
log::info!(target: TEEREX, "timestamp_millis: {:#?}" , ×tamp_millis); |
What do you think?
e9cd2ce
to
f384c41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would downgrade some logs to trace!
, and also strip some of the info from some of the logs. I have mentioned two example cases, where I think this is true. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes! Looks good to me now!
Sorry, for merging the other one first. I remember that Alain brought in a `log::info!("teerex: ***"), maybe you can fix this while resolving the conflicts. :) |
No description provided.