]> git.karo-electronics.de Git - linux-beck.git/commit
efi/arm64: Check SetupMode when determining Secure Boot status
authorLinn Crosetto <linn@hpe.com>
Mon, 25 Apr 2016 20:06:37 +0000 (21:06 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 28 Apr 2016 09:33:49 +0000 (11:33 +0200)
commit30d7bf034c034995f34dae265d96247f7f12044e
tree6e22db412011330983d1547beea3f5693ce1a05b
parent73a6492589c87cd56707c8ac19eec78236c2d576
efi/arm64: Check SetupMode when determining Secure Boot status

According to the UEFI specification (version 2.5 Errata A, page 87):

    The platform firmware is operating in secure boot mode if the value of
    the SetupMode variable is 0 and the SecureBoot variable is set to 1. A
    platform cannot operate in secure boot mode if the SetupMode variable
    is set to 1.

Check the value of the SetupMode variable when determining the state of
Secure Boot.

Plus also do minor cleanup, change sizeof() use to match kernel style guidelines.

Signed-off-by: Linn Crosetto <linn@hpe.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Roy Franz <roy.franz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1461614832-17633-6-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/libstub/arm-stub.c