arm64: kprobes: Cleanup jprobe_return
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 21 Jul 2016 08:44:17 +0000 (09:44 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 21 Jul 2016 10:47:52 +0000 (11:47 +0100)
commit3b7d14e9f3f1efd4c4348800e977fd1ce4ca660e
tree60fd0adbd3de143dc45d8fd6f8f2852b6ccd9019
parentab4c1325d4bf111a590a1f773e3d93bde7f40201
arm64: kprobes: Cleanup jprobe_return

jprobe_return seems to have aged badly. Comments referring to
non-existent behaviours, and a dangerous habit of messing
with registers without telling the compiler.

This patches applies the following remedies:
- Fix the comments to describe the actual behaviour
- Tidy up the asm sequence to directly assign the
  stack pointer without clobbering extra registers
- Mark the rest of the function as unreachable() so
  that the compiler knows that there is no need for
  an epilogue
- Stop making jprobe_return_break a global function
  (you really don't want to call that guy, and it isn't
  even a function).

Tested with tcp_probe.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/probes/kprobes.c