Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
701cac61
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
701cac61
编写于
4月 05, 2017
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CONFIG_ARCH_HAS_RAW_COPY_USER is unconditional now
all architectures converted Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
eea86b63
变更
35
显示空白变更内容
内联
并排
Showing
35 changed file
with
3 addition
and
83 deletion
+3
-83
arch/Kconfig
arch/Kconfig
+0
-3
arch/alpha/Kconfig
arch/alpha/Kconfig
+0
-1
arch/arc/Kconfig
arch/arc/Kconfig
+0
-1
arch/arm/Kconfig
arch/arm/Kconfig
+0
-1
arch/arm64/Kconfig
arch/arm64/Kconfig
+0
-1
arch/avr32/Kconfig
arch/avr32/Kconfig
+0
-1
arch/blackfin/Kconfig
arch/blackfin/Kconfig
+0
-1
arch/c6x/Kconfig
arch/c6x/Kconfig
+0
-1
arch/cris/Kconfig
arch/cris/Kconfig
+0
-1
arch/frv/Kconfig
arch/frv/Kconfig
+0
-1
arch/h8300/Kconfig
arch/h8300/Kconfig
+0
-1
arch/hexagon/Kconfig
arch/hexagon/Kconfig
+0
-1
arch/ia64/Kconfig
arch/ia64/Kconfig
+0
-1
arch/m32r/Kconfig
arch/m32r/Kconfig
+0
-1
arch/m68k/Kconfig
arch/m68k/Kconfig
+0
-1
arch/metag/Kconfig
arch/metag/Kconfig
+0
-1
arch/microblaze/Kconfig
arch/microblaze/Kconfig
+0
-1
arch/mips/Kconfig
arch/mips/Kconfig
+0
-1
arch/mn10300/Kconfig
arch/mn10300/Kconfig
+0
-1
arch/nios2/Kconfig
arch/nios2/Kconfig
+0
-1
arch/openrisc/Kconfig
arch/openrisc/Kconfig
+0
-1
arch/parisc/Kconfig
arch/parisc/Kconfig
+0
-1
arch/powerpc/Kconfig
arch/powerpc/Kconfig
+0
-1
arch/s390/Kconfig
arch/s390/Kconfig
+0
-1
arch/score/Kconfig
arch/score/Kconfig
+0
-1
arch/sh/Kconfig
arch/sh/Kconfig
+0
-1
arch/sparc/Kconfig
arch/sparc/Kconfig
+0
-1
arch/tile/Kconfig
arch/tile/Kconfig
+0
-1
arch/um/Kconfig.common
arch/um/Kconfig.common
+0
-1
arch/unicore32/Kconfig
arch/unicore32/Kconfig
+0
-1
arch/x86/Kconfig
arch/x86/Kconfig
+0
-1
arch/xtensa/Kconfig
arch/xtensa/Kconfig
+0
-1
include/asm-generic/uaccess.h
include/asm-generic/uaccess.h
+0
-41
include/linux/uaccess.h
include/linux/uaccess.h
+2
-5
lib/Makefile
lib/Makefile
+1
-3
未找到文件。
arch/Kconfig
浏览文件 @
701cac61
...
...
@@ -847,7 +847,4 @@ config STRICT_MODULE_RWX
config ARCH_WANT_RELAX_ORDER
bool
config ARCH_HAS_RAW_COPY_USER
bool
source "kernel/gcov/Kconfig"
arch/alpha/Kconfig
浏览文件 @
701cac61
...
...
@@ -26,7 +26,6 @@ config ALPHA
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,
...
...
arch/arc/Kconfig
浏览文件 @
701cac61
...
...
@@ -44,7 +44,6 @@ config ARC
select HAVE_GENERIC_DMA_COHERENT
select HAVE_KERNEL_GZIP
select HAVE_KERNEL_LZMA
select ARCH_HAS_RAW_COPY_USER
config MIGHT_HAVE_PCI
bool
...
...
arch/arm/Kconfig
浏览文件 @
701cac61
...
...
@@ -96,7 +96,6 @@ config ARM
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
...
...
arch/arm64/Kconfig
浏览文件 @
701cac61
...
...
@@ -115,7 +115,6 @@ config ARM64
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.
...
...
arch/avr32/Kconfig
浏览文件 @
701cac61
...
...
@@ -19,7 +19,6 @@ config AVR32
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
...
...
arch/blackfin/Kconfig
浏览文件 @
701cac61
...
...
@@ -41,7 +41,6 @@ config BLACKFIN
select MODULES_USE_ELF_RELA
select HAVE_DEBUG_STACKOVERFLOW
select HAVE_NMI
select ARCH_HAS_RAW_COPY_USER
config GENERIC_CSUM
def_bool y
...
...
arch/c6x/Kconfig
浏览文件 @
701cac61
...
...
@@ -18,7 +18,6 @@ config C6X
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
...
...
arch/cris/Kconfig
浏览文件 @
701cac61
...
...
@@ -71,7 +71,6 @@ config CRIS
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
...
...
arch/frv/Kconfig
浏览文件 @
701cac61
...
...
@@ -16,7 +16,6 @@ config FRV
select OLD_SIGACTION
select HAVE_DEBUG_STACKOVERFLOW
select ARCH_NO_COHERENT_DMA_MMAP
select ARCH_HAS_RAW_COPY_USER
config ZONE_DMA
bool
...
...
arch/h8300/Kconfig
浏览文件 @
701cac61
...
...
@@ -22,7 +22,6 @@ config H8300
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
...
...
arch/hexagon/Kconfig
浏览文件 @
701cac61
...
...
@@ -26,7 +26,6 @@ config HEXAGON
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.
...
...
arch/ia64/Kconfig
浏览文件 @
701cac61
...
...
@@ -53,7 +53,6 @@ config IA64
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
...
...
arch/m32r/Kconfig
浏览文件 @
701cac61
...
...
@@ -19,7 +19,6 @@ config M32R
select HAVE_DEBUG_STACKOVERFLOW
select CPU_NO_EFFICIENT_FFS
select DMA_NOOP_OPS
select ARCH_HAS_RAW_COPY_USER
config SBUS
bool
...
...
arch/m68k/Kconfig
浏览文件 @
701cac61
...
...
@@ -22,7 +22,6 @@ config M68K
select MODULES_USE_ELF_RELA
select OLD_SIGSUSPEND3
select OLD_SIGACTION
select ARCH_HAS_RAW_COPY_USER
config RWSEM_GENERIC_SPINLOCK
bool
...
...
arch/metag/Kconfig
浏览文件 @
701cac61
config METAG
def_bool y
select ARCH_HAS_RAW_COPY_USER
select EMBEDDED
select GENERIC_ATOMIC64
select GENERIC_CLOCKEVENTS
...
...
arch/microblaze/Kconfig
浏览文件 @
701cac61
...
...
@@ -34,7 +34,6 @@ config MICROBLAZE
select TRACING_SUPPORT
select VIRT_TO_BUS
select CPU_NO_EFFICIENT_FFS
select ARCH_HAS_RAW_COPY_USER
config SWAP
def_bool n
...
...
arch/mips/Kconfig
浏览文件 @
701cac61
...
...
@@ -69,7 +69,6 @@ config MIPS
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"
...
...
arch/mn10300/Kconfig
浏览文件 @
701cac61
...
...
@@ -16,7 +16,6 @@ config MN10300
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
...
...
arch/nios2/Kconfig
浏览文件 @
701cac61
...
...
@@ -16,7 +16,6 @@ config NIOS2
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
...
...
arch/openrisc/Kconfig
浏览文件 @
701cac61
...
...
@@ -28,7 +28,6 @@ config OPENRISC
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
...
...
arch/parisc/Kconfig
浏览文件 @
701cac61
...
...
@@ -41,7 +41,6 @@ config PARISC
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
...
...
arch/powerpc/Kconfig
浏览文件 @
701cac61
...
...
@@ -87,7 +87,6 @@ config PPC
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
...
...
arch/s390/Kconfig
浏览文件 @
701cac61
...
...
@@ -178,7 +178,6 @@ config S390
select ARCH_HAS_SCALED_CPUTIME
select VIRT_TO_BUS
select HAVE_NMI
select ARCH_HAS_RAW_COPY_USER
config SCHED_OMIT_FRAME_POINTER
...
...
arch/score/Kconfig
浏览文件 @
701cac61
...
...
@@ -15,7 +15,6 @@ config SCORE
select MODULES_USE_ELF_REL
select CLONE_BACKWARDS
select CPU_NO_EFFICIENT_FFS
select ARCH_HAS_RAW_COPY_USER
choice
prompt "System type"
...
...
arch/sh/Kconfig
浏览文件 @
701cac61
...
...
@@ -48,7 +48,6 @@ config SUPERH
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
...
...
arch/sparc/Kconfig
浏览文件 @
701cac61
...
...
@@ -45,7 +45,6 @@ config SPARC
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
...
...
arch/tile/Kconfig
浏览文件 @
701cac61
...
...
@@ -33,7 +33,6 @@ config TILE
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
...
...
arch/um/Kconfig.common
浏览文件 @
701cac61
...
...
@@ -13,7 +13,6 @@ config UML
select GENERIC_CLOCKEVENTS
select HAVE_GCC_PLUGINS
select TTY # Needed for line.c
select ARCH_HAS_RAW_COPY_USER
config MMU
bool
...
...
arch/unicore32/Kconfig
浏览文件 @
701cac61
...
...
@@ -18,7 +18,6 @@ config UNICORE32
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
...
...
arch/x86/Kconfig
浏览文件 @
701cac61
...
...
@@ -175,7 +175,6 @@ config X86
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
...
...
arch/xtensa/Kconfig
浏览文件 @
701cac61
...
...
@@ -29,7 +29,6 @@ config XTENSA
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
...
...
include/asm-generic/uaccess.h
浏览文件 @
701cac61
...
...
@@ -86,11 +86,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
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)
...
...
@@ -151,11 +147,7 @@ extern int __put_user_bad(void) __attribute__((noreturn));
#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)
...
...
@@ -164,39 +156,6 @@ static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
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/linux/uaccess.h
浏览文件 @
701cac61
...
...
@@ -12,12 +12,10 @@
#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
...
...
@@ -196,7 +194,6 @@ copy_in_user(void __user *to, const void *from, unsigned long n)
return
n
;
}
#endif
#endif
static
__always_inline
void
pagefault_disabled_inc
(
void
)
{
...
...
lib/Makefile
浏览文件 @
701cac61
...
...
@@ -41,7 +41,7 @@ obj-y += bcd.o div64.o sort.o parser.o debug_locks.o random32.o \
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
...
...
@@ -242,5 +242,3 @@ UBSAN_SANITIZE_ubsan.o := n
obj-$(CONFIG_SBITMAP)
+=
sbitmap.o
obj-$(CONFIG_PARMAN)
+=
parman.o
obj-$(CONFIG_ARCH_HAS_RAW_COPY_USER)
+=
usercopy.o
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录