rpms/kernel/devel linux-2.6-x86-set_memory_wc-fixes.patch, NONE, 1.1 patch-2.6.31-rc4-git6.bz2.sign, NONE, 1.1 .cvsignore, 1.1104, 1.1105 config-generic, 1.314, 1.315 kernel.spec, 1.1676, 1.1677 linux-2.6-ksm.patch, 1.1, 1.2 linux-2.6.31-lirc.patch, 1.2, 1.3 sources, 1.1062, 1.1063 upstream, 1.976, 1.977 patch-2.6.31-rc4-git3.bz2.sign, 1.1, NONE

Chuck Ebbert cebbert at fedoraproject.org
Fri Jul 31 01:00:05 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1950

Modified Files:
	.cvsignore config-generic kernel.spec linux-2.6-ksm.patch 
	linux-2.6.31-lirc.patch sources upstream 
Added Files:
	linux-2.6-x86-set_memory_wc-fixes.patch 
	patch-2.6.31-rc4-git6.bz2.sign 
Removed Files:
	patch-2.6.31-rc4-git3.bz2.sign 
Log Message:
Linux 2.6.31-rc4-git6
  New config item: CONFIG_BATTERY_DS2782 is not set
Add last-minute set_memory_wc() fix from LKML.

linux-2.6-x86-set_memory_wc-fixes.patch:
 pageattr.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- NEW FILE linux-2.6-x86-set_memory_wc-fixes.patch ---
From:	"Pallipadi, Venkatesh" <venkatesh.pallipadi at intel.com>
To:	Ingo Molnar <mingo at elte.hu>, "H. Peter Anvin" <hpa at zytor.com>,
	Thomas Gleixner <tglx at linutronix.de>
Cc:	linux-kernel at vger.kernel.org, stable at kernel.org,
	suresh.b.siddha at intel.com, Jerome Glisse <glisse at freedesktop.org>
Subject: [PATCH] x86: Fix set_memory_wc related corruption
Message-ID: <20090730214319.GA1889 at linux-os.sc.intel.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.1i
Sender:	linux-kernel-owner at vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List:	linux-kernel at vger.kernel.org


Changeset 3869c4aa18835c8c61b44bd0f3ace36e9d3b5bd0
that went in after 2.6.30-rc1 was a seemingly small change to _set_memory_wc()
to make it complaint with SDM requirements. But, introduced a nasty bug, which
can result in crash and/or strange corruptions when set_memory_wc is used.
One such crash reported here
http://lkml.org/lkml/2009/7/30/94

Actually, that changeset introduced two bugs.
* change_page_attr_set() takes &addr as first argument and can the addr value
  might have changed on return, even for single page change_page_attr_set()
  call. That will make the second change_page_attr_set() in this routine
  operate on unrelated addr, that can eventually cause strange corruptions
  and bad page state crash.
* The second change_page_attr_set() call, before setting _PAGE_CACHE_WC, should
  clear the earlier _PAGE_CACHE_UC_MINUS, as otherwise cache attribute will not
  be WC (will be UC instead).

The patch below fixes both these problems. Sending a single patch to fix both
the problems, as the change is to the same line of code. The change to have a
addr_copy is not very clean. But, it is simpler than making more changes
through various routines in pageattr.c.

A huge thanks to Jerome for reporting this problem and providing a simple test
case that helped us root cause the problem.

Reported-by: Jerome Glisse <glisse at freedesktop.org>

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha at intel.com>
---

Patch needed for 2.6.30-stable as well

 arch/x86/mm/pageattr.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 1b734d7..895d90e 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -997,12 +997,15 @@ EXPORT_SYMBOL(set_memory_array_uc);
 int _set_memory_wc(unsigned long addr, int numpages)
 {
 	int ret;
+	unsigned long addr_copy = addr;
+
 	ret = change_page_attr_set(&addr, numpages,
 				    __pgprot(_PAGE_CACHE_UC_MINUS), 0);
-
 	if (!ret) {
-		ret = change_page_attr_set(&addr, numpages,
-				    __pgprot(_PAGE_CACHE_WC), 0);
+		ret = change_page_attr_set_clr(&addr_copy, numpages,
+					       __pgprot(_PAGE_CACHE_WC),
+					       __pgprot(_PAGE_CACHE_MASK),
+					       0, 0, NULL);
 	}
 	return ret;
 }
-- 
1.6.0.6


--- NEW FILE patch-2.6.31-rc4-git6.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info

iD8DBQBKcjipyGugalF9Dw4RAmnoAJ0c4vwUj764wafADxzQ8/HUvfW/3ACeM9tS
6RHBb7VUKldTInhcjNgXUBk=
=txfa
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/.cvsignore,v
retrieving revision 1.1104
retrieving revision 1.1105
diff -u -p -r1.1104 -r1.1105
--- .cvsignore	29 Jul 2009 01:42:07 -0000	1.1104
+++ .cvsignore	31 Jul 2009 01:00:04 -0000	1.1105
@@ -6,4 +6,4 @@ temp-*
 kernel-2.6.30
 linux-2.6.30.tar.bz2
 patch-2.6.31-rc4.bz2
-patch-2.6.31-rc4-git3.bz2
+patch-2.6.31-rc4-git6.bz2


Index: config-generic
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/config-generic,v
retrieving revision 1.314
retrieving revision 1.315
diff -u -p -r1.314 -r1.315
--- config-generic	28 Jul 2009 13:35:42 -0000	1.314
+++ config-generic	31 Jul 2009 01:00:04 -0000	1.315
@@ -3761,6 +3761,7 @@ CONFIG_POWER_SUPPLY=m
 # CONFIG_POWER_SUPPLY_DEBUG is not set
 CONFIG_APM_POWER=m
 # CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_DS2782 is not set
 CONFIG_BATTERY_PMU=m
 CONFIG_BATTERY_BQ27x00=m
 CONFIG_BATTERY_MAX17040=m


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1676
retrieving revision 1.1677
diff -u -p -r1.1676 -r1.1677
--- kernel.spec	30 Jul 2009 20:43:31 -0000	1.1676
+++ kernel.spec	31 Jul 2009 01:00:04 -0000	1.1677
@@ -61,7 +61,7 @@ Summary: The Linux kernel
 # The rc snapshot level
 %define rcrev 4
 # The git snapshot level
-%define gitrev 3
+%define gitrev 6
 # Set rpm version accordingly
 %define rpmversion 2.6.%{upstream_sublevel}
 %endif
@@ -702,6 +702,7 @@ Patch3050: linux-2.6-nfsd4-proots.patch
 Patch11010: via-hwmon-temp-sensor.patch
 
 # patches headed upstream
+Patch12000: linux-2.6-x86-set_memory_wc-fixes.patch
 
 %endif
 
@@ -1122,6 +1123,7 @@ ApplyPatch sched-introduce-SCHED_RESET_O
 # Architecture patches
 # x86(-64)
 ApplyPatch via-hwmon-temp-sensor.patch
+ApplyPatch linux-2.6-x86-set_memory_wc-fixes.patch
 
 #
 # PowerPC
@@ -1933,6 +1935,11 @@ fi
 # and build.
 
 %changelog
+* Thu Jul 30 2009 Chuck Ebbert <cebbert at redhat.com>
+- Linux 2.6.31-rc4-git6
+  New config item: CONFIG_BATTERY_DS2782 is not set
+- Add last-minute set_memory_wc() fix from LKML.
+
 * Thu Jul 30 2009 Matthew Garrett <mjg at redhat.com>
 - drm-intel-pm.patch: Don't reclock external outputs. Increase the reduced
    clock slightly to avoid upsetting some hardware. Disable renderclock

linux-2.6-ksm.patch:
 b/arch/alpha/include/asm/mman.h     |    3 
 b/arch/mips/include/asm/mman.h      |    3 
 b/arch/parisc/include/asm/mman.h    |    3 
 b/arch/xtensa/include/asm/mman.h    |    3 
 b/fs/proc/page.c                    |    5 
 b/include/asm-generic/mman-common.h |    5 
 b/include/linux/ksm.h               |   50 +
 b/include/linux/mm.h                |    1 
 b/include/linux/mmu_notifier.h      |   34 
 b/include/linux/rmap.h              |    6 
 b/include/linux/sched.h             |    7 
 b/kernel/fork.c                     |    8 
 b/mm/Kconfig                        |   11 
 b/mm/Makefile                       |    1 
 b/mm/ksm.c                          |   56 +
 b/mm/madvise.c                      |   41 
 b/mm/memory.c                       |    9 
 b/mm/mmu_notifier.c                 |   22 
 b/mm/mremap.c                       |   14 
 b/mm/rmap.c                         |   23 
 include/linux/ksm.h                 |   29 
 mm/ksm.c                            | 1506 +++++++++++++++++++++++++++++++++++-
 mm/madvise.c                        |   16 
 mm/memory.c                         |    7 
 24 files changed, 1780 insertions(+), 83 deletions(-)

Index: linux-2.6-ksm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-ksm.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- linux-2.6-ksm.patch	23 Jul 2009 18:25:23 -0000	1.1
+++ linux-2.6-ksm.patch	31 Jul 2009 01:00:04 -0000	1.2
@@ -546,9 +546,9 @@ index bd29592..ac312a4 100644
 -	mm->flags = (current->mm) ? current->mm->flags : default_dump_filter;
 +	mm->flags = (current->mm) ?
 +		(current->mm->flags & MMF_INIT_MASK) : default_dump_filter;
+ 	mm->oom_adj = (current->mm) ? current->mm->oom_adj : 0;
  	mm->core_state = NULL;
  	mm->nr_ptes = 0;
- 	set_mm_counter(mm, file_rss, 0);
 @@ -486,6 +491,7 @@ void mmput(struct mm_struct *mm)
  
  	if (atomic_dec_and_test(&mm->mm_users)) {

linux-2.6.31-lirc.patch:
 MAINTAINERS                           |    9 
 drivers/input/Kconfig                 |    2 
 drivers/input/Makefile                |    2 
 drivers/input/lirc/Kconfig            |  112 +
 drivers/input/lirc/Makefile           |   20 
 drivers/input/lirc/lirc.h             |  100 +
 drivers/input/lirc/lirc_bt829.c       |  383 ++++++
 drivers/input/lirc/lirc_dev.c         |  851 ++++++++++++++
 drivers/input/lirc/lirc_dev.h         |  184 +++
 drivers/input/lirc/lirc_i2c.c         |  537 ++++++++
 drivers/input/lirc/lirc_igorplugusb.c |  556 +++++++++
 drivers/input/lirc/lirc_imon.c        | 2062 ++++++++++++++++++++++++++++++++++
 drivers/input/lirc/lirc_it87.c        |  986 ++++++++++++++++
 drivers/input/lirc/lirc_it87.h        |  116 +
 drivers/input/lirc/lirc_ite8709.c     |  539 ++++++++
 drivers/input/lirc/lirc_mceusb.c      | 1223 ++++++++++++++++++++
 drivers/input/lirc/lirc_parallel.c    |  709 +++++++++++
 drivers/input/lirc/lirc_parallel.h    |   26 
 drivers/input/lirc/lirc_sasem.c       |  931 +++++++++++++++
 drivers/input/lirc/lirc_serial.c      | 1316 +++++++++++++++++++++
 drivers/input/lirc/lirc_sir.c         | 1294 +++++++++++++++++++++
 drivers/input/lirc/lirc_streamzap.c   |  777 ++++++++++++
 drivers/input/lirc/lirc_ttusbir.c     |  397 ++++++
 drivers/input/lirc/lirc_zilog.c       | 1374 ++++++++++++++++++++++
 24 files changed, 14506 insertions(+)

Index: linux-2.6.31-lirc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6.31-lirc.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- linux-2.6.31-lirc.patch	7 Jul 2009 06:17:04 -0000	1.2
+++ linux-2.6.31-lirc.patch	31 Jul 2009 01:00:04 -0000	1.3
@@ -51,8 +51,8 @@ index 381190c..fc79bdf 100644
 +S:	Maintained
 +
  LINUX SECURITY MODULE (LSM) FRAMEWORK
- P:	Chris Wright
- M:	chrisw at sous-sol.org
+ M:	Chris Wright <chrisw at sous-sol.org>
+ L:	linux-security-module at vger.kernel.org
 diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig
 index cd50c00..442f94f 100644
 --- a/drivers/input/Kconfig


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/sources,v
retrieving revision 1.1062
retrieving revision 1.1063
diff -u -p -r1.1062 -r1.1063
--- sources	29 Jul 2009 01:42:07 -0000	1.1062
+++ sources	31 Jul 2009 01:00:05 -0000	1.1063
@@ -1,3 +1,3 @@
 7a80058a6382e5108cdb5554d1609615  linux-2.6.30.tar.bz2
 879f514ce009b9a7535b743f71cd3c02  patch-2.6.31-rc4.bz2
-c7015e64d87ae5573ee85308ec680082  patch-2.6.31-rc4-git3.bz2
+600168a562b18faa4bdc2f6ba934d57c  patch-2.6.31-rc4-git6.bz2


Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/upstream,v
retrieving revision 1.976
retrieving revision 1.977
diff -u -p -r1.976 -r1.977
--- upstream	29 Jul 2009 01:42:07 -0000	1.976
+++ upstream	31 Jul 2009 01:00:05 -0000	1.977
@@ -1,3 +1,3 @@
 linux-2.6.30.tar.bz2
 patch-2.6.31-rc4.bz2
-patch-2.6.31-rc4-git3.bz2
+patch-2.6.31-rc4-git6.bz2


--- patch-2.6.31-rc4-git3.bz2.sign DELETED ---




More information about the fedora-extras-commits mailing list