Messages in this thread | | | Date | Thu, 28 Apr 2016 11:02:14 +0200 | From | Ingo Molnar <> | Subject | Re: [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
| |