link: value read through vpd_get_value doesn't match value read/set through vpd |
|
Issue descriptionOn link, the values set through vpd don't match the values read through vpd_get_value. One of the consequences is tha tpm-firmware-update* scripts (use vpd) and Chrome powerwash dialogue (uses vpd_get_value) see different values for tpm_firmware_update_params. Below is a sample session: 1) Compare values: already wrong localhost ~ # vpd -i RW_VPD -l ... "tpm_firmware_update_params"="mode:first_boot" localhost ~ # /usr/sbin/vpd_get_value tpm_firmware_update_params mode:first_boot,dryrun:1 2) Delete key in vpd: still remains in vpd_get_value localhost ~ # vpd -i RW_VPD -d tpm_firmware_update_params localhost ~ # vpd -i RW_VPD -l ... (no tpm_firmware_update_params) ... localhost ~ # vpd -l ... (no tpm_firmware_update_params) ... localhost ~ # /usr/sbin/vpd_get_value tpm_firmware_update_params mode:first_boot,dryrun:1 3) Reboot, changes made through vpd are persisted, but vpd_get_value still returns a wrong value localhost ~ # reboot localhost ~ # vpd -i RW_VPD -l ... (no tpm_firmware_update_params) ... localhost ~ # vpd -l ... (no tpm_firmware_update_params) ... localhost ~ # /usr/sbin/vpd_get_value tpm_firmware_update_params mode:first_boot,dryrun:1
,
Dec 1 2017
dump_vpd_log doesn't update /mnt/stateful_partition/unencrypted/cache/vpd/full-v2.txt if that file already exists. Not sure if that's correct.
,
Dec 1 2017
Re comment #2: yes, that's the correct behavior unless --force is passed to dump_vpd_log. "VPD_IGNORE_CACHE=1 /usr/sbin/vpd_get_value tpm_firmware_update_params" correctly reads the values through vpd -g. So, looks like it is expected that VPD data is never changed once cached once. Or at least, the force dump is invoked by whoever changes it. Either we need to update the vpd2.0.txt by running "dump_vpd_log --force" after making changes, or session_manager should use "vpd -g" directly or ignore the cache by setting VPD_IGNORE_CACHE env var when calling vpd_get_value in SessionManagerImpl::StartTPMFirmwareUpdate. Using 'vpd -g' is probably the easiest approach. A potential performance hit is not important here since it only happens when the user performs powerwash with the 'Update firmware' flag set. |
|
►
Sign in to add a comment |
|
Comment 1 by apronin@chromium.org
, Dec 1 2017