Skip to content

Conversation

@onvej-sl
Copy link
Contributor

@onvej-sl onvej-sl commented Nov 7, 2025

No description provided.

@trezor-bot trezor-bot bot added this to Firmware Nov 7, 2025
@github-project-automation github-project-automation bot moved this to 🔎 Needs review in Firmware Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

en main(all)

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

@onvej-sl onvej-sl force-pushed the onvej-sl/tropic-wear-leveling branch 2 times, most recently from 78944c4 to 44307f0 Compare November 10, 2025 13:39
@onvej-sl onvej-sl force-pushed the onvej-sl/tropic-wear-leveling branch from 44307f0 to 0bd6f2e Compare November 10, 2025 15:04
@onvej-sl onvej-sl marked this pull request as ready for review November 10, 2025 15:17
@onvej-sl onvej-sl requested review from andrewkozlik and removed request for TychoVrahe and obrusvit November 10, 2025 17:17
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);
Copy link
Contributor

@andrewkozlik andrewkozlik Nov 13, 2025

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 55a745a.

}

void tropic_pin_reset_slots_time(uint32_t *time_ms, uint16_t pin_index) {
get_change_pin_counter_time(time_ms);
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 55a745a.

@github-actions
Copy link

Looks like you changed Cargo.lock. Please make sure to review the dependencies and update internal version list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔎 Needs review

Development

Successfully merging this pull request may close these issues.

3 participants