[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e825dec01f6ffd19fd5487f04280583c673b7f1d.camel@perches.com>
Date: Thu, 09 Dec 2021 15:47:49 -0800
From: Joe Perches <joe@...ches.com>
To: Kees Cook <keescook@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] x86/boot/string: Add missing function declarations
On Thu, 2021-12-09 at 15:37 -0800, Kees Cook wrote:
> On Fri, Nov 19, 2021 at 09:53:25AM -0800, Kees Cook wrote:
> > Silence "missing function declaration" warnings from string.h when
> > building under W=1.
> >
> > Signed-off-by: Kees Cook <keescook@...omium.org>
> > ---
>
> Hi, just a quick ping on this little fix.
[]
> > diff --git a/arch/x86/boot/string.h b/arch/x86/boot/string.h
[]
> > @@ -8,8 +8,10 @@
> > #undef memcmp
> >
> > void *memcpy(void *dst, const void *src, size_t len);
> > +void *memmove(void *dst, const void *src, size_t len);
> > void *memset(void *dst, int c, size_t len);
> > int memcmp(const void *s1, const void *s2, size_t len);
> > +int bcmp(const void *s1, const void *s2, size_t len);
Unrelated trivia:
Is bcmp still used anywhere in the kernel?
confdata.c is a user-mode program right?
$ git grep -w bcmp
arch/x86/boot/string.c: * Clang may lower `memcmp == 0` to `bcmp == 0`.
arch/x86/boot/string.c:int bcmp(const void *s1, const void *s2, size_t len)
include/linux/string.h:extern int bcmp(const void *,const void *,__kernel_size_t);
lib/Makefile:# Prevent the compiler from calling builtins like memcmp() or bcmp() from this
lib/string.c: * bcmp - returns 0 if and only if the buffers have identical contents.
lib/string.c: * meaning, and architectures may implement their own more efficient bcmp(). So
lib/string.c:int bcmp(const void *a, const void *b, size_t len)
lib/string.c:EXPORT_SYMBOL(bcmp);
scripts/kconfig/confdata.c: if (bcmp(map1, map2, st1.st_size))
Powered by blists - more mailing lists