[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210926072048.190336-2-wangkefeng.wang@huawei.com>
Date: Sun, 26 Sep 2021 15:20:40 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: <arnd@...db.de>, <linux-arch@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
<rostedt@...dmis.org>, <mingo@...hat.com>, <davem@...emloft.net>,
<ast@...nel.org>, <ryabinin.a.a@...il.com>,
<akpm@...ux-foundation.org>
CC: <mpe@...erman.id.au>, <benh@...nel.crashing.org>,
<paulus@...ba.org>, <bpf@...r.kernel.org>,
Kefeng Wang <wangkefeng.wang@...wei.com>
Subject: [PATCH v3 1/9] kallsyms: Remove arch specific text and data check
After commit 4ba66a976072 ("arch: remove blackfin port"),
no need arch-specific text/data check.
Cc: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
include/asm-generic/sections.h | 16 ----------------
include/linux/kallsyms.h | 3 +--
kernel/locking/lockdep.c | 3 ---
3 files changed, 1 insertion(+), 21 deletions(-)
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index d16302d3eb59..817309e289db 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -64,22 +64,6 @@ extern __visible const void __nosave_begin, __nosave_end;
#define dereference_kernel_function_descriptor(p) ((void *)(p))
#endif
-/* random extra sections (if any). Override
- * in asm/sections.h */
-#ifndef arch_is_kernel_text
-static inline int arch_is_kernel_text(unsigned long addr)
-{
- return 0;
-}
-#endif
-
-#ifndef arch_is_kernel_data
-static inline int arch_is_kernel_data(unsigned long addr)
-{
- return 0;
-}
-#endif
-
/*
* Check if an address is part of freed initmem. This is needed on architectures
* with virt == phys kernel mapping, for code that wants to check if an address
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index 6851c2313cad..2a241e3f063f 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -34,8 +34,7 @@ static inline int is_kernel_inittext(unsigned long addr)
static inline int is_kernel_text(unsigned long addr)
{
- if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) ||
- arch_is_kernel_text(addr))
+ if ((addr >= (unsigned long)_stext && addr <= (unsigned long)_etext))
return 1;
return in_gate_area_no_mm(addr);
}
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 7096384dc60f..dcdbcee391cd 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -803,9 +803,6 @@ static int static_obj(const void *obj)
if ((addr >= start) && (addr < end))
return 1;
- if (arch_is_kernel_data(addr))
- return 1;
-
/*
* in-kernel percpu var?
*/
--
2.26.2
Powered by blists - more mailing lists