Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653252

Re: [PATCH] x86/KASLR: use the right memcpy

From Baoquan He <bhe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/KASLR: use the right memcpy
Date 2017-05-30 16:00 +0200
Message-ID <tMPQJ-861-1@gated-at.bofh.it> (permalink)
References <tMLtN-5qE-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/30/17 at 11:14am, Arnd Bergmann wrote:
> The decompressor has its own implementation of the string functions,
> but has to include the right header to get those, while implicitly
> including linux/string.h may result in a link error:
> 
> arch/x86/boot/compressed/kaslr.o: In function `choose_random_location':
> kaslr.c:(.text+0xf51): undefined reference to `_mmx_memcpy'
> 
> This has appeared now as kaslr started using memcpy. Other files in the
> decompressor already do the same thing.
> 
> Fixes: d52e7d5a952c ("x86/KASLR: Parse all 'memmap=' boot option entries")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for this fix, Arnd!

The linking error didn't happen when I tested the patch of d52e7d5a952c.
Could you tell in what condition it will be triggered? Not sure if I
should wait for this fix being merged and do a back porting, or can
defer it if it's not risky.

Thanks
Baoquan

> ---
>  arch/x86/boot/compressed/kaslr.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
> index e0eba12bffe7..fe318b44f7b8 100644
> --- a/arch/x86/boot/compressed/kaslr.c
> +++ b/arch/x86/boot/compressed/kaslr.c
> @@ -30,6 +30,7 @@
>  
>  #include "misc.h"
>  #include "error.h"
> +#include "../string.h"
>  
>  #include <generated/compile.h>
>  #include <linux/module.h>
> -- 
> 2.9.0
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/KASLR: use the right memcpy Arnd Bergmann <arnd@arndb.de> - 2017-05-30 11:20 +0200
  Re: [PATCH] x86/KASLR: use the right memcpy Baoquan He <bhe@redhat.com> - 2017-05-30 16:00 +0200
    Re: [PATCH] x86/KASLR: use the right memcpy Arnd Bergmann <arnd@arndb.de> - 2017-05-30 16:30 +0200
      Re: [PATCH] x86/KASLR: use the right memcpy Baoquan He <bhe@redhat.com> - 2017-05-31 03:50 +0200
  [tip:x86/boot] x86/KASLR: Use the right memcpy() implementation tip-bot for Arnd Bergmann <tipbot@zytor.com> - 2017-05-31 11:50 +0200

csiph-web