Linux NFS development
 help / color / mirror / Atom feed
* Issue found with kernel/net/sunrpc/xdr.c
@ 2013-08-27 21:16 Mark Young
  2013-08-27 22:01 ` Myklebust, Trond
  0 siblings, 1 reply; 12+ messages in thread
From: Mark Young @ 2013-08-27 21:16 UTC (permalink / raw)
  To: linux-nfs@vger.kernel.org; +Cc: Matt Craighead

I was pointed to this mailing list by Brian Fields.

 We're currently seeing NFS data corruption, which we traced back to memory corruption that happens in the function _shift_data_right_pages in net/sunrpc/xdr.c.
 
 When we see the issue, we're running a 32bit os with systems running with more than 1GB of physical memory.   The errant behavior appears to be that two calls to kmap_atomic (on 32bit systems with highmem present) with the same physical address (on addresses within highmem)  will return two different vaddrs.    In our assessment, this confuses the memmove code into thinking that the two addresses are non-overlapping in spite of the fact that they are overlapping in physical space.  This, in turn, results in corruption.  
 
 A proposed solution to the problem would involve calling kmap_atomic only once in the case that the pgfrom and pgto are identical, and then re-using the resultant vaddr for both vto and vfrom.

Any insight on the issue or the proposed solution would be greatly appreciated.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-08-28 19:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 21:16 Issue found with kernel/net/sunrpc/xdr.c Mark Young
2013-08-27 22:01 ` Myklebust, Trond
2013-08-28 14:32   ` J. Bruce Fields
2013-08-28 15:18     ` Matt Craighead
2013-08-28 15:41       ` J. Bruce Fields
2013-08-28 15:47         ` Matt Craighead
2013-08-28 16:08           ` J. Bruce Fields
2013-08-28 16:32             ` Myklebust, Trond
2013-08-28 17:51       ` Myklebust, Trond
2013-08-28 18:53         ` Matt Craighead
2013-08-28 19:39           ` Myklebust, Trond
2013-08-28 19:40             ` Matt Craighead

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox