DAPLink icon indicating copy to clipboard operation
DAPLink copied to clipboard

Turn page programming/sector erase to default

Open brianesquilona opened this issue 6 years ago • 4 comments

Current implementation defaults to erasing the whole flash, unless the page programming or sector erase is enabled by flash_manager_set_page_erase(true);

I think we should enable this one by default if the flash algo has support for erase_sector. If there are no objections :), I will create a PR for this.

brianesquilona avatar Jan 28 '19 16:01 brianesquilona

I think this has both up- and downsides. On one hand using sector erase would not wipe out unprotected bootloaders and other data by accident. On the other hand partial erase has led to leakage of sensitive information more than just once...

therealprof avatar Jan 28 '19 16:01 therealprof

@therealprof DAPLink is used in development environment, not for production firmware updates. So there should be no real secrets on the device. A device that has security requirements for managing sensitive information or keys must have debug access locked out in the production lifecycle state, so DAPLink wouldn't be able to program flash, anyway.

flit avatar Mar 08 '19 18:03 flit

DAPLink is used in development environment, not for production firmware updates. So there should be no real secrets on the device.

In past times we certainly have used debug probes for production purposes.

A device that has security requirements for managing sensitive information or keys must have debug access locked out in the production lifecycle state, so DAPLink wouldn't be able to program flash, anyway.

Fair enough, though I wouldn't count on it that they always exist.

therealprof avatar Mar 08 '19 19:03 therealprof

You're absolutely right, DAPLink can and will be used in production environments. However, there's a difference between factory production and end user firmware updates. The latter is what I was talking about.

flit avatar Mar 09 '19 17:03 flit