[-mm patch] lguest: remove check_bug_kill()

From: Adrian Bunk
Date: Sun Mar 25 2007 - 10:57:54 EST


On Sun, Mar 25, 2007 at 05:33:45PM +1000, Rusty Russell wrote:
> On Sat, 2007-03-24 at 14:06 +0100, Adrian Bunk wrote:
> > On Mon, Mar 19, 2007 at 08:56:23PM -0800, Andrew Morton wrote:
> > >...
> > > Changes since 2.6.21-rc3-mm1:
> > >...
> > > +lguest-use-read-only-pages-rather-than-segments-to-protect-high-mapped-switcher.patch
> > >...
> > > x86/x86_64 updates
> > >...
> >
> >
> > check_bug_kill() is no longer used.
>
> Thanks Adrian, that was actually an oversight. However, this function
> is most useful in early bringup, so I didn't notice it was gone.
>
> I'd prefer a patch which eliminates it altogether, rather than #if 0 it
> out.

Patch below.

> Thanks!
> Rusty.

cu
Adrian


<-- snip -->


check_bug_kill() is no longer used.

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

---

arch/i386/lguest/interrupts_and_traps.c | 27 ------------------------
arch/i386/lguest/lg.h | 1
2 files changed, 28 deletions(-)

--- linux-2.6.21-rc4-mm1/arch/i386/lguest/lg.h.old 2007-03-25 14:38:22.000000000 +0200
+++ linux-2.6.21-rc4-mm1/arch/i386/lguest/lg.h 2007-03-25 14:41:13.000000000 +0200
@@ -195,7 +195,6 @@
/* interrupts_and_traps.c: */
void maybe_do_interrupt(struct lguest *lg);
int deliver_trap(struct lguest *lg, unsigned int num);
-void check_bug_kill(struct lguest *lg);
void load_guest_idt_entry(struct lguest *lg, unsigned int i, u32 low, u32 hi);
void pin_stack_pages(struct lguest *lg);
void pin_trap_pages(struct lguest *lg);
--- linux-2.6.21-rc4-mm1/arch/i386/lguest/interrupts_and_traps.c.old 2007-03-25 14:38:46.000000000 +0200
+++ linux-2.6.21-rc4-mm1/arch/i386/lguest/interrupts_and_traps.c 2007-03-25 14:41:25.000000000 +0200
@@ -118,33 +118,6 @@
return 1;
}

-void check_bug_kill(struct lguest *lg)
-{
-#ifdef CONFIG_BUG
- u32 eip = lg->regs->eip - PAGE_OFFSET;
- u16 insn;
-
- /* This only works for addresses in linear mapping... */
- if (lg->regs->eip < PAGE_OFFSET)
- return;
- lhread(lg, &insn, eip, sizeof(insn));
- if (insn == 0x0b0f) {
-#ifdef CONFIG_DEBUG_BUGVERBOSE
- u16 l;
- u32 f;
- char file[128];
- lhread(lg, &l, eip+sizeof(insn), sizeof(l));
- lhread(lg, &f, eip+sizeof(insn)+sizeof(l), sizeof(f));
- lhread(lg, file, f - PAGE_OFFSET, sizeof(file));
- file[sizeof(file)-1] = 0;
- kill_guest(lg, "BUG() at %#x %s:%u", eip, file, l);
-#else
- kill_guest(lg, "BUG() at %#x", eip);
-#endif /* CONFIG_DEBUG_BUGVERBOSE */
- }
-#endif /* CONFIG_BUG */
-}
-
static int direct_trap(const struct lguest *lg,
const struct desc_struct *trap,
unsigned int num)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/