lkml.org 
[lkml]   [2016]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] x86/boot: Rename overlapping memcpy() to memmove()

* Kees Cook <keescook@chromium.org> wrote:

> Instead of having non-standard memcpy() behavior, explicitly call the new
> function memmove(), make it available to the decompressors, and switch
> the two overlap cases (screen scrolling and ELF parsing) to use memmove().
> Additionally documents the purpose of compressed/string.c.
>
> Suggested-by: Lasse Collin <lasse.collin@tukaani.org>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> Applies on top of tip:x86/boot
> ---
> arch/x86/boot/compressed/misc.c | 6 ++++--
> arch/x86/boot/compressed/string.c | 19 +++++++++++--------
> 2 files changed, 15 insertions(+), 10 deletions(-)
>
> diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
> index c57d785ff955..6dde6ccdf00e 100644
> --- a/arch/x86/boot/compressed/misc.c
> +++ b/arch/x86/boot/compressed/misc.c
> @@ -32,9 +32,11 @@
> #undef memcpy
> #undef memset
> #define memzero(s, n) memset((s), 0, (n))
> +#define memmove memmove

Btw., what's the purpose of this define? If it's already defined then we should
get a build warning. If it's not, we won't.

Anyway, applied it, just curious.

Thanks,

Ingo

\
 
 \ /
  Last update: 2016-04-28 11:21    [W:0.091 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site