* Kees Cook <[email protected]> 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 <[email protected]>
> Signed-off-by: Kees Cook <[email protected]>
> ---
> 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

Reply via email to