1. 29 10月, 2015 1 次提交
    • W
      Revert "ARM64: unwind: Fix PC calculation" · 9702970c
      Will Deacon 提交于
      This reverts commit e306dfd0.
      
      With this patch applied, we were the only architecture making this sort
      of adjustment to the PC calculation in the unwinder. This causes
      problems for ftrace, where the PC values are matched against the
      contents of the stack frames in the callchain and fail to match any
      records after the address adjustment.
      
      Whilst there has been some effort to change ftrace to workaround this,
      those patches are not yet ready for mainline and, since we're the odd
      architecture in this regard, let's just step in line with other
      architectures (like arch/arm/) for now.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      9702970c
  2. 08 9月, 2014 1 次提交
  3. 29 5月, 2014 1 次提交
  4. 17 2月, 2014 1 次提交
    • O
      ARM64: unwind: Fix PC calculation · e306dfd0
      Olof Johansson 提交于
      The frame PC value in the unwind code used to just take the saved LR
      value and use that.  That's incorrect as a stack trace, since it shows
      the return path stack, not the call path stack.
      
      In particular, it shows faulty information in case the bl is done as
      the very last instruction of one label, since the return point will be
      in the next label. That can easily be seen with tail calls to panic(),
      which is marked __noreturn and thus doesn't have anything useful after it.
      
      Easiest here is to just correct the unwind code and do a -4, to get the
      actual call site for the backtrace instead of the return site.
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      Cc: stable@vger.kernel.org
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      e306dfd0
  5. 20 12月, 2013 1 次提交
  6. 17 9月, 2012 1 次提交
  7. 17 3月, 2011 1 次提交
  8. 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
  9. 08 11月, 2010 1 次提交
  10. 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
  11. 12 2月, 2009 1 次提交
  12. 03 7月, 2008 1 次提交
  13. 23 6月, 2008 1 次提交
  14. 30 5月, 2007 1 次提交
  15. 16 5月, 2007 1 次提交
  16. 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
  17. 28 4月, 2007 1 次提交