aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/process_32.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2008-02-08 07:19:28 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:30 -0500
commit7fa3031500ec9b0a7460c8c23751799006ffee74 (patch)
tree2a7e9202b35a39dc8217e95825263c0629e67e35 /arch/x86/kernel/process_32.c
parentb0b933c08bd5fd053bbba8ba6387f543be03d49f (diff)
aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT
Suppress A.OUT library support if CONFIG_ARCH_SUPPORTS_AOUT is not set. Not all architectures support the A.OUT binfmt, so the ELF binfmt should not be permitted to go looking for A.OUT libraries to load in such a case. Not only that, but under such conditions A.OUT core dumps are not produced either. To make this work, this patch also does the following: (1) Makes the existence of the contents of linux/a.out.h contingent on CONFIG_ARCH_SUPPORTS_AOUT. (2) Renames dump_thread() to aout_dump_thread() as it's only called by A.OUT core dumping code. (3) Moves aout_dump_thread() into asm/a.out-core.h and makes it inline. This is then included only where needed. This means that this bit of arch code will be stored in the appropriate A.OUT binfmt module rather than the core kernel. (4) Drops A.OUT support for Blackfin (according to Mike Frysinger it's not needed) and FRV. This patch depends on the previous patch to move STACK_TOP[_MAX] out of asm/a.out.h and into asm/processor.h as they're required whether or not A.OUT format is available. [jdike@addtoit.com: uml: re-remove accidentally restored code] Signed-off-by: David Howells <dhowells@redhat.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/kernel/process_32.c')
-rw-r--r--arch/x86/kernel/process_32.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index dabdbeff1f77..78858068e24d 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -539,55 +539,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
539 return err; 539 return err;
540} 540}
541 541
542/*
543 * fill in the user structure for a core dump..
544 */
545void dump_thread(struct pt_regs * regs, struct user * dump)
546{
547 u16 gs;
548
549/* changed the size calculations - should hopefully work better. lbt */
550 dump->magic = CMAGIC;
551 dump->start_code = 0;
552 dump->start_stack = regs->sp & ~(PAGE_SIZE - 1);
553 dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
554 dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
555 dump->u_dsize -= dump->u_tsize;
556 dump->u_ssize = 0;
557 dump->u_debugreg[0] = current->thread.debugreg0;
558 dump->u_debugreg[1] = current->thread.debugreg1;
559 dump->u_debugreg[2] = current->thread.debugreg2;
560 dump->u_debugreg[3] = current->thread.debugreg3;
561 dump->u_debugreg[4] = 0;
562 dump->u_debugreg[5] = 0;
563 dump->u_debugreg[6] = current->thread.debugreg6;
564 dump->u_debugreg[7] = current->thread.debugreg7;
565
566 if (dump->start_stack < TASK_SIZE)
567 dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
568
569 dump->regs.bx = regs->bx;
570 dump->regs.cx = regs->cx;
571 dump->regs.dx = regs->dx;
572 dump->regs.si = regs->si;
573 dump->regs.di = regs->di;
574 dump->regs.bp = regs->bp;
575 dump->regs.ax = regs->ax;
576 dump->regs.ds = (u16)regs->ds;
577 dump->regs.es = (u16)regs->es;
578 dump->regs.fs = (u16)regs->fs;
579 savesegment(gs,gs);
580 dump->regs.orig_ax = regs->orig_ax;
581 dump->regs.ip = regs->ip;
582 dump->regs.cs = (u16)regs->cs;
583 dump->regs.flags = regs->flags;
584 dump->regs.sp = regs->sp;
585 dump->regs.ss = (u16)regs->ss;
586
587 dump->u_fpvalid = dump_fpu (regs, &dump->i387);
588}
589EXPORT_SYMBOL(dump_thread);
590
591#ifdef CONFIG_SECCOMP 542#ifdef CONFIG_SECCOMP
592static void hard_disable_TSC(void) 543static void hard_disable_TSC(void)
593{ 544{