From: Ingo Molnar <mingo@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: Yinghai Lu <yinghai@kernel.org>, Baoquan He <bhe@redhat.com>,
Borislav Petkov <bp@suse.de>, Ingo Molnar <mingo@redhat.com>,
"x86@kernel.org" <x86@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Dmitry Vyukov <dvyukov@google.com>,
"H.J. Lu" <hjl.tools@gmail.com>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Andy Lutomirski <luto@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/boot: Rename overlapping memcpy() to memmove()
Date: Mon, 25 Apr 2016 09:36:43 +0200 [thread overview]
Message-ID: <20160425073643.GA27425@gmail.com> (raw)
In-Reply-To: <CAGXu5jJibUuByt=L8-NkWEvBbx==wZxTRgJkSqKEeD=kS9=VAA@mail.gmail.com>
* Kees Cook <keescook@chromium.org> wrote:
> On Sat, Apr 23, 2016 at 4:08 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Kees Cook <keescook@chromium.org> wrote:
> >
> >> --- a/arch/x86/boot/compressed/string.c
> >> +++ b/arch/x86/boot/compressed/string.c
> >> @@ -1,7 +1,13 @@
> >> +/*
> >> + * This provides an optimized implementation of memcpy, and a simplified
> >> + * implementation of memset and memmove, to avoid problems with the
> >> + * built-in implementations when running in the restricted decompression
> >> + * stub environment.
> >> + */
> >
> > Does 'built in' here mean the compiler's implementation?
> >
> > We cannot call kernel built-in functions yet, so we have to duplicate everything
> > we might need, right?
>
> Right, I actually mean both: we can use neither gcc nor kernel
> built-ins. (I am fuzzy on why the gcc built-ins aren't available -- I
> think because they're not available for standalone builds.)
I think part of it is that we simply don't trust libgcc: it might be using FPU ops
or it might start doing something silly from a kernel perspective while
language-lawyering their way out of the regression with some sort of 'we never
promised to keep that kind of detail stable'.
The smaller the cross-surface to a historically compatibility-breakage-happy
compiler like GCC the better.
Thanks,
Ingo
prev parent reply other threads:[~2016-04-25 7:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-22 22:26 [PATCH] x86/boot: Rename overlapping memcpy() to memmove() Kees Cook
2016-04-23 11:08 ` Ingo Molnar
2016-04-23 19:46 ` Kees Cook
2016-04-25 7:36 ` Ingo Molnar [this message]
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=20160425073643.GA27425@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=aryabinin@virtuozzo.com \
--cc=bhe@redhat.com \
--cc=bp@suse.de \
--cc=dvyukov@google.com \
--cc=hjl.tools@gmail.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=x86@kernel.org \
--cc=yinghai@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