From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:54914 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755044AbeAMOyG (ORCPT ); Sat, 13 Jan 2018 09:54:06 -0500 Subject: Patch "kaiser: Set _PAGE_NX only if supported" has been added to the 4.9-stable tree To: ytht.net@gmail.com, gregkh@linuxfoundation.org, groeck@chromium.org Cc: , From: Date: Sat, 13 Jan 2018 15:53:56 +0100 In-Reply-To: <20180112214256.257463-1-ytht.net@gmail.com> Message-ID: <151585523669@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled kaiser: Set _PAGE_NX only if supported to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kaiser-set-_page_nx-only-if-supported.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From ytht.net@gmail.com Sat Jan 13 15:46:36 2018 From: Lepton Wu Date: Fri, 12 Jan 2018 13:42:56 -0800 Subject: kaiser: Set _PAGE_NX only if supported To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, groeck@chromium.org, hshan@google.com, Lepton Wu Message-ID: <20180112214256.257463-1-ytht.net@gmail.com> From: Lepton Wu This finally resolve crash if loaded under qemu + haxm. Haitao Shan pointed out that the reason of that crash is that NX bit get set for page tables. It seems we missed checking if _PAGE_NX is supported in kaiser_add_user_map Link: https://www.spinics.net/lists/kernel/msg2689835.html Reviewed-by: Guenter Roeck Signed-off-by: Lepton Wu Signed-off-by: Greg Kroah-Hartman --- arch/x86/mm/kaiser.c | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/x86/mm/kaiser.c +++ b/arch/x86/mm/kaiser.c @@ -197,6 +197,8 @@ static int kaiser_add_user_map(const voi * requires that not to be #defined to 0): so mask it off here. */ flags &= ~_PAGE_GLOBAL; + if (!(__supported_pte_mask & _PAGE_NX)) + flags &= ~_PAGE_NX; for (; address < end_addr; address += PAGE_SIZE) { target_address = get_pa_from_mapping(address); Patches currently in stable-queue which might be from ytht.net@gmail.com are queue-4.9/kaiser-set-_page_nx-only-if-supported.patch