platform/x86/intel/ifs: Metadata validation for start_chunk
authorJithu Joseph <jithu.joseph@intel.com>
Thu, 5 Oct 2023 19:51:34 +0000 (12:51 -0700)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 6 Oct 2023 10:05:21 +0000 (13:05 +0300)
commit60d2e1b37d530d6b1f8b7773cebaf8bbc1536b28
tree290370d2b7599d99f3ca3b2b888a03e1438b5878
parent25a76dbb36dd58ad4df7f6a4dc43061a10b0d817
platform/x86/intel/ifs: Metadata validation for start_chunk

Add an additional check to validate IFS image metadata field prior to
loading the test image.

If start_chunk is not a multiple of chunks_per_stride error out.

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