[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FBFBDCE.6030104@zytor.com>
Date: Fri, 25 May 2012 10:13:50 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Thavatchai Makphaibulcboke <thavatchai.makpahibulchoke@...com>
CC: Lasse Collin <lasse.collin@...aani.org>,
"lethal@...ux-sh.org" <lethal@...ux-sh.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"x86@...nel.org" <x86@...nel.org>,
"kaloz@...nwrt.org" <kaloz@...nwrt.org>,
"matt.fleming@...el.com" <matt.fleming@...el.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"linux-sh@...r.kernel.org" <linux-sh@...r.kernel.org>,
"linux@....linux.org.uk" <linux@....linux.org.uk>,
"schwidefsky@...ibm.com" <schwidefsky@...ibm.com>,
"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
"linux390@...ibm.com" <linux390@...ibm.com>
Subject: Re: [PATCH] lib/decompress_unxz.c: removing all memory helper functions
On 05/25/2012 10:05 AM, Thavatchai Makphaibulcboke wrote:
>> We could do that. But according to the comment in the original
>> implementation, there seems to be a concern regarding its performance
>> speed. If you believe all archs' memcpy would give comparable
>> performance to the memmove. then I could do that.
>>
>
> Also how about the case for overlapping buffer, especially when the
> destination is at a higher address? I do not believe memcpy guarantee
> to work.
memcpy() is not guaranteed to work for any overlap; that is what
memmove() is for.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists