linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ram Pai <linuxram@us.ibm.com>
To: mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org, hbabu@us.ibm.com,
	mhocko@kernel.org, bauerman@linux.vnet.ibm.com,
	linuxram@us.ibm.com, Ulrich.Weigand@de.ibm.com,
	fweimer@redhat.com, msuchanek@suse.de
Subject: [PATCH v3 0/9] powerpc/pkeys: fixes to pkeys
Date: Tue, 17 Jul 2018 06:51:01 -0700	[thread overview]
Message-ID: <1531835470-32691-1-git-send-email-linuxram@us.ibm.com> (raw)

Assortment of fixes to pkey to match its behavior to that on x86.

Patch 1  makes pkey consumable in multithreaded applications.

Patch 2  Deny, by default, permissions on all unallocated keys.

Patch 3  pkey allocation/free must not change pkey registers.

Patch 4  fixes fork to inherit the key attributes.

Patch 5  A off-by-one bug made one key unusable. Fixes it.

Patch 6  Makes pkey-0 less special.

Patch 7 fix to core-pkeys selftest to capture the modified behavior

Patch 8 fix to ptrace-pkeys selftest to capture the modified behavior

The above patch series is successfully verified using pkey selftests,
on both powerpc and x86.

Ram Pai (9):
  powerpc/pkeys: Give all threads control of their key permissions
  powerpc/pkeys: Deny read/write/execute by default
  powerpc/pkeys: key allocation/deallocation must not change pkey
    registers
  powerpc/pkeys: Save the pkey registers before fork
  powerpc/pkeys: fix calculation of total pkeys.
  powerpc/pkeys: Preallocate execute-only key
  powerpc/pkeys: make protection key 0 less special
  powerpc/core-pkeys: execute-permission on keys are disabled by
    default
  powerpc/ptrace-pkeys: execute-permission on keys are disabled by
    default

 arch/powerpc/include/asm/pkeys.h                   |   40 +++---
 arch/powerpc/kernel/process.c                      |    1 +
 arch/powerpc/mm/pkeys.c                            |  141 +++++++-------------
 tools/testing/selftests/powerpc/ptrace/core-pkey.c |    4 +
 .../testing/selftests/powerpc/ptrace/ptrace-pkey.c |    5 +
 5 files changed, 79 insertions(+), 112 deletions(-)

             reply	other threads:[~2018-07-17 13:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17 13:51 Ram Pai [this message]
2018-07-17 13:51 ` [PATCH v3 1/9] powerpc/pkeys: Give all threads control of their key permissions Ram Pai
2018-07-24 13:59   ` [v3, " Michael Ellerman
2018-07-17 13:51 ` [PATCH v3 2/9] powerpc/pkeys: Deny read/write/execute by default Ram Pai
2018-07-17 13:51 ` [PATCH v3 3/9] powerpc/pkeys: key allocation/deallocation must not change pkey registers Ram Pai
2018-07-17 13:51 ` [PATCH v3 4/9] powerpc/pkeys: Save the pkey registers before fork Ram Pai
2018-07-17 13:51 ` [PATCH v3 5/9] powerpc/pkeys: fix calculation of total pkeys Ram Pai
2018-07-17 13:51 ` [PATCH v3 6/9] powerpc/pkeys: Preallocate execute-only key Ram Pai
2018-07-17 13:51 ` [PATCH v3 7/9] powerpc/pkeys: make protection key 0 less special Ram Pai
2018-07-17 13:51 ` [PATCH v3 8/9] powerpc/core-pkeys: execute-permission on keys are disabled by default Ram Pai
2018-07-17 13:51 ` [PATCH v3 9/9] powerpc/ptrace-pkeys: " Ram Pai

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=1531835470-32691-1-git-send-email-linuxram@us.ibm.com \
    --to=linuxram@us.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=bauerman@linux.vnet.ibm.com \
    --cc=fweimer@redhat.com \
    --cc=hbabu@us.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhocko@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.de \
    /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).