Received: by 10.223.185.116 with SMTP id b49csp3206082wrg; Mon, 5 Mar 2018 16:31:32 -0800 (PST) X-Google-Smtp-Source: AG47ELsGWO6wmBngLsZSjLJIt0S57+OXxeUOU0WIEB6XC5opn5fLiOUmgq1AtBEfPpNAuNLpIOlc X-Received: by 10.101.98.17 with SMTP id d17mr13690408pgv.221.1520296292119; Mon, 05 Mar 2018 16:31:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520296292; cv=none; d=google.com; s=arc-20160816; b=xWA7Tu5O7Gg26U5T1ae572yqjJmBG6EqjvYvM9I7qo6OgKmhSO2efen/7p0VFdQ0vk 3wKO2e2qfqAcdnOZz7OQqTOmapHeI8MfIA6aqlAucbnNzv4PW3e3G9vv2tyzDZ3Rfcsi CO+zGTNJRIDpK66uCKMzZValoGcPc6NOv5xFkM8xFs88schAvGxuM/EC4Yvseo/jC/zE If7soagUooPPVgY5ES6ad9oAVW08j1bUyks8OmhFgdQLxi2Cq4b2cD77vo+u8aeBB1dG 4lEdeIxq0tYNCJIS8XNdcuypq+EohWqSE3dzmALkGwfwQS3FxykE47aZGZQ5Ro+++J+k GzdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:arc-authentication-results; bh=Loqnia0F1/gDzfa78590XFtH3yC1OyR6AtW5jtJGkB8=; b=MCUDBj9jU4XxJo8aYz2B6PX0XDqRQpOqOxjt4jjc08ZUDvCg/GsDBR1SlH+sJgT40D Mf7MDbkubqML0LXqoqBV4wkYWhnZU2b8Y1tPKtImyNGb7WgEo7lIElNtBX61RaRGRrQo j1cC0yeoYP+60PAxf+Oqxb5xra3hbWsjgDdsoFpEPMqUG6Rxl1WQZtyZbYuXOEVCLLCX 7sWndmczR641EMXIPfT+ywaaYricPNqo0uEBHLPjI0BDpoT1sY94ZsnuZVNB1cNiuSBb 6Gp4MhEclwDawmiFaOqsqZjs2wMILm0fBbDasTP8oYyeI+G83J0XVeKNPHHfZ+Iiedf0 eSaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=HbgVLnTU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si9031258pgr.489.2018.03.05.16.31.17; Mon, 05 Mar 2018 16:31:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=HbgVLnTU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933491AbeCFA0v (ORCPT + 99 others); Mon, 5 Mar 2018 19:26:51 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:42918 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933324AbeCFA0k (ORCPT ); Mon, 5 Mar 2018 19:26:40 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w260LXUG073680; Tue, 6 Mar 2018 00:26:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=Loqnia0F1/gDzfa78590XFtH3yC1OyR6AtW5jtJGkB8=; b=HbgVLnTUhp2RpGtpEXK9mCeZdRa7MM4FLsKLF32MGb0INvn6qny9bBtE4ZWD/foQ4oIU oCDkgM+Cf02vBLP38mmmDDsTOidSHkaNVhBj5q4FNDfZ8TPZebqp/s8MaMvM6ab4bMYa cJLEl296gEqZ5NzP4zO3Z8DDfHF96SLruoyyMwN2k0Vd7IiQV9aZYTBDfsnRD162My2L a0g8tzrQ2GAajHfunSp8Qxylxl7LBYrrpDTngtSdi5RKge3UnTSBOlLOJ2sj9TsWr8p+ hJkIyBTMts9JAabRA+lg56f85WdmzhvF48gxNIoyq9dOl7AGQRKT8zmCzE7VoP4Qg9Xs 5w== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2ghe5xgf10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Mar 2018 00:26:36 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w260QZQe024023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Mar 2018 00:26:35 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w260QYo1025193; Tue, 6 Mar 2018 00:26:34 GMT Received: from localhost.localdomain (/98.216.35.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Mar 2018 16:26:34 -0800 From: Pavel Tatashin To: steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux-kernel@vger.kernel.org, Alexander.Levin@microsoft.com, dan.j.williams@intel.com, sathyanarayanan.kuppuswamy@intel.com, pankaj.laxminarayan.bharadiya@intel.com, akuster@mvista.com, cminyard@mvista.com, pasha.tatashin@oracle.com, gregkh@linuxfoundation.org, stable@vger.kernel.org Subject: [PATCH 4.1 40/65] kaiser: delete KAISER_REAL_SWITCH option Date: Mon, 5 Mar 2018 19:25:13 -0500 Message-Id: <20180306002538.1761-41-pasha.tatashin@oracle.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180306002538.1761-1-pasha.tatashin@oracle.com> References: <20180306002538.1761-1-pasha.tatashin@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8823 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=865 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803060003 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hugh Dickins We fail to see what CONFIG_KAISER_REAL_SWITCH is for: it seems to be left over from early development, and now just obscures tricky parts of the code. Delete it before adding PCIDs, or nokaiser boot option. (Or if there is some good reason to keep the option, then it needs a help text - and a "depends on KAISER", so that all those without KAISER are not asked the question.) Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit b9d2ccc54e17b5aa50dd0c036d3f4fb4e5248d54) Signed-off-by: Pavel Tatashin Conflicts: arch/x86/entry/entry_64.S (not in this tree) arch/x86/kernel/entry_64.S (patched instead of that) --- arch/x86/include/asm/kaiser.h | 4 ---- arch/x86/kernel/entry_64.S | 4 ---- security/Kconfig | 4 ---- 3 files changed, 12 deletions(-) diff --git a/arch/x86/include/asm/kaiser.h b/arch/x86/include/asm/kaiser.h index 051acf678cda..e0fc45e77aee 100644 --- a/arch/x86/include/asm/kaiser.h +++ b/arch/x86/include/asm/kaiser.h @@ -21,17 +21,13 @@ .macro _SWITCH_TO_KERNEL_CR3 reg movq %cr3, \reg -#ifdef CONFIG_KAISER_REAL_SWITCH andq $(~KAISER_SHADOW_PGD_OFFSET), \reg -#endif movq \reg, %cr3 .endm .macro _SWITCH_TO_USER_CR3 reg movq %cr3, \reg -#ifdef CONFIG_KAISER_REAL_SWITCH orq $(KAISER_SHADOW_PGD_OFFSET), \reg -#endif movq \reg, %cr3 .endm diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 5c6c11d9d779..d2b2372e01c6 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -1541,9 +1541,7 @@ ENTRY(nmi) /* %rax is saved above, so OK to clobber here */ movq %cr3, %rax pushq %rax -#ifdef CONFIG_KAISER_REAL_SWITCH andq $(~KAISER_SHADOW_PGD_OFFSET), %rax -#endif movq %rax, %cr3 #endif call do_nmi @@ -1779,9 +1777,7 @@ end_repeat_nmi: /* %rax is saved above, so OK to clobber here */ movq %cr3, %rax pushq %rax -#ifdef CONFIG_KAISER_REAL_SWITCH andq $(~KAISER_SHADOW_PGD_OFFSET), %rax -#endif movq %rax, %cr3 #endif DEFAULT_FRAME 0 /* XXX: Do we need this? */ diff --git a/security/Kconfig b/security/Kconfig index 5f4b656bfa4c..9d63046e4794 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -41,10 +41,6 @@ config KAISER If you are unsure how to answer this question, answer Y. -config KAISER_REAL_SWITCH - bool "KAISER: actually switch page tables" - default y - config SECURITYFS bool "Enable the securityfs filesystem" help -- 2.16.2