Re: [PATCH v2 6/7] sections: Add new is_kernel() and is_kernel_text()

2021-07-28 Thread Kefeng Wang
On 2021/7/28 23:32, Steven Rostedt wrote: On Wed, 28 Jul 2021 16:13:19 +0800 Kefeng Wang wrote: @@ -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

Re: [PATCH v2 6/7] sections: Add new is_kernel() and is_kernel_text()

2021-07-28 Thread Steven Rostedt
On Wed, 28 Jul 2021 16:13:19 +0800 Kefeng Wang wrote: > @@ -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

[PATCH v2 6/7] sections: Add new is_kernel() and is_kernel_text()

2021-07-28 Thread Kefeng Wang
The new is_kernel() check the kernel address ranges, and the new is_kernel_text() check the kernel text section ranges. Then use them to make some code clear. Cc: Arnd Bergmann Cc: Andrey Ryabinin Signed-off-by: Kefeng Wang --- include/asm-generic/sections.h | 27 +++