[linux] 02/02: [i386/686-pae] mm: Fix types used in pgprot cacheability flags translations
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Tue Feb 16 02:54:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch sid
in repository linux.
commit fcd5547ba0cae795425bf7fd601e4a2e594f4f8c
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Tue Feb 16 02:03:01 2016 +0000
[i386/686-pae] mm: Fix types used in pgprot cacheability flags translations
---
debian/changelog | 2 +
...types-used-in-pgprot-cacheability-flags-t.patch | 45 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 48 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 25f8739..1d45e53 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,8 @@ linux (4.4.1-1) UNRELEASED; urgency=medium
* udeb: Really add virtio_input to virtio-modules (not input-modules)
* [x86] Fix issues resulting in W+X pages:
- [amd64] efi: Build our own page table structure
+ - [i386/686-pae] mm: Fix types used in pgprot cacheability flags
+ translations
[ Roger Shimizu ]
* Enable TTY_PRINTK as module (Closes: #814540).
diff --git a/debian/patches/bugfix/x86/x86-mm-fix-types-used-in-pgprot-cacheability-flags-t.patch b/debian/patches/bugfix/x86/x86-mm-fix-types-used-in-pgprot-cacheability-flags-t.patch
new file mode 100644
index 0000000..8594455
--- /dev/null
+++ b/debian/patches/bugfix/x86/x86-mm-fix-types-used-in-pgprot-cacheability-flags-t.patch
@@ -0,0 +1,45 @@
+From: Jan Beulich <JBeulich at suse.com>
+Date: Tue, 26 Jan 2016 04:15:18 -0700
+Subject: x86/mm: Fix types used in pgprot cacheability flags translations
+Origin: https://git.kernel.org/linus/3625c2c234ef66acf21a72d47a5ffa94f6c5ebf2
+
+For PAE kernels "unsigned long" is not suitable to hold page protection
+flags, since _PAGE_NX doesn't fit there. This is the reason for quite a
+few W+X pages getting reported as insecure during boot (observed namely
+for the entire initrd range).
+
+Fixes: 281d4078be ("x86: Make page cache mode a real type")
+Signed-off-by: Jan Beulich <jbeulich at suse.com>
+Reviewed-by: Juergen Gross <JGross at suse.com>
+Cc: stable at vger.kernel.org
+Link: http://lkml.kernel.org/r/56A7635602000078000CAFF1@prv-mh.provo.novell.com
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+---
+ arch/x86/include/asm/pgtable_types.h | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/arch/x86/include/asm/pgtable_types.h
++++ b/arch/x86/include/asm/pgtable_types.h
+@@ -363,20 +363,18 @@ static inline enum page_cache_mode pgpro
+ }
+ static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot)
+ {
++ pgprotval_t val = pgprot_val(pgprot);
+ pgprot_t new;
+- unsigned long val;
+
+- val = pgprot_val(pgprot);
+ pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
+ ((val & _PAGE_PAT) << (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));
+ return new;
+ }
+ static inline pgprot_t pgprot_large_2_4k(pgprot_t pgprot)
+ {
++ pgprotval_t val = pgprot_val(pgprot);
+ pgprot_t new;
+- unsigned long val;
+
+- val = pgprot_val(pgprot);
+ pgprot_val(new) = (val & ~(_PAGE_PAT | _PAGE_PAT_LARGE)) |
+ ((val & _PAGE_PAT_LARGE) >>
+ (_PAGE_BIT_PAT_LARGE - _PAGE_BIT_PAT));
diff --git a/debian/patches/series b/debian/patches/series
index eaf3ec4..aac4e3e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -130,3 +130,4 @@ bugfix/x86/x86-efi-map-ram-into-the-identity-page-table-for-mix.patch
bugfix/x86/x86-efi-hoist-page-table-switching-code-into-efi_cal.patch
bugfix/x86/x86-efi-build-our-own-page-table-structures.patch
bugfix/x86/x86-efi-setup-separate-efi-page-tables-in-kexec-path.patch
+bugfix/x86/x86-mm-fix-types-used-in-pgprot-cacheability-flags-t.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list