Thread (10 messages) flat view 10 messages, 4 authors, 2018-10-18

Re: [PATCH 1/5] powerpc/64s: Kernel Hypervisor Restricted Access Prevention

From: Russell Currey <hidden>
Date: 2018-10-18 02:07:21

On Wed, 2018-10-17 at 22:30 +1100, Michael Ellerman wrote:
Russell Currey [off-list ref] writes:
quoted
diff --git a/arch/powerpc/kernel/entry_64.S
b/arch/powerpc/kernel/entry_64.S
index 7b1693adff2a..090f72cbb02d 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -286,6 +286,9 @@ BEGIN_FTR_SECTION
 	HMT_MEDIUM_LOW
 END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 
+	/* headed back to userspace, so unlock the AMR */
+	UNLOCK_AMR(r2)
+
This one needs an ifdef, or preferable an empty version in a header
for
non-book3s 64, otherwise we get:

  arch/powerpc/kernel/entry_64.S: Assembler messages:
  arch/powerpc/kernel/entry_64.S:290: Error: unrecognized opcode:
`unlock_amr(%r2)'
  scripts/Makefile.build:405: recipe for target
'arch/powerpc/kernel/entry_64.o' failed

That's a corenet64-ish defconfig.
Yep, sorry.  I knew it wouldn't build on non-64s but I just wanted to
get the main part out there so people could start looking at it.  Will
fix.

- Russell
cheers
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help