platform/x86/intel/ifs: Validate image size
authorJithu Joseph <jithu.joseph@intel.com>
Thu, 5 Oct 2023 19:51:33 +0000 (12:51 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 6 Oct 2023 10:05:20 +0000 (13:05 +0300)
commit25a76dbb36dd58ad4df7f6a4dc43061a10b0d817
tree9bc419a8fea333f61a5d1dbac26a472bcbd76c14
parent72b96ee29ed6f7670bbb180ba694816e33d361d1
platform/x86/intel/ifs: Validate image size

Perform additional validation prior to loading IFS image.

Error out if the size of the file being loaded doesn't match the size
specified in the header.

Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Pengfei Xu <pengfei.xu@intel.com>
Link: https://lore.kernel.org/r/20231005195137.3117166-6-jithu.joseph@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/intel/ifs/load.c