Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
IOTSTOR-953: Fix address calculations from SlicingBlockDevice #11797
IOTSTOR-953: Fix address calculations from SlicingBlockDevice
Summary of change (What the change is for and why)
Fix address calculations from SlicingBlockDevice.
This fixed #11781
Documentation (Details of any document updates required)
No documentation update.
Pull request type (required)
Test results (required)
Release Notes (required for feature/major PRs)
Summary of changes
Impact of changes
Migration actions required
Test results before the last commit:
After the last commit
* Refactor some headers to use relative path from Mbed OS root. * Refactor some data types to compile on 64bit machines. * Refactor some debug traces to use mbed_trace.
* Change MBED_ASSERTS() to return valid error code, so that checks are not bypassed on release builds. * Fix starting address calculations so that "addr" parameter is always relative to SlicingDevice and "_start" is only added when calls to underlying storage block is made. * Bypass BlockDevice:is_valid_*() to underlying block device. Slicingblockdevice was just verifying addresses independently, without verifying those from underlying block storage.
This uses HeapBlockDevice for providing the underlying storage block. Check boundaries that slicingblockdevice do not overlow over to unassigned blocks.
DeviceKey was using mbedtls_ssl_safer_memcmp() to compare result against buffer of equal length, but zero content. This comparison makes no sense as the entropy function is already returning proper error, if it fails.