Skip to content
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

README: Update Limitations section #430

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,49 @@ being merged to `master`:

## Limitations

The emulator handles only a few syscalls made by common apps; for instance,
There is absolutely no guarantee that apps will have the same behavior on
hardware devices and Speculos, though the differences are limited.

### Syscalls

The emulator handles only a few syscalls made by common apps. For instance,
syscalls related to app install, firmware update or OS info can't be
implemented.

There is absolutely no guarantee that apps will have the same behavior on
hardware devices and Speculos:
Invalid syscall parameters might throw an exception on a real device while
being ignored on Speculos.
Notably, this is the case for application allowed derivation path and curve and
application settings flags which are enforced by the device OS, but ignored by
Speculos.

### Memory alignment

Attempts to perform unaligned accesses when not allowed (eg. dereferencing a
misaligned pointer) will cause an alignment fault on a Ledger Nano S device but
not on Speculos. Note that such unaligned accesses are supported by other
Ledger devices.

Following code crashes on LNS device, but not on Speculos nor on other devices.
```
uint8_t buffer[20];
for (int i = 0; i < 20; i++) {
buffer[i] = i;
}
uint32_t display_value = *((uint32_t*) (buffer + 1));
PRINTF("display_value: %d\n", display_value);
```

### Watchdog

NanoX and Stax devices use an internal watchdog enforcing usage of regular
calls to `io_seproxyhal_io_heartbeat();`. This watchdog is not emulated on
Speculos.

### Pending review screen

- Invalid syscall parameters might throw an exception on a real device while
being ignored on Speculos.
- Attempts to perform unaligned accesses when not allowed (eg. dereferencing a
misaligned pointer) will cause an alignment fault on a hardware device.
The C SDK offers a feature to display a warning screen upon app launch
indicating that the app has not been reviewed.
As the `_install_parameters` are not handled by Speculos, the screen won't be displayed.


## Security
Expand Down
Loading