aboutsummaryrefslogtreecommitdiffstats
path: root/lib/strncpy_from_user.c
diff options
context:
space:
mode:
authorArnd Bergmann <[email protected]>2022-02-14 08:00:10 +0000
committerArnd Bergmann <[email protected]>2022-02-25 08:36:05 +0000
commit52fe8d125c9afecc6fff6afd9950a388488df2ce (patch)
treeec9fa16bb2f988f2625b9bf66443e10c2819f6a5 /lib/strncpy_from_user.c
parentm68k: fix access_ok for coldfire (diff)
downloadkernel-52fe8d125c9afecc6fff6afd9950a388488df2ce.tar.gz
kernel-52fe8d125c9afecc6fff6afd9950a388488df2ce.zip
arm64: simplify access_ok()
arm64 has an inline asm implementation of access_ok() that is derived from the 32-bit arm version and optimized for the case that both the limit and the size are variable. With set_fs() gone, the limit is always constant, and the size usually is as well, so just using the default implementation reduces the check into a comparison against a constant that can be scheduled by the compiler. On a defconfig build, this saves over 28KB of .text. Acked-by: Robin Murphy <[email protected]> Acked-by: Mark Rutland <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
Diffstat (limited to 'lib/strncpy_from_user.c')
0 files changed, 0 insertions, 0 deletions