-
-
Notifications
You must be signed in to change notification settings - Fork 672
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
improve optiga communication reliability #3303
Conversation
TychoVrahe
commented
Sep 26, 2023
- adds delays to physical layer
- resets the optiga via pin during initialization
core/embed/firmware/main.c
Outdated
@@ -300,6 +300,10 @@ void SVC_C_Handler(uint32_t *stack) { | |||
// raising privileges. | |||
stack[6] = (uintptr_t)reboot_to_bootloader; | |||
return; | |||
case SVC_GET_SYSTICK_VAL: { | |||
uint32_t *ret_ptr = (uint32_t *)stack[0]; |
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.
this looks insecure? allows unprivileged code to write to any address.
maybe we could return the value in some register or something?
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.
@hiviah any quick ideas how to do that?
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.
(alternately just reserve a static uint32_t
at a known location and the caller will need to take the systick val out of there?)
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.
going with the static idea: 8f7ae53
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.
utACK
[no changelog]
[no changelog]
8f7ae53
to
750dc50
Compare