dumpstack_32.c (cb76c93982404273d746f3ccd5085b47689099a8) | dumpstack_32.c (5fe599e02e41550c59831613a11c8ae057897c29) |
---|---|
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/hardirq.h> --- 21 unchanged lines hidden (view full) --- 30 } 31} 32 33static bool in_hardirq_stack(unsigned long *stack, struct stack_info *info) 34{ 35 unsigned long *begin = (unsigned long *)this_cpu_read(hardirq_stack); 36 unsigned long *end = begin + (THREAD_SIZE / sizeof(long)); 37 | 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/hardirq.h> --- 21 unchanged lines hidden (view full) --- 30 } 31} 32 33static bool in_hardirq_stack(unsigned long *stack, struct stack_info *info) 34{ 35 unsigned long *begin = (unsigned long *)this_cpu_read(hardirq_stack); 36 unsigned long *end = begin + (THREAD_SIZE / sizeof(long)); 37 |
38 if (stack < begin || stack >= end) | 38 /* 39 * This is a software stack, so 'end' can be a valid stack pointer. 40 * It just means the stack is empty. 41 */ 42 if (stack < begin || stack > end) |
39 return false; 40 41 info->type = STACK_TYPE_IRQ; 42 info->begin = begin; 43 info->end = end; 44 45 /* 46 * See irq_32.c -- the next stack pointer is stored at the beginning of --- 4 unchanged lines hidden (view full) --- 51 return true; 52} 53 54static bool in_softirq_stack(unsigned long *stack, struct stack_info *info) 55{ 56 unsigned long *begin = (unsigned long *)this_cpu_read(softirq_stack); 57 unsigned long *end = begin + (THREAD_SIZE / sizeof(long)); 58 | 43 return false; 44 45 info->type = STACK_TYPE_IRQ; 46 info->begin = begin; 47 info->end = end; 48 49 /* 50 * See irq_32.c -- the next stack pointer is stored at the beginning of --- 4 unchanged lines hidden (view full) --- 55 return true; 56} 57 58static bool in_softirq_stack(unsigned long *stack, struct stack_info *info) 59{ 60 unsigned long *begin = (unsigned long *)this_cpu_read(softirq_stack); 61 unsigned long *end = begin + (THREAD_SIZE / sizeof(long)); 62 |
59 if (stack < begin || stack >= end) | 63 /* 64 * This is a software stack, so 'end' can be a valid stack pointer. 65 * It just means the stack is empty. 66 */ 67 if (stack < begin || stack > end) |
60 return false; 61 62 info->type = STACK_TYPE_SOFTIRQ; 63 info->begin = begin; 64 info->end = end; 65 66 /* 67 * The next stack pointer is stored at the beginning of the stack. --- 147 unchanged lines hidden --- | 68 return false; 69 70 info->type = STACK_TYPE_SOFTIRQ; 71 info->begin = begin; 72 info->end = end; 73 74 /* 75 * The next stack pointer is stored at the beginning of the stack. --- 147 unchanged lines hidden --- |