-
-
Notifications
You must be signed in to change notification settings - Fork 721
Tropic wear leveling #6136
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
base: main
Are you sure you want to change the base?
Tropic wear leveling #6136
Conversation
|
| model | device_test | click_test | persistence_test |
|---|---|---|---|
| T2T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3B1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3W1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
Latest CI run: 19672792880
78944c4 to
44307f0
Compare
44307f0 to
0bd6f2e
Compare
core/embed/sec/tropic/tropic.c
Outdated
| void tropic_pin_set_time(uint32_t *time_ms) { | ||
| rng_fill_buffer_strong_time(time_ms); | ||
| update_change_pin_counter_time(time_ms); | ||
| get_change_pin_counter_time(time_ms); |
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.
Calling get_change_pin_counter_time() will give an incorrect result, because if the counter is not cached, then time will be added to the estimate, but in reality update_change_pin_counter() will have cached it, so it will be a no-op.
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.
Fixed in 55a745a.
core/embed/sec/tropic/tropic.c
Outdated
| } | ||
|
|
||
| void tropic_pin_reset_slots_time(uint32_t *time_ms, uint16_t pin_index) { | ||
| get_change_pin_counter_time(time_ms); |
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.
Calling get_change_pin_counter_time() will give an overestimate when the counter is not cached, because it will have already been cached in tropic_pin_stretch(), so in tropic_pin_reset_slots() it will be a no-op.
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.
Fixed in 55a745a.
Co-authored-by: Andrew Kozlik <[email protected]>
|
Looks like you changed |




































No description provided.