coreboot-kgpe-d16/payloads/libpayload/libc
Julius Werner ae096be00c libpayload: memmove: Don't make expectations of architecture memcpy
default_memmove() calls memcpy() when (src > dst). This is safe for the
default_memcpy() implementation, but just calling memcpy() may invoke an
architecture-specific implementation. Architectures are free to
implement memcpy() however they want and may assume that buffers don't
overlap in either direction. So while this happens to work for all
current architecture implementations of memcpy(), it's safer not to rely
on that and only rely on the known implementation of default_memcpy()
for the forwards-overlapping case.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I7ece4ce9e6622a36612bfade3deb62f351877789
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44691
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 09:24:06 +00:00
..
Makefile.inc libpayload: Add simple 32.32 fixed-point math API 2020-07-09 00:32:11 +00:00
args.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
console.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
coreboot.c libpayload: Cache physical location of strings 2020-08-24 09:13:35 +00:00
ctype.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
die.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
exec.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
fmap.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
fpmath.c libpayload: Add simple 32.32 fixed-point math API 2020-07-09 00:32:11 +00:00
getopt_long.c Reduce warnings/errors in libpayload when using picky compiler options 2011-06-30 20:41:23 +02:00
hexdump.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
ipchecksum.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
lib.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
libgcc.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
malloc.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
memory.c libpayload: memmove: Don't make expectations of architecture memcpy 2020-08-24 09:24:06 +00:00
printf.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
qsort.c libpayload: Fix whitespace errors 2013-06-27 14:46:43 +02:00
rand.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
readline.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
string.c payloads/libpayload/libc: Avoid NULL pointer dereference 2020-05-28 09:34:37 +00:00
strlcpy.c libpayload: Implement strlcpy 2011-07-07 22:29:35 +02:00
sysinfo.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
time.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00