Re: [GIT] Sparc

From: Linus Torvalds
Date: Mon Mar 23 2015 - 13:12:38 EST


On Mon, Mar 23, 2015 at 10:05 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Mar 23, 2015 at 9:55 AM, David Miller <davem@xxxxxxxxxxxxx> wrote:
>>
>> Some perf bug fixes from David Ahern, and the fix for that nasty
>> memmove() bug.
>
> That doesn't seem to be marked for stable? Or do you do the same thing
> as for networking, and just collect stable patches manually?

Side note: the memmove commit message is a bit misleading. The old
code handled zero-length calls fine, even if it wasn't explicit: it
always called memmove() for that case.

The condition "dst <= src || src + len <= dst" ends up being always
true when len is zero (because it obviously ends up being "dst <= src
|| src <= dst").

So there was just one bug - the 64-byte overlap with the cacheline
establish for the destination. Even that cacheline establish would
have been ok if all the loads for the 64-byte block had been done
up-front.

Oh well. I'm actually somewhat surprised this didn't hit anything
else. Doesn't networking also end up doing overlapping memmove() on
the skb data occasionally?

Linus
--
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/