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

Fix missing offset in TBStore read from flash #11296

Merged
merged 1 commit into from
Aug 29, 2019

Conversation

kyle-cypress
Copy link

Description

When reading data from flash in more than one chunk, the current code reads every chunk to the same location in the output buffer. This change offset the read destination into the buffer by the current chunk's offset (similar to what is done for the CRC computation).

Submitting the pull request now to obtain feedback on the change. Greentea test logs will be attached soon.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ARMmbed/team-cypress

Release Notes

This could cause incomplete data retrieval and mismatch when reading
data in more than one chunk, because every chunk would be read to the
same location at the beginning of the output buffer.
@ciarmcom ciarmcom requested review from a team August 23, 2019 01:00
@ciarmcom
Copy link
Member

@kyle-cypress, thank you for your changes.
@ARMmbed/mbed-os-storage @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@VeijoPesonen VeijoPesonen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how was this caught and why haven't seen it earlier ?

@kyle-cypress
Copy link
Author

how was this caught and why haven't seen it earlier ?

This was caught when one of our team members temporarily set work_buf_size = 8 while debugging devicekey test failures related to in-progress TARGET_PSOC6 work.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 28, 2019

This PR is part of rollup PR #11366

Please do not update this PR, or if needed, let us know asap

@0xc0170 0xc0170 merged commit 06dd330 into ARMmbed:master Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants