Re: [git pull] "big box" x86 changes, boot protocol

From: Ingo Molnar
Date: Sat Apr 26 2008 - 17:17:50 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> > We always use the gcc builtin for memcpy() here.
>
> It's probably hard to write a reasonable x86 memcpy() that wouldn't
> happen to do the right thing for this case, but I do agee - we should
> still use memmove() for this, just to make it clear that it does
> overlapping things.

agreed, i queued up the patch below.

Ingo

------------->
Subject: bootprotocol: cleanup
From: Ingo Molnar <mingo@xxxxxxx>
Date: Sat Apr 26 23:14:36 CEST 2008

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/kernel/e820_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-x86.q/arch/x86/kernel/e820_64.c
===================================================================
--- linux-x86.q.orig/arch/x86/kernel/e820_64.c
+++ linux-x86.q/arch/x86/kernel/e820_64.c
@@ -100,7 +100,7 @@ void __init free_early(unsigned long sta
for (j = i + 1; j < MAX_EARLY_RES && early_res[j].end; j++)
;

- memcpy(&early_res[i], &early_res[i + 1],
+ memmove(&early_res[i], &early_res[i + 1],
(j - 1 - i) * sizeof(struct early_res));

early_res[j - 1].end = 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/