linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] arm64 live patching
@ 2018-10-01 14:09 Torsten Duwe
  2018-10-01 14:16 ` [PATCH v3 1/4] DYNAMIC_FTRACE configurable with and without REGS Torsten Duwe
                   ` (3 more replies)
  0 siblings, 4 replies; 48+ messages in thread
From: Torsten Duwe @ 2018-10-01 14:09 UTC (permalink / raw)
  To: Will Deacon, Catalin Marinas, Julien Thierry, Steven Rostedt,
	Josh Poimboeuf, Ingo Molnar, Ard Biesheuvel, Arnd Bergmann,
	AKASHI Takahiro
  Cc: linux-arm-kernel, linux-kernel, live-patching

Hi all!

Some substantial changes were requested, so I had to shuffle a few
things around. All the bigger changes are in now.

[Changes from v2]:

* ifeq($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y) instead of ifdef

* "fix" commit 06aeaaeabf69da4. (new patch 1)
  Made DYNAMIC_FTRACE_WITH_REGS a real choice. The current situation
  would be that a linux-4.20 kernel on arm64 should be built with
  gcc >= 8; as in this case, as well as all other archs, the "default y"
  works. Only kernels >= 4.20, arm64, gcc < 8, must change this to "n"
  in order to not be stopped by the Makefile $(error) from patch 2/4.
  You'll then fall back to the DYNAMIC_FTRACE, if selected, like before.

* use some S_X* constants to refer to offsets into pt_regs in assembly.

* have the compiler/assembler generate the mov x9,x30 instruction that
  saves LR at compile time, rather than generate it repeatedly at runtime.

* flip the ftrace_regs_caller stack frame so that it is no longer
  upside down, as Ard remarked. This change broke the graph caller somehow.

* extend handling of the module arch-dependent ftrace trampoline with
  a companion "regs" version.
  
* clear the _TIF_PATCH_PENDING on do_notify_resume()

* took care of arch/arm64/kernel/time.c when changing stack unwinder
  semantics

[TODO]

* use more S_X* constants

* run the full livepatch test suite, especially test apply_relocate_add()
  functionality late after module load.

[Changes from v1]:

* Missing compiler support is now a Makefile error, instead
  of a warning. This will keep the compile log shorter and
  it will thus be easier to spot the problem.

* A separate ftrace_regs_caller. Only that one will write out
  a complete pt_regs, for efficiency.

* Replace the use of X19 with X28 to remember the old PC during
  live patch detection, as only that is saved&restored now for
  non-regs ftrace.

* CONFIG_DYNAMIC_FTRACE_WITH_REGS and CC_USING_PATCHABLE_FUNCTION_ENTRY
  are currently synonymous on arm64, but differentiate better for
  the future when this is no longer the case.

* Clean up "old"/"new" insn value setting vs. #ifdefs.

* #define a INSN_MOV_X9_X30 with suggested aarch64_insn_gen call
  and use that instead of an immediate hex value.

	Torsten

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

end of thread, other threads:[~2018-11-06  9:44 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 14:09 [PATCH v3 0/4] arm64 live patching Torsten Duwe
2018-10-01 14:16 ` [PATCH v3 1/4] DYNAMIC_FTRACE configurable with and without REGS Torsten Duwe
2018-10-01 14:52   ` Ard Biesheuvel
2018-10-01 15:03     ` Torsten Duwe
2018-10-01 15:06       ` Ard Biesheuvel
2018-10-01 15:10         ` Torsten Duwe
2018-10-01 15:14           ` Steven Rostedt
2018-10-01 14:16 ` [PATCH v3 2/4] arm64: implement ftrace with regs Torsten Duwe
2018-10-01 15:57   ` Ard Biesheuvel
2018-10-02 10:02     ` Torsten Duwe
2018-10-02 10:39       ` Ard Biesheuvel
2018-10-02 11:27   ` Mark Rutland
2018-10-02 12:18     ` Torsten Duwe
2018-10-02 12:57       ` Mark Rutland
2018-10-01 14:16 ` [PATCH v3 3/4] arm64: implement live patching Torsten Duwe
2018-10-17 13:39   ` Miroslav Benes
2018-10-18 12:58     ` Jessica Yu
2018-10-19 11:59       ` Miroslav Benes
2018-10-19 12:18         ` Jessica Yu
2018-10-19 15:14           ` Miroslav Benes
2018-10-19 13:46         ` Torsten Duwe
2018-10-19 13:52       ` Ard Biesheuvel
2018-10-19 15:21         ` Miroslav Benes
2018-10-20 14:10           ` Ard Biesheuvel
2018-10-22 12:53             ` Miroslav Benes
2018-10-22 14:54               ` Torsten Duwe
2018-10-23 17:55   ` [PATCH] arm64/module: use mod->klp_info section header information Jessica Yu
2018-10-23 19:32     ` kbuild test robot
2018-10-24 11:57     ` Miroslav Benes
2018-10-25  8:08     ` Petr Mladek
2018-10-25  9:00       ` Miroslav Benes
2018-10-25 11:42         ` Jessica Yu
2018-10-26 17:25     ` [PATCH v2] arm64/module: use mod->klp_info section header information for livepatch modules Jessica Yu
2018-10-29 13:24       ` Miroslav Benes
2018-10-29 13:32         ` Jessica Yu
2018-10-29 15:28       ` Will Deacon
2018-10-30 13:19         ` Jessica Yu
2018-11-01 15:18           ` Miroslav Benes
2018-11-01 16:07           ` Will Deacon
2018-11-05 12:30             ` Ard Biesheuvel
2018-11-05 17:57   ` [PATCH] arm64/module: use plt section indices for relocations Jessica Yu
2018-11-05 18:04     ` Ard Biesheuvel
2018-11-05 18:53     ` [PATCH v2] " Jessica Yu
2018-11-05 18:56       ` Ard Biesheuvel
2018-11-05 19:26       ` Will Deacon
2018-11-05 19:49         ` Jessica Yu
2018-11-06  9:44         ` Miroslav Benes
2018-10-01 14:16 ` [PATCH v3 4/4] arm64: reliable stacktraces Torsten Duwe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).