From: Baoquan He <bhe@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Ingo Molnar <mingo@redhat.com>,
the arch/x86 maintainers <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Kees Cook <keescook@chromium.org>,
Thomas Garnier <thgarnie@google.com>,
Dave Jiang <dave.jiang@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/KASLR: use the right memcpy
Date: Wed, 31 May 2017 09:43:15 +0800 [thread overview]
Message-ID: <20170531014315.GA8840@x1> (raw)
In-Reply-To: <CAK8P3a1EZyq5iN0c2+9FN2FDKEvu=WPfQf8d-32JxOwRFpSUeQ@mail.gmail.com>
On 05/30/17 at 04:24pm, Arnd Bergmann wrote:
> On Tue, May 30, 2017 at 3:56 PM, Baoquan He <bhe@redhat.com> wrote:
> > 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.
>
> It only happens on 32-bit kernels with CONFIG_X86_USE_3DNOW, maybe
> there are additional requirements.
Checked code again, in commit d52e7d5a952c "#include "../boot.h" is
removed. Not sure if that removal caused the 32-bit kernel link error.
While I didn't see boot/string.h is included into the boot/boot.h.
next prev parent reply other threads:[~2017-05-31 1:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 9:14 [PATCH] x86/KASLR: use the right memcpy Arnd Bergmann
2017-05-30 13:56 ` Baoquan He
2017-05-30 14:24 ` Arnd Bergmann
2017-05-31 1:43 ` Baoquan He [this message]
2017-05-31 9:40 ` [tip:x86/boot] x86/KASLR: Use the right memcpy() implementation tip-bot for Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170531014315.GA8840@x1 \
--to=bhe@redhat.com \
--cc=arnd@arndb.de \
--cc=dave.jiang@intel.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=thgarnie@google.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox