lkml.org 
[lkml]   [2019]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 1/2] x86/purgatory: do not use __builtin_memcpy and __builtin_memset
On Tue, 23 Jul 2019, Nick Desaulniers wrote:
> Instead, reuse an implementation from arch/x86/boot/compressed/string.c
> if we define warn as a symbol. Also, Clang may lower memcmp's that
> compare against 0 to bcmp's, so add a small definition, too. See also:
> commit 5f074f3e192f ("lib/string.c: implement a basic bcmp")
>
> Cc: stable@vger.kernel.org
> Fixes: 8fc5b4d4121c ("purgatory: core purgatory functionality")
> Link: https://bugs.chromium.org/p/chromium/issues/detail?id=984056
> Reported-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
> Debugged-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
> Debugged-by: Manoj Gupta <manojgupta@google.com>
> Suggested-by: Alistair Delva <adelva@google.com>
> Signed-off-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

That SOB chain is weird. Is Vaibhav the author?

> +/*
> + * Clang may lower `memcmp == 0` to `bcmp == 0`.
> + */
> +int bcmp(const void *s1, const void *s2, size_t len) {
> + return memcmp(s1, s2, len);
> +}

foo()
{
}

please.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-07-24 12:34    [W:0.062 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site