Skip to content

Commit 8d3e09b

Browse files
committed
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull regset conversion fix from Al Viro: "Fix a regression from an unnoticed bisect hazard in the regset series. A bunch of old (aout, originally) primitives used by coredumps became dead code after fdpic conversion to regsets. Removal of that dead code had been the first commit in the followups to regset series; unfortunately, it happened to hide the bisect hazard on sh (extern for fpregs_get() had not been updated in the main series when it should have been; followup simply made fpregs_get() static). And without that followup commit this bisect hazard became breakage in the mainline" Tested-by: John Paul Adrian Glaubitz <[email protected]> * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kill unused dump_fpu() instances
2 parents 9420f1c + bb1a773 commit 8d3e09b

File tree

14 files changed

+1
-257
lines changed

14 files changed

+1
-257
lines changed

arch/arc/kernel/process.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,6 @@ void flush_thread(void)
296296
{
297297
}
298298

299-
int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
300-
{
301-
return 0;
302-
}
303-
304299
int elf_check_arch(const struct elf32_hdr *x)
305300
{
306301
unsigned int eflags;

arch/arm/kernel/process.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -281,21 +281,6 @@ int dump_task_regs(struct task_struct *t, elf_gregset_t *elfregs)
281281
return 1;
282282
}
283283

284-
/*
285-
* fill in the fpe structure for a core dump...
286-
*/
287-
int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
288-
{
289-
struct thread_info *thread = current_thread_info();
290-
int used_math = thread->used_cp[1] | thread->used_cp[2];
291-
292-
if (used_math)
293-
memcpy(fp, &thread->fpstate.soft, sizeof (*fp));
294-
295-
return used_math != 0;
296-
}
297-
EXPORT_SYMBOL(dump_fpu);
298-
299284
unsigned long get_wchan(struct task_struct *p)
300285
{
301286
struct stackframe frame;

arch/hexagon/kernel/process.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,6 @@ unsigned long get_wchan(struct task_struct *p)
153153
return 0;
154154
}
155155

156-
/*
157-
* Required placeholder.
158-
*/
159-
int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
160-
{
161-
return 0;
162-
}
163-
164-
165156
/*
166157
* Called on the exit path of event entry; see vm_entry.S
167158
*

arch/ia64/kernel/process.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -530,52 +530,18 @@ do_copy_task_regs (struct task_struct *task, struct unw_frame_info *info, void *
530530
unw_get_ar(info, UNW_AR_SSD, &dst[56]);
531531
}
532532

533-
void
534-
do_dump_task_fpu (struct task_struct *task, struct unw_frame_info *info, void *arg)
535-
{
536-
elf_fpreg_t *dst = arg;
537-
int i;
538-
539-
memset(dst, 0, sizeof(elf_fpregset_t)); /* don't leak any "random" bits */
540-
541-
if (unw_unwind_to_user(info) < 0)
542-
return;
543-
544-
/* f0 is 0.0, f1 is 1.0 */
545-
546-
for (i = 2; i < 32; ++i)
547-
unw_get_fr(info, i, dst + i);
548-
549-
ia64_flush_fph(task);
550-
if ((task->thread.flags & IA64_THREAD_FPH_VALID) != 0)
551-
memcpy(dst + 32, task->thread.fph, 96*16);
552-
}
553-
554533
void
555534
do_copy_regs (struct unw_frame_info *info, void *arg)
556535
{
557536
do_copy_task_regs(current, info, arg);
558537
}
559538

560-
void
561-
do_dump_fpu (struct unw_frame_info *info, void *arg)
562-
{
563-
do_dump_task_fpu(current, info, arg);
564-
}
565-
566539
void
567540
ia64_elf_core_copy_regs (struct pt_regs *pt, elf_gregset_t dst)
568541
{
569542
unw_init_running(do_copy_regs, dst);
570543
}
571544

572-
int
573-
dump_fpu (struct pt_regs *pt, elf_fpregset_t dst)
574-
{
575-
unw_init_running(do_dump_fpu, dst);
576-
return 1; /* f0-f31 are always valid so we always return 1 */
577-
}
578-
579545
/*
580546
* Flush thread state. This is called when a thread does an execve().
581547
*/

arch/nios2/kernel/process.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,6 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp)
252252
regs->sp = sp;
253253
}
254254

255-
#include <linux/elfcore.h>
256-
257-
/* Fill in the FPU structure for a core dump. */
258-
int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r)
259-
{
260-
return 0; /* Nios2 has no FPU and thus no FPU registers */
261-
}
262-
263255
asmlinkage int nios2_clone(unsigned long clone_flags, unsigned long newsp,
264256
int __user *parent_tidptr, int __user *child_tidptr,
265257
unsigned long tls)

arch/openrisc/kernel/process.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,6 @@ void start_thread(struct pt_regs *regs, unsigned long pc, unsigned long sp)
214214
regs->sp = sp;
215215
}
216216

217-
/* Fill in the fpu structure for a core dump. */
218-
int dump_fpu(struct pt_regs *regs, elf_fpregset_t * fpu)
219-
{
220-
/* TODO */
221-
return 0;
222-
}
223-
224217
extern struct thread_info *_switch(struct thread_info *old_ti,
225218
struct thread_info *new_ti);
226219
extern int lwa_flag;

arch/parisc/include/asm/elf.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,6 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
305305

306306
struct task_struct;
307307

308-
extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
309-
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
310-
311308
struct pt_regs; /* forward declaration... */
312309

313310

arch/parisc/kernel/process.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -151,25 +151,6 @@ void release_thread(struct task_struct *dead_task)
151151
{
152152
}
153153

154-
/*
155-
* Fill in the FPU structure for a core dump.
156-
*/
157-
158-
int dump_fpu (struct pt_regs * regs, elf_fpregset_t *r)
159-
{
160-
if (regs == NULL)
161-
return 0;
162-
163-
memcpy(r, regs->fr, sizeof *r);
164-
return 1;
165-
}
166-
167-
int dump_task_fpu (struct task_struct *tsk, elf_fpregset_t *r)
168-
{
169-
memcpy(r, tsk->thread.regs.fr, sizeof(*r));
170-
return 1;
171-
}
172-
173154
/*
174155
* Idle thread support
175156
*

arch/s390/kernel/process.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -160,24 +160,6 @@ asmlinkage void execve_tail(void)
160160
asm volatile("sfpc %0" : : "d" (0));
161161
}
162162

163-
/*
164-
* fill in the FPU structure for a core dump.
165-
*/
166-
int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs)
167-
{
168-
save_fpu_regs();
169-
fpregs->fpc = current->thread.fpu.fpc;
170-
fpregs->pad = 0;
171-
if (MACHINE_HAS_VX)
172-
convert_vx_to_fp((freg_t *)&fpregs->fprs,
173-
current->thread.fpu.vxrs);
174-
else
175-
memcpy(&fpregs->fprs, current->thread.fpu.fprs,
176-
sizeof(fpregs->fprs));
177-
return 1;
178-
}
179-
EXPORT_SYMBOL(dump_fpu);
180-
181163
unsigned long get_wchan(struct task_struct *p)
182164
{
183165
struct unwind_state state;

arch/sh/include/asm/fpu.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ struct user_regset;
3737
extern int do_fpu_inst(unsigned short, struct pt_regs *);
3838
extern int init_fpu(struct task_struct *);
3939

40-
extern int fpregs_get(struct task_struct *target,
41-
const struct user_regset *regset,
42-
unsigned int pos, unsigned int count,
43-
void *kbuf, void __user *ubuf);
44-
4540
static inline void __unlazy_fpu(struct task_struct *tsk, struct pt_regs *regs)
4641
{
4742
if (task_thread_info(tsk)->status & TS_USEDFPU) {

0 commit comments

Comments
 (0)