Skip to content
Commit ff5ac61e authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Mimi Zohar
Browse files

x86/ima: use correct identifier for SetupMode variable

The IMA arch code attempts to inspect the "SetupMode" EFI variable
by populating a variable called efi_SetupMode_name with the string
"SecureBoot" and passing that to the EFI GetVariable service, which
obviously does not yield the expected result.

Given that the string is only referenced a single time, let's get
rid of the intermediate variable, and pass the correct string as
an immediate argument. While at it, do the same for "SecureBoot".

Fixes: 399574c6 ("x86/ima: retry detecting secure boot mode")
Fixes: 980ef4d2

 ("x86/ima: check EFI SetupMode too")
Cc: Matthew Garrett <mjg59@google.com>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Cc: stable@vger.kernel.org # v5.3
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
parent bb6d3fb3
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