Skip to content

fix(vfio): dynamically allocate buffer for PCI config space#429

Merged
Lencerf merged 1 commit intogoogle:mainfrom
Lencerf:fix/vfio/config-size
Mar 12, 2026
Merged

fix(vfio): dynamically allocate buffer for PCI config space#429
Lencerf merged 1 commit intogoogle:mainfrom
Lencerf:fix/vfio/config-size

Conversation

@Lencerf
Copy link
Collaborator

@Lencerf Lencerf commented Mar 12, 2026

Dynamically allocate the buffer for PCI configuration space based on the region_config.size. This resolves an EFAULT error when read() is called with a buffer larger than the actual device configuration space.

Dynamically allocate the buffer for PCI configuration space based on the
region_config.size. This resolves an EFAULT error when read() is called
with a buffer larger than the actual device configuration space.

Signed-off-by: Changyuan Lyu <changyuanl@google.com>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 22987201988

Details

  • 0 of 4 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 26.903%

Changes Missing Coverage Covered Lines Changed/Added Lines %
alioth/src/vfio/pci.rs 0 4 0.0%
Totals Coverage Status
Change from base Build 22923063720: -0.002%
Covered Lines: 3879
Relevant Lines: 14848

💛 - Coveralls

@Lencerf Lencerf merged commit af2cd3f into google:main Mar 12, 2026
6 of 9 checks passed
@Lencerf Lencerf deleted the fix/vfio/config-size branch March 12, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants