linux/arch/arm/lib
Andrew Jeffery ceac10c83b ARM: 9290/1: uaccess: Fix KASAN false-positives
__copy_to_user_memcpy() and __clear_user_memset() had been calling
memcpy() and memset() respectively, leading to false-positive KASAN
reports when starting userspace:

    [   10.707901] Run /init as init process
    [   10.731892] process '/bin/busybox' started with executable stack
    [   10.745234] ==================================================================
    [   10.745796] BUG: KASAN: user-memory-access in __clear_user_memset+0x258/0x3ac
    [   10.747260] Write of size 2687 at addr 000de581 by task init/1

Use __memcpy() and __memset() instead to allow userspace access, which
is of course the intent of these functions.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2023-03-06 15:25:08 +00:00
..
ashldi3.S Revert "arm: move exports to definitions" 2016-11-23 10:00:03 +00:00
ashrdi3.S Revert "arm: move exports to definitions" 2016-11-23 10:00:03 +00:00
backtrace-clang.S ARM: implement IRQ stacks 2021-12-03 15:11:31 +01:00
backtrace.S ARM: implement IRQ stacks 2021-12-03 15:11:31 +01:00
bitops.h ARM: 8843/1: use unified assembler in headers 2019-02-26 11:26:06 +00:00
bswapsdi2.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
call_with_stack.S ARM: 9233/1: stacktrace: Skip frame pointer boundary check for call_with_stack() 2022-10-04 11:09:47 +01:00
changebit.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clear_user.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
clearbit.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
copy_from_user.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
copy_page.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
copy_template.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
copy_to_user.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
csumipv6.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
csumpartial.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
csumpartialcopy.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
csumpartialcopygeneric.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
csumpartialcopyuser.S arm: propagate the calling convention changes down to csum_partial_copy_from_user() 2020-08-20 15:45:16 -04:00
delay-loop.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
delay.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
div64.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
error-inject.c ARM: 9279/1: support function error injection 2022-12-07 14:08:38 +00:00
findbit.S ARM: findbit: add unwinder information 2022-11-14 12:00:58 +00:00
getuser.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-readsb.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-readsl.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-readsw-armv3.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-readsw-armv4.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-writesb.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-writesl.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-writesw-armv3.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io-writesw-armv4.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
lib1funcs.S ARM: 8844/1: use unified assembler in assembly files 2019-02-26 11:26:07 +00:00
lshrdi3.S Revert "arm: move exports to definitions" 2016-11-23 10:00:03 +00:00
Makefile ARM: 9279/1: support function error injection 2022-12-07 14:08:38 +00:00
memchr.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
memcpy.S ARM: memcpy: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
memmove.S ARM: memmove: use frame pointer as unwind anchor 2021-12-03 15:11:32 +01:00
memset.S ARM: memset: clean up unwind annotations 2021-12-03 15:11:32 +01:00
muldi3.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
putuser.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
setbit.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
strchr.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
strrchr.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
testchangebit.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
testclearbit.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
testsetbit.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
uaccess_with_memcpy.c ARM: 9290/1: uaccess: Fix KASAN false-positives 2023-03-06 15:25:08 +00:00
ucmpdi2.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
xor-neon.c crypto: arm/xor - make vectorized C code Clang-friendly 2022-02-11 20:39:39 +11:00