Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
43a5d548
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看板
提交
43a5d548
编写于
10月 07, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aout: switch to dump_emit
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
cdc3d562
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
11 addition
and
16 deletion
+11
-16
arch/x86/ia32/ia32_aout.c
arch/x86/ia32/ia32_aout.c
+8
-12
fs/binfmt_aout.c
fs/binfmt_aout.c
+3
-4
未找到文件。
arch/x86/ia32/ia32_aout.c
浏览文件 @
43a5d548
...
@@ -133,14 +133,6 @@ static void set_brk(unsigned long start, unsigned long end)
...
@@ -133,14 +133,6 @@ static void set_brk(unsigned long start, unsigned long end)
#include <linux/coredump.h>
#include <linux/coredump.h>
#define DUMP_WRITE(addr, nr) \
if (!dump_write(cprm->file, (void *)(addr), (nr))) \
goto end_coredump;
#define DUMP_SEEK(offset) \
if (!dump_seek(cprm->file, offset)) \
goto end_coredump;
#define START_DATA(u) (u.u_tsize << PAGE_SHIFT)
#define START_DATA(u) (u.u_tsize << PAGE_SHIFT)
#define START_STACK(u) (u.start_stack)
#define START_STACK(u) (u.start_stack)
...
@@ -192,22 +184,26 @@ static int aout_core_dump(struct coredump_params *cprm)
...
@@ -192,22 +184,26 @@ static int aout_core_dump(struct coredump_params *cprm)
set_fs
(
KERNEL_DS
);
set_fs
(
KERNEL_DS
);
/* struct user */
/* struct user */
DUMP_WRITE
(
&
dump
,
sizeof
(
dump
));
if
(
!
dump_emit
(
cprm
,
&
dump
,
sizeof
(
dump
)))
goto
end_coredump
;
/* Now dump all of the user data. Include malloced stuff as well */
/* Now dump all of the user data. Include malloced stuff as well */
DUMP_SEEK
(
PAGE_SIZE
-
sizeof
(
dump
));
if
(
!
dump_seek
(
cprm
->
file
,
PAGE_SIZE
-
sizeof
(
dump
)))
goto
end_coredump
;
/* now we start writing out the user space info */
/* now we start writing out the user space info */
set_fs
(
USER_DS
);
set_fs
(
USER_DS
);
/* Dump the data area */
/* Dump the data area */
if
(
dump
.
u_dsize
!=
0
)
{
if
(
dump
.
u_dsize
!=
0
)
{
dump_start
=
START_DATA
(
dump
);
dump_start
=
START_DATA
(
dump
);
dump_size
=
dump
.
u_dsize
<<
PAGE_SHIFT
;
dump_size
=
dump
.
u_dsize
<<
PAGE_SHIFT
;
DUMP_WRITE
(
dump_start
,
dump_size
);
if
(
!
dump_emit
(
cprm
,
(
void
*
)
dump_start
,
dump_size
))
goto
end_coredump
;
}
}
/* Now prepare to dump the stack area */
/* Now prepare to dump the stack area */
if
(
dump
.
u_ssize
!=
0
)
{
if
(
dump
.
u_ssize
!=
0
)
{
dump_start
=
START_STACK
(
dump
);
dump_start
=
START_STACK
(
dump
);
dump_size
=
dump
.
u_ssize
<<
PAGE_SHIFT
;
dump_size
=
dump
.
u_ssize
<<
PAGE_SHIFT
;
DUMP_WRITE
(
dump_start
,
dump_size
);
if
(
!
dump_emit
(
cprm
,
(
void
*
)
dump_start
,
dump_size
))
goto
end_coredump
;
}
}
end_coredump:
end_coredump:
set_fs
(
fs
);
set_fs
(
fs
);
...
...
fs/binfmt_aout.c
浏览文件 @
43a5d548
...
@@ -45,7 +45,6 @@ static int load_aout_library(struct file*);
...
@@ -45,7 +45,6 @@ static int load_aout_library(struct file*);
*/
*/
static
int
aout_core_dump
(
struct
coredump_params
*
cprm
)
static
int
aout_core_dump
(
struct
coredump_params
*
cprm
)
{
{
struct
file
*
file
=
cprm
->
file
;
mm_segment_t
fs
;
mm_segment_t
fs
;
int
has_dumped
=
0
;
int
has_dumped
=
0
;
void
__user
*
dump_start
;
void
__user
*
dump_start
;
...
@@ -85,7 +84,7 @@ static int aout_core_dump(struct coredump_params *cprm)
...
@@ -85,7 +84,7 @@ static int aout_core_dump(struct coredump_params *cprm)
set_fs
(
KERNEL_DS
);
set_fs
(
KERNEL_DS
);
/* struct user */
/* struct user */
if
(
!
dump_
write
(
file
,
&
dump
,
sizeof
(
dump
)))
if
(
!
dump_
emit
(
cprm
,
&
dump
,
sizeof
(
dump
)))
goto
end_coredump
;
goto
end_coredump
;
/* Now dump all of the user data. Include malloced stuff as well */
/* Now dump all of the user data. Include malloced stuff as well */
if
(
!
dump_seek
(
cprm
->
file
,
PAGE_SIZE
-
sizeof
(
dump
)))
if
(
!
dump_seek
(
cprm
->
file
,
PAGE_SIZE
-
sizeof
(
dump
)))
...
@@ -96,14 +95,14 @@ static int aout_core_dump(struct coredump_params *cprm)
...
@@ -96,14 +95,14 @@ static int aout_core_dump(struct coredump_params *cprm)
if
(
dump
.
u_dsize
!=
0
)
{
if
(
dump
.
u_dsize
!=
0
)
{
dump_start
=
START_DATA
(
dump
);
dump_start
=
START_DATA
(
dump
);
dump_size
=
dump
.
u_dsize
<<
PAGE_SHIFT
;
dump_size
=
dump
.
u_dsize
<<
PAGE_SHIFT
;
if
(
!
dump_
write
(
file
,
dump_start
,
dump_size
))
if
(
!
dump_
emit
(
cprm
,
dump_start
,
dump_size
))
goto
end_coredump
;
goto
end_coredump
;
}
}
/* Now prepare to dump the stack area */
/* Now prepare to dump the stack area */
if
(
dump
.
u_ssize
!=
0
)
{
if
(
dump
.
u_ssize
!=
0
)
{
dump_start
=
START_STACK
(
dump
);
dump_start
=
START_STACK
(
dump
);
dump_size
=
dump
.
u_ssize
<<
PAGE_SHIFT
;
dump_size
=
dump
.
u_ssize
<<
PAGE_SHIFT
;
if
(
!
dump_
write
(
file
,
dump_start
,
dump_size
))
if
(
!
dump_
emit
(
cprm
,
dump_start
,
dump_size
))
goto
end_coredump
;
goto
end_coredump
;
}
}
end_coredump:
end_coredump:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录