mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/6] MIPS: Further microMIPS stack unwinding fixes
@ 2017-08-08 12:22 Matt Redfearn
  2017-08-08 12:22 ` [PATCH v3 1/6] MIPS: Handle non word sized instructions when examining frame Matt Redfearn
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Matt Redfearn @ 2017-08-08 12:22 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: linux-mips, Matt Redfearn, Marcin Nowakowski, Miodrag Dinic,
	linux-kernel, James Hogan, David Daney, Ingo Molnar, Paul Burton

Commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned access support.")
added support for unwinding the stack on microMIPS, which has a mix of
16 and 32bit sized instructions. Unfortunately a lot of the code
introduced had bugs which prevented it working correctly in all cases.
This series aims to address those issues. The series also provides
additional fixup to some changes made in v4.11, which also aimed to
address errors in commit 34c2f668d0f6 ("MIPS: microMIPS: Add unaligned
access support.").

These patches have been tested on qemu M14Kc micromips and tested for
regression on ci40, Boston, Octeon III & malta.

For ease of backport, I have opted to just fix the issues with the
existing code to start off with, despite the violations of the code
style in the areas being fixed. The final patch in the series refactors
the is_sp_move_ins function so that it compiles with the coding
standard.

This series is based on v4.13-rc4.


Changes in v3:
- Remove hack which attempted to cope with 16bit instructions
- New patch to fix detection of addiusp instruction
- Deal with special behaviour of addiusp immediates 0x0,0x1,0x1fe & 0x1ff
- New patch to fix big endian systems

Changes in v2:
- Keep locals in reverse christmas tree order
- Replace conditional with xor and subtract
- Refactor is_sp_move_ins to interpret immediate inline.

Matt Redfearn (6):
  MIPS: Handle non word sized instructions when examining frame
  MIPS: microMIPS: Fix detection of addiusp instruction
  MIPS: microMIPS: Fix decoding of addiusp instruction
  MIPS: microMIPS: Fix decoding of swsp16 instruction
  MIPS: Stacktrace: Fix  microMIPS stack unwinding on big endian systems
  MIPS: Refactor handling of stack pointer in get_frame_info

 arch/mips/include/uapi/asm/inst.h |  2 +-
 arch/mips/kernel/process.c        | 80 ++++++++++++++++++++-------------------
 2 files changed, 43 insertions(+), 39 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-08 12:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 12:22 [PATCH v3 0/6] MIPS: Further microMIPS stack unwinding fixes Matt Redfearn
2017-08-08 12:22 ` [PATCH v3 1/6] MIPS: Handle non word sized instructions when examining frame Matt Redfearn
2017-08-08 12:22 ` [PATCH v3 2/6] MIPS: microMIPS: Fix detection of addiusp instruction Matt Redfearn
2017-08-08 12:22 ` [PATCH v3 3/6] MIPS: microMIPS: Fix decoding " Matt Redfearn
2017-08-08 12:22 ` [PATCH v3 4/6] MIPS: microMIPS: Fix decoding of swsp16 instruction Matt Redfearn
2017-08-08 12:22 ` [PATCH v3 5/6] MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems Matt Redfearn
2017-08-08 12:22 ` [PATCH v3 6/6] MIPS: Refactor handling of stack pointer in get_frame_info Matt Redfearn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®