linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] arm64: PSR <-> SPSR_ELx mapping fixes
@ 2018-06-25 14:44 Mark Rutland
  2018-06-25 14:44 ` [PATCH 1/7] arm64: add PSR_AA32_* definitions Mark Rutland
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Mark Rutland @ 2018-06-25 14:44 UTC (permalink / raw)
  To: linux-arm-kernel

The SPSR_ELx format has diverged from the AArch32-native SPSR format since the
addition of DIT. Thus, we need to map between the two for certain compat
operations.

Also, when we added support for DIT, we forgot to account for this in
valid_user_regs(), causing PSTATE.DIT to be cleared upon sigreturn.

These patches (based on v4.18-rc2) fix those issues, cleaning up the COMPAT_PSR
definitions to try to avoid confusiong in future.

The COMPAT_PSR_ definitions are now used for the AArch32-native SPR format
(i.e. they are the compat userspace view), with PSR_AA32_ definitions used for
the AArch64 view of the PSR for AArch32 tasks.

Thanks,
Mark.

Mark Rutland (7):
  arm64: add PSR_AA32_* definitions
  arm64: don't zero DIT on signal return
  arm64: compat: map SPSR_ELx<->PSR for signals
  arm64: ptrace: map SPSR_ELx<->PSR for compat tasks
  arm64: use PSR_AA32 definitions
  kvm/arm: use PSR_AA32 definitions
  arm64: remove unused COMPAT_PSR definitions

 arch/arm/include/asm/kvm_emulate.h       | 14 +++---
 arch/arm64/include/asm/kvm_emulate.h     | 10 ++---
 arch/arm64/include/asm/processor.h       |  6 +--
 arch/arm64/include/asm/ptrace.h          | 77 +++++++++++++++++++++-----------
 arch/arm64/kernel/armv8_deprecated.c     | 24 +++++-----
 arch/arm64/kernel/cpufeature.c           |  2 +-
 arch/arm64/kernel/process.c              | 20 ++++-----
 arch/arm64/kernel/ptrace.c               | 34 ++++++++------
 arch/arm64/kernel/signal32.c             | 18 +++++---
 arch/arm64/kvm/guest.c                   | 14 +++---
 arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c |  2 +-
 arch/arm64/kvm/regmap.c                  | 22 ++++-----
 arch/arm64/kvm/reset.c                   |  4 +-
 virt/kvm/arm/aarch32.c                   | 20 ++++-----
 14 files changed, 152 insertions(+), 115 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2018-07-05 12:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 14:44 [PATCH 0/7] arm64: PSR <-> SPSR_ELx mapping fixes Mark Rutland
2018-06-25 14:44 ` [PATCH 1/7] arm64: add PSR_AA32_* definitions Mark Rutland
2018-06-25 14:44 ` [PATCH 2/7] arm64: don't zero DIT on signal return Mark Rutland
2018-06-25 14:44 ` [PATCH 3/7] arm64: compat: map SPSR_ELx<->PSR for signals Mark Rutland
2018-06-25 16:15   ` Suzuki K Poulose
2018-06-25 16:19     ` Mark Rutland
2018-06-25 14:44 ` [PATCH 4/7] arm64: ptrace: map SPSR_ELx<->PSR for compat tasks Mark Rutland
2018-06-25 14:44 ` [PATCH 5/7] arm64: use PSR_AA32 definitions Mark Rutland
2018-06-25 14:44 ` [PATCH 6/7] kvm/arm: " Mark Rutland
2018-07-04 13:12   ` Will Deacon
2018-07-04 13:23     ` Marc Zyngier
2018-07-04 14:01       ` Will Deacon
2018-07-04 15:06   ` Christoffer Dall
2018-06-25 14:44 ` [PATCH 7/7] arm64: remove unused COMPAT_PSR definitions Mark Rutland
2018-07-04 17:33 ` [PATCH 0/7] arm64: PSR <-> SPSR_ELx mapping fixes Will Deacon
2018-07-05 12:08   ` Mark Rutland

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