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
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
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
SimpleFsDelete.c
SimpleFsFlush.c
SimpleFsGetInfo.c
SimpleFsGetPosition.c
SimpleFsOpen.c
SimpleFsOpenVolume.c
SimpleFsRead.c
SimpleFsSetInfo.c OvmfPkg/VirtioFsDxe: handle attribute updates in EFI_FILE_PROTOCOL.SetInfo 2020-12-21 17:16:23 +00:00
SimpleFsSetPosition.c
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