mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Neil Romig <neil@romig.demon.co.uk>,
	linux-kernel@vger.kernel.org, hyoshiok@miraclelinux.com,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: File corruption when using kernels 2.6.18+
Date: Wed, 3 Oct 2007 12:22:42 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.999.0710031209450.3579@woody.linux-foundation.org> (raw)
In-Reply-To: <84144f020710031148i346b393bm528fc150fedff00f@mail.gmail.com>



On Wed, 3 Oct 2007, Pekka Enberg wrote:

> Hi Neil,
> 
> On 10/3/07, Neil Romig <neil@romig.demon.co.uk> wrote:
> > > > Thanks for your help on this. I have narrowed it down to commit
> > > > "c22ce143d15eb288543fe9873e1c5ac1c01b69a1 x86: cache pollution aware
> > > > __copy_from_user_ll()". This fits with the errors I'm getting, so now I need
> > > > to find out if I can safely ignore this patch, or does it have to be modified?
> > > > This is my first Linux bug in many years of simply using it, so I'm a little
> > > > nervous!
> 
> A some point in time, I wrote:
> > > Just to make sure, if you disable CONFIG_X86_INTEL_USERCOPY, the
> > > corruption goes away?
> 
> On 10/3/07, Neil Romig <neil@romig.demon.co.uk> wrote:
> > It took some fiddling to disable (edit arch/i386/Kconfig.cpu) but that has fixed it.
> > Many thanks!
> >
> > Does this need to be reported as a bug? Or should the kernel config scripts be
> > changed to enable this option to be easily turned off?
> 
> Looks like a bug to me. Can we have your /proc/cpuinfo too?

I doubt it's a CPU bug. It's more likely a chipset or motherboard bug 
around the CPU. The patterns for the original "cp" corruption that Neil 
posted seem to be:

	   File offset		correct		corrupt
	 decimal      hex
	======== ========
	  642470 0009cda6	'm' 0x6D	'o' 0x6f
	  972198 000ed5a6	'i' 0x69	'a' 0x61
	 1243686 0012fa26	's' 0x73	'c' 0x63
	 1676846 0019962e	't' 0x74	'`' 0x64
	 1907974 001d1d06	' ' 0x20	'(' 0x28
	...

and since it's apparently about using the uncached accesses, it's 
interesting that the low three bits are identical in all those corruptions 
(they also seem to be single-bit errors in the actual byte-value, although 
the bit is not the same). If the external bus is 64 bits (?), that would 
say that it's one particular byte lane that is dodgy.

I would bet that the reason the intel-optimized memcpy triggers this is 
that the non-temporal stores just means that you go out directly on the 
bus, and it probably just shows a weakness in the chipset or bus that 
doesn't show with the normal cacheline accesses.

			Linus

  reply	other threads:[~2007-10-03 19:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 15:40 Neil Romig
2007-09-30 16:29 ` Pekka Enberg
2007-10-02 21:05   ` Neil Romig
2007-10-03  5:18     ` Pekka Enberg
2007-10-03 18:42       ` Neil Romig
2007-10-03 18:48         ` Pekka Enberg
2007-10-03 19:22           ` Linus Torvalds [this message]
2007-10-03 19:35             ` Pekka Enberg
2007-10-03 19:54               ` Linus Torvalds
2007-10-04  1:11                 ` Hiro Yoshioka
2007-10-03 20:30               ` Alan Cox
2007-10-04 18:34                 ` Neil Romig
2007-10-02 22:30 ` Chuck Ebbert
     [not found] <fa.VCoGTwbB+qeNlkBJ24MiuXcGSRA@ifi.uio.no>
     [not found] ` <fa.R+FhT6IGmV/dDweUt/MdSeA5YbQ@ifi.uio.no>
     [not found]   ` <fa.7MxTIt/ik0uRFN/lMWUasYV/JyE@ifi.uio.no>
     [not found]     ` <fa.YJ4uCPzXT5TQElSosyz98cpuMSc@ifi.uio.no>
     [not found]       ` <fa.Tp9UUX9EYprQyLg0shgH1YG9DDM@ifi.uio.no>
     [not found]         ` <fa.PzpJEEoLXfC+eOQZjTWjdf9vdnE@ifi.uio.no>
2007-10-04  2:59           ` Robert Hancock
2007-10-04  3:39             ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.0.999.0710031209450.3579@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hyoshiok@miraclelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil@romig.demon.co.uk \
    --cc=penberg@cs.helsinki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®