[kernel] r16166 - in dists/sid/linux-2.6/debian: . patches/bugfix/all/stable patches/features/all/openvz patches/features/all/vserver patches/series

Ben Hutchings benh at alioth.debian.org
Thu Aug 19 01:18:49 UTC 2010


Author: benh
Date: Thu Aug 19 01:18:45 2010
New Revision: 16166

Log:
Add stable 2.6.32.20-rc1

Update context for openvz and vserver patches.

Added:
   dists/sid/linux-2.6/debian/patches/bugfix/all/stable/2.6.32.20-rc1.patch
Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/patches/features/all/openvz/openvz.patch
   dists/sid/linux-2.6/debian/patches/features/all/vserver/vs2.3.0.36.27.patch
   dists/sid/linux-2.6/debian/patches/series/21

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Wed Aug 18 23:57:32 2010	(r16165)
+++ dists/sid/linux-2.6/debian/changelog	Thu Aug 19 01:18:45 2010	(r16166)
@@ -9,6 +9,8 @@
       (Closes: #591415)
     - Revert "sched, cputime: Introduce thread_group_times()" which would
       result in an ABI change
+  * Add stable 2.6.32.20-rc1:
+    - Fix regressions introduced by original fix for CVE-2010-2240
   * Add drm and other relevant changes from stable 2.6.34.4
 
   [ Bastian Blank ]

Added: dists/sid/linux-2.6/debian/patches/bugfix/all/stable/2.6.32.20-rc1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/stable/2.6.32.20-rc1.patch	Thu Aug 19 01:18:45 2010	(r16166)
@@ -0,0 +1,81 @@
+diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
+index 366b101..899145d 100644
+--- a/fs/proc/task_mmu.c
++++ b/fs/proc/task_mmu.c
+@@ -206,6 +206,7 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
+ 	int flags = vma->vm_flags;
+ 	unsigned long ino = 0;
+ 	unsigned long long pgoff = 0;
++	unsigned long start;
+ 	dev_t dev = 0;
+ 	int len;
+ 
+@@ -216,8 +217,13 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
+ 		pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
+ 	}
+ 
++	/* We don't show the stack guard page in /proc/maps */
++	start = vma->vm_start;
++	if (vma->vm_flags & VM_GROWSDOWN)
++		start += PAGE_SIZE;
++
+ 	seq_printf(m, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu %n",
+-			vma->vm_start,
++			start,
+ 			vma->vm_end,
+ 			flags & VM_READ ? 'r' : '-',
+ 			flags & VM_WRITE ? 'w' : '-',
+diff --git a/mm/memory.c b/mm/memory.c
+index 76d1b21..babb991 100644
+--- a/mm/memory.c
++++ b/mm/memory.c
+@@ -2662,24 +2662,23 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+ 	spinlock_t *ptl;
+ 	pte_t entry;
+ 
+-	if (check_stack_guard_page(vma, address) < 0) {
+-		pte_unmap(page_table);
++	pte_unmap(page_table);
++
++	/* Check if we need to add a guard page to the stack */
++	if (check_stack_guard_page(vma, address) < 0)
+ 		return VM_FAULT_SIGBUS;
+-	}
+ 
++	/* Use the zero-page for reads */
+ 	if (!(flags & FAULT_FLAG_WRITE)) {
+ 		entry = pte_mkspecial(pfn_pte(my_zero_pfn(address),
+ 						vma->vm_page_prot));
+-		ptl = pte_lockptr(mm, pmd);
+-		spin_lock(ptl);
++		page_table = pte_offset_map_lock(mm, pmd, address, &ptl);
+ 		if (!pte_none(*page_table))
+ 			goto unlock;
+ 		goto setpte;
+ 	}
+ 
+ 	/* Allocate our own private page. */
+-	pte_unmap(page_table);
+-
+ 	if (unlikely(anon_vma_prepare(vma)))
+ 		goto oom;
+ 	page = alloc_zeroed_user_highpage_movable(vma, address);
+diff --git a/mm/mlock.c b/mm/mlock.c
+index 2e05c97..524d2a4 100644
+--- a/mm/mlock.c
++++ b/mm/mlock.c
+@@ -170,6 +170,14 @@ static long __mlock_vma_pages_range(struct vm_area_struct *vma,
+ 	if (vma->vm_flags & VM_WRITE)
+ 		gup_flags |= FOLL_WRITE;
+ 
++	/* We don't try to access the guard page of a stack vma */
++	if (vma->vm_flags & VM_GROWSDOWN) {
++		if (start == vma->vm_start) {
++			start += PAGE_SIZE;
++			nr_pages--;
++		}
++	}
++
+ 	while (nr_pages > 0) {
+ 		int i;
+ 

Modified: dists/sid/linux-2.6/debian/patches/features/all/openvz/openvz.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/openvz/openvz.patch	Wed Aug 18 23:57:32 2010	(r16165)
+++ dists/sid/linux-2.6/debian/patches/features/all/openvz/openvz.patch	Thu Aug 19 01:18:45 2010	(r16166)
@@ -76738,12 +76738,12 @@
  	pte_t entry;
 +	struct page_beancounter *pbc = NULL;
  
-	if (check_stack_guard_page(vma, address) < 0) {
-		pte_unmap(page_table);
-@@ -2645,6 +2732,9 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
- 	/* Allocate our own private page. */
  	pte_unmap(page_table);
  
+@@ -2645,6 +2732,9 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
+ 	}
+ 
+ 	/* Allocate our own private page. */
 +	if (unlikely(pb_alloc(&pbc)))
 +		goto oom_nopb;
 +

Modified: dists/sid/linux-2.6/debian/patches/features/all/vserver/vs2.3.0.36.27.patch
==============================================================================
--- dists/sid/linux-2.6/debian/patches/features/all/vserver/vs2.3.0.36.27.patch	Wed Aug 18 23:57:32 2010	(r16165)
+++ dists/sid/linux-2.6/debian/patches/features/all/vserver/vs2.3.0.36.27.patch	Thu Aug 19 01:18:45 2010	(r16166)
@@ -26257,9 +26257,9 @@
  	rss[1] = rss[0] = 0;
  	dst_pte = pte_alloc_map_lock(dst_mm, dst_pmd, addr, &dst_ptl);
 @@ -2645,6 +2649,8 @@ static int do_anonymous_page(struct mm_s
- 	/* Allocate our own private page. */
- 	pte_unmap(page_table);
+ 	}
  
+ 	/* Allocate our own private page. */
 +	if (!vx_rss_avail(mm, 1))
 +		goto oom;
  	if (unlikely(anon_vma_prepare(vma)))

Modified: dists/sid/linux-2.6/debian/patches/series/21
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/21	Wed Aug 18 23:57:32 2010	(r16165)
+++ dists/sid/linux-2.6/debian/patches/series/21	Thu Aug 19 01:18:45 2010	(r16166)
@@ -8,3 +8,4 @@
 + bugfix/all/drm-edid-Fix-the-HDTV-hack-sync-adjustment.patch
 + bugfix/x86/drm-i915-Use-RSEN-instead-of-HTPLG-for-tfp410-monito.patch
 + bugfix/x86/i915-fix-ironlake-edp-panel-setup-v4.patch
++ bugfix/all/stable/2.6.32.20-rc1.patch



More information about the Kernel-svn-changes mailing list