Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
aa3e7eaf
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
aa3e7eaf
编写于
10月 05, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch elf_core_write_extra_data() to dump_emit()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
506f21c5
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
13 deletion
+11
-13
arch/ia64/kernel/elfcore.c
arch/ia64/kernel/elfcore.c
+2
-4
arch/x86/um/elfcore.c
arch/x86/um/elfcore.c
+2
-6
fs/binfmt_elf.c
fs/binfmt_elf.c
+3
-1
fs/binfmt_elf_fdpic.c
fs/binfmt_elf_fdpic.c
+3
-1
include/linux/elfcore.h
include/linux/elfcore.h
+1
-1
未找到文件。
arch/ia64/kernel/elfcore.c
浏览文件 @
aa3e7eaf
...
...
@@ -40,8 +40,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
return
1
;
}
int
elf_core_write_extra_data
(
struct
file
*
file
,
size_t
*
size
,
unsigned
long
limit
)
int
elf_core_write_extra_data
(
struct
coredump_params
*
cprm
)
{
const
struct
elf_phdr
*
const
gate_phdrs
=
(
const
struct
elf_phdr
*
)
(
GATE_ADDR
+
GATE_EHDR
->
e_phoff
);
...
...
@@ -52,8 +51,7 @@ int elf_core_write_extra_data(struct file *file, size_t *size,
void
*
addr
=
(
void
*
)
gate_phdrs
[
i
].
p_vaddr
;
size_t
memsz
=
PAGE_ALIGN
(
gate_phdrs
[
i
].
p_memsz
);
*
size
+=
memsz
;
if
(
*
size
>
limit
||
!
dump_write
(
file
,
addr
,
memsz
))
if
(
!
dump_emit
(
cprm
,
addr
,
memsz
))
return
0
;
break
;
}
...
...
arch/x86/um/elfcore.c
浏览文件 @
aa3e7eaf
...
...
@@ -38,8 +38,7 @@ int elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset)
return
1
;
}
int
elf_core_write_extra_data
(
struct
file
*
file
,
size_t
*
size
,
unsigned
long
limit
)
int
elf_core_write_extra_data
(
struct
coredump_params
*
cprm
)
{
if
(
vsyscall_ehdr
)
{
const
struct
elfhdr
*
const
ehdrp
=
...
...
@@ -52,10 +51,7 @@ int elf_core_write_extra_data(struct file *file, size_t *size,
if
(
phdrp
[
i
].
p_type
==
PT_LOAD
)
{
void
*
addr
=
(
void
*
)
phdrp
[
i
].
p_vaddr
;
size_t
filesz
=
phdrp
[
i
].
p_filesz
;
*
size
+=
filesz
;
if
(
*
size
>
limit
||
!
dump_write
(
file
,
addr
,
filesz
))
if
(
!
dump_emit
(
cprm
,
addr
,
filesz
))
return
0
;
}
}
...
...
fs/binfmt_elf.c
浏览文件 @
aa3e7eaf
...
...
@@ -2196,8 +2196,10 @@ static int elf_core_dump(struct coredump_params *cprm)
}
}
if
(
!
elf_core_write_extra_data
(
cprm
->
file
,
&
size
,
cprm
->
limit
))
cprm
->
written
=
size
;
if
(
!
elf_core_write_extra_data
(
cprm
))
goto
end_coredump
;
size
=
cprm
->
written
;
if
(
e_phnum
==
PN_XNUM
)
{
size
+=
sizeof
(
*
shdr4extnum
);
...
...
fs/binfmt_elf_fdpic.c
浏览文件 @
aa3e7eaf
...
...
@@ -1818,8 +1818,10 @@ static int elf_fdpic_core_dump(struct coredump_params *cprm)
cprm
->
mm_flags
)
<
0
)
goto
end_coredump
;
if
(
!
elf_core_write_extra_data
(
cprm
->
file
,
&
size
,
cprm
->
limit
))
cprm
->
written
=
size
;
if
(
!
elf_core_write_extra_data
(
cprm
))
goto
end_coredump
;
size
=
cprm
->
written
;
if
(
e_phnum
==
PN_XNUM
)
{
size
+=
sizeof
(
*
shdr4extnum
);
...
...
include/linux/elfcore.h
浏览文件 @
aa3e7eaf
...
...
@@ -67,7 +67,7 @@ extern Elf_Half elf_core_extra_phdrs(void);
extern
int
elf_core_write_extra_phdrs
(
struct
coredump_params
*
cprm
,
loff_t
offset
);
extern
int
elf_core_write_extra_data
(
struct
file
*
file
,
size_t
*
size
,
unsigned
long
limit
);
elf_core_write_extra_data
(
struct
coredump_params
*
cprm
);
extern
size_t
elf_core_extra_data_size
(
void
);
#endif
/* _LINUX_ELFCORE_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录