All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17] arm64: entry deasmification and cleanup
@ 2020-01-08 18:56 Mark Rutland
  2020-01-08 18:56 ` [PATCH 01/17] arm64: entry: mark all entry code as notrace Mark Rutland
                   ` (16 more replies)
  0 siblings, 17 replies; 41+ messages in thread
From: Mark Rutland @ 2020-01-08 18:56 UTC (permalink / raw)
  To: linux-arm-kernel, catalin.marinas, will, james.morse
  Cc: mark.rutland, keescook, maz, broonie, labbott, robin.murphy,
	julien.thierry.kdev, alex.popov

This series aims to make the arm64 exception handling code easier to
maintain and update, primarily by converting from assembly to C wherever
reasonably possible. This allows us to remove infrastructure we had to
duplicate for C and assembly, and leaves less assembly behind that may
require special treatment (e.g. for BTI).

Previous patches converted syscall management to C, along with the rest
of the synchronous exception vectors. This series converts the remaining
IRQ and error paths, before factoring out the common EL0 exception
entry/return work. Some parts of the existing assembly were somewhat
arcane, and for these I've added more extensive comments than were
present in the assembly.

After converting the bulk of the logic to C, it was clear that a few
structural inconsistencies had crept in over the years, so I've tried to
clean those up and make the remaining assembly simpler and clearer.

There are a couple more things which could be factored out, notably the
SW PAN logic and the GIC prio masking entry/exit work. I've left those
as-is for now.

The series has seen some basic testing, and is I'm currently fuzzing it
with a local Syzkaller instance.

I've pushed the patches to my arm64/entry-deasm branch [1,2], based on
v5.5-rc3.

Thanks,
Mark.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/entry-deasm
[2] git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/entry-deasm

Mark Rutland (17):
  arm64: entry: mark all entry code as notrace
  arm64: entry: cleanup el0 svc handler naming
  arm64: entry: move arm64_preempt_schedule_irq to entry-common.c
  arm64: entry: move preempt logic to C
  arm64: entry: add a call_on_stack helper
  arm64: entry: convert irq entry to C
  arm64: entry: convert error entry to C
  arm64: entry: Split el0_sync_compat from el0_sync
  arm64: entry: organise handler stubs consistently
  arm64: entry: consolidate EL1 return paths
  stackleak: allow C to call stackleak_erase()
  arm64: debug-monitors: refactor MDSCR manipulation
  arm64: entry: move common el0 entry/return work to C
  arm64: entry: move NO_SYSCALL setup to C
  arm64: entry: move ARM64_ERRATUM_845719 workaround to C
  arm64: entry: move ARM64_ERRATUM_1418040 workaround to C
  arm64: entry: cleanup sp_el0 manipulation

 arch/arm64/include/asm/assembler.h      |  18 --
 arch/arm64/include/asm/debug-monitors.h |  10 +
 arch/arm64/include/asm/exception.h      |   8 +-
 arch/arm64/kernel/asm-offsets.c         |   1 -
 arch/arm64/kernel/debug-monitors.c      |  32 +--
 arch/arm64/kernel/entry-common.c        | 245 ++++++++++++++++++++++-
 arch/arm64/kernel/entry.S               | 333 +++++++-------------------------
 arch/arm64/kernel/irq.c                 |  15 --
 arch/arm64/kernel/process.c             |  17 --
 arch/arm64/kernel/signal.c              |   3 +-
 arch/arm64/kernel/syscall.c             |   4 +-
 arch/arm64/kernel/traps.c               |   2 +-
 arch/arm64/mm/fault.c                   |   7 -
 include/linux/stackleak.h               |   3 +
 14 files changed, 338 insertions(+), 360 deletions(-)

-- 
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-01-27 23:00 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 18:56 [PATCH 00/17] arm64: entry deasmification and cleanup Mark Rutland
2020-01-08 18:56 ` [PATCH 01/17] arm64: entry: mark all entry code as notrace Mark Rutland
2020-01-09  5:21   ` Anshuman Khandual
2020-01-13 15:44     ` Mark Rutland
2020-01-08 18:56 ` [PATCH 02/17] arm64: entry: cleanup el0 svc handler naming Mark Rutland
2020-01-09  5:33   ` Anshuman Khandual
2020-01-08 18:56 ` [PATCH 03/17] arm64: entry: move arm64_preempt_schedule_irq to entry-common.c Mark Rutland
2020-01-09  5:36   ` Anshuman Khandual
2020-01-08 18:56 ` [PATCH 04/17] arm64: entry: move preempt logic to C Mark Rutland
2020-01-09  6:43   ` Anshuman Khandual
2020-01-09 12:22     ` Mark Rutland
2020-01-08 18:56 ` [PATCH 05/17] arm64: entry: add a call_on_stack helper Mark Rutland
2020-01-09  8:00   ` Anshuman Khandual
2020-01-14 18:24     ` Mark Rutland
2020-01-09 14:30   ` Laura Abbott
2020-01-09 14:46     ` Mark Rutland
2020-01-08 18:56 ` [PATCH 06/17] arm64: entry: convert irq entry to C Mark Rutland
2020-01-08 18:56 ` [PATCH 07/17] arm64: entry: convert error " Mark Rutland
2020-01-09  9:12   ` Anshuman Khandual
2020-01-09 12:49     ` Mark Rutland
2020-01-08 18:56 ` [PATCH 08/17] arm64: entry: Split el0_sync_compat from el0_sync Mark Rutland
2020-01-09  9:50   ` Anshuman Khandual
2020-01-08 18:56 ` [PATCH 09/17] arm64: entry: organise handler stubs consistently Mark Rutland
2020-01-09 10:01   ` Anshuman Khandual
2020-01-08 18:56 ` [PATCH 10/17] arm64: entry: consolidate EL1 return paths Mark Rutland
2020-01-10  3:39   ` Anshuman Khandual
2020-01-10 16:02     ` Mark Rutland
2020-01-08 18:56 ` [PATCH 11/17] stackleak: allow C to call stackleak_erase() Mark Rutland
2020-01-10  3:45   ` Anshuman Khandual
2020-01-10 16:07     ` Mark Rutland
2020-01-27 23:00   ` Kees Cook
2020-01-08 18:56 ` [PATCH 12/17] arm64: debug-monitors: refactor MDSCR manipulation Mark Rutland
2020-01-10  4:35   ` Anshuman Khandual
2020-01-10 16:09     ` Mark Rutland
2020-01-08 18:56 ` [PATCH 13/17] arm64: entry: move common el0 entry/return work to C Mark Rutland
2020-01-09 15:19   ` Mark Rutland
2020-01-08 18:56 ` [PATCH 14/17] arm64: entry: move NO_SYSCALL setup " Mark Rutland
2020-01-10  5:37   ` Anshuman Khandual
2020-01-08 18:56 ` [PATCH 15/17] arm64: entry: move ARM64_ERRATUM_845719 workaround " Mark Rutland
2020-01-08 18:56 ` [PATCH 16/17] arm64: entry: move ARM64_ERRATUM_1418040 " Mark Rutland
2020-01-08 18:56 ` [PATCH 17/17] arm64: entry: cleanup sp_el0 manipulation Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.