VirtualBox

Changeset 100892 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Aug 17, 2023 10:04:15 AM (16 months ago)
Author:
vboxsync
Message:

Devices/Security/DevTpm: Fix regression introduced by r157063 causing a saved state to fail to load with a TPM enabled. The buffer size must (and can) be safely queried when the TPM is constructed or the command buffer size is 0 when the saved state is loaded causing a config mismatch error, bugref:10075 ticketref:21773

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Security/DevTpm.cpp

    r99739 r100892  
    16381638
    16391639    if (pThisCC->pDrvTpm)
    1640     {
    16411640        pThis->fEstablishmentSet = pThisCC->pDrvTpm->pfnGetEstablishedFlag(pThisCC->pDrvTpm);
    1642         pThis->cbCmdResp         = RT_MIN(pThisCC->pDrvTpm->pfnGetBufferSize(pThisCC->pDrvTpm), TPM_DATA_BUFFER_SIZE_MAX);
    1643     }
    16441641}
    16451642
     
    16551652    tpmR3HwReset(pThis);
    16561653    if (pThisCC->pDrvTpm)
    1657     {
    16581654        pThis->fEstablishmentSet = pThisCC->pDrvTpm->pfnGetEstablishedFlag(pThisCC->pDrvTpm);
    1659         pThis->cbCmdResp         = RT_MIN(pThisCC->pDrvTpm->pfnGetBufferSize(pThisCC->pDrvTpm), TPM_DATA_BUFFER_SIZE_MAX);
    1660     }
    16611655}
    16621656
     
    17501744        AssertLogRelMsgReturn(pThisCC->pDrvTpm, ("TPM#%d: Driver is missing the TPM interface.\n", iInstance), VERR_PDM_MISSING_INTERFACE);
    17511745
     1746        pThis->cbCmdResp     = RT_MIN(pThisCC->pDrvTpm->pfnGetBufferSize(pThisCC->pDrvTpm), TPM_DATA_BUFFER_SIZE_MAX);
    17521747        pThis->fLocChangeSup = pThisCC->pDrvTpm->pfnGetLocalityMax(pThisCC->pDrvTpm) > 0;
    17531748
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette