summaryrefslogtreecommitdiff
path: root/kernel/kallsyms.c
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2018-01-22 10:40:32 +0100
committerPetr Mladek <pmladek@suse.com>2018-01-22 10:40:32 +0100
commit3ccdc5190f8df12dfafff9264e406c5496401da5 (patch)
treeca4afea86b2ae2625125658b2e0af2e043e84017 /kernel/kallsyms.c
parent6fd78a1a99c9580da49ee8f951fdce9846256375 (diff)
parent1df7338ac96558d5ae4c1a9dd5d1cb60fcd1bdb2 (diff)
Merge branch 'for-4.16-deprecate-printk-pf' into for-4.16
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r--kernel/kallsyms.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index 531ffa984bc2..0e4c0922908a 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -12,7 +12,6 @@
* compression (see scripts/kallsyms.c for a more complete description)
*/
#include <linux/kallsyms.h>
-#include <linux/module.h>
#include <linux/init.h>
#include <linux/seq_file.h>
#include <linux/fs.h>
@@ -20,15 +19,12 @@
#include <linux/err.h>
#include <linux/proc_fs.h>
#include <linux/sched.h> /* for cond_resched */
-#include <linux/mm.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/filter.h>
#include <linux/ftrace.h>
#include <linux/compiler.h>
-#include <asm/sections.h>
-
/*
* These will be re-linked against their real values
* during the second link stage.
@@ -52,37 +48,6 @@ extern const u16 kallsyms_token_index[] __weak;
extern const unsigned long kallsyms_markers[] __weak;
-static inline int is_kernel_inittext(unsigned long addr)
-{
- if (addr >= (unsigned long)_sinittext
- && addr <= (unsigned long)_einittext)
- return 1;
- return 0;
-}
-
-static inline int is_kernel_text(unsigned long addr)
-{
- if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) ||
- arch_is_kernel_text(addr))
- return 1;
- return in_gate_area_no_mm(addr);
-}
-
-static inline int is_kernel(unsigned long addr)
-{
- if (addr >= (unsigned long)_stext && addr <= (unsigned long)_end)
- return 1;
- return in_gate_area_no_mm(addr);
-}
-
-static int is_ksym_addr(unsigned long addr)
-{
- if (IS_ENABLED(CONFIG_KALLSYMS_ALL))
- return is_kernel(addr);
-
- return is_kernel_text(addr) || is_kernel_inittext(addr);
-}
-
/*
* Expand a compressed symbol data into the resulting uncompressed string,
* if uncompressed string is too long (>= maxlen), it will be truncated,