audk/OvmfPkg/VirtioFsDxe
Laszlo Ersek e9c5ff3d27 OvmfPkg/VirtioFsDxe: call IsTimeValid() before EfiTimeToEpoch()
EmbeddedPkg/TimeBaseLib provides a verification function called
IsTimeValid(), for enforcing the UEFI spec requirements on an EFI_TIME
object.

When EFI_FILE_PROTOCOL.SetInfo() is called in order to update the
timestamps on the file, let's invoke IsTimeValid() first, before passing
the new EFI_FILE_INFO.{CreateTime,LastAccessTime,ModificationTime} values
to EfiTimeToEpoch().

This patch is not expected to make a practical difference, but it's better
to ascertain the preconditions of EfiTimeToEpoch() on the
EFI_FILE_PROTOCOL.SetInfo() caller. The FAT driver (EnhancedFatDxe) has a
similar check, namely in FatSetFileInfo() -> FatIsValidTime().

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20210107095051.22715-1-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2021-01-07 14:13:44 +00:00
..
DriverBinding.c
FuseFlush.c
FuseForget.c
FuseFsync.c
FuseGetAttr.c
FuseInit.c OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_WRITE 2020-12-21 17:16:23 +00:00
FuseLookup.c
FuseMkDir.c
FuseOpen.c
FuseOpenDir.c
FuseOpenOrCreate.c
FuseRead.c OvmfPkg/VirtioFsDxe: add a shared wrapper for FUSE_READ / FUSE_READDIRPLUS 2020-12-21 17:16:23 +00:00
FuseRelease.c
FuseRename.c OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_RENAME2 2020-12-21 17:16:23 +00:00
FuseSetAttr.c OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_SETATTR 2020-12-21 17:16:23 +00:00
FuseStatFs.c OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_STATFS 2020-12-21 17:16:23 +00:00
FuseUnlink.c
FuseWrite.c OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_WRITE 2020-12-21 17:16:23 +00:00
Helpers.c OvmfPkg/VirtioFsDxe: call IsTimeValid() before EfiTimeToEpoch() 2021-01-07 14:13:44 +00:00
SimpleFsClose.c OvmfPkg/VirtioFsDxe: add EFI_FILE_INFO cache fields to VIRTIO_FS_FILE 2020-12-21 17:16:23 +00:00
SimpleFsDelete.c OvmfPkg/VirtioFsDxe: add EFI_FILE_INFO cache fields to VIRTIO_FS_FILE 2020-12-21 17:16:23 +00:00
SimpleFsFlush.c OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.Flush() 2020-12-21 17:16:23 +00:00
SimpleFsGetInfo.c OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.GetInfo() 2020-12-21 17:16:23 +00:00
SimpleFsGetPosition.c OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.GetPosition, .SetPosition 2020-12-21 17:16:23 +00:00
SimpleFsOpen.c OvmfPkg/VirtioFsDxe: add EFI_FILE_INFO cache fields to VIRTIO_FS_FILE 2020-12-21 17:16:23 +00:00
SimpleFsOpenVolume.c OvmfPkg/VirtioFsDxe: add EFI_FILE_INFO cache fields to VIRTIO_FS_FILE 2020-12-21 17:16:23 +00:00
SimpleFsRead.c OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.Read() for directories 2020-12-21 17:16:23 +00:00
SimpleFsSetInfo.c OvmfPkg/VirtioFsDxe: handle attribute updates in EFI_FILE_PROTOCOL.SetInfo 2020-12-21 17:16:23 +00:00
SimpleFsSetPosition.c OvmfPkg/VirtioFsDxe: add EFI_FILE_INFO cache fields to VIRTIO_FS_FILE 2020-12-21 17:16:23 +00:00
SimpleFsWrite.c OvmfPkg/VirtioFsDxe: implement EFI_FILE_PROTOCOL.Write() 2020-12-21 17:16:23 +00:00
VirtioFsDxe.h OvmfPkg/VirtioFsDxe: add helper for determining file mode bits update 2020-12-21 17:16:23 +00:00
VirtioFsDxe.inf OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_SETATTR 2020-12-21 17:16:23 +00:00