<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/arch/arm/kernel/stacktrace.c, branch v3.16.1</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.1</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.1'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2014-05-30T00:12:32Z</updated>
<entry>
<title>ARM: 8049/1: ftrace/add save_stack_trace_regs() implementation</title>
<updated>2014-05-30T00:12:32Z</updated>
<author>
<name>Lin Yongting</name>
<email>linyongting@gmail.com</email>
</author>
<published>2014-05-04T15:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9c986661638c69772f5479c4715061239ec61b29'/>
<id>urn:sha1:9c986661638c69772f5479c4715061239ec61b29</id>
<content type='text'>
When configure kprobe events of ftrace with "stacktrace" option enabled
in arm, there is no stacktrace was recorded after the kprobe event was
triggered. The root cause is no save_stack_trace_regs() function implemented.

Implement the save_stack_trace_regs() function in arm, then ftrace will
call this architecture-related function to record the stacktrace into
ring buffer.

After this fix, stacktrace can be recorded, for example:

 # mount -t debugfs nodev /sys/kernel/debug
 # echo "p:netrx net_rx_action" &gt;&gt; /sys/kernel/debug/tracing/kprobe_events
 # echo 1 &gt; /sys/kernel/debug/tracing/events/kprobes/netrx/enable
 # echo 1 &gt; /sys/kernel/debug/tracing/options/stacktrace
 # echo 1 &gt; /sys/kernel/debug/tracing/tracing_on
 # ping 127.0.0.1 -c 1
 # echo 0 &gt; /sys/kernel/debug/tracing/tracing_on

 # cat /sys/kernel/debug/tracing/trace
 # tracer: nop
 #
 # entries-in-buffer/entries-written: 12/12   #P:1
 #
 #                              _-----=&gt; irqs-off
 #                             / _----=&gt; need-resched
 #                            | / _---=&gt; hardirq/softirq
 #                            || / _--=&gt; preempt-depth
 #                            ||| /     delay
 #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
 #              | |       |   ||||       |         |
             &lt;------ missing some entries ----------------&gt;
             ping-1200  [000] dNs1   667.603250: netrx: (net_rx_action+0x0/0x1f8)
             ping-1200  [000] dNs1   667.604738: &lt;stack trace&gt;
  =&gt; net_rx_action
  =&gt; do_softirq
  =&gt; local_bh_enable
  =&gt; ip_finish_output
  =&gt; ip_output
  =&gt; ip_local_out
  =&gt; ip_send_skb
  =&gt; ip_push_pending_frames
  =&gt; raw_sendmsg
  =&gt; inet_sendmsg
  =&gt; sock_sendmsg
  =&gt; SyS_sendto
  =&gt; ret_fast_syscall

Signed-off-by: Lin Yongting &lt;linyongting@gmail.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: stacktrace: include exception PC value in stacktrace output</title>
<updated>2014-05-22T15:33:24Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2014-05-03T15:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=07b403415884e961920f55e6db462dff15d9df5a'/>
<id>urn:sha1:07b403415884e961920f55e6db462dff15d9df5a</id>
<content type='text'>
When we unwind through an exception stack, include the saved PC value
into the stack trace: this fills in an otherwise missed functions from
the trace (as indicated below):

 [&lt;c03f4424&gt;] fec_enet_interrupt+0xa0/0xe8
 [&lt;c0066c0c&gt;] handle_irq_event_percpu+0x68/0x228
 [&lt;c0066e18&gt;] handle_irq_event+0x4c/0x6c
 [&lt;c006a024&gt;] handle_fasteoi_irq+0xac/0x198
 [&lt;c00664b0&gt;] generic_handle_irq+0x4c/0x60
 [&lt;c000f014&gt;] handle_IRQ+0x40/0x98
 [&lt;c0008554&gt;] gic_handle_irq+0x30/0x64
 [&lt;c0012900&gt;] __irq_svc+0x40/0x50
 [&lt;c0029030&gt;] __do_softirq+0xe0/0x2fc		&lt;====
 [&lt;c0029500&gt;] irq_exit+0xb0/0x100
 [&lt;c000f018&gt;] handle_IRQ+0x44/0x98
 [&lt;c0008554&gt;] gic_handle_irq+0x30/0x64
 [&lt;c0012900&gt;] __irq_svc+0x40/0x50
 [&lt;c000f34c&gt;] arch_cpu_idle+0x30/0x38		&lt;====
 [&lt;c005e1e4&gt;] cpu_startup_entry+0xac/0x214
 [&lt;c066297c&gt;] rest_init+0x68/0x80
 [&lt;c08ccb10&gt;] start_kernel+0x2fc/0x358

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: stacktrace: avoid listing stacktrace functions in stacktrace</title>
<updated>2014-05-22T15:33:19Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2014-05-03T10:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3683f44c42e991d313dc301504ee0fca1aeb8580'/>
<id>urn:sha1:3683f44c42e991d313dc301504ee0fca1aeb8580</id>
<content type='text'>
While debugging the FEC ethernet driver using stacktrace, it was noticed
that the stacktraces always begin as follows:

 [&lt;c00117b4&gt;] save_stack_trace_tsk+0x0/0x98
 [&lt;c0011870&gt;] save_stack_trace+0x24/0x28
 ...

This is because the stack trace code includes the stack frames for itself.
This is incorrect behaviour, and also leads to "skip" doing the wrong
thing (which is the number of stack frames to avoid recording.)

Perversely, it does the right thing when passed a non-current thread.  Fix
this by ensuring that we have a known constant number of frames above the
main stack trace function, and always skip these.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 7913/1: fix framepointer check in unwind_frame</title>
<updated>2013-12-09T23:24:33Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>k.khlebnikov@samsung.com</email>
</author>
<published>2013-12-05T13:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3abb6671a9c04479c4bd026798a05f857393b7e2'/>
<id>urn:sha1:3abb6671a9c04479c4bd026798a05f857393b7e2</id>
<content type='text'>
This patch fixes corner case when (fp + 4) overflows unsigned long,
for example: fp = 0xFFFFFFFF -&gt; fp + 4 == 3.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Konstantin Khlebnikov &lt;k.khlebnikov@samsung.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>arm: convert core files from module.h to export.h</title>
<updated>2011-10-31T23:30:49Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-07-22T14:58:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ecea4ab6d3d8bb4122522398200f1cd2a06af6d5'/>
<id>urn:sha1:ecea4ab6d3d8bb4122522398200f1cd2a06af6d5</id>
<content type='text'>
Many of the core ARM kernel files are not modules, but just
including module.h for exporting symbols.  Now these files can
use the lighter footprint export.h for this role.

There are probably lots more, but ARM files of mach-* and plat-*
don't get coverage via a simple yesconfig build.  They will have
to be cleaned up and tested via using their respective configs.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>ARM: fix /proc/$PID/stack on SMP</title>
<updated>2011-01-15T09:27:04Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2011-01-15T09:27:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d5996b2ff0e26cf7ed4c103084a2d6fc569e7216'/>
<id>urn:sha1:d5996b2ff0e26cf7ed4c103084a2d6fc569e7216</id>
<content type='text'>
Rabin Vincent reports:
| On SMP, this BUG() in save_stack_trace_tsk() can be easily triggered
| from user space by reading /proc/$PID/stack, where $PID is any pid but
| the current process:
|
|	if (tsk != current) {
| #ifdef CONFIG_SMP
|		/*
|		 * What guarantees do we have here that 'tsk'
|		 * is not running on another CPU?
|		 */
|		BUG();
| #else

Fix this by replacing the BUG() with an entry to terminate the stack
trace, returning an empty trace - I'd rather not expose the dwarf
unwinder to a volatile stack of a running thread.

Reported-by: Rabin Vincent &lt;rabin@rab.in&gt;
Tested-by: Rabin Vincent &lt;rabin@rab.in&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>ARM: 6468/1: backtrace: fix calculation of thread stack base</title>
<updated>2010-11-07T16:12:37Z</updated>
<author>
<name>Will Deacon</name>
<email>will.deacon@arm.com</email>
</author>
<published>2010-11-04T17:22:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d33aadbf8e9ba0b844c2a4a03723969c913ab03a'/>
<id>urn:sha1:d33aadbf8e9ba0b844c2a4a03723969c913ab03a</id>
<content type='text'>
When unwinding stack frames we must take care not to unwind
areas of memory that lie outside of the known extent of the stack.

This patch fixes an incorrect calculation of the stack base where
THREAD_SIZE is added to the stack pointer after it has already
been aligned to this value. Since the ALIGN macro performs this
addition internally, we end up overshooting the base by 8k.

Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[ARM] 5613/1: implement CALLER_ADDRESSx</title>
<updated>2009-07-21T16:21:28Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2009-07-21T08:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4bf1fa5a34aa2dd0d2cc58f0fc213a2e22d007a4'/>
<id>urn:sha1:4bf1fa5a34aa2dd0d2cc58f0fc213a2e22d007a4</id>
<content type='text'>
From: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;

As __builtin_return_address(n) doesn't work for ARM with n &gt; 0, the
kernel needs its own implementation.

This fixes many warnings saying:

	warning: unsupported argument to '__builtin_return_address'

The new methods and walk_stackframe must not be instrumented because
CALLER_ADDRESSx is used in the various tracers and tracing the tracer is
a bad idea.

What's currently missing is an implementation using unwind tables.  This
is not fatal though, it's just that the tracers don't get enough
information to be really useful.

Note that if both ARM_UNWIND and FRAME_POINTER are enabled,
walk_stackframe uses unwind information.  So in this case the same
implementation is used as when FRAME_POINTER is disabled.

Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[ARM] 5382/1: unwind: Reorganise the stacktrace support</title>
<updated>2009-02-12T13:21:17Z</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2009-02-11T12:07:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2d7c11bfc91637e5f9bc5f8c9a82aaffcc0e97aa'/>
<id>urn:sha1:2d7c11bfc91637e5f9bc5f8c9a82aaffcc0e97aa</id>
<content type='text'>
This patch changes the walk_stacktrace and its callers for easier
integration of stack unwinding. The arch/arm/kernel/stacktrace.h file is
also moved to arch/arm/include/asm/stacktrace.h.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'core/stacktrace' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2008-07-15T17:31:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-07-15T17:31:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af5329cdf51cdd208a323e521faa46800a16d2ec'/>
<id>urn:sha1:af5329cdf51cdd208a323e521faa46800a16d2ec</id>
<content type='text'>
* 'core/stacktrace' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  generic-ipi: powerpc/generic-ipi tree build failure
  stacktrace: fix build failure on sparc64
  stacktrace: export save_stack_trace[_tsk]
  stacktrace: fix modular build, export print_stack_trace and save_stack_trace
  backtrace: replace timer with tasklet + completions
  stacktrace: add saved stack traces to backtrace self-test
  stacktrace: print_stack_trace() cleanup
  debugging: make stacktrace independent from DEBUG_KERNEL
  stacktrace: don't crash on invalid stack trace structs
</content>
</entry>
</feed>
