]> git.baikalelectronics.ru Git - kernel.git/commit
uaccess: add force_uaccess_{begin,end} helpers
authorChristoph Hellwig <hch@lst.de>
Wed, 12 Aug 2020 01:33:47 +0000 (18:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 12 Aug 2020 17:57:59 +0000 (10:57 -0700)
commit05ef2db3aedbb02134ab21337b330cefc74453a6
treefd71a87be80c03601ab0e3be425fe45da116b5ba
parente142172a0b05095603c1285662fc8a17d1c0271c
uaccess: add force_uaccess_{begin,end} helpers

Add helpers to wrap the get_fs/set_fs magic for undoing any damange done
by set_fs(KERNEL_DS).  There is no real functional benefit, but this
documents the intent of these calls better, and will allow stubbing the
functions out easily for kernels builds that do not allow address space
overrides in the future.

[hch@lst.de: drop two incorrect hunks, fix a commit log typo]
Link: http://lkml.kernel.org/r/20200714105505.935079-6-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Greentime Hu <green.hu@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Nick Hu <nickhu@andestech.com>
Cc: Vincent Chen <deanbo422@gmail.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Link: http://lkml.kernel.org/r/20200710135706.537715-6-hch@lst.de
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 files changed:
arch/arm64/kernel/sdei.c
arch/m68k/include/asm/tlbflush.h
arch/mips/kernel/unaligned.c
arch/nds32/mm/alignment.c
arch/sh/kernel/traps_32.c
drivers/firmware/arm_sdei.c
include/linux/uaccess.h
kernel/events/callchain.c
kernel/events/core.c
kernel/kthread.c
kernel/stacktrace.c
mm/maccess.c