firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

MP Table has incorrect entry count

Open cperciva opened this issue 2 years ago • 0 comments

Describe the bug

The MP Configuration Table Header (per Intel Multiprocessing Specification) includes fields "BASE TABLE LENGTH" and "ENTRY COUNT". The former specifies the length of the table (header plus entries), while the latter specifies the number of entries. The specification states that "Software must step through each entry in the base table until it reaches ENTRY COUNT".

Firecracker sets ENTRY COUNT to zero. Linux boots only because of a kernel bug -- it ignores ENTRY COUNT and instead scans through counting bytes until it hits BASE TABLE LENGTH.

To Reproduce

Try to boot an OS which obeys the Intel Multiprocessing Specification (e.g. FreeBSD).

Expected behaviour

ENTRY COUNT should be initialized properly to the number of table entries.

Environment

[Author TODO: Please supply the following information):] [ - Firecracker version.] [ - Host and guest kernel versions.] [ - Rootfs used.] [ - Architecture.] [ - Any other relevant software versions.]

Additional context

[Author TODO: How has this bug affected you?]

[Author TODO: What are you trying to achieve?]

[Author TODO: Do you have any idea of what the solution might be?]

Checks

  • [ ] Have you searched the Firecracker Issues database for similar problems?
  • [ ] Have you read the existing relevant Firecracker documentation?
  • [ ] Are you certain the bug being reported is a Firecracker issue?

cperciva avatar Jul 02 '22 01:07 cperciva