Re: [PATCH v3] mm/page_owner: ignore everything below the IRQ entry point

From: Maninder Singh
Date: Mon Apr 16 2018 - 04:07:53 EST


Â
Hi Arnd,


We sent one patch for ignoring entries below IRQ point in page_onwer using stackdepot.

V2:- https://lkml.org/lkml/2018/3/26/178

V3:- https://lkml.org/lkml/2018/3/27/357

But it's breaking build for um target with below reason.


ÂÂÂkernel/stacktrace.o:ÂInÂfunctionÂ`filter_irq_stacks':
>>Âstacktrace.c:(.text+0x20e):ÂundefinedÂreferenceÂtoÂ`__irqentry_text_start'
>>Âstacktrace.c:(.text+0x218):ÂundefinedÂreferenceÂtoÂ`__irqentry_text_end'
>>Âstacktrace.c:(.text+0x222):ÂundefinedÂreferenceÂtoÂ`__softirqentry_text_start'
>>Âstacktrace.c:(.text+0x22c):ÂundefinedÂreferenceÂtoÂ`__softirqentry_text_end'
ÂÂÂcollect2:Âerror:ÂldÂreturnedÂ1ÂexitÂstatus

So can we add below fix for this build break, can you suggest if it is ok or we need to find
some other way:-

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 76b63f5..0f3b7f8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -460,6 +460,10 @@
* to use ".." first.
*/
#define TEXT_TEXT \
+ VMLINUX_SYMBOL(__irqentry_text_start) = .; \
+ VMLINUX_SYMBOL(__irqentry_text_end) = .; \
+ VMLINUX_SYMBOL(__softirqentry_text_start) = .; \
+ VMLINUX_SYMBOL(__softirqentry_text_end) = .; \
ALIGN_FUNCTION(); \
*(.text.hot TEXT_MAIN .text.fixup .text.unlikely) \
*(.text..refcount) \
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h


To make solution generic for all architecture we declared 4 dummy variables which we used in our patch.


Thanks ,
Maninder Singh