From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id 1EEC16B005C for ; Fri, 23 Mar 2018 14:11:07 -0400 (EDT) Received: by mail-pf0-f199.google.com with SMTP id b23so5240204pfi.16 for ; Fri, 23 Mar 2018 11:11:07 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com. [192.55.52.43]) by mx.google.com with ESMTPS id k78si7259371pfb.272.2018.03.23.11.11.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 11:11:06 -0700 (PDT) Subject: [PATCH 0/9] x86, pkeys: two protection keys bug fixes From: Dave Hansen Date: Fri, 23 Mar 2018 11:09:03 -0700 Message-Id: <20180323180903.33B17168@viggo.jf.intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Dave Hansen , linuxram@us.ibm.com, tglx@linutronix.de, dave.hansen@intel.com, mpe@ellerman.id.au, mingo@kernel.org, akpm@linux-foundation.org, shuah@kernel.org, shakeelb@google.com This fixes two bugs, and adds selftests to make sure they stay fixed: 1. pkey 0 was not usable via mprotect_pkey() because it had never been explicitly allocated. 2. mprotect(PROT_EXEC) memory could sometimes be left with the implicit exec-only protection key assigned. I already posted #1 previously. I'm including them both here because I don't think it's been picked up in case folks want to pull these all in a single bundle. Cc: Ram Pai Cc: Thomas Gleixner Cc: Dave Hansen Cc: Michael Ellermen Cc: Ingo Molnar Cc: Andrew Morton p Cc: Shuah Khan Cc: Shakeel Butt