]> Git Repo - linux.git/commitdiff
extable: use is_kernel_text() helper
authorKefeng Wang <[email protected]>
Tue, 9 Nov 2021 02:34:09 +0000 (18:34 -0800)
committerLinus Torvalds <[email protected]>
Tue, 9 Nov 2021 18:02:51 +0000 (10:02 -0800)
The core_kernel_text() should check the gate area, as it is part of kernel
text range, use is_kernel_text() in core_kernel_text().

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kefeng Wang <[email protected]>
Reviewed-by: Sergey Senozhatsky <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Andrey Konovalov <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Ivan Kokshaysky <[email protected]>
Cc: Matt Turner <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Richard Henderson <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/extable.c

index 6505207aa7e6a082fa35d1ad60c42dd2825a776e..b6f330f0fe7496ad34d21fda39e494edb381d262 100644 (file)
@@ -64,8 +64,7 @@ const struct exception_table_entry *search_exception_tables(unsigned long addr)
 
 int notrace core_kernel_text(unsigned long addr)
 {
-       if (addr >= (unsigned long)_stext &&
-           addr < (unsigned long)_etext)
+       if (is_kernel_text(addr))
                return 1;
 
        if (system_state < SYSTEM_FREEING_INITMEM &&
This page took 0.04218 seconds and 4 git commands to generate.