Skip to content

Commit 0f43283

Browse files
committed
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
2 parents 6ba0d2e + 1697a32 commit 0f43283

File tree

10 files changed

+146
-268
lines changed

10 files changed

+146
-268
lines changed

arch/ia64/include/asm/elf.h

-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ extern void ia64_init_addr_space (void);
179179
#define ELF_AR_SSD_OFFSET (56 * sizeof(elf_greg_t))
180180
#define ELF_AR_END_OFFSET (57 * sizeof(elf_greg_t))
181181

182-
typedef unsigned long elf_fpxregset_t;
183-
184182
typedef unsigned long elf_greg_t;
185183
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
186184

arch/powerpc/include/asm/elf.h

-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs,
5353
}
5454
#define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
5555

56-
typedef elf_vrregset_t elf_fpxregset_t;
57-
5856
/* ELF_HWCAP yields a mask that user programs can use to figure out what
5957
instruction set this cpu supports. This could be done in userspace,
6058
but it's not easy, and we've already done it here. */

arch/x86/include/asm/elf.h

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ typedef struct user_i387_struct elf_fpregset_t;
2121

2222
#ifdef __i386__
2323

24-
typedef struct user_fxsr_struct elf_fpxregset_t;
25-
2624
#define R_386_NONE 0
2725
#define R_386_32 1
2826
#define R_386_PC32 2

fs/binfmt_elf.c

-30
Original file line numberDiff line numberDiff line change
@@ -2038,9 +2038,6 @@ struct elf_thread_status
20382038
struct elf_prstatus prstatus; /* NT_PRSTATUS */
20392039
elf_fpregset_t fpu; /* NT_PRFPREG */
20402040
struct task_struct *thread;
2041-
#ifdef ELF_CORE_COPY_XFPREGS
2042-
elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */
2043-
#endif
20442041
struct memelfnote notes[3];
20452042
int num_notes;
20462043
};
@@ -2071,15 +2068,6 @@ static int elf_dump_thread_status(long signr, struct elf_thread_status *t)
20712068
t->num_notes++;
20722069
sz += notesize(&t->notes[1]);
20732070
}
2074-
2075-
#ifdef ELF_CORE_COPY_XFPREGS
2076-
if (elf_core_copy_task_xfpregs(p, &t->xfpu)) {
2077-
fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE,
2078-
sizeof(t->xfpu), &t->xfpu);
2079-
t->num_notes++;
2080-
sz += notesize(&t->notes[2]);
2081-
}
2082-
#endif
20832071
return sz;
20842072
}
20852073

@@ -2090,9 +2078,6 @@ struct elf_note_info {
20902078
struct elf_prpsinfo *psinfo; /* NT_PRPSINFO */
20912079
struct list_head thread_list;
20922080
elf_fpregset_t *fpu;
2093-
#ifdef ELF_CORE_COPY_XFPREGS
2094-
elf_fpxregset_t *xfpu;
2095-
#endif
20962081
user_siginfo_t csigdata;
20972082
int thread_status_size;
20982083
int numnote;
@@ -2116,11 +2101,6 @@ static int elf_note_info_init(struct elf_note_info *info)
21162101
info->fpu = kmalloc(sizeof(*info->fpu), GFP_KERNEL);
21172102
if (!info->fpu)
21182103
return 0;
2119-
#ifdef ELF_CORE_COPY_XFPREGS
2120-
info->xfpu = kmalloc(sizeof(*info->xfpu), GFP_KERNEL);
2121-
if (!info->xfpu)
2122-
return 0;
2123-
#endif
21242104
return 1;
21252105
}
21262106

@@ -2184,13 +2164,6 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
21842164
if (info->prstatus->pr_fpvalid)
21852165
fill_note(info->notes + info->numnote++,
21862166
"CORE", NT_PRFPREG, sizeof(*info->fpu), info->fpu);
2187-
#ifdef ELF_CORE_COPY_XFPREGS
2188-
if (elf_core_copy_task_xfpregs(current, info->xfpu))
2189-
fill_note(info->notes + info->numnote++,
2190-
"LINUX", ELF_CORE_XFPREG_TYPE,
2191-
sizeof(*info->xfpu), info->xfpu);
2192-
#endif
2193-
21942167
return 1;
21952168
}
21962169

@@ -2243,9 +2216,6 @@ static void free_note_info(struct elf_note_info *info)
22432216
kfree(info->psinfo);
22442217
kfree(info->notes);
22452218
kfree(info->fpu);
2246-
#ifdef ELF_CORE_COPY_XFPREGS
2247-
kfree(info->xfpu);
2248-
#endif
22492219
}
22502220

22512221
#endif

0 commit comments

Comments
 (0)