본문 바로가기

Core BSP 분석/리눅스 커널 핵심 분석

(90)
리눅스 커널 디버깅 http://www.dedoimedo.com/computers/crash-analyze.html
stack_overflow_check static inline void stack_overflow_check(struct pt_regs *regs) { #ifdef CONFIG_DEBUG_STACKOVERFLOW #define STACK_TOP_MARGIN 128 struct orig_ist *oist; u64 irq_stack_top, irq_stack_bottom; u64 estack_top, estack_bottom; u64 curbase = (u64)task_stack_page(current); if (user_mode_vm(regs)) return; if (regs->sp >= curbase + sizeof(struct thread_info) + sizeof(struct pt_regs) + STACK_TOP_MARGIN && reg..
Debug config arch/x86/kernel/x8664_ksyms_64.c:62:#ifndef CONFIG_DEBUG_VIRTUAL arch/x86/kernel/amd_gart_64.c:308:#ifdef CONFIG_IOMMU_DEBUG arch/x86/kernel/test_nx.c:145:#ifdef CONFIG_DEBUG_RODATA arch/x86/kernel/Makefile:79:obj-$(CONFIG_DEBUG_RODATA_TEST) += test_rodata.o arch/x86/kernel/Makefile:80:obj-$(CONFIG_DEBUG_NX_TEST) += test_nx.o arch/x86/kernel/Makefile:81:obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_se..
CONFIG_DETECT_HUNG_TASK #ifdef CONFIG_DETECT_HUNG_TASK extern unsigned int sysctl_hung_task_panic; extern unsigned long sysctl_hung_task_check_count; extern unsigned long sysctl_hung_task_timeout_secs; extern unsigned long sysctl_hung_task_warnings; extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos); #else /* Avoid need for ifdefs elsewhere in t..
gdt_page DEFINE_PER_CPU_PAGE_ALIGNED(structgdt_page, gdt_page) = { .gdt = { /* * Weneed valid kernel segments for data and code in long mode too * IRETwill check the segment types kkeil2000/10/28 * Alsosysret mandates a special GDT layout * * TLSdescriptors are currently at a different place compared to i386. *Hopefully nobody expects them at a fixed place (Wine?) */ [GDT_ENTRY_KERNEL32_CS] = GDT_ENTRY_I..
process state /* * Per process flags */ #define PF_EXITING 0x00000004 /* getting shut down */ #define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */ #define PF_VCPU 0x00000010 /* I'm a virtual CPU */ #define PF_WQ_WORKER 0x00000020 /* I'm a workqueue worker */ #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ #define PF_MCE_PROCESS 0x00000080 /* process policy on mce errors */ #define PF..
cmm: thread dump ;**************************************************************************** ;** thread_process_dump_austin.cmm ;** ;** This cmm file is designed to dump tcb information of all processes in Moorefield platform. ;** ;** ;**************************************************************************** ;** ;** EDIT HISTORY FOR MODULE ;** ;** ;** when who what, where, why ;** -------- --- -------------..
x86 stack dump(1) Cy _ RAX 0F RBX FFFFFFFF83358820 ^S+^Stack_________+ P P RCX FFFF88007EB0EF28 RDX 1 SP> FFFF880044E35EC0 Ac _ RSI FFFF88007EB0D138 RDI 63 +08 FFFFFFFF823B8B1E Zr _ R8 1 R9 0 +10 0000000000000002 S _ R10 0 R11 0 +18 0000000000000000 T _ R12 63 R13 0246 +20 00000000F95C1FB4 I _ R14 6 R15 0 +28 FFFF880044E35F50 D _ RBP FFFF880044E35E88 RSP FFFF880044E35E88 +300000000000000000 O _ RF 7006 RIP FFFFFF..