x86/platform/intel/quark: Change the kernel's IMR lock bit to false
authorBryan O'Donoghue <pure.logic@nexus-software.ie>
Tue, 23 Feb 2016 01:29:58 +0000 (01:29 +0000)
committerIngo Molnar <mingo@kernel.org>
Tue, 23 Feb 2016 06:35:53 +0000 (07:35 +0100)
commitdd71a17b1193dd4a4c35ecd0ba227aac3d110836
tree200ce287d171bafbf2cd062fef746d2d136eb65a
parent81f70ba233d5f660e1ea5fe23260ee323af5d53a
x86/platform/intel/quark: Change the kernel's IMR lock bit to false

Currently when setting up an IMR around the kernel's .text section we lock
that IMR, preventing further modification. While superficially this appears
to be the right thing to do, in fact this doesn't account for a legitimate
change in the memory map such as when executing a new kernel via kexec.

In such a scenario a second kernel can have a different size and location
to it's predecessor and can view some of the memory occupied by it's
predecessor as legitimately usable DMA RAM. If this RAM were then
subsequently allocated to DMA agents within the system it could conceivably
trigger an IMR violation.

This patch fixes the this potential situation by keeping the kernel's .text
section IMR lock bit false by default.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: boon.leong.ong@intel.com
Cc: paul.gortmaker@windriver.com
Link: http://lkml.kernel.org/r/1456190999-12685-2-git-send-email-pure.logic@nexus-software.ie
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/platform/intel-quark/imr.c