Thanks to visit codestin.com
Credit goes to github.com

Skip to content

devices: fw_cfg: Correctly handle short and long reads - #8507

Merged
rbradford merged 1 commit into
cloud-hypervisor:mainfrom
rbradford:202607/fw-cfg-read-safety
Jul 1, 2026
Merged

rbradford merged 1 commit into
cloud-hypervisor:mainfrom
rbradford:202607/fw-cfg-read-safety

Conversation

@rbradford

Copy link
Copy Markdown
Member

Fill the target MMIO buffer with zeroes to handle reads with access
sizes larger than the data and also check that the read access length
does not exceed the size of the backing slice (previously it just
checked the access size vs length not taking the offset into account).

Assisted-by: Claude:Opus-4.8
Signed-off-by: Rob Bradford [email protected]

Fill the target MMIO buffer with zeroes to handle reads with access
sizes larger than the data and also check that the read access length
does not exceed the size of the backing slice (previously it just
checked the access size vs length not taking the offset into account).

Assisted-by: Claude:Opus-4.8
Signed-off-by: Rob Bradford <[email protected]>
@rbradford
rbradford requested a review from a team as a code owner July 1, 2026 16:35
@rbradford
rbradford enabled auto-merge July 1, 2026 16:56
@rbradford
rbradford added this pull request to the merge queue Jul 1, 2026
@github-project-automation github-project-automation Bot moved this from 🆕 New to 📋 Backlog in Cloud Hypervisor Roadmap Jul 1, 2026
@likebreath likebreath added the bug-fix Bug fix to include in release notes label Jul 1, 2026
@yamahata

yamahata commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Hi, this is good catch. I suspect that this issue is common for all BusDevice implementation ? If so, the logic should go to the common implementation in BusDevice trait.

If we would go for that route, it would be a big surger. So we can merge this patch first and create an issue for the future task, maybe for the next cycle.

Merged via the queue into cloud-hypervisor:main with commit c5104a9 Jul 1, 2026
39 checks passed
@github-project-automation github-project-automation Bot moved this from 📋 Backlog to ✅ Done in Cloud Hypervisor Roadmap Jul 1, 2026
@rbradford rbradford added bug-fix Bug fix to include in release notes and removed bug-fix Bug fix to include in release notes labels Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Bug fix to include in release notes

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants