]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
efi: Fix build error due to enum collision between efi.h and ima.h
authorAnders Roxell <anders.roxell@linaro.org>
Fri, 15 Feb 2019 16:55:51 +0000 (17:55 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 May 2019 18:55:24 +0000 (20:55 +0200)
commit6ba92b4a022e22c74096bd0e9e995f2c59cc3cc2
treef74cc43b43049926b1d71efa46cd46fb0d0af451
parent8cae5553ef7ea68cc5de5b3b425b820e98716c14
efi: Fix build error due to enum collision between efi.h and ima.h

BugLink: https://bugs.launchpad.net/bugs/1828410
[ Upstream commit 5c418dc789a3898717ebf2caa5716ba91a7150b2 ]

The following commit:

  a893ea15d764 ("tpm: move tpm_chip definition to include/linux/tpm.h")

introduced a build error when both IMA and EFI are enabled:

    In file included from ../security/integrity/ima/ima_fs.c:30:
    ../security/integrity/ima/ima.h:176:7: error: redeclaration of enumerator "NONE"

What happens is that both headers (ima.h and efi.h) defines the same
'NONE' constant, and it broke when they started getting included from
the same file:

Rework to prefix the EFI enum with 'EFI_*'.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20190215165551.12220-2-ard.biesheuvel@linaro.org
[ Cleaned up the changelog a bit. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/x86/platform/efi/quirks.c
drivers/firmware/efi/runtime-wrappers.c
include/linux/efi.h