summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/Kconfig3
-rw-r--r--arch/alpha/Kconfig1
-rw-r--r--arch/arc/Kconfig1
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--arch/avr32/Kconfig1
-rw-r--r--arch/blackfin/Kconfig1
-rw-r--r--arch/c6x/Kconfig1
-rw-r--r--arch/cris/Kconfig1
-rw-r--r--arch/frv/Kconfig1
-rw-r--r--arch/h8300/Kconfig1
-rw-r--r--arch/hexagon/Kconfig1
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/m32r/Kconfig1
-rw-r--r--arch/m68k/Kconfig1
-rw-r--r--arch/metag/Kconfig1
-rw-r--r--arch/microblaze/Kconfig1
-rw-r--r--arch/mips/Kconfig1
-rw-r--r--arch/mn10300/Kconfig1
-rw-r--r--arch/nios2/Kconfig1
-rw-r--r--arch/openrisc/Kconfig1
-rw-r--r--arch/parisc/Kconfig1
-rw-r--r--arch/powerpc/Kconfig1
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/score/Kconfig1
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sparc/Kconfig1
-rw-r--r--arch/tile/Kconfig1
-rw-r--r--arch/um/Kconfig.common1
-rw-r--r--arch/unicore32/Kconfig1
-rw-r--r--arch/x86/Kconfig1
-rw-r--r--arch/xtensa/Kconfig1
-rw-r--r--include/asm-generic/uaccess.h41
-rw-r--r--include/linux/uaccess.h7
-rw-r--r--lib/Makefile4
35 files changed, 3 insertions, 83 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 315d37626ddc..cd211a14a88f 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -847,7 +847,4 @@ config STRICT_MODULE_RWX
847config ARCH_WANT_RELAX_ORDER 847config ARCH_WANT_RELAX_ORDER
848 bool 848 bool
849 849
850config ARCH_HAS_RAW_COPY_USER
851 bool
852
853source "kernel/gcov/Kconfig" 850source "kernel/gcov/Kconfig"
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 1be5f61dc630..0e49d39ea74a 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -26,7 +26,6 @@ config ALPHA
26 select ODD_RT_SIGACTION 26 select ODD_RT_SIGACTION
27 select OLD_SIGSUSPEND 27 select OLD_SIGSUSPEND
28 select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67 28 select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
29 select ARCH_HAS_RAW_COPY_USER
30 help 29 help
31 The Alpha is a 64-bit general-purpose processor designed and 30 The Alpha is a 64-bit general-purpose processor designed and
32 marketed by the Digital Equipment Corporation of blessed memory, 31 marketed by the Digital Equipment Corporation of blessed memory,
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 7e213ff4f01f..c9f30f4763ab 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -44,7 +44,6 @@ config ARC
44 select HAVE_GENERIC_DMA_COHERENT 44 select HAVE_GENERIC_DMA_COHERENT
45 select HAVE_KERNEL_GZIP 45 select HAVE_KERNEL_GZIP
46 select HAVE_KERNEL_LZMA 46 select HAVE_KERNEL_LZMA
47 select ARCH_HAS_RAW_COPY_USER
48 47
49config MIGHT_HAVE_PCI 48config MIGHT_HAVE_PCI
50 bool 49 bool
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6fab7f34739c..0d4e71b42c77 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -96,7 +96,6 @@ config ARM
96 select PERF_USE_VMALLOC 96 select PERF_USE_VMALLOC
97 select RTC_LIB 97 select RTC_LIB
98 select SYS_SUPPORTS_APM_EMULATION 98 select SYS_SUPPORTS_APM_EMULATION
99 select ARCH_HAS_RAW_COPY_USER
100 # Above selects are sorted alphabetically; please add new ones 99 # Above selects are sorted alphabetically; please add new ones
101 # according to that. Thanks. 100 # according to that. Thanks.
102 help 101 help
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 3c833ff3303c..3741859765cf 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -115,7 +115,6 @@ config ARM64
115 select SPARSE_IRQ 115 select SPARSE_IRQ
116 select SYSCTL_EXCEPTION_TRACE 116 select SYSCTL_EXCEPTION_TRACE
117 select THREAD_INFO_IN_TASK 117 select THREAD_INFO_IN_TASK
118 select ARCH_HAS_RAW_COPY_USER
119 help 118 help
120 ARM 64-bit (AArch64) Linux support. 119 ARM 64-bit (AArch64) Linux support.
121 120
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 8c349f2a9ebb..7e75d45e20cd 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -19,7 +19,6 @@ config AVR32
19 select HAVE_MOD_ARCH_SPECIFIC 19 select HAVE_MOD_ARCH_SPECIFIC
20 select MODULES_USE_ELF_RELA 20 select MODULES_USE_ELF_RELA
21 select HAVE_NMI 21 select HAVE_NMI
22 select ARCH_HAS_RAW_COPY_USER
23 help 22 help
24 AVR32 is a high-performance 32-bit RISC microprocessor core, 23 AVR32 is a high-performance 32-bit RISC microprocessor core,
25 designed for cost-sensitive embedded applications, with particular 24 designed for cost-sensitive embedded applications, with particular
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 919dad1436f7..3c1bd640042a 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -41,7 +41,6 @@ config BLACKFIN
41 select MODULES_USE_ELF_RELA 41 select MODULES_USE_ELF_RELA
42 select HAVE_DEBUG_STACKOVERFLOW 42 select HAVE_DEBUG_STACKOVERFLOW
43 select HAVE_NMI 43 select HAVE_NMI
44 select ARCH_HAS_RAW_COPY_USER
45 44
46config GENERIC_CSUM 45config GENERIC_CSUM
47 def_bool y 46 def_bool y
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 3c7bd9a29f90..5aa8ea8bad2d 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -18,7 +18,6 @@ config C6X
18 select GENERIC_CLOCKEVENTS 18 select GENERIC_CLOCKEVENTS
19 select MODULES_USE_ELF_RELA 19 select MODULES_USE_ELF_RELA
20 select ARCH_NO_COHERENT_DMA_MMAP 20 select ARCH_NO_COHERENT_DMA_MMAP
21 select ARCH_HAS_RAW_COPY_USER
22 21
23config MMU 22config MMU
24 def_bool n 23 def_bool n
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 36f94c45e3f9..71b758dc3a96 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -71,7 +71,6 @@ config CRIS
71 select GENERIC_SCHED_CLOCK if ETRAX_ARCH_V32 71 select GENERIC_SCHED_CLOCK if ETRAX_ARCH_V32
72 select HAVE_DEBUG_BUGVERBOSE if ETRAX_ARCH_V32 72 select HAVE_DEBUG_BUGVERBOSE if ETRAX_ARCH_V32
73 select HAVE_NMI 73 select HAVE_NMI
74 select ARCH_HAS_RAW_COPY_USER
75 74
76config HZ 75config HZ
77 int 76 int
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index e489fef111dd..eefd9a4ed156 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -16,7 +16,6 @@ config FRV
16 select OLD_SIGACTION 16 select OLD_SIGACTION
17 select HAVE_DEBUG_STACKOVERFLOW 17 select HAVE_DEBUG_STACKOVERFLOW
18 select ARCH_NO_COHERENT_DMA_MMAP 18 select ARCH_NO_COHERENT_DMA_MMAP
19 select ARCH_HAS_RAW_COPY_USER
20 19
21config ZONE_DMA 20config ZONE_DMA
22 bool 21 bool
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index 473883417004..3ae852507e57 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -22,7 +22,6 @@ config H8300
22 select HAVE_ARCH_KGDB 22 select HAVE_ARCH_KGDB
23 select HAVE_ARCH_HASH 23 select HAVE_ARCH_HASH
24 select CPU_NO_EFFICIENT_FFS 24 select CPU_NO_EFFICIENT_FFS
25 select ARCH_HAS_RAW_COPY_USER
26 25
27config RWSEM_GENERIC_SPINLOCK 26config RWSEM_GENERIC_SPINLOCK
28 def_bool y 27 def_bool y
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 0c536a83ea71..1941e4baaee6 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -26,7 +26,6 @@ config HEXAGON
26 select GENERIC_CLOCKEVENTS_BROADCAST 26 select GENERIC_CLOCKEVENTS_BROADCAST
27 select MODULES_USE_ELF_RELA 27 select MODULES_USE_ELF_RELA
28 select GENERIC_CPU_DEVICES 28 select GENERIC_CPU_DEVICES
29 select ARCH_HAS_RAW_COPY_USER
30 ---help--- 29 ---help---
31 Qualcomm Hexagon is a processor architecture designed for high 30 Qualcomm Hexagon is a processor architecture designed for high
32 performance and low power across a wide variety of applications. 31 performance and low power across a wide variety of applications.
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 0ed0e44856b2..18ca6a9ce566 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -53,7 +53,6 @@ config IA64
53 select ARCH_USE_CMPXCHG_LOCKREF 53 select ARCH_USE_CMPXCHG_LOCKREF
54 select HAVE_ARCH_AUDITSYSCALL 54 select HAVE_ARCH_AUDITSYSCALL
55 select HAVE_ARCH_HARDENED_USERCOPY 55 select HAVE_ARCH_HARDENED_USERCOPY
56 select ARCH_HAS_RAW_COPY_USER
57 default y 56 default y
58 help 57 help
59 The Itanium Processor Family is Intel's 64-bit successor to 58 The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index b3e82bdd6db0..95474460b367 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -19,7 +19,6 @@ config M32R
19 select HAVE_DEBUG_STACKOVERFLOW 19 select HAVE_DEBUG_STACKOVERFLOW
20 select CPU_NO_EFFICIENT_FFS 20 select CPU_NO_EFFICIENT_FFS
21 select DMA_NOOP_OPS 21 select DMA_NOOP_OPS
22 select ARCH_HAS_RAW_COPY_USER
23 22
24config SBUS 23config SBUS
25 bool 24 bool
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 7d345758ea16..d140206d5d29 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -22,7 +22,6 @@ config M68K
22 select MODULES_USE_ELF_RELA 22 select MODULES_USE_ELF_RELA
23 select OLD_SIGSUSPEND3 23 select OLD_SIGSUSPEND3
24 select OLD_SIGACTION 24 select OLD_SIGACTION
25 select ARCH_HAS_RAW_COPY_USER
26 25
27config RWSEM_GENERIC_SPINLOCK 26config RWSEM_GENERIC_SPINLOCK
28 bool 27 bool
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
index ecce0c5ec8e8..5b7a45d99cfb 100644
--- a/arch/metag/Kconfig
+++ b/arch/metag/Kconfig
@@ -1,6 +1,5 @@
1config METAG 1config METAG
2 def_bool y 2 def_bool y
3 select ARCH_HAS_RAW_COPY_USER
4 select EMBEDDED 3 select EMBEDDED
5 select GENERIC_ATOMIC64 4 select GENERIC_ATOMIC64
6 select GENERIC_CLOCKEVENTS 5 select GENERIC_CLOCKEVENTS
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 1aff3658a104..85885a501dce 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -34,7 +34,6 @@ config MICROBLAZE
34 select TRACING_SUPPORT 34 select TRACING_SUPPORT
35 select VIRT_TO_BUS 35 select VIRT_TO_BUS
36 select CPU_NO_EFFICIENT_FFS 36 select CPU_NO_EFFICIENT_FFS
37 select ARCH_HAS_RAW_COPY_USER
38 37
39config SWAP 38config SWAP
40 def_bool n 39 def_bool n
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index aff5633bfe4d..a008a9f03072 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -69,7 +69,6 @@ config MIPS
69 select HAVE_EXIT_THREAD 69 select HAVE_EXIT_THREAD
70 select HAVE_REGS_AND_STACK_ACCESS_API 70 select HAVE_REGS_AND_STACK_ACCESS_API
71 select HAVE_ARCH_HARDENED_USERCOPY 71 select HAVE_ARCH_HARDENED_USERCOPY
72 select ARCH_HAS_RAW_COPY_USER
73 72
74menu "Machine selection" 73menu "Machine selection"
75 74
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index a96f3dcb0119..38e3494bfb63 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -16,7 +16,6 @@ config MN10300
16 select OLD_SIGACTION 16 select OLD_SIGACTION
17 select HAVE_DEBUG_STACKOVERFLOW 17 select HAVE_DEBUG_STACKOVERFLOW
18 select ARCH_NO_COHERENT_DMA_MMAP 18 select ARCH_NO_COHERENT_DMA_MMAP
19 select ARCH_HAS_RAW_COPY_USER
20 19
21config AM33_2 20config AM33_2
22 def_bool n 21 def_bool n
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 45b4727e3136..51a56c8b04b4 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -16,7 +16,6 @@ config NIOS2
16 select SPARSE_IRQ 16 select SPARSE_IRQ
17 select USB_ARCH_HAS_HCD if USB_SUPPORT 17 select USB_ARCH_HAS_HCD if USB_SUPPORT
18 select CPU_NO_EFFICIENT_FFS 18 select CPU_NO_EFFICIENT_FFS
19 select ARCH_HAS_RAW_COPY_USER
20 19
21config GENERIC_CSUM 20config GENERIC_CSUM
22 def_bool y 21 def_bool y
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 38954181fa96..1e95920b0737 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -28,7 +28,6 @@ config OPENRISC
28 select OR1K_PIC 28 select OR1K_PIC
29 select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1 29 select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1
30 select NO_BOOTMEM 30 select NO_BOOTMEM
31 select ARCH_HAS_RAW_COPY_USER
32 31
33config MMU 32config MMU
34 def_bool y 33 def_bool y
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 15b7b279a169..ad294b3fb90b 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -41,7 +41,6 @@ config PARISC
41 select GENERIC_CLOCKEVENTS 41 select GENERIC_CLOCKEVENTS
42 select ARCH_NO_COHERENT_DMA_MMAP 42 select ARCH_NO_COHERENT_DMA_MMAP
43 select CPU_NO_EFFICIENT_FFS 43 select CPU_NO_EFFICIENT_FFS
44 select ARCH_HAS_RAW_COPY_USER
45 44
46 help 45 help
47 The PA-RISC microprocessor is designed by Hewlett-Packard and used 46 The PA-RISC microprocessor is designed by Hewlett-Packard and used
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 839f08887269..97a8bc8a095c 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -87,7 +87,6 @@ config PPC
87 select ARCH_HAS_DMA_SET_COHERENT_MASK 87 select ARCH_HAS_DMA_SET_COHERENT_MASK
88 select ARCH_HAS_ELF_RANDOMIZE 88 select ARCH_HAS_ELF_RANDOMIZE
89 select ARCH_HAS_GCOV_PROFILE_ALL 89 select ARCH_HAS_GCOV_PROFILE_ALL
90 select ARCH_HAS_RAW_COPY_USER
91 select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE 90 select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE
92 select ARCH_HAS_SG_CHAIN 91 select ARCH_HAS_SG_CHAIN
93 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 92 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 0724dbf2d8f8..a2dcef0aacc7 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -178,7 +178,6 @@ config S390
178 select ARCH_HAS_SCALED_CPUTIME 178 select ARCH_HAS_SCALED_CPUTIME
179 select VIRT_TO_BUS 179 select VIRT_TO_BUS
180 select HAVE_NMI 180 select HAVE_NMI
181 select ARCH_HAS_RAW_COPY_USER
182 181
183 182
184config SCHED_OMIT_FRAME_POINTER 183config SCHED_OMIT_FRAME_POINTER
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index 4d241cfedc3b..507d63181389 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -15,7 +15,6 @@ config SCORE
15 select MODULES_USE_ELF_REL 15 select MODULES_USE_ELF_REL
16 select CLONE_BACKWARDS 16 select CLONE_BACKWARDS
17 select CPU_NO_EFFICIENT_FFS 17 select CPU_NO_EFFICIENT_FFS
18 select ARCH_HAS_RAW_COPY_USER
19 18
20choice 19choice
21 prompt "System type" 20 prompt "System type"
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index c689645eb8b7..ee086958b2b2 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -48,7 +48,6 @@ config SUPERH
48 select HAVE_ARCH_AUDITSYSCALL 48 select HAVE_ARCH_AUDITSYSCALL
49 select HAVE_FUTEX_CMPXCHG if FUTEX 49 select HAVE_FUTEX_CMPXCHG if FUTEX
50 select HAVE_NMI 50 select HAVE_NMI
51 select ARCH_HAS_RAW_COPY_USER
52 help 51 help
53 The SuperH is a RISC processor targeted for use in embedded systems 52 The SuperH is a RISC processor targeted for use in embedded systems
54 and consumer electronics; it was also used in the Sega Dreamcast 53 and consumer electronics; it was also used in the Sega Dreamcast
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 68353048f24e..68ac5c7cd982 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -45,7 +45,6 @@ config SPARC
45 select HAVE_ARCH_HARDENED_USERCOPY 45 select HAVE_ARCH_HARDENED_USERCOPY
46 select PROVE_LOCKING_SMALL if PROVE_LOCKING 46 select PROVE_LOCKING_SMALL if PROVE_LOCKING
47 select ARCH_WANT_RELAX_ORDER 47 select ARCH_WANT_RELAX_ORDER
48 select ARCH_HAS_RAW_COPY_USER
49 48
50config SPARC32 49config SPARC32
51 def_bool !64BIT 50 def_bool !64BIT
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 27808d86eb57..4583c0320059 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -33,7 +33,6 @@ config TILE
33 select USER_STACKTRACE_SUPPORT 33 select USER_STACKTRACE_SUPPORT
34 select USE_PMC if PERF_EVENTS 34 select USE_PMC if PERF_EVENTS
35 select VIRT_TO_BUS 35 select VIRT_TO_BUS
36 select ARCH_HAS_RAW_COPY_USER
37 36
38config MMU 37config MMU
39 def_bool y 38 def_bool y
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index e13f763849b1..fd443852103c 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -13,7 +13,6 @@ config UML
13 select GENERIC_CLOCKEVENTS 13 select GENERIC_CLOCKEVENTS
14 select HAVE_GCC_PLUGINS 14 select HAVE_GCC_PLUGINS
15 select TTY # Needed for line.c 15 select TTY # Needed for line.c
16 select ARCH_HAS_RAW_COPY_USER
17 16
18config MMU 17config MMU
19 bool 18 bool
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 319519eaed24..0769066929c6 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -18,7 +18,6 @@ config UNICORE32
18 select ARCH_WANT_FRAME_POINTERS 18 select ARCH_WANT_FRAME_POINTERS
19 select GENERIC_IOMAP 19 select GENERIC_IOMAP
20 select MODULES_USE_ELF_REL 20 select MODULES_USE_ELF_REL
21 select ARCH_HAS_RAW_COPY_USER
22 help 21 help
23 UniCore-32 is 32-bit Instruction Set Architecture, 22 UniCore-32 is 32-bit Instruction Set Architecture,
24 including a series of low-power-consumption RISC chip 23 including a series of low-power-consumption RISC chip
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5f59fc388063..cc98d5a294ee 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -175,7 +175,6 @@ config X86
175 select USER_STACKTRACE_SUPPORT 175 select USER_STACKTRACE_SUPPORT
176 select VIRT_TO_BUS 176 select VIRT_TO_BUS
177 select X86_FEATURE_NAMES if PROC_FS 177 select X86_FEATURE_NAMES if PROC_FS
178 select ARCH_HAS_RAW_COPY_USER
179 178
180config INSTRUCTION_DECODER 179config INSTRUCTION_DECODER
181 def_bool y 180 def_bool y
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 043d37d45919..f4126cf997a4 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -29,7 +29,6 @@ config XTENSA
29 select NO_BOOTMEM 29 select NO_BOOTMEM
30 select PERF_USE_VMALLOC 30 select PERF_USE_VMALLOC
31 select VIRT_TO_BUS 31 select VIRT_TO_BUS
32 select ARCH_HAS_RAW_COPY_USER
33 help 32 help
34 Xtensa processors are 32-bit RISC machines designed by Tensilica 33 Xtensa processors are 32-bit RISC machines designed by Tensilica
35 primarily for embedded systems. These processors are both 34 primarily for embedded systems. These processors are both
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index d65c311eb128..bbe4bb438e39 100644
--- a/include/asm-generic/uaccess.h
+++ b/include/asm-generic/uaccess.h
@@ -86,11 +86,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
86 86
87static inline int __put_user_fn(size_t size, void __user *ptr, void *x) 87static inline int __put_user_fn(size_t size, void __user *ptr, void *x)
88{ 88{
89#ifdef CONFIG_ARCH_HAS_RAW_COPY_USER
90 return unlikely(raw_copy_to_user(ptr, x, size)) ? -EFAULT : 0; 89 return unlikely(raw_copy_to_user(ptr, x, size)) ? -EFAULT : 0;
91#else
92 return unlikely(__copy_to_user(ptr, x, size)) ? -EFAULT : 0;
93#endif
94} 90}
95 91
96#define __put_user_fn(sz, u, k) __put_user_fn(sz, u, k) 92#define __put_user_fn(sz, u, k) __put_user_fn(sz, u, k)
@@ -151,11 +147,7 @@ extern int __put_user_bad(void) __attribute__((noreturn));
151#ifndef __get_user_fn 147#ifndef __get_user_fn
152static inline int __get_user_fn(size_t size, const void __user *ptr, void *x) 148static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
153{ 149{
154#ifdef CONFIG_ARCH_HAS_RAW_COPY_USER
155 return unlikely(raw_copy_from_user(x, ptr, size)) ? -EFAULT : 0; 150 return unlikely(raw_copy_from_user(x, ptr, size)) ? -EFAULT : 0;
156#else
157 return unlikely(__copy_from_user(x, ptr, size)) ? -EFAULT : 0;
158#endif
159} 151}
160 152
161#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k) 153#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
@@ -164,39 +156,6 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
164 156
165extern int __get_user_bad(void) __attribute__((noreturn)); 157extern int __get_user_bad(void) __attribute__((noreturn));
166 158
167#ifndef CONFIG_ARCH_HAS_RAW_COPY_USER
168
169#ifndef __copy_from_user_inatomic
170#define __copy_from_user_inatomic __copy_from_user
171#endif
172
173#ifndef __copy_to_user_inatomic
174#define __copy_to_user_inatomic __copy_to_user
175#endif
176
177static inline long copy_from_user(void *to,
178 const void __user * from, unsigned long n)
179{
180 unsigned long res = n;
181 might_fault();
182 if (likely(access_ok(VERIFY_READ, from, n)))
183 res = __copy_from_user(to, from, n);
184 if (unlikely(res))
185 memset(to + (n - res), 0, res);
186 return res;
187}
188
189static inline long copy_to_user(void __user *to,
190 const void *from, unsigned long n)
191{
192 might_fault();
193 if (access_ok(VERIFY_WRITE, to, n))
194 return __copy_to_user(to, from, n);
195 else
196 return n;
197}
198#endif
199
200/* 159/*
201 * Copy a null terminated string from userspace. 160 * Copy a null terminated string from userspace.
202 */ 161 */
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index 7fc2104b88bc..e0cbfb09e60f 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -12,12 +12,10 @@
12 12
13#include <asm/uaccess.h> 13#include <asm/uaccess.h>
14 14
15#ifdef CONFIG_ARCH_HAS_RAW_COPY_USER
16/* 15/*
17 * Architectures should provide two primitives (raw_copy_{to,from}_user()) 16 * Architectures should provide two primitives (raw_copy_{to,from}_user())
18 * select ARCH_HAS_RAW_COPY_FROM_USER and get rid of their private instances 17 * and get rid of their private instances of copy_{to,from}_user() and
19 * of copy_{to,from}_user() and __copy_{to,from}_user{,_inatomic}(). Once 18 * __copy_{to,from}_user{,_inatomic}().
20 * all of them switch, this part of linux/uaccess.h will become unconditional.
21 * 19 *
22 * raw_copy_{to,from}_user(to, from, size) should copy up to size bytes and 20 * raw_copy_{to,from}_user(to, from, size) should copy up to size bytes and
23 * return the amount left to copy. They should assume that access_ok() has 21 * return the amount left to copy. They should assume that access_ok() has
@@ -196,7 +194,6 @@ copy_in_user(void __user *to, const void *from, unsigned long n)
196 return n; 194 return n;
197} 195}
198#endif 196#endif
199#endif
200 197
201static __always_inline void pagefault_disabled_inc(void) 198static __always_inline void pagefault_disabled_inc(void)
202{ 199{
diff --git a/lib/Makefile b/lib/Makefile
index 7d875c389172..b47cf97e1e68 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -41,7 +41,7 @@ obj-y += bcd.o div64.o sort.o parser.o debug_locks.o random32.o \
41 gcd.o lcm.o list_sort.o uuid.o flex_array.o iov_iter.o clz_ctz.o \ 41 gcd.o lcm.o list_sort.o uuid.o flex_array.o iov_iter.o clz_ctz.o \
42 bsearch.o find_bit.o llist.o memweight.o kfifo.o \ 42 bsearch.o find_bit.o llist.o memweight.o kfifo.o \
43 percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o \ 43 percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o \
44 once.o refcount.o 44 once.o refcount.o usercopy.o
45obj-y += string_helpers.o 45obj-y += string_helpers.o
46obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o 46obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
47obj-y += hexdump.o 47obj-y += hexdump.o
@@ -242,5 +242,3 @@ UBSAN_SANITIZE_ubsan.o := n
242obj-$(CONFIG_SBITMAP) += sbitmap.o 242obj-$(CONFIG_SBITMAP) += sbitmap.o
243 243
244obj-$(CONFIG_PARMAN) += parman.o 244obj-$(CONFIG_PARMAN) += parman.o
245
246obj-$(CONFIG_ARCH_HAS_RAW_COPY_USER) += usercopy.o