platform/x86/intel/ifs: Remove memory allocation from load path
mainline inclusion from mainline-v6.2-rc1 commit cb5eceee category: feature feature: Backport Intel In Field Scan(IFS) multi-blob images support bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I6L337 CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ commit/?id=cb5eceee Intel-SIG: commit cb5eceee ("platform/x86/intel/ifs: Remove memory allocation from load path") ------------------------------------- platform/x86/intel/ifs: Remove memory allocation from load path IFS requires tests to be authenticated once for each CPU socket on a system. scan_chunks_sanity_check() was dynamically allocating memory to store the state of whether tests have been authenticated on each socket for every load operation. Move the memory allocation to init path and store the pointer in ifs_data struct. Also rearrange the adjacent error checking in init for a more simplified and natural flow. Suggested-by:Borislav Petkov <bp@alien8.de> Signed-off-by:
Jithu Joseph <jithu.joseph@intel.com> Signed-off-by:
Borislav Petkov <bp@suse.de> Reviewed-by:
Tony Luck <tony.luck@intel.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20221117195957.28225-1-jithu.joseph@intel.com Signed-off-by:
Aichun Shi <aichun.shi@intel.com>
Loading
Please sign in to comment