]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/efi: Ignore EFI_MEMORY_XP attribute if RP and/or WP are set
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 2 Jan 2018 18:10:39 +0000 (18:10 +0000)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Jan 2018 13:03:48 +0000 (14:03 +0100)
commit1e9de1d2207d67b97bb0b62e38454b663d6542fa
tree6acbfe24a871ac3b302c0641897847c6c0215f86
parent76ad9dffd91be11e51b847eb115d623b713a3bdc
arm64/efi: Ignore EFI_MEMORY_XP attribute if RP and/or WP are set

The UEFI memory map is a bit vague about how to interpret the
EFI_MEMORY_XP attribute when it is combined with EFI_MEMORY_RP and/or
EFI_MEMORY_WP, which have retroactively been redefined as cacheability
attributes rather than permission attributes.

So let's ignore EFI_MEMORY_XP if _RP and/or _WP are also set. In this
case, it is likely that they are being used to describe the capability
of the region (i.e., whether it has the controls to reconfigure it as
non-executable) rather than the nature of the contents of the region
(i.e., whether it contains data that we will never attempt to execute)

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tyler Baicar <tbaicar@codeaurora.org>
Cc: Vasyl Gomonovych <gomonovych@gmail.com>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180102181042.19074-3-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/arm64/kernel/efi.c