Skip to content

Commit

Permalink
README: Update Limitations section
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Chapron committed Oct 26, 2023
1 parent 2348e2f commit 5f31875
Showing 1 changed file with 38 additions and 7 deletions.
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,48 @@ 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 crash 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 device 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

0 comments on commit 5f31875

Please sign in to comment.