From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759257AbYDZXh6 (ORCPT ); Sat, 26 Apr 2008 19:37:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752742AbYDZXhv (ORCPT ); Sat, 26 Apr 2008 19:37:51 -0400 Received: from gw.goop.org ([64.81.55.164]:40388 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbYDZXhu (ORCPT ); Sat, 26 Apr 2008 19:37:50 -0400 Message-ID: <4813BCC7.5040701@goop.org> Date: Sat, 26 Apr 2008 16:37:43 -0700 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.12 (X11/20080418) MIME-Version: 1.0 To: Andrew Morton CC: Ingo Molnar , Linus Torvalds , linux-kernel@vger.kernel.org, Thomas Gleixner , "H. Peter Anvin" , Yinghai Lu , Yinghai Lu , jbarnes@virtuousgeek.org Subject: Re: [git pull] "big box" x86 changes, boot protocol References: <20080426185516.GA32364@elte.hu> <20080426195407.GA13729@elte.hu> <20080426133928.a6f40caa.akpm@linux-foundation.org> In-Reply-To: <20080426133928.a6f40caa.akpm@linux-foundation.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton wrote: >> + memcpy(&early_res[i], &early_res[i + 1], >> + (j - 1 - i) * sizeof(struct early_res)); >> > > nit: memcpy() shouldn't be used for overlapping copies. It happens to be > OK (for dst Definitely shouldn't be assumed. At one point in the distant past I had a ppc memcpy which would clobber a destination cacheline before reading the source, so source and dest within a cacheline's distance would be trouble, regardless of the direction. Arch-specific code which knows about the arch-specific details of memcpy might be safer, I guess, but its still fairly brittle. J