1. 22 5月, 2014 2 次提交
    • R
      ARM: stacktrace: include exception PC value in stacktrace output · 07b40341
      Russell King 提交于
      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):
      
       [<c03f4424>] fec_enet_interrupt+0xa0/0xe8
       [<c0066c0c>] handle_irq_event_percpu+0x68/0x228
       [<c0066e18>] handle_irq_event+0x4c/0x6c
       [<c006a024>] handle_fasteoi_irq+0xac/0x198
       [<c00664b0>] generic_handle_irq+0x4c/0x60
       [<c000f014>] handle_IRQ+0x40/0x98
       [<c0008554>] gic_handle_irq+0x30/0x64
       [<c0012900>] __irq_svc+0x40/0x50
       [<c0029030>] __do_softirq+0xe0/0x2fc		<====
       [<c0029500>] irq_exit+0xb0/0x100
       [<c000f018>] handle_IRQ+0x44/0x98
       [<c0008554>] gic_handle_irq+0x30/0x64
       [<c0012900>] __irq_svc+0x40/0x50
       [<c000f34c>] arch_cpu_idle+0x30/0x38		<====
       [<c005e1e4>] cpu_startup_entry+0xac/0x214
       [<c066297c>] rest_init+0x68/0x80
       [<c08ccb10>] start_kernel+0x2fc/0x358
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      07b40341
    • R
      ARM: stacktrace: avoid listing stacktrace functions in stacktrace · 3683f44c
      Russell King 提交于
      While debugging the FEC ethernet driver using stacktrace, it was noticed
      that the stacktraces always begin as follows:
      
       [<c00117b4>] save_stack_trace_tsk+0x0/0x98
       [<c0011870>] 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: <stable@vger.kernel.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      3683f44c
  2. 10 12月, 2013 1 次提交
  3. 01 11月, 2011 1 次提交
    • P
      arm: convert core files from module.h to export.h · ecea4ab6
      Paul Gortmaker 提交于
      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: NPaul Gortmaker <paul.gortmaker@windriver.com>
      ecea4ab6
  4. 15 1月, 2011 1 次提交
    • R
      ARM: fix /proc/$PID/stack on SMP · d5996b2f
      Russell King 提交于
      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: NRabin Vincent <rabin@rab.in>
      Tested-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d5996b2f
  5. 08 11月, 2010 1 次提交
  6. 22 7月, 2009 1 次提交
    • U
      [ARM] 5613/1: implement CALLER_ADDRESSx · 4bf1fa5a
      Uwe Kleine-König 提交于
      From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      
      As __builtin_return_address(n) doesn't work for ARM with n > 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 <catalin.marinas@arm.com>
      Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4bf1fa5a
  7. 12 2月, 2009 1 次提交
  8. 03 7月, 2008 1 次提交
  9. 23 6月, 2008 1 次提交
  10. 30 5月, 2007 1 次提交
  11. 16 5月, 2007 1 次提交
  12. 12 5月, 2007 1 次提交
    • A
      [ARM] stacktrace fix · fac07790
      Andrew Morton 提交于
      ab1b6f03 said
      
       - remove the unused task argument to save_stack_trace, it's always current
      
      then broke arm:
      
      arch/arm/kernel/stacktrace.c:56: error: conflicting types for 'save_stack_trace'
      include/linux/stacktrace.h:11: error: previous declaration of 'save_stack_trace' was here
      arch/arm/kernel/stacktrace.c:56: error: conflicting types for 'save_stack_trace'
      include/linux/stacktrace.h:11: error: previous declaration of 'save_stack_trace' was here
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fac07790
  13. 28 4月, 2007 1 次提交