Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751330AbeAEG34 (ORCPT + 1 other); Fri, 5 Jan 2018 01:29:56 -0500 Received: from mga14.intel.com ([192.55.52.115]:44757 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751234AbeAEG3z (ORCPT ); Fri, 5 Jan 2018 01:29:55 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,317,1511856000"; d="scan'208";a="189977764" Subject: Re: [PATCH 05/23] x86, kaiser: unmap kernel from userspace page tables (core patch) To: Yisheng Xie , linux-kernel@vger.kernel.org References: <20171123003438.48A0EEDE@viggo.jf.intel.com> <20171123003447.1DB395E3@viggo.jf.intel.com> <93776eb2-b6d4-679a-280c-8ba558a69c34@linux.intel.com> Cc: linux-mm@kvack.org, richard.fellner@student.tugraz.at, moritz.lipp@iaik.tugraz.at, daniel.gruss@iaik.tugraz.at, michael.schwarz@iaik.tugraz.at, luto@kernel.org, torvalds@linux-foundation.org, keescook@google.com, hughd@google.com, x86@kernel.org, Andrea Arcangeli From: Dave Hansen Message-ID: <20a54a5f-f4e5-2126-fb73-6a995d13d52d@linux.intel.com> Date: Thu, 4 Jan 2018 22:29:53 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/04/2018 10:16 PM, Yisheng Xie wrote: > BTW, we have just reported a bug caused by kaiser[1], which looks like > caused by SMEP. Could you please help to have a look? > > [1] https://lkml.org/lkml/2018/1/5/3 Please report that to your kernel vendor. Your EFI page tables have the NX bit set on the low addresses. There have been a bunch of iterations of this, but you need to make sure that the EFI kernel mappings don't get _PAGE_NX set on them. Look at what __pti_set_user_pgd() does in mainline.