aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/extable.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/extable.c')
-rw-r--r--kernel/extable.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/extable.c b/kernel/extable.c
index d44aac0c3faa..5339705b8241 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -72,9 +72,19 @@ int core_kernel_text(unsigned long addr)
72 return 0; 72 return 0;
73} 73}
74 74
75/**
76 * core_kernel_data - tell if addr points to kernel data
77 * @addr: address to test
78 *
79 * Returns true if @addr passed in is from the core kernel data
80 * section.
81 *
82 * Note: On some archs it may return true for core RODATA, and false
83 * for others. But will always be true for core RW data.
84 */
75int core_kernel_data(unsigned long addr) 85int core_kernel_data(unsigned long addr)
76{ 86{
77 if (addr >= (unsigned long)_stext && 87 if (addr >= (unsigned long)_sdata &&
78 addr < (unsigned long)_edata) 88 addr < (unsigned long)_edata)
79 return 1; 89 return 1;
80 return 0; 90 return 0;