summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2010-02-18 11:51:40 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 16:01:15 -0700
commit429f074ef0e55415bb6bd72acca5be2e952719da (patch)
tree3d94f3e34ee5c89dd2fc8c90e698342be52239d1 /kernel
parent01a8e5d5cc7a5dde54fbff3cee4792a2501d133b (diff)
downloadkernel-crypto-429f074ef0e55415bb6bd72acca5be2e952719da.tar.gz
kernel-crypto-429f074ef0e55415bb6bd72acca5be2e952719da.tar.xz
kernel-crypto-429f074ef0e55415bb6bd72acca5be2e952719da.zip
x86_64, cpa: Don't work hard in preserving kernel 2M mappings when using 4K already
commit 281ff33b7c1b1ba2a5f9b03425e5f692a94913fa upstream. We currently enforce the !RW mapping for the kernel mapping that maps holes between different text, rodata and data sections. However, kernel identity mappings will have different RWX permissions to the pages mapping to text and to the pages padding (which are freed) the text, rodata sections. Hence kernel identity mappings will be broken to smaller pages. For 64-bit, kernel text and kernel identity mappings are different, so we can enable protection checks that come with CONFIG_DEBUG_RODATA, as well as retain 2MB large page mappings for kernel text. Konrad reported a boot failure with the Linux Xen paravirt guest because of this. In this paravirt guest case, the kernel text mapping and the kernel identity mapping share the same page-table pages. Thus forcing the !RW mapping for some of the kernel mappings also cause the kernel identity mappings to be read-only resulting in the boot failure. Linux Xen paravirt guest also uses 4k mappings and don't use 2M mapping. Fix this issue and retain large page performance advantage for native kernels by not working hard and not enforcing !RW for the kernel text mapping, if the current mapping is already using small page mapping. Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> LKML-Reference: <1266522700.2909.34.camel@sbs-t61.sc.intel.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions