Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
10503bf9
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
10503bf9
编写于
4月 07, 2017
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
get rid of unused __strncpy_from_user() instances
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
82985258
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
2 addition
and
92 deletion
+2
-92
arch/cris/include/asm/uaccess.h
arch/cris/include/asm/uaccess.h
+0
-6
arch/m32r/include/asm/uaccess.h
arch/m32r/include/asm/uaccess.h
+0
-2
arch/m32r/kernel/m32r_ksyms.c
arch/m32r/kernel/m32r_ksyms.c
+0
-1
arch/m32r/lib/usercopy.c
arch/m32r/lib/usercopy.c
+0
-8
arch/microblaze/include/asm/uaccess.h
arch/microblaze/include/asm/uaccess.h
+1
-3
arch/mips/include/asm/uaccess.h
arch/mips/include/asm/uaccess.h
+0
-54
arch/mips/lib/strncpy_user.S
arch/mips/lib/strncpy_user.S
+0
-6
arch/mn10300/include/asm/uaccess.h
arch/mn10300/include/asm/uaccess.h
+0
-1
arch/mn10300/kernel/mn10300_ksyms.c
arch/mn10300/kernel/mn10300_ksyms.c
+0
-1
arch/mn10300/lib/usercopy.c
arch/mn10300/lib/usercopy.c
+0
-8
arch/xtensa/include/asm/uaccess.h
arch/xtensa/include/asm/uaccess.h
+1
-2
未找到文件。
arch/cris/include/asm/uaccess.h
浏览文件 @
10503bf9
...
...
@@ -172,12 +172,6 @@ extern unsigned long __copy_user(void __user *to, const void *from, unsigned lon
extern
unsigned
long
__copy_user_in
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
);
extern
unsigned
long
__do_clear_user
(
void
__user
*
to
,
unsigned
long
n
);
static
inline
long
__strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
)
{
return
__do_strncpy_from_user
(
dst
,
src
,
count
);
}
static
inline
long
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
)
{
...
...
arch/m32r/include/asm/uaccess.h
浏览文件 @
10503bf9
...
...
@@ -482,8 +482,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
long
__must_check
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
);
long
__must_check
__strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
);
/**
* __clear_user: - Zero a block of memory in user space, with less checking.
...
...
arch/m32r/kernel/m32r_ksyms.c
浏览文件 @
10503bf9
...
...
@@ -23,7 +23,6 @@ EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL
(
iounmap
);
EXPORT_SYMBOL
(
strncpy_from_user
);
EXPORT_SYMBOL
(
__strncpy_from_user
);
EXPORT_SYMBOL
(
clear_user
);
EXPORT_SYMBOL
(
__clear_user
);
EXPORT_SYMBOL
(
strnlen_user
);
...
...
arch/m32r/lib/usercopy.c
浏览文件 @
10503bf9
...
...
@@ -88,14 +88,6 @@ do { \
#endif
/* CONFIG_ISA_DUAL_ISSUE */
long
__strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
)
{
long
res
;
__do_strncpy_from_user
(
dst
,
src
,
count
,
res
);
return
res
;
}
long
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
)
{
...
...
arch/microblaze/include/asm/uaccess.h
浏览文件 @
10503bf9
...
...
@@ -355,14 +355,12 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
*/
extern
int
__strncpy_user
(
char
*
to
,
const
char
__user
*
from
,
int
len
);
#define __strncpy_from_user __strncpy_user
static
inline
long
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
)
{
if
(
!
access_ok
(
VERIFY_READ
,
src
,
1
))
return
-
EFAULT
;
return
__strncpy_
from_
user
(
dst
,
src
,
count
);
return
__strncpy_user
(
dst
,
src
,
count
);
}
/*
...
...
arch/mips/include/asm/uaccess.h
浏览文件 @
10503bf9
...
...
@@ -967,60 +967,6 @@ __clear_user(void __user *addr, __kernel_size_t size)
__cl_size; \
})
extern
long
__strncpy_from_kernel_nocheck_asm
(
char
*
__to
,
const
char
__user
*
__from
,
long
__len
);
extern
long
__strncpy_from_user_nocheck_asm
(
char
*
__to
,
const
char
__user
*
__from
,
long
__len
);
/*
* __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking.
* @dst: Destination address, in kernel space. This buffer must be at
* least @count bytes long.
* @src: Source address, in user space.
* @count: Maximum number of bytes to copy, including the trailing NUL.
*
* Copies a NUL-terminated string from userspace to kernel space.
* Caller must check the specified block with access_ok() before calling
* this function.
*
* On success, returns the length of the string (not including the trailing
* NUL).
*
* If access to userspace fails, returns -EFAULT (some data may have been
* copied).
*
* If @count is smaller than the length of the string, copies @count bytes
* and returns @count.
*/
static
inline
long
__strncpy_from_user
(
char
*
__to
,
const
char
__user
*
__from
,
long
__len
)
{
long
res
;
if
(
eva_kernel_access
())
{
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
"move
\t
$5, %2
\n\t
"
"move
\t
$6, %3
\n\t
"
__MODULE_JAL
(
__strncpy_from_kernel_nocheck_asm
)
"move
\t
%0, $2"
:
"=r"
(
res
)
:
"r"
(
__to
),
"r"
(
__from
),
"r"
(
__len
)
:
"$2"
,
"$3"
,
"$4"
,
"$5"
,
"$6"
,
__UA_t0
,
"$31"
,
"memory"
);
}
else
{
might_fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
"move
\t
$5, %2
\n\t
"
"move
\t
$6, %3
\n\t
"
__MODULE_JAL
(
__strncpy_from_user_nocheck_asm
)
"move
\t
%0, $2"
:
"=r"
(
res
)
:
"r"
(
__to
),
"r"
(
__from
),
"r"
(
__len
)
:
"$2"
,
"$3"
,
"$4"
,
"$5"
,
"$6"
,
__UA_t0
,
"$31"
,
"memory"
);
}
return
res
;
}
extern
long
__strncpy_from_kernel_asm
(
char
*
__to
,
const
char
__user
*
__from
,
long
__len
);
extern
long
__strncpy_from_user_asm
(
char
*
__to
,
const
char
__user
*
__from
,
long
__len
);
...
...
arch/mips/lib/strncpy_user.S
浏览文件 @
10503bf9
...
...
@@ -35,7 +35,6 @@ LEAF(__strncpy_from_\func\()_asm)
and
v0
,
a1
bnez
v0
,
.
Lfault
\
@
FEXPORT
(
__strncpy_from_
\
func
\()
_nocheck_asm
)
move
t0
,
zero
move
v1
,
a1
.
ifeqs
"\
func
","
kernel
"
...
...
@@ -70,16 +69,12 @@ FEXPORT(__strncpy_from_\func\()_nocheck_asm)
#ifndef CONFIG_EVA
/
*
Set
aliases
*/
.
global
__strncpy_from_user_asm
.
global
__strncpy_from_user_nocheck_asm
.
set
__strncpy_from_user_asm
,
__strncpy_from_kernel_asm
.
set
__strncpy_from_user_nocheck_asm
,
__strncpy_from_kernel_nocheck_asm
EXPORT_SYMBOL
(
__strncpy_from_user_asm
)
EXPORT_SYMBOL
(
__strncpy_from_user_nocheck_asm
)
#endif
__BUILD_STRNCPY_ASM
kernel
EXPORT_SYMBOL
(
__strncpy_from_kernel_asm
)
EXPORT_SYMBOL
(
__strncpy_from_kernel_nocheck_asm
)
#ifdef CONFIG_EVA
.
set
push
...
...
@@ -87,5 +82,4 @@ EXPORT_SYMBOL(__strncpy_from_kernel_nocheck_asm)
__BUILD_STRNCPY_ASM
user
.
set
pop
EXPORT_SYMBOL
(
__strncpy_from_user_asm
)
EXPORT_SYMBOL
(
__strncpy_from_user_nocheck_asm
)
#endif
arch/mn10300/include/asm/uaccess.h
浏览文件 @
10503bf9
...
...
@@ -290,7 +290,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
}
extern
long
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
);
extern
long
__strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
);
extern
long
strnlen_user
(
const
char
__user
*
str
,
long
n
);
extern
unsigned
long
clear_user
(
void
__user
*
mem
,
unsigned
long
len
);
extern
unsigned
long
__clear_user
(
void
__user
*
mem
,
unsigned
long
len
);
...
...
arch/mn10300/kernel/mn10300_ksyms.c
浏览文件 @
10503bf9
...
...
@@ -23,7 +23,6 @@ EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL
(
memset
);
EXPORT_SYMBOL
(
strncpy_from_user
);
EXPORT_SYMBOL
(
__strncpy_from_user
);
EXPORT_SYMBOL
(
clear_user
);
EXPORT_SYMBOL
(
__clear_user
);
EXPORT_SYMBOL
(
strnlen_user
);
...
...
arch/mn10300/lib/usercopy.c
浏览文件 @
10503bf9
...
...
@@ -49,14 +49,6 @@ do { \
: "memory", "cc"); \
} while (0)
long
__strncpy_from_user
(
char
*
dst
,
const
char
*
src
,
long
count
)
{
long
res
;
__do_strncpy_from_user
(
dst
,
src
,
count
,
res
);
return
res
;
}
long
strncpy_from_user
(
char
*
dst
,
const
char
*
src
,
long
count
)
{
...
...
arch/xtensa/include/asm/uaccess.h
浏览文件 @
10503bf9
...
...
@@ -278,13 +278,12 @@ clear_user(void *addr, unsigned long size)
extern
long
__strncpy_user
(
char
*
,
const
char
*
,
long
);
#define __strncpy_from_user __strncpy_user
static
inline
long
strncpy_from_user
(
char
*
dst
,
const
char
*
src
,
long
count
)
{
if
(
access_ok
(
VERIFY_READ
,
src
,
1
))
return
__strncpy_
from_
user
(
dst
,
src
,
count
);
return
__strncpy_user
(
dst
,
src
,
count
);
return
-
EFAULT
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录