config ARCH_WANT_RELAX_ORDER
bool
-config ARCH_HAS_RAW_COPY_USER
- bool
-
source "kernel/gcov/Kconfig"
select ODD_RT_SIGACTION
select OLD_SIGSUSPEND
select CPU_NO_EFFICIENT_FFS if !ALPHA_EV67
- select ARCH_HAS_RAW_COPY_USER
help
The Alpha is a 64-bit general-purpose processor designed and
marketed by the Digital Equipment Corporation of blessed memory,
select HAVE_GENERIC_DMA_COHERENT
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZMA
- select ARCH_HAS_RAW_COPY_USER
config MIGHT_HAVE_PCI
bool
select PERF_USE_VMALLOC
select RTC_LIB
select SYS_SUPPORTS_APM_EMULATION
- select ARCH_HAS_RAW_COPY_USER
# Above selects are sorted alphabetically; please add new ones
# according to that. Thanks.
help
select SPARSE_IRQ
select SYSCTL_EXCEPTION_TRACE
select THREAD_INFO_IN_TASK
- select ARCH_HAS_RAW_COPY_USER
help
ARM 64-bit (AArch64) Linux support.
select HAVE_MOD_ARCH_SPECIFIC
select MODULES_USE_ELF_RELA
select HAVE_NMI
- select ARCH_HAS_RAW_COPY_USER
help
AVR32 is a high-performance 32-bit RISC microprocessor core,
designed for cost-sensitive embedded applications, with particular
select MODULES_USE_ELF_RELA
select HAVE_DEBUG_STACKOVERFLOW
select HAVE_NMI
- select ARCH_HAS_RAW_COPY_USER
config GENERIC_CSUM
def_bool y
select GENERIC_CLOCKEVENTS
select MODULES_USE_ELF_RELA
select ARCH_NO_COHERENT_DMA_MMAP
- select ARCH_HAS_RAW_COPY_USER
config MMU
def_bool n
select GENERIC_SCHED_CLOCK if ETRAX_ARCH_V32
select HAVE_DEBUG_BUGVERBOSE if ETRAX_ARCH_V32
select HAVE_NMI
- select ARCH_HAS_RAW_COPY_USER
config HZ
int
select OLD_SIGACTION
select HAVE_DEBUG_STACKOVERFLOW
select ARCH_NO_COHERENT_DMA_MMAP
- select ARCH_HAS_RAW_COPY_USER
config ZONE_DMA
bool
select HAVE_ARCH_KGDB
select HAVE_ARCH_HASH
select CPU_NO_EFFICIENT_FFS
- select ARCH_HAS_RAW_COPY_USER
config RWSEM_GENERIC_SPINLOCK
def_bool y
select GENERIC_CLOCKEVENTS_BROADCAST
select MODULES_USE_ELF_RELA
select GENERIC_CPU_DEVICES
- select ARCH_HAS_RAW_COPY_USER
---help---
Qualcomm Hexagon is a processor architecture designed for high
performance and low power across a wide variety of applications.
select ARCH_USE_CMPXCHG_LOCKREF
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_HARDENED_USERCOPY
- select ARCH_HAS_RAW_COPY_USER
default y
help
The Itanium Processor Family is Intel's 64-bit successor to
select HAVE_DEBUG_STACKOVERFLOW
select CPU_NO_EFFICIENT_FFS
select DMA_NOOP_OPS
- select ARCH_HAS_RAW_COPY_USER
config SBUS
bool
select MODULES_USE_ELF_RELA
select OLD_SIGSUSPEND3
select OLD_SIGACTION
- select ARCH_HAS_RAW_COPY_USER
config RWSEM_GENERIC_SPINLOCK
bool
config METAG
def_bool y
- select ARCH_HAS_RAW_COPY_USER
select EMBEDDED
select GENERIC_ATOMIC64
select GENERIC_CLOCKEVENTS
select TRACING_SUPPORT
select VIRT_TO_BUS
select CPU_NO_EFFICIENT_FFS
- select ARCH_HAS_RAW_COPY_USER
config SWAP
def_bool n
select HAVE_EXIT_THREAD
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_ARCH_HARDENED_USERCOPY
- select ARCH_HAS_RAW_COPY_USER
menu "Machine selection"
select OLD_SIGACTION
select HAVE_DEBUG_STACKOVERFLOW
select ARCH_NO_COHERENT_DMA_MMAP
- select ARCH_HAS_RAW_COPY_USER
config AM33_2
def_bool n
select SPARSE_IRQ
select USB_ARCH_HAS_HCD if USB_SUPPORT
select CPU_NO_EFFICIENT_FFS
- select ARCH_HAS_RAW_COPY_USER
config GENERIC_CSUM
def_bool y
select OR1K_PIC
select CPU_NO_EFFICIENT_FFS if !OPENRISC_HAVE_INST_FF1
select NO_BOOTMEM
- select ARCH_HAS_RAW_COPY_USER
config MMU
def_bool y
select GENERIC_CLOCKEVENTS
select ARCH_NO_COHERENT_DMA_MMAP
select CPU_NO_EFFICIENT_FFS
- select ARCH_HAS_RAW_COPY_USER
help
The PA-RISC microprocessor is designed by Hewlett-Packard and used
select ARCH_HAS_DMA_SET_COHERENT_MASK
select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_GCOV_PROFILE_ALL
- select ARCH_HAS_RAW_COPY_USER
select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE
select ARCH_HAS_SG_CHAIN
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
select ARCH_HAS_SCALED_CPUTIME
select VIRT_TO_BUS
select HAVE_NMI
- select ARCH_HAS_RAW_COPY_USER
config SCHED_OMIT_FRAME_POINTER
select MODULES_USE_ELF_REL
select CLONE_BACKWARDS
select CPU_NO_EFFICIENT_FFS
- select ARCH_HAS_RAW_COPY_USER
choice
prompt "System type"
select HAVE_ARCH_AUDITSYSCALL
select HAVE_FUTEX_CMPXCHG if FUTEX
select HAVE_NMI
- select ARCH_HAS_RAW_COPY_USER
help
The SuperH is a RISC processor targeted for use in embedded systems
and consumer electronics; it was also used in the Sega Dreamcast
select HAVE_ARCH_HARDENED_USERCOPY
select PROVE_LOCKING_SMALL if PROVE_LOCKING
select ARCH_WANT_RELAX_ORDER
- select ARCH_HAS_RAW_COPY_USER
config SPARC32
def_bool !64BIT
select USER_STACKTRACE_SUPPORT
select USE_PMC if PERF_EVENTS
select VIRT_TO_BUS
- select ARCH_HAS_RAW_COPY_USER
config MMU
def_bool y
select GENERIC_CLOCKEVENTS
select HAVE_GCC_PLUGINS
select TTY # Needed for line.c
- select ARCH_HAS_RAW_COPY_USER
config MMU
bool
select ARCH_WANT_FRAME_POINTERS
select GENERIC_IOMAP
select MODULES_USE_ELF_REL
- select ARCH_HAS_RAW_COPY_USER
help
UniCore-32 is 32-bit Instruction Set Architecture,
including a series of low-power-consumption RISC chip
select USER_STACKTRACE_SUPPORT
select VIRT_TO_BUS
select X86_FEATURE_NAMES if PROC_FS
- select ARCH_HAS_RAW_COPY_USER
config INSTRUCTION_DECODER
def_bool y
select NO_BOOTMEM
select PERF_USE_VMALLOC
select VIRT_TO_BUS
- select ARCH_HAS_RAW_COPY_USER
help
Xtensa processors are 32-bit RISC machines designed by Tensilica
primarily for embedded systems. These processors are both
static inline int __put_user_fn(size_t size, void __user *ptr, void *x)
{
-#ifdef CONFIG_ARCH_HAS_RAW_COPY_USER
return unlikely(raw_copy_to_user(ptr, x, size)) ? -EFAULT : 0;
-#else
- return unlikely(__copy_to_user(ptr, x, size)) ? -EFAULT : 0;
-#endif
}
#define __put_user_fn(sz, u, k) __put_user_fn(sz, u, k)
#ifndef __get_user_fn
static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
{
-#ifdef CONFIG_ARCH_HAS_RAW_COPY_USER
return unlikely(raw_copy_from_user(x, ptr, size)) ? -EFAULT : 0;
-#else
- return unlikely(__copy_from_user(x, ptr, size)) ? -EFAULT : 0;
-#endif
}
#define __get_user_fn(sz, u, k) __get_user_fn(sz, u, k)
extern int __get_user_bad(void) __attribute__((noreturn));
-#ifndef CONFIG_ARCH_HAS_RAW_COPY_USER
-
-#ifndef __copy_from_user_inatomic
-#define __copy_from_user_inatomic __copy_from_user
-#endif
-
-#ifndef __copy_to_user_inatomic
-#define __copy_to_user_inatomic __copy_to_user
-#endif
-
-static inline long copy_from_user(void *to,
- const void __user * from, unsigned long n)
-{
- unsigned long res = n;
- might_fault();
- if (likely(access_ok(VERIFY_READ, from, n)))
- res = __copy_from_user(to, from, n);
- if (unlikely(res))
- memset(to + (n - res), 0, res);
- return res;
-}
-
-static inline long copy_to_user(void __user *to,
- const void *from, unsigned long n)
-{
- might_fault();
- if (access_ok(VERIFY_WRITE, to, n))
- return __copy_to_user(to, from, n);
- else
- return n;
-}
-#endif
-
/*
* Copy a null terminated string from userspace.
*/
#include <asm/uaccess.h>
-#ifdef CONFIG_ARCH_HAS_RAW_COPY_USER
/*
* Architectures should provide two primitives (raw_copy_{to,from}_user())
- * select ARCH_HAS_RAW_COPY_FROM_USER and get rid of their private instances
- * of copy_{to,from}_user() and __copy_{to,from}_user{,_inatomic}(). Once
- * all of them switch, this part of linux/uaccess.h will become unconditional.
+ * and get rid of their private instances of copy_{to,from}_user() and
+ * __copy_{to,from}_user{,_inatomic}().
*
* raw_copy_{to,from}_user(to, from, size) should copy up to size bytes and
* return the amount left to copy. They should assume that access_ok() has
return n;
}
#endif
-#endif
static __always_inline void pagefault_disabled_inc(void)
{
gcd.o lcm.o list_sort.o uuid.o flex_array.o iov_iter.o clz_ctz.o \
bsearch.o find_bit.o llist.o memweight.o kfifo.o \
percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o \
- once.o refcount.o
+ once.o refcount.o usercopy.o
obj-y += string_helpers.o
obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o
obj-y += hexdump.o
obj-$(CONFIG_SBITMAP) += sbitmap.o
obj-$(CONFIG_PARMAN) += parman.o
-
-obj-$(CONFIG_ARCH_HAS_RAW_COPY_USER) += usercopy.o