All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN
@ 2021-03-10 15:26 ` Marc Zyngier
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2021-03-10 15:26 UTC (permalink / raw)
  To: kvm, kvmarm, linux-arm-kernel
  Cc: James Morse, Julien Thierry, Suzuki K Poulose, Mark Rutland,
	Will Deacon, qperret, kernel-team

Since we use distinct permissions when mapping things at EL2 depending
on whether they are text or data, we are already using a W^X setup
with nVHE.

This trivial series aims to enforce it by setting SCTLR_EL2.WXN at all
times. It just cleans up a couple of code paths so that
SCTLR_ELx_FLAGS is only used by the KVM setup code, and finally sets
the WXN flag permanently.

Lightly tested on an A53 system with 4KB and 64KB pages.

Thanks,

	M.

Marc Zyngier (4):
  arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
  KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM
    teardown
  KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGS
  KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

 arch/arm64/include/asm/sysreg.h    | 5 +++--
 arch/arm64/kernel/cpu-reset.S      | 5 +----
 arch/arm64/kvm/hyp/nvhe/hyp-init.S | 6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.29.2


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

* [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN
@ 2021-03-10 15:26 ` Marc Zyngier
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2021-03-10 15:26 UTC (permalink / raw)
  To: kvm, kvmarm, linux-arm-kernel; +Cc: kernel-team, Will Deacon

Since we use distinct permissions when mapping things at EL2 depending
on whether they are text or data, we are already using a W^X setup
with nVHE.

This trivial series aims to enforce it by setting SCTLR_EL2.WXN at all
times. It just cleans up a couple of code paths so that
SCTLR_ELx_FLAGS is only used by the KVM setup code, and finally sets
the WXN flag permanently.

Lightly tested on an A53 system with 4KB and 64KB pages.

Thanks,

	M.

Marc Zyngier (4):
  arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
  KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM
    teardown
  KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGS
  KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

 arch/arm64/include/asm/sysreg.h    | 5 +++--
 arch/arm64/kernel/cpu-reset.S      | 5 +----
 arch/arm64/kvm/hyp/nvhe/hyp-init.S | 6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.29.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN
@ 2021-03-10 15:26 ` Marc Zyngier
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2021-03-10 15:26 UTC (permalink / raw)
  To: kvm, kvmarm, linux-arm-kernel
  Cc: James Morse, Julien Thierry, Suzuki K Poulose, Mark Rutland,
	Will Deacon, qperret, kernel-team

Since we use distinct permissions when mapping things at EL2 depending
on whether they are text or data, we are already using a W^X setup
with nVHE.

This trivial series aims to enforce it by setting SCTLR_EL2.WXN at all
times. It just cleans up a couple of code paths so that
SCTLR_ELx_FLAGS is only used by the KVM setup code, and finally sets
the WXN flag permanently.

Lightly tested on an A53 system with 4KB and 64KB pages.

Thanks,

	M.

Marc Zyngier (4):
  arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
  KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM
    teardown
  KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGS
  KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

 arch/arm64/include/asm/sysreg.h    | 5 +++--
 arch/arm64/kernel/cpu-reset.S      | 5 +----
 arch/arm64/kvm/hyp/nvhe/hyp-init.S | 6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.29.2


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

* [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN
@ 2021-03-10 15:26 ` Marc Zyngier
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2021-03-10 15:26 UTC (permalink / raw)
  To: kvm, kvmarm, linux-arm-kernel
  Cc: James Morse, Julien Thierry, Suzuki K Poulose, Mark Rutland,
	Will Deacon, qperret, kernel-team

Since we use distinct permissions when mapping things at EL2 depending
on whether they are text or data, we are already using a W^X setup
with nVHE.

This trivial series aims to enforce it by setting SCTLR_EL2.WXN at all
times. It just cleans up a couple of code paths so that
SCTLR_ELx_FLAGS is only used by the KVM setup code, and finally sets
the WXN flag permanently.

Lightly tested on an A53 system with 4KB and 64KB pages.

Thanks,

	M.

Marc Zyngier (4):
  arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
  KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM
    teardown
  KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGS
  KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

 arch/arm64/include/asm/sysreg.h    | 5 +++--
 arch/arm64/kernel/cpu-reset.S      | 5 +----
 arch/arm64/kvm/hyp/nvhe/hyp-init.S | 6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.29.2


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

* [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN
@ 2021-03-10 15:26 ` Marc Zyngier
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2021-03-10 15:26 UTC (permalink / raw)
  To: kvm, kvmarm, linux-arm-kernel; +Cc: kernel-team, Will Deacon

Since we use distinct permissions when mapping things at EL2 depending
on whether they are text or data, we are already using a W^X setup
with nVHE.

This trivial series aims to enforce it by setting SCTLR_EL2.WXN at all
times. It just cleans up a couple of code paths so that
SCTLR_ELx_FLAGS is only used by the KVM setup code, and finally sets
the WXN flag permanently.

Lightly tested on an A53 system with 4KB and 64KB pages.

Thanks,

	M.

Marc Zyngier (4):
  arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
  KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM
    teardown
  KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGS
  KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

 arch/arm64/include/asm/sysreg.h    | 5 +++--
 arch/arm64/kernel/cpu-reset.S      | 5 +----
 arch/arm64/kvm/hyp/nvhe/hyp-init.S | 6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.29.2

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN
@ 2021-03-10 15:26 ` Marc Zyngier
  0 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2021-03-10 15:26 UTC (permalink / raw)
  To: kvm, kvmarm, linux-arm-kernel
  Cc: James Morse, Julien Thierry, Suzuki K Poulose, Mark Rutland,
	Will Deacon, qperret, kernel-team

Since we use distinct permissions when mapping things at EL2 depending
on whether they are text or data, we are already using a W^X setup
with nVHE.

This trivial series aims to enforce it by setting SCTLR_EL2.WXN at all
times. It just cleans up a couple of code paths so that
SCTLR_ELx_FLAGS is only used by the KVM setup code, and finally sets
the WXN flag permanently.

Lightly tested on an A53 system with 4KB and 64KB pages.

Thanks,

	M.

Marc Zyngier (4):
  arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart
  KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM
    teardown
  KVM: arm64: Rename SCTLR_ELx_FLAGS to SCTLR_EL2_FLAGS
  KVM: arm64: Force SCTLR_EL2.WXN when running nVHE

 arch/arm64/include/asm/sysreg.h    | 5 +++--
 arch/arm64/kernel/cpu-reset.S      | 5 +----
 arch/arm64/kvm/hyp/nvhe/hyp-init.S | 6 ++----
 3 files changed, 6 insertions(+), 10 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2021-03-10 15:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 15:26 [PATCH 0/4] KVM: arm64: Running the EL2 nVHE code with WXN Marc Zyngier
2021-03-10 15:26 ` Marc Zyngier
2021-03-10 15:26 ` Marc Zyngier
2021-03-10 15:26 Marc Zyngier
2021-03-10 15:26 ` Marc Zyngier
2021-03-10 15:26 ` Marc Zyngier

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.