Commit f4e209e9 authored by Jithu Joseph's avatar Jithu Joseph Committed by Borislav Petkov

platform/x86/intel/ifs: Return a more appropriate error code

scan_chunks_sanity_check() returns -ENOMEM if it encounters an error
while copying IFS test image from memory to Secure Memory.

Return -EIO in this scenario, as it is more appropriate.
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 avatarSohil Mehta <sohil.mehta@intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20221117035935.4136738-3-jithu.joseph@intel.com
parent 10d4853e
...@@ -157,8 +157,10 @@ static int scan_chunks_sanity_check(struct device *dev) ...@@ -157,8 +157,10 @@ static int scan_chunks_sanity_check(struct device *dev)
INIT_WORK(&local_work.w, copy_hashes_authenticate_chunks); INIT_WORK(&local_work.w, copy_hashes_authenticate_chunks);
schedule_work_on(cpu, &local_work.w); schedule_work_on(cpu, &local_work.w);
wait_for_completion(&ifs_done); wait_for_completion(&ifs_done);
if (ifsd->loading_error) if (ifsd->loading_error) {
ret = -EIO;
goto out; goto out;
}
package_authenticated[curr_pkg] = 1; package_authenticated[curr_pkg] = 1;
} }
ret = 0; ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment