[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#471427: marked as done ([ia64] fix multithread/nfs corruption)



Your message dated Sat, 05 Apr 2008 07:52:17 +0000
with message-id <E1Ji3CD-0004M7-B5@ries.debian.org>
and subject line Bug#471427: fixed in linux-2.6 2.6.18.dfsg.1-19
has caused the Debian Bug report #471427,
regarding [ia64] fix multithread/nfs corruption
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
471427: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=471427
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: linux-2.6
Version: 2.6.18.dfsg.1-18etch1
Severity: important
Tags: patch

This issue was originally reported to LKML here:
  http://www.gelato.unsw.edu.au/archives/linux-ia64/0704/20323.html

This problem was eventually fixed upstream, but the patch was quite
invasive. The fix originally proposed (moving the lazy_mmu_prot_update
call) is believed to sufficiently resolve the issue. This fix, along
with a similar fix for migrate.c, was picked up by the RHEL kernels
(attached). I suggest including this fix in stable.

-- 
dann frazier

From: Luming Yu <luyu@redhat.com>
Subject: [RHEL 5.1 PATCH] BZ 253356: [EL5][BUG] Unexpected SIGILL on 	NFS/Montecito(ia64)
Date: Fri, 24 Aug 2007 21:49:48 +0800
Bugzilla: 253356
Message-Id: <46CEE1FC.20002@redhat.com>
Changelog: [mm] ia64: flush i-cache before set_pte


BZ 253356

Description of problem:
>Consider multi-thread...thread A and B on cpu0 and cpu1.
>And assume NFS's rpc client works on cpu1 and copies contents of the
>page on cpu1.
>
>following is a case I can imagine.
>==
>   --cpu0--               --cpu1--
>(A)page_fault                   
>(A)do no pag              
>(A)do NFS request/        
>(A)wait for new page-cache
>                          (NFS) recieve answer from server.
>                                copy pages.  //D-cache of cpu1 is dirty
>(A)got new page.          
>(A)set_pte_at()           
>                          (B) access new page. "pte is already set."
>here.
>                              no page fault.
>(A)flush_icache()(slow!)  (B) exec page and SIGILL.
>==

>>>> > For understanding, you have to understand how Montecito's cache works.
>>>> >
>>>> > Because L2-Dcache to L3-mixed-cache is *write-back*. Thera are time
>>>> > when a new data in L2-Dcache is not synchronized with data in 
>>>L3-mixed-cache.
>>>> > During this inconsistent time, L2-Icache miss will fetch wrong 
>>>instruction > > from L3-mixed-cache.
>>>> >
>>>> > cpu1 does this. *new hot data* on L2-Dcache (by NFS's RPC page fill) 
>>>and
>>>> > L3-mixed cache has stale data. L2-Dcache and L3-mixed-cache should be 
>>>synched
>>>> > before L2-Icache looks up L3-mixed-cache.
>>>> >
>>>> > Because fc instruction makes L2-Dcache and L3-mixed-cache consistent 
>>>(by invalidation),
>>>> > flush cache before set_pte() fixes the problem.
>>>> >
>>>> >   
>>>      
>>> Hmmm, interesting. The NFS's RPC page is still not actually filled with 
>>> valid data before it gets returned
>>> from vma->vm_ops->nopage in do_no_page. 
>>    
>
>Just cache is not coherent. 
>
>  
>>> Do you think we need to fix this  problem too?
>>    
>
>No. most of the cpus doesn't need cache flush at NFS's RPC page fill.
>And fix in NFS is already denied. 
>
>  
>>> Probably we need to make sure NFS's RPC page contains validate data 
>>> before it can be used in page fault
>>> handler. That would be more generic and less invasive to red hat kernel.
>>> 
>>    
>For redhat kernel,
>moving lazy_mmu_prot_update() before set_pet() is the simplest,
>for fixing NFS problem, I think. (But I'm not sure there are more unknown 
>case or not.)
>
>  
Upstream status:

Following 3 patches are in -mm kernel

http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/broken-out/flush-icache-before-set_pte-on-ia64-flush-icache-at-set_pte.patch
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/broken-out/flush-icache-before-set_pte-on-ia64-flush-icache-at-set_pte-fix.patch
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc3/2.6.23-rc3-mm1/broken-out/flush-icache-before-set_pte-on-ia64-flush-icache-at-set_pte-fix-update.patch

The following back port is prepared by the original author of the upstream 
patch set.  I reviewed and tested the back port
version which looks less invasive to red hat el5.1 kernel for fixing the 
problem. The only concern of this back port is that I'm worried that some 
cases that I don't know could be missed.  So please help review, test and 
ACK.

Thanks,
Luming







Fix Montecito's problem just by moving lazy_mmu_prot_update().

* Fixes do_no_page() case.
* Fixes page migration.

-Kame

==
diff -Nru linux-2.6.18.ia64/mm/memory.c mylinux-2.6.18.ia64/mm/memory.c
--- linux-2.6.18.ia64/mm/memory.c	2007-08-24 19:14:11.000000000 +0900
+++ mylinux-2.6.18.ia64/mm/memory.c	2007-08-24 19:46:33.000000000 +0900
@@ -2371,6 +2371,7 @@
 		entry = mk_pte(new_page, vma->vm_page_prot);
 		if (write_access)
 			entry = maybe_mkwrite(pte_mkdirty(entry), vma);
+		lazy_mmu_prot_update(entry);
 		set_pte_at(mm, address, page_table, entry);
 		if (anon) {
 			inc_mm_counter(mm, anon_rss);
@@ -2392,7 +2393,6 @@
 
 	/* no need to invalidate: a not-present page shouldn't be cached */
 	update_mmu_cache(vma, address, entry);
-	lazy_mmu_prot_update(entry);
 unlock:
 	pte_unmap_unlock(page_table, ptl);
 	if (dirty_page) {
diff -Nru linux-2.6.18.ia64/mm/migrate.c mylinux-2.6.18.ia64/mm/migrate.c
--- linux-2.6.18.ia64/mm/migrate.c	2007-08-24 19:14:03.000000000 +0900
+++ mylinux-2.6.18.ia64/mm/migrate.c	2007-08-24 19:48:27.000000000 +0900
@@ -172,6 +172,7 @@
 	pte = pte_mkold(mk_pte(new, vma->vm_page_prot));
 	if (is_write_migration_entry(entry))
 		pte = pte_mkwrite(pte);
+	lazy_mmu_prot_update(pte);
 	set_pte_at(mm, addr, ptep, pte);
 
 	if (PageAnon(new))
@@ -181,7 +182,6 @@
 
 	/* No need to invalidate - it was non-present before */
 	update_mmu_cache(vma, addr, pte);
-	lazy_mmu_prot_update(pte);
 
 out:
 	pte_unmap_unlock(ptep, ptl);


--- End Message ---
--- Begin Message ---
Source: linux-2.6
Source-Version: 2.6.18.dfsg.1-19

We believe that the bug you reported is fixed in the latest version of
linux-2.6, which is due to be installed in the Debian FTP archive:

linux-2.6_2.6.18.dfsg.1-19.diff.gz
  to pool/main/l/linux-2.6/linux-2.6_2.6.18.dfsg.1-19.diff.gz
linux-2.6_2.6.18.dfsg.1-19.dsc
  to pool/main/l/linux-2.6/linux-2.6_2.6.18.dfsg.1-19.dsc
linux-doc-2.6.18_2.6.18.dfsg.1-19_all.deb
  to pool/main/l/linux-2.6/linux-doc-2.6.18_2.6.18.dfsg.1-19_all.deb
linux-headers-2.6.18-6-all-ia64_2.6.18.dfsg.1-19_ia64.deb
  to pool/main/l/linux-2.6/linux-headers-2.6.18-6-all-ia64_2.6.18.dfsg.1-19_ia64.deb
linux-headers-2.6.18-6-all_2.6.18.dfsg.1-19_ia64.deb
  to pool/main/l/linux-2.6/linux-headers-2.6.18-6-all_2.6.18.dfsg.1-19_ia64.deb
linux-headers-2.6.18-6-itanium_2.6.18.dfsg.1-19_ia64.deb
  to pool/main/l/linux-2.6/linux-headers-2.6.18-6-itanium_2.6.18.dfsg.1-19_ia64.deb
linux-headers-2.6.18-6-mckinley_2.6.18.dfsg.1-19_ia64.deb
  to pool/main/l/linux-2.6/linux-headers-2.6.18-6-mckinley_2.6.18.dfsg.1-19_ia64.deb
linux-headers-2.6.18-6_2.6.18.dfsg.1-19_ia64.deb
  to pool/main/l/linux-2.6/linux-headers-2.6.18-6_2.6.18.dfsg.1-19_ia64.deb
linux-image-2.6.18-6-itanium_2.6.18.dfsg.1-19_ia64.deb
  to pool/main/l/linux-2.6/linux-image-2.6.18-6-itanium_2.6.18.dfsg.1-19_ia64.deb
linux-image-2.6.18-6-mckinley_2.6.18.dfsg.1-19_ia64.deb
  to pool/main/l/linux-2.6/linux-image-2.6.18-6-mckinley_2.6.18.dfsg.1-19_ia64.deb
linux-manual-2.6.18_2.6.18.dfsg.1-19_all.deb
  to pool/main/l/linux-2.6/linux-manual-2.6.18_2.6.18.dfsg.1-19_all.deb
linux-patch-debian-2.6.18_2.6.18.dfsg.1-19_all.deb
  to pool/main/l/linux-2.6/linux-patch-debian-2.6.18_2.6.18.dfsg.1-19_all.deb
linux-source-2.6.18_2.6.18.dfsg.1-19_all.deb
  to pool/main/l/linux-2.6/linux-source-2.6.18_2.6.18.dfsg.1-19_all.deb
linux-support-2.6.18-6_2.6.18.dfsg.1-19_all.deb
  to pool/main/l/linux-2.6/linux-support-2.6.18-6_2.6.18.dfsg.1-19_all.deb
linux-tree-2.6.18_2.6.18.dfsg.1-19_all.deb
  to pool/main/l/linux-2.6/linux-tree-2.6.18_2.6.18.dfsg.1-19_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 471427@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
dann frazier <dannf@debian.org> (supplier of updated linux-2.6 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 03 Apr 2008 16:22:55 -0600
Source: linux-2.6
Binary: linux-image-2.6.18-6-vserver-powerpc linux-image-2.6.18-6-sparc32 linux-headers-2.6.18-6-r4k-kn04 linux-image-2.6.18-6-s390x linux-headers-2.6.18-6-r4k-ip22 linux-headers-2.6.18-6-xen-vserver-686 linux-headers-2.6.18-6-alpha-legacy linux-modules-2.6.18-6-xen-686 linux-headers-2.6.18-6-alpha-generic linux-headers-2.6.18-6-powerpc-miboot linux-headers-2.6.18-6-all-mips linux-image-2.6.18-6-r4k-ip22 linux-headers-2.6.18-6-powerpc-smp linux-headers-2.6.18-6-vserver-k7 xen-linux-system-2.6.18-6-xen-amd64 linux-manual-2.6.18 linux-image-2.6.18-6-footbridge linux-image-2.6.18-6-parisc-smp linux-image-2.6.18-6-s390 linux-image-2.6.18-6-xen-686 linux-image-2.6.18-6-amd64 linux-image-2.6.18-6-powerpc-miboot linux-headers-2.6.18-6-qemu linux-headers-2.6.18-6-mac linux-image-2.6.18-6-powerpc-smp linux-headers-2.6.18-6-rpc linux-image-2.6.18-6-xen-amd64 linux-headers-2.6.18-6-r5k-cobalt linux-headers-2.6.18-6-itanium linux-image-2.6.18-6-itanium linux-headers-2.6.18-6-vserver-sparc64 linux-image-2.6.18-6-powerpc linux-image-2.6.18-6-parisc linux-modules-2.6.18-6-xen-vserver-amd64 linux-image-2.6.18-6-parisc64-smp linux-headers-2.6.18-6-iop32x linux-image-2.6.18-6-sparc64-smp linux-image-2.6.18-6-686-bigmem linux-headers-2.6.18-6-all-mipsel linux-headers-2.6.18-6-all-ia64 linux-headers-2.6.18-6-ixp4xx linux-image-2.6.18-6-amiga linux-headers-2.6.18-6-all-m68k linux-image-2.6.18-6-r3k-kn02 linux-headers-2.6.18-6-mckinley linux-modules-2.6.18-6-xen-vserver-686 linux-image-2.6.18-6-alpha-legacy linux-image-2.6.18-6-alpha-smp linux-headers-2.6.18-6-xen-vserver-amd64 linux-headers-2.6.18-6-atari linux-image-2.6.18-6-vserver-powerpc64 linux-image-2.6.18-6-alpha-generic linux-headers-2.6.18-6-vserver-686 xen-linux-system-2.6.18-6-xen-vserver-686 linux-image-2.6.18-6-k7 linux-image-2.6.18-6-sb1a-bcm91480b linux-headers-2.6.18-6-all-hppa linux-headers-2.6.18-6-xen-amd64 linux-image-2.6.18-6-rpc linux-support-2.6.18-6 linux-doc-2.6.18 linux-headers-2.6.18-6-sparc64 linux-headers-2.6.18-6-all-amd64 linux-headers-2.6.18-6-sparc32 linux-headers-2.6.18-6-all-alpha linux-headers-2.6.18-6-alpha-smp linux-headers-2.6.18-6 linux-image-2.6.18-6-iop32x linux-image-2.6.18-6-vserver-k7 linux-image-2.6.18-6-parisc64 linux-headers-2.6.18-6-k7 linux-image-2.6.18-6-r5k-ip32 linux-image-2.6.18-6-r4k-kn04 linux-headers-2.6.18-6-all linux-image-2.6.18-6-atari linux-headers-2.6.18-6-vserver-powerpc linux-source-2.6.18 linux-headers-2.6.18-6-amd64 linux-headers-2.6.18-6-xen-686 linux-headers-2.6.18-6-r5k-ip32 linux-headers-2.6.18-6-sb1-bcm91250a linux-image-2.6.18-6-qemu linux-headers-2.6.18-6-xen linux-headers-2.6.18-6-prep linux-headers-2.6.18-6-all-sparc linux-image-2.6.18-6-mckinley linux-headers-2.6.18-6-vserver-s390x xen-linux-system-2.6.18-6-xen-vserver-amd64 linux-headers-2.6.18-6-footbridge linux-image-2.6.18-6-sb1-bcm91250a linux-image-2.6.18-6-xen-vserver-amd64 linux-image-2.6.18-6-mac xen-linux-system-2.6.18-6-xen-686 linux-image-2.6.18-6-r5k-cobalt linux-headers-2.6.18-6-s390x linux-image-2.6.18-6-xen-vserver-686 linux-headers-2.6.18-6-parisc64 linux-headers-2.6.18-6-parisc-smp linux-headers-2.6.18-6-r3k-kn02 linux-headers-2.6.18-6-s3c2410 linux-headers-2.6.18-6-xen-vserver linux-image-2.6.18-6-vserver-sparc64 linux-headers-2.6.18-6-686 linux-image-2.6.18-6-vserver-amd64 linux-headers-2.6.18-6-powerpc linux-headers-2.6.18-6-686-bigmem linux-image-2.6.18-6-686 linux-headers-2.6.18-6-amiga linux-image-2.6.18-6-vserver-686 linux-image-2.6.18-6-powerpc64 linux-headers-2.6.18-6-vserver-powerpc64 linux-headers-2.6.18-6-all-arm linux-image-2.6.18-6-sparc64 linux-headers-2.6.18-6-all-powerpc linux-image-2.6.18-6-486 linux-image-2.6.18-6-s3c2410 linux-headers-2.6.18-6-vserver-alpha linux-headers-2.6.18-6-parisc64-smp linux-image-2.6.18-6-prep linux-patch-debian-2.6.18 linux-headers-2.6.18-6-sparc64-smp linux-modules-2.6.18-6-xen-amd64 linux-tree-2.6.18 linux-image-2.6.18-6-s390-tape linux-headers-2.6.18-6-vserver-amd64 linux-image-2.6.18-6-vserver-s390x linux-image-2.6.18-6-vserver-alpha linux-headers-2.6.18-6-sb1a-bcm91480b linux-headers-2.6.18-6-powerpc64 linux-headers-2.6.18-6-all-i386 linux-headers-2.6.18-6-parisc linux-headers-2.6.18-6-s390 linux-headers-2.6.18-6-vserver linux-image-2.6.18-6-ixp4xx linux-headers-2.6.18-6-486 linux-headers-2.6.18-6-all-s390
Architecture: source ia64 all
Version: 2.6.18.dfsg.1-19
Distribution: stable
Urgency: high
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Changed-By: dann frazier <dannf@debian.org>
Description: 
 linux-doc-2.6.18 - Linux kernel specific documentation for version 2.6.18
 linux-headers-2.6.18-6 - Common header files for Linux 2.6.18
 linux-headers-2.6.18-6-all - All header files for Linux 2.6.18
 linux-headers-2.6.18-6-all-ia64 - All header files for Linux 2.6.18
 linux-headers-2.6.18-6-itanium - Header files for Linux 2.6.18 on Itanium
 linux-headers-2.6.18-6-mckinley - Header files for Linux 2.6.18 on Itanium II
 linux-image-2.6.18-6-itanium - Linux 2.6.18 image on Itanium
 linux-image-2.6.18-6-mckinley - Linux 2.6.18 image on Itanium II
 linux-manual-2.6.18 - Linux kernel API manual pages for version 2.6.18
 linux-patch-debian-2.6.18 - Debian patches to version 2.6.18 of the Linux kernel
 linux-source-2.6.18 - Linux kernel source for version 2.6.18 with Debian patches
 linux-support-2.6.18-6 - Support files for Linux 2.6.18
 linux-tree-2.6.18 - Linux kernel source tree for building Debian kernel images
Closes: 466401 469058 470719 471427 473824
Changes: 
 linux-2.6 (2.6.18.dfsg.1-19) stable; urgency=high
 .
   [ Martin Michlmayr ]
   * [mips] Enable UART on RaQ1 (closes: #473824).
 .
   [ dann frazier ]
   * e1000: Add PCI-IDs for 82571EB 4-port cards (closes: #466401).
   * Fix potential nfs write corruption (closes: #470719)
   * [ia64] Fix multi-thread/nfs text corruption (closes: #471427).
 .
   [ Bastian Blank ]
   * [i386/amd64] Clear DF before calling signal handler. (closes: #469058)
Files: 
 0f7ea4103e090d7f9a156090f0294a7f 5662 devel optional linux-2.6_2.6.18.dfsg.1-19.dsc
 d1ed973e192795b55ab4d2867917fcee 5384246 devel optional linux-2.6_2.6.18.dfsg.1-19.diff.gz
 e74a3731ac89fce2845cce8fbd8cdbea 3589694 doc optional linux-doc-2.6.18_2.6.18.dfsg.1-19_all.deb
 879d589774fe1c33b6b848289a6e6d83 1085018 doc optional linux-manual-2.6.18_2.6.18.dfsg.1-19_all.deb
 265071ab13306d769ff70b7e37537b97 1585778 devel optional linux-patch-debian-2.6.18_2.6.18.dfsg.1-19_all.deb
 9871f68780353bd51c547cafd849bf0a 41463294 devel optional linux-source-2.6.18_2.6.18.dfsg.1-19_all.deb
 1d95b3d601c24344be1895a9564601f1 3735816 devel optional linux-support-2.6.18-6_2.6.18.dfsg.1-19_all.deb
 8428701762805d8ebb9e03af6a52a48f 54000 devel optional linux-tree-2.6.18_2.6.18.dfsg.1-19_all.deb
 043dd78c61c392dc021817b9f09d99f4 53480 devel optional linux-headers-2.6.18-6-all_2.6.18.dfsg.1-19_ia64.deb
 6de572157a52da1d9b135445c753de71 53498 devel optional linux-headers-2.6.18-6-all-ia64_2.6.18.dfsg.1-19_ia64.deb
 3f86b7207fe411a06c66fc12d10df8d3 3081340 devel optional linux-headers-2.6.18-6_2.6.18.dfsg.1-19_ia64.deb
 7719e421131814d56db8b1928127f2e3 28014540 admin optional linux-image-2.6.18-6-itanium_2.6.18.dfsg.1-19_ia64.deb
 2f3c4b013a565e8041ca6d1e3da232be 254860 devel optional linux-headers-2.6.18-6-itanium_2.6.18.dfsg.1-19_ia64.deb
 305276651992845a116e9fa51955be3e 28181824 admin optional linux-image-2.6.18-6-mckinley_2.6.18.dfsg.1-19_ia64.deb
 e00866b66276db62c91478740b582702 255722 devel optional linux-headers-2.6.18-6-mckinley_2.6.18.dfsg.1-19_ia64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFH9ZzFhuANDBmkLRkRAkFLAJ0b6tCkStQjUkV2MPitzVjemrpxBwCggIcu
uh14bqjVJ89+rmzO6mDydn4=
=Fif/
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: