linux-stable/arch/powerpc/lib
Jeff Mahoney 637a99022f powerpc: Fix handling of strncmp with zero len
Commit 0119536c, which added the assembly version of strncmp to
powerpc, mentions that it adds two instructions to the version from
boot/string.S to allow it to handle len=0. Unfortunately, it doesn't
always return 0 when that is the case. The length is passed in r5, but
the return value is passed back in r3. In certain cases, this will
happen to work. Otherwise it will pass back the address of the first
string as the return value.

This patch lifts the len <= 0 handling code from memcpy to handle that
case.

Reported by: Christian_Sellars@symantec.com
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
CC: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2010-04-07 18:00:39 +10:00
..
alloc.c [POWERPC] Limit range of __init_ref_ok somewhat 2007-10-03 11:48:44 +10:00
checksum_32.S
checksum_64.S
code-patching.c PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures 2008-07-24 10:47:21 -07:00
copy_32.S powerpc/8xx: Start using dcbX instructions in various copy routines 2009-12-09 17:10:37 +11:00
copypage_64.S powerpc: Pair loads and stores in copy_4k_page 2010-02-17 14:03:16 +11:00
copyuser_64.S powerpc: Improve 64bit copy_tofrom_user 2010-02-17 14:03:16 +11:00
crtsavres.S [POWERPC] Fix -Os kernel builds with newer gcc versions 2008-06-16 15:00:54 +10:00
devres.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
div64.S
feature-fixups-test.S powerpc: Fixup lwsync at runtime 2008-07-03 16:58:10 +10:00
feature-fixups.c powerpc: Fix lwsync feature fixup vs. modules on 64-bit 2010-02-26 18:29:17 +11:00
locks.c locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
Makefile powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
mem_64.S [POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y 2007-04-13 03:55:13 +10:00
memcpy_64.S powerpc: Fix 64bit memcpy() regression 2009-02-26 14:02:53 +11:00
rheap.c powerpc: Fix corruption error in rh_alloc_fixed() 2008-12-17 10:06:14 -06:00
sstep.c powerpc: Don't emulate mr. instructions 2009-02-10 14:39:07 +11:00
string.S powerpc: Fix handling of strncmp with zero len 2010-04-07 18:00:39 +10:00
usercopy_64.c