History

Merge branch 'work.fdpic' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull fdpick coredump update from Al Viro: "Switches fdpic coredumps away from original aout dumping primitives to the same kind of regset use as regular elf coredumps do" * 'work.fdpic' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: [elf-fdpic] switch coredump to regsets [elf-fdpic] use elf_dump_thread_status() for the dumper thread as well [elf-fdpic] move allocation of elf_thread_status into elf_dump_thread_status() [elf-fdpic] coredump: don't bother with cyclic list for per-thread objects kill elf_fpxregs_t take fdpic-related parts of elf_prstatus out unexport linux/elfcore.h

Linus Torvalds committed 6 years ago

Commit 0f432832 parents 6ba0d2e 1697a3210 files · +146 −268Browse files

Showing the changes to include/linux (2 of 10 files). Show all

Unified · Split

2 files
  1. include/linux/elfcore-compat.h +0 −4
  2. include/linux/elfcore.h +56 −10
include/linux/elfcore-compat.h+0−4
@@ -32,10 +32,6 @@ struct compat_elf_prstatus · 31 unmodified lines
3232 struct old_timeval32 pr_cutime;
3333 struct old_timeval32 pr_cstime;
3434 compat_elf_gregset_t pr_reg;
35−#ifdef CONFIG_BINFMT_ELF_FDPIC
36− compat_ulong_t pr_exec_fdpic_loadmap;
37− compat_ulong_t pr_interp_fdpic_loadmap;
38−#endif
3935 compat_int_t pr_fpvalid;
4036 };
4137
include/linux/elfcore.h+56−10
@@ -5,12 +5,65 @@ · 4 unmodified lines
55 #include <linux/user.h>
66 #include <linux/bug.h>
77 #include <linux/sched/task_stack.h>
8−
9−#include <asm/elf.h>
10−#include <uapi/linux/elfcore.h>
8+#include <linux/types.h>
9+#include <linux/signal.h>
10+#include <linux/time.h>
11+#include <linux/ptrace.h>
12+#include <linux/fs.h>
13+#include <linux/elf.h>
1114
1215 struct coredump_params;
1316
17+struct elf_siginfo
18+{
19+ int si_signo; /* signal number */
20+ int si_code; /* extra code */
21+ int si_errno; /* errno */
22+};
23+
24+/*
25+ * Definitions to generate Intel SVR4-like core files.
26+ * These mostly have the same names as the SVR4 types with "elf_"
27+ * tacked on the front to prevent clashes with linux definitions,
28+ * and the typedef forms have been avoided. This is mostly like
29+ * the SVR4 structure, but more Linuxy, with things that Linux does
30+ * not support and which gdb doesn't really use excluded.
31+ */
32+struct elf_prstatus
33+{
34+ struct elf_siginfo pr_info; /* Info associated with signal */
35+ short pr_cursig; /* Current signal */
36+ unsigned long pr_sigpend; /* Set of pending signals */
37+ unsigned long pr_sighold; /* Set of held signals */
38+ pid_t pr_pid;
39+ pid_t pr_ppid;
40+ pid_t pr_pgrp;
41+ pid_t pr_sid;
42+ struct __kernel_old_timeval pr_utime; /* User time */
43+ struct __kernel_old_timeval pr_stime; /* System time */
44+ struct __kernel_old_timeval pr_cutime; /* Cumulative user time */
45+ struct __kernel_old_timeval pr_cstime; /* Cumulative system time */
46+ elf_gregset_t pr_reg; /* GP registers */
47+ int pr_fpvalid; /* True if math co-processor being used. */
48+};
49+
50+#define ELF_PRARGSZ (80) /* Number of chars for args */
51+
52+struct elf_prpsinfo
53+{
54+ char pr_state; /* numeric process state */
55+ char pr_sname; /* char for pr_state */
56+ char pr_zomb; /* zombie */
57+ char pr_nice; /* nice val */
58+ unsigned long pr_flag; /* flags */
59+ __kernel_uid_t pr_uid;
60+ __kernel_gid_t pr_gid;
61+ pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
62+ /* Lots missing */
63+ char pr_fname[16]; /* filename of executable */
64+ char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
65+};
66+
1467 static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs)
1568 {
1669 #ifdef ELF_CORE_COPY_REGS
@@ -51,13 +104,6 @@ static inline int elf_core_copy_task_fpregs(struct task_struct *t, struct pt_reg · 34 unmodified lines
51104 #endif
52105 }
53106
54−#ifdef ELF_CORE_COPY_XFPREGS
55−static inline int elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu)
56−{
57− return ELF_CORE_COPY_XFPREGS(t, xfpu);
58−}
59−#endif
60−
61107 /*
62108 * These functions parameterize elf_core_dump in fs/binfmt_elf.c to write out
63109 * extra segments containing the gate DSO contents. Dumping its

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t