linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Subject: Re: [v6,01/10] powerpc/powernv/idle: Restore IAMR after idle
Date: Mon, 22 Apr 2019 00:19:14 +1000 (AEST)	[thread overview]
Message-ID: <44nBfV60dTz9sNF@ozlabs.org> (raw)
In-Reply-To: <20190418065125.2687-1-mpe@ellerman.id.au>

On Thu, 2019-04-18 at 06:51:16 UTC, Michael Ellerman wrote:
> From: Russell Currey <ruscur@russell.cc>
> 
> Without restoring the IAMR after idle, execution prevention on POWER9
> with Radix MMU is overwritten and the kernel can freely execute
> userspace without faulting.
> 
> This is necessary when returning from any stop state that modifies
> user state, as well as hypervisor state.
> 
> To test how this fails without this patch, load the lkdtm driver and
> do the following:
> 
>   $ echo EXEC_USERSPACE > /sys/kernel/debug/provoke-crash/DIRECT
> 
> which won't fault, then boot the kernel with powersave=off, where it
> will fault. Applying this patch will fix this.
> 
> Fixes: 3b10d0095a1e ("powerpc/mm/radix: Prevent kernel execution of user space")
> Cc: stable@vger.kernel.org # v4.10+
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> Reviewed-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Series applied to powerpc next.

https://git.kernel.org/powerpc/c/a3f3072db6cad40895c585dce65e36aa

cheers

      parent reply	other threads:[~2019-04-21 15:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18  6:51 [PATCH v6 01/10] powerpc/powernv/idle: Restore IAMR after idle Michael Ellerman
2019-04-18  6:51 ` [PATCH v6 02/10] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR " Michael Ellerman
2019-04-18  6:51 ` [PATCH v6 03/10] powerpc: Add framework for Kernel Userspace Protection Michael Ellerman
2019-04-18  6:51 ` [PATCH v6 04/10] powerpc: Add skeleton for Kernel Userspace Execution Prevention Michael Ellerman
2019-04-18  6:51 ` [PATCH v6 05/10] powerpc: Add a framework for Kernel Userspace Access Protection Michael Ellerman
2019-04-18  6:51 ` [PATCH v6 06/10] powerpc/64: Setup KUP on secondary CPUs Michael Ellerman
2019-04-24  6:03   ` Christophe Leroy
2019-04-18  6:51 ` [PATCH v6 07/10] powerpc/mm/radix: Use KUEP API for Radix MMU Michael Ellerman
2019-04-18  6:51 ` [PATCH v6 08/10] powerpc/lib: Refactor __patch_instruction() to use __put_user_asm() Michael Ellerman
2019-04-18  6:51 ` [PATCH v6 09/10] powerpc/64s: Implement KUAP for Radix MMU Michael Ellerman
2020-04-17 10:10   ` Christophe Leroy
2020-04-17 10:39     ` Nicholas Piggin
2020-04-17 12:02       ` Christophe Leroy
2019-04-18  6:51 ` [PATCH v6 10/10] powerpc/mm: Detect bad KUAP faults Michael Ellerman
2019-04-21 14:19 ` Michael Ellerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44nBfV60dTz9sNF@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).