public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC-PATCH] x86: really use __builtin_memcmp on x86_32
@ 2008-11-10  6:12 Harvey Harrison
  2008-11-10  7:45 ` Ingo Molnar
  2008-11-10  8:38 ` Andi Kleen
  0 siblings, 2 replies; 5+ messages in thread
From: Harvey Harrison @ 2008-11-10  6:12 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: H. Peter Anvin, Thomas Gleixner, LKML

Impact: prevent generic code from overriding __builtin_memcmp

lib/string.c was using a generic implementation of memcmp
because __HAVE_ARCH_MEMCMP was not defined and it was then doing
#undef memcmp and defining a generic version.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
 arch/x86/include/asm/string_32.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/string_32.h b/arch/x86/include/asm/string_32.h
index c86f452..b671baf 100644
--- a/arch/x86/include/asm/string_32.h
+++ b/arch/x86/include/asm/string_32.h
@@ -195,6 +195,7 @@ static inline void *__memcpy3d(void *to, const void *from, size_t len)
 #define __HAVE_ARCH_MEMMOVE
 void *memmove(void *dest, const void *src, size_t n);
 
+#define __HAVE_ARCH_MEMCMP
 #define memcmp __builtin_memcmp
 
 #define __HAVE_ARCH_MEMCHR
-- 
1.6.0.3.866.gc189b




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-10 16:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-10  6:12 [RFC-PATCH] x86: really use __builtin_memcmp on x86_32 Harvey Harrison
2008-11-10  7:45 ` Ingo Molnar
2008-11-10  8:05   ` Ingo Molnar
2008-11-10 16:53     ` Harvey Harrison
2008-11-10  8:38 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox