dumpstack.c (fba961ab29e5ffb055592442808bb0f7962e05da) | dumpstack.c (4fe2d8b11a370af286287a2661de9d4e6c9a145a) |
---|---|
1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 */ 5#include <linux/kallsyms.h> 6#include <linux/kprobes.h> 7#include <linux/uaccess.h> 8#include <linux/utsname.h> --- 29 unchanged lines hidden (view full) --- 38 info->type = STACK_TYPE_TASK; 39 info->begin = begin; 40 info->end = end; 41 info->next_sp = NULL; 42 43 return true; 44} 45 | 1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 */ 5#include <linux/kallsyms.h> 6#include <linux/kprobes.h> 7#include <linux/uaccess.h> 8#include <linux/utsname.h> --- 29 unchanged lines hidden (view full) --- 38 info->type = STACK_TYPE_TASK; 39 info->begin = begin; 40 info->end = end; 41 info->next_sp = NULL; 42 43 return true; 44} 45 |
46bool in_sysenter_stack(unsigned long *stack, struct stack_info *info) | 46bool in_entry_stack(unsigned long *stack, struct stack_info *info) |
47{ | 47{ |
48 struct SYSENTER_stack *ss = cpu_SYSENTER_stack(smp_processor_id()); | 48 struct entry_stack *ss = cpu_entry_stack(smp_processor_id()); |
49 50 void *begin = ss; 51 void *end = ss + 1; 52 53 if ((void *)stack < begin || (void *)stack >= end) 54 return false; 55 | 49 50 void *begin = ss; 51 void *end = ss + 1; 52 53 if ((void *)stack < begin || (void *)stack >= end) 54 return false; 55 |
56 info->type = STACK_TYPE_SYSENTER; | 56 info->type = STACK_TYPE_ENTRY; |
57 info->begin = begin; 58 info->end = end; 59 info->next_sp = NULL; 60 61 return true; 62} 63 64static void printk_stack_address(unsigned long address, int reliable, --- 41 unchanged lines hidden (view full) --- 106 /* 107 * Iterate through the stacks, starting with the current stack pointer. 108 * Each stack has a pointer to the next one. 109 * 110 * x86-64 can have several stacks: 111 * - task stack 112 * - interrupt stack 113 * - HW exception stacks (double fault, nmi, debug, mce) | 57 info->begin = begin; 58 info->end = end; 59 info->next_sp = NULL; 60 61 return true; 62} 63 64static void printk_stack_address(unsigned long address, int reliable, --- 41 unchanged lines hidden (view full) --- 106 /* 107 * Iterate through the stacks, starting with the current stack pointer. 108 * Each stack has a pointer to the next one. 109 * 110 * x86-64 can have several stacks: 111 * - task stack 112 * - interrupt stack 113 * - HW exception stacks (double fault, nmi, debug, mce) |
114 * - SYSENTER stack | 114 * - entry stack |
115 * 116 * x86-32 can have up to four stacks: 117 * - task stack 118 * - softirq stack 119 * - hardirq stack | 115 * 116 * x86-32 can have up to four stacks: 117 * - task stack 118 * - softirq stack 119 * - hardirq stack |
120 * - SYSENTER stack | 120 * - entry stack |
121 */ 122 for (regs = NULL; stack; stack = PTR_ALIGN(stack_info.next_sp, sizeof(long))) { 123 const char *stack_name; 124 125 if (get_stack_info(stack, task, &stack_info, &visit_mask)) { 126 /* 127 * We weren't on a valid stack. It's possible that 128 * we overflowed a valid stack into a guard page. --- 233 unchanged lines hidden --- | 121 */ 122 for (regs = NULL; stack; stack = PTR_ALIGN(stack_info.next_sp, sizeof(long))) { 123 const char *stack_name; 124 125 if (get_stack_info(stack, task, &stack_info, &visit_mask)) { 126 /* 127 * We weren't on a valid stack. It's possible that 128 * we overflowed a valid stack into a guard page. --- 233 unchanged lines hidden --- |