kernel-hacking-2024-linux-s.../include/asm-um
Nick Piggin 08932a1983 uml: use generic BUG
Get UML to use the generic bug support rather than arch specific one.

If I insert an artificial bug right before loading init, I get this:

 Kernel panic - not syncing: Kernel mode signal 4

 EIP: 0023:[<0819d501>] CPU: 0 Not tainted ESP: 002b:f7fd4fbc EFLAGS: 00000246
    Not tainted
    EAX: 00000000 EBX: 00007870 ECX: 00000013 EDX: 00007870
    ESI: 0000786d EDI: 00000011 EBP: f7fd4fd8 DS: 002b ES: 002b
    08273bec:  [<0806e814>] show_regs+0x104/0x106
    08273c08:  [<08058927>] panic_exit+0x2c/0x4b
    08273c18:  [<08080ee7>] notifier_call_chain+0x32/0x5b
    08273c38:  [<08080fbd>] __atomic_notifier_call_chain+0x30/0x32
    08273c54:  [<08080fee>] atomic_notifier_call_chain+0x2f/0x31
    08273c70:  [<08073b88>] panic+0x75/0x131
    08273c94:  [<080586c7>] relay_signal+0x87/0x95
    08273cb0:  [<0806b9ee>] sig_handler_common_skas+0x9e/0x120
    08273cd8:  [<08067738>] sig_handler+0x28/0x4f
    08273cec:  [<0806792e>] handle_signal+0x53/0x89
    08273d0c:  [<08069f60>] hard_handler+0x18/0x28
    08273d1c:  [<ffffe500>] transitions+0xf7d598b8/0xfffffff0

With this patch in place, this is how it looks:

 BUG: failure at init/main.c:779/init_post()!
 Kernel panic - not syncing: BUG!

 EIP: 0023:[<081a65d1>] CPU: 0 Not tainted ESP: 002b:f7f0dfbc EFLAGS: 00000246
    Not tainted
    EAX: 00000000 EBX: 000069db ECX: 00000013 EDX: 000069db
    ESI: 000069d8 EDI: 00000011 EBP: f7f0dfd8 DS: 002b ES: 002b
    098efedc:  [<0806e9a4>] show_regs+0x104/0x106
    098efef8:  [<080589c7>] panic_exit+0x2c/0x4b
    098eff08:  [<080818d7>] notifier_call_chain+0x32/0x5b
    098eff28:  [<080819ad>] __atomic_notifier_call_chain+0x30/0x32
    098eff44:  [<080819de>] atomic_notifier_call_chain+0x2f/0x31
    098eff60:  [<08073f28>] panic+0x75/0x131
    098eff84:  [<080541d5>] init_post+0xcd/0xe8
    098eff9c:  [<08048ad4>] kernel_init+0x8e/0x9a
    098effb4:  [<08066dee>] run_kernel_thread+0x41/0x53
    098effe0:  [<08058e75>] new_thread_handler+0x62/0x8b
    098efffc:  [<a55a5a5a>] 0xa55a5a5a

[ jdike - added BUG_TABLE to linker script ]

Signed-off-by: Nick Piggin <npiggin@suse.de>
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>
2007-06-24 08:59:11 -07:00
..
a.out.h uml: kill x86_64 STACK_TOP_MAX 2007-06-16 13:16:16 -07:00
alternative-asm.i
alternative.h
apic.h
archparam-i386.h
archparam-ppc.h
archparam-x86_64.h
atomic.h
auxvec.h
bitops.h
boot.h
bug.h uml: use generic BUG 2007-06-24 08:59:11 -07:00
bugs.h
byteorder.h
cache.h
cacheflush.h
calling.h
checksum.h
cmpxchg.h x86: create asm/cmpxchg.h 2007-05-08 11:15:20 -07:00
cobalt.h
common.lds.S uml: use generic BUG 2007-06-24 08:59:11 -07:00
cpufeature.h
cputime.h
current.h
delay.h [PATCH] uml: fix unreasonably long udelay 2007-04-02 10:06:08 -07:00
desc.h
device.h
div64.h [NET]: div64_64 consolidate (rev3) 2007-04-25 22:23:33 -07:00
dma-mapping.h
dma.h
dwarf2.h
elf-i386.h
elf-ppc.h [PATCH] uml: fix apparent "CONFIG_64_BIT" typo. 2007-02-11 10:51:23 -08:00
elf-x86_64.h
emergency-restart.h
errno.h
fcntl.h
fixmap.h
floppy.h
frame.i
futex.h
hardirq.h
highmem.h
host_ldt-i386.h
host_ldt-x86_64.h
hw_irq.h
ide.h
io.h
ioctl.h
ioctls.h
ipc.h
ipcbuf.h
irq.h
irq_regs.h
irq_vectors.h
irqflags.h
kdebug.h move die notifier handling to common code 2007-05-08 11:15:04 -07:00
keyboard.h
kmap_types.h
ldt.h
linkage.h
local.h
locks.h
mca_dma.h
mman.h
mmu.h
mmu_context.h [PATCH] x86: PARAVIRT: add hooks to intercept mm creation and destruction 2007-05-02 19:27:14 +02:00
module-generic.h
module-i386.h
module-x86_64.h
msgbuf.h
mtrr.h
mutex.h
namei.h
page.h uml: more page fault path trimming 2007-05-07 12:13:04 -07:00
page_offset.h
param.h
pci.h
pda.h
percpu.h
pgalloc.h
pgtable-2level.h [PATCH] uml: fix pte bit collision 2007-03-29 08:22:24 -07:00
pgtable-3level.h
pgtable.h [PATCH] uml: pte_mkread fix 2007-03-01 14:53:38 -08:00
poll.h
posix_types.h
prctl.h
processor-generic.h
processor-i386.h
processor-ppc.h
processor-x86_64.h [PATCH] uml: x86_64 thread fixes 2007-02-11 10:51:24 -08:00
ptrace-generic.h
ptrace-i386.h
ptrace-x86_64.h [PATCH] uml: x86_64 ptrace fixes 2007-02-11 10:51:24 -08:00
required-features.h uml: fix build breakage 2007-05-09 12:30:48 -07:00
resource.h
rwlock.h
rwsem.h
scatterlist.h
sections.h
segment.h
semaphore.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext-generic.h
sigcontext-i386.h
sigcontext-ppc.h
sigcontext-x86_64.h
siginfo.h
signal.h
smp.h Remove hardcoding of hard_smp_processor_id on UP systems 2007-05-09 12:30:48 -07:00
socket.h
sockios.h
spinlock.h
spinlock_types.h
stat.h
statfs.h
string.h
suspend.h
system-generic.h
system-i386.h
system-ppc.h
system-x86_64.h
termbits.h
termios.h
thread_info.h uml: iRQ stacks 2007-05-11 08:29:34 -07:00
timex.h
tlb.h
tlbflush.h uml: more page fault path trimming 2007-05-07 12:13:04 -07:00
topology.h
types.h
uaccess.h
ucontext.h
unaligned.h
unistd.h
user.h
vga.h
vm-flags-i386.h
vm-flags-x86_64.h
vm86.h
xor.h