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

OvmfPkg/AcpiPlatformDxe: Measure ACPI table from QEMU in TDVF #3997

Merged
merged 2 commits into from
Feb 4, 2023

Conversation

jyao1
Copy link
Contributor

@jyao1 jyao1 commented Feb 3, 2023

https://bugzilla.tianocore.org/show_bug.cgi?id=4245

QEMU provides the following three files for guest to install the ACPI tables:

  • etc/acpi/rsdp
  • etc/acpi/tables
  • etc/table-loader

"etc/acpi/rsdp" and "etc/acpi/tables" are similar, they are only kept separate because they have different allocation requirements in SeaBIOS.

Both of these fw_cfg files contain preformatted ACPI payload. "etc/acpi/rsdp" contains only the RSDP table, while "etc/acpi/tables" contains all other tables, concatenated. To be noted, the tables in these two files have been filled in by qemu, but two kinds of fields are incomplete: pointers to other tables and checksums (which depend on the pointers).

"/etc/table-loader" is a linker/loader which provides the commands to "patch" the tables in "etc/acpi/tables" and then install them. "Patch" means to fill the pointers and compute the checksum.

From the security perspective these 3 files are the raw data downloaded from qemu. They should be measured and extended before they're consumed.

Cc: Erdem Aktas erdemaktas@google.com
Cc: James Bottomley jejb@linux.ibm.com
Cc: Jiewen Yao jiewen.yao@intel.com
Cc: Gerd Hoffmann kraxel@redhat.com
Cc: Tom Lendacky thomas.lendacky@amd.com
Cc: Michael Roth michael.roth@amd.com
Signed-off-by: Min Xu min.m.xu@intel.com
Reviewed-by: Jiewen Yao jiewen.yao@intel.com
Acked-by: Gerd Hoffmann kraxel@redhat.com

https://bugzilla.tianocore.org/show_bug.cgi?id=4245

QEMU provides the following three files for guest to install the ACPI
tables:
 - etc/acpi/rsdp
 - etc/acpi/tables
 - etc/table-loader

"etc/acpi/rsdp" and "etc/acpi/tables" are similar, they are only kept
separate because they have different allocation requirements in SeaBIOS.

Both of these fw_cfg files contain preformatted ACPI payload.
"etc/acpi/rsdp" contains only the RSDP table, while "etc/acpi/tables"
contains all other tables, concatenated. To be noted, the tables in these
two files have been filled in by qemu, but two kinds of fields are
incomplete: pointers to other tables and checksums (which depend on the
pointers).

"/etc/table-loader" is a linker/loader which provides the commands to
"patch" the tables in "etc/acpi/tables" and then install them. "Patch"
means to fill the pointers and compute the checksum.

From the security perspective these 3 files are the raw data downloaded
from qemu. They should be measured and extended before they're consumed.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Michael Roth <michael.roth@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
@jyao1 jyao1 added the push Auto push patch series in PR if all checks pass label Feb 3, 2023
@mergify mergify bot merged commit 935343c into tianocore:master Feb 4, 2023
@jyao1 jyao1 deleted the patch2 branch February 4, 2023 11:22
smo4201 added a commit to Fraunhofer-AISEC/tpm-pcr-tools that referenced this pull request Nov 22, 2023
In recent versions of OVMF, the files passed from QEMU to the
VM are measured into PCR1 as EV_PLATFORM_CONFIG_FLAGS. Introduce
new config flags to hand over the files with the data passed from
QEMU to the VM (etc/acpi-tables, etc/acpi-rsdb, etc/table-loader
and etc/tpm/log) to enable the calculation of PCR1.

For details on the OVMF changes, see:
tianocore/edk2#3997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants