linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] arm64: Convert entry.S synchronous exception handling to C
@ 2019-10-03 17:16 James Morse
  2019-10-03 17:16 ` [PATCH 1/8] arm64: Fix incorrect irqflag restore for priority masking for compat James Morse
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: James Morse @ 2019-10-03 17:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Catalin Marinas, James Morse, Masami Hiramatsu,
	Will Deacon, Julien Thierry

Hi folks,

This series is based on Mark Rutland's 'deasm' series here[0]. This is
just the parts that related to Synchronous Exceptions.

To handle v8.2 RAS errors directly in the kernel, we need to read from
some CPU system registers immediately after taking a synchronous external
abort.
Just to be awkward, the entry assembly calls 'inherit_daif', so if we
took an external abort from a pre-emptible context, we become pre-emptible
again before calling C code. If we moved to another CPU, we can't read the
the system registers.

Ideally, for an external abort, the entry code would increase the
preempt count. Doing this in assembly isn't going to improve entry.S
readability.


Bite the bullet, and move the synchronous exception paths into C.


This series can be retrieved from:
git://linux-arm.org/linux-jm.git deasm_sync_only/v1

(which has been force-pushed since the end of the merge-window...)

Patch one has already been posted as a fix here:
https://lore.kernel.org/linux-arm-kernel/20191003170127.127278-1-james.morse@arm.com/


Bugs welcome.


Thanks,

James


[0] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/entry-deasm
[1] https://lore.kernel.org/linux-acpi/1562086280-5351-1-git-send-email-baicar@os.amperecomputing.com/


James Morse (5):
  arm64: Fix incorrect irqflag restore for priority masking for compat
  arm64: remove __exception annotations
  arm64: Add prototypes for functions called by entry.S
  arm64: Remove asmlinkage from updated functions
  arm64: entry-common: don't touch daif before bp-hardening

Mark Rutland (3):
  arm64: add local_daif_inherit()
  arm64: entry: convert el1_sync to C
  arm64: entry: convert el0_sync to C

 arch/arm64/include/asm/asm-uaccess.h |  10 -
 arch/arm64/include/asm/daifflags.h   |  16 ++
 arch/arm64/include/asm/exception.h   |  22 +-
 arch/arm64/include/asm/processor.h   |   7 +
 arch/arm64/include/asm/traps.h       |  10 -
 arch/arm64/kernel/Makefile           |   6 +-
 arch/arm64/kernel/entry-common.c     | 331 +++++++++++++++++++++++++++
 arch/arm64/kernel/entry.S            | 274 +---------------------
 arch/arm64/kernel/fpsimd.c           |   6 +-
 arch/arm64/kernel/probes/kprobes.c   |   4 -
 arch/arm64/kernel/syscall.c          |   4 +-
 arch/arm64/kernel/traps.c            |  12 +-
 arch/arm64/kernel/vmlinux.lds.S      |   3 -
 arch/arm64/mm/fault.c                |  55 ++---
 14 files changed, 409 insertions(+), 351 deletions(-)
 create mode 100644 arch/arm64/kernel/entry-common.c

-- 
2.20.1


_______________________________________________
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] 23+ messages in thread

end of thread, other threads:[~2019-10-04 16:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03 17:16 [PATCH 0/8] arm64: Convert entry.S synchronous exception handling to C James Morse
2019-10-03 17:16 ` [PATCH 1/8] arm64: Fix incorrect irqflag restore for priority masking for compat James Morse
2019-10-03 17:16 ` [PATCH 2/8] arm64: remove __exception annotations James Morse
2019-10-04 10:17   ` Mark Rutland
2019-10-04 14:10     ` Masami Hiramatsu
2019-10-04 16:08       ` James Morse
2019-10-04 16:34         ` Mark Rutland
2019-10-04 13:03   ` Marc Gonzalez
2019-10-04 16:08     ` James Morse
2019-10-03 17:16 ` [PATCH 3/8] arm64: Add prototypes for functions called by entry.S James Morse
2019-10-04 10:22   ` Mark Rutland
2019-10-03 17:16 ` [PATCH 4/8] arm64: add local_daif_inherit() James Morse
2019-10-03 17:16 ` [PATCH 5/8] arm64: entry: convert el1_sync to C James Morse
2019-10-04 10:39   ` Mark Rutland
2019-10-03 17:16 ` [PATCH 6/8] arm64: entry: convert el0_sync " James Morse
2019-10-04 12:57   ` Mark Rutland
2019-10-04 16:09     ` James Morse
2019-10-04 16:37       ` Mark Rutland
2019-10-03 17:16 ` [PATCH 7/8] arm64: Remove asmlinkage from updated functions James Morse
2019-10-04 12:58   ` Mark Rutland
2019-10-03 17:16 ` [PATCH 8/8] arm64: entry-common: don't touch daif before bp-hardening James Morse
2019-10-04 13:31   ` Mark Rutland
2019-10-04 16:09     ` James Morse

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).