Commit 574ef6a9 authored by Jithu Joseph's avatar Jithu Joseph Committed by Aichun Shi
Browse files

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: default avatarBorislav Petkov <bp@alien8.de>
Signed-off-by: default avatarJithu Joseph <jithu.joseph@intel.com>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarTony Luck <tony.luck@intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20221117195957.28225-1-jithu.joseph@intel.com


Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent 5c1c6af6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment