Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
ef41f460
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看板
提交
ef41f460
编写于
4月 28, 2009
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MIPS: uaccess: Switch lock annotations to might_fault().
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
005076a1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
18 deletion
+23
-18
arch/mips/include/asm/checksum.h
arch/mips/include/asm/checksum.h
+2
-2
arch/mips/include/asm/uaccess.h
arch/mips/include/asm/uaccess.h
+21
-16
未找到文件。
arch/mips/include/asm/checksum.h
浏览文件 @
ef41f460
...
...
@@ -40,7 +40,7 @@ static inline
__wsum
csum_partial_copy_from_user
(
const
void
__user
*
src
,
void
*
dst
,
int
len
,
__wsum
sum
,
int
*
err_ptr
)
{
might_
sleep
();
might_
fault
();
return
__csum_partial_copy_user
((
__force
void
*
)
src
,
dst
,
len
,
sum
,
err_ptr
);
}
...
...
@@ -53,7 +53,7 @@ static inline
__wsum
csum_and_copy_to_user
(
const
void
*
src
,
void
__user
*
dst
,
int
len
,
__wsum
sum
,
int
*
err_ptr
)
{
might_
sleep
();
might_
fault
();
if
(
access_ok
(
VERIFY_WRITE
,
dst
,
len
))
return
__csum_partial_copy_user
(
src
,
(
__force
void
*
)
dst
,
len
,
sum
,
err_ptr
);
...
...
arch/mips/include/asm/uaccess.h
浏览文件 @
ef41f460
...
...
@@ -245,6 +245,7 @@ do { \
int __gu_err = -EFAULT; \
const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); \
\
might_fault(); \
if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \
__get_user_common((x), size, __gu_ptr); \
\
...
...
@@ -334,6 +335,7 @@ do { \
__typeof__(*(ptr)) __pu_val = (x); \
int __pu_err = -EFAULT; \
\
might_fault(); \
if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) { \
switch (size) { \
case 1: __put_user_asm("sb", __pu_addr); break; \
...
...
@@ -708,10 +710,10 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n);
const void *__cu_from; \
long __cu_len; \
\
might_sleep(); \
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
might_fault(); \
__cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \
__cu_len; \
})
...
...
@@ -764,13 +766,14 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
const void *__cu_from; \
long __cu_len; \
\
might_sleep(); \
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) \
if (access_ok(VERIFY_WRITE, __cu_to, __cu_len)) { \
might_fault(); \
__cu_len = __invoke_copy_to_user(__cu_to, __cu_from, \
__cu_len); \
} \
__cu_len; \
})
...
...
@@ -843,10 +846,10 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
const void __user *__cu_from; \
long __cu_len; \
\
might_sleep(); \
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
might_fault(); \
__cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \
__cu_len); \
__cu_len; \
...
...
@@ -874,13 +877,14 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
const void __user *__cu_from; \
long __cu_len; \
\
might_sleep(); \
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
if (access_ok(VERIFY_READ, __cu_from, __cu_len)) \
if (access_ok(VERIFY_READ, __cu_from, __cu_len)) { \
might_fault(); \
__cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \
__cu_len); \
} \
__cu_len; \
})
...
...
@@ -890,10 +894,10 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
const void __user *__cu_from; \
long __cu_len; \
\
might_sleep(); \
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
might_fault(); \
__cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \
__cu_len); \
__cu_len; \
...
...
@@ -905,14 +909,15 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
const void __user *__cu_from; \
long __cu_len; \
\
might_sleep(); \
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
if (likely(access_ok(VERIFY_READ, __cu_from, __cu_len) && \
access_ok(VERIFY_WRITE, __cu_to, __cu_len))) \
access_ok(VERIFY_WRITE, __cu_to, __cu_len))) { \
might_fault(); \
__cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \
__cu_len); \
} \
__cu_len; \
})
...
...
@@ -932,7 +937,7 @@ __clear_user(void __user *addr, __kernel_size_t size)
{
__kernel_size_t
res
;
might_
sleep
();
might_
fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
"move
\t
$5, $0
\n\t
"
...
...
@@ -981,7 +986,7 @@ __strncpy_from_user(char *__to, const char __user *__from, long __len)
{
long
res
;
might_
sleep
();
might_
fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
"move
\t
$5, %2
\n\t
"
...
...
@@ -1018,7 +1023,7 @@ strncpy_from_user(char *__to, const char __user *__from, long __len)
{
long
res
;
might_
sleep
();
might_
fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
"move
\t
$5, %2
\n\t
"
...
...
@@ -1037,7 +1042,7 @@ static inline long __strlen_user(const char __user *s)
{
long
res
;
might_
sleep
();
might_
fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
__MODULE_JAL
(
__strlen_user_nocheck_asm
)
...
...
@@ -1067,7 +1072,7 @@ static inline long strlen_user(const char __user *s)
{
long
res
;
might_
sleep
();
might_
fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
__MODULE_JAL
(
__strlen_user_asm
)
...
...
@@ -1084,7 +1089,7 @@ static inline long __strnlen_user(const char __user *s, long n)
{
long
res
;
might_
sleep
();
might_
fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
"move
\t
$5, %2
\n\t
"
...
...
@@ -1115,7 +1120,7 @@ static inline long strnlen_user(const char __user *s, long n)
{
long
res
;
might_
sleep
();
might_
fault
();
__asm__
__volatile__
(
"move
\t
$4, %1
\n\t
"
"move
\t
$5, %2
\n\t
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录