How can I read the configuration space of a PCI device inside a sysbox container?
Open
Nobody has claimed this yet.
bug
- Dominant language
- Shell
- Stars
- 3.9k
- Forks
- 230
- Avg merge
- 7h 48m
- Merged PRs (30d)
- 3
Description
Here's what I get in the sysbox container.
root@localhost:/tmp# docker run --runtime=sysbox-runc -it --rm alpine
/ # hexdump /sys/bus/pci/devices/0000:42:00.0/config
0000000 10de 27b8 0546 0010 00a1 0302 0000 0000
0000010 0000 bc00 000c 0000 0d20 0000 000c 0000
0000020 0d38 0000 0000 0000 0000 0000 10de 16ca
0000030 0000 0000 0060 0000 0000 0000 010b 0000
0000040
/ #
/ #
And the information in the host system
root@localhost:/tmp# hexdump /sys/bus/pci/devices/0000:42:00.0/config | head
0000000 10de 27b8 0546 0010 00a1 0302 0000 0000
0000010 0000 bc00 000c 0000 0d20 0000 000c 0000
0000020 0d38 0000 0000 0000 0000 0000 10de 16ca
0000030 0000 0000 0060 0000 0000 0000 010b 0000
0000040 10de 16ca 0000 0000 0000 0000 0000 0000
0000050 0002 0000 0001 0000 d6ce 0023 0000 0000
0000060 6801 4803 0008 0000 7800 0080 0000 0000
0000070 0000 0000 0000 0000 b410 0002 8de1 1064
0000080 2937 0000 6103 0045 0140 1081 0000 0000
0000090 0000 0000 0000 0000 0000 0000 0013 0007
It looks like all the configuration information in the sysbox container is truncated.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are named. Start by reproducing the docker run with --runtime=sysbox-runc and compare the container and host hexdump outputs for /sys/bus/pci/devices/0000:42:00.0/config. Trace the relevant PCI configuration handling and determine whether the container should expose the full configuration space; done means the behavior is corrected or its limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100