Received: by 10.223.185.116 with SMTP id b49csp3210973wrg; Mon, 5 Mar 2018 16:38:05 -0800 (PST) X-Google-Smtp-Source: AG47ELtF7w6x7SWVHmvUXYHMc22gPsAvo+jM/ukKGxO/BRB/V1YX4ybz6uDK07aLeAyihmw927zT X-Received: by 2002:a17:902:8488:: with SMTP id c8-v6mr14906864plo.155.1520296685518; Mon, 05 Mar 2018 16:38:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520296685; cv=none; d=google.com; s=arc-20160816; b=x2XxJzoMNZq47ZcrNvDk3PQHvjMO+ta1TXctcpnj1W3OYeZWyhfLW2CE7LtlJIOEB0 nhMnx8T/5i/dxo7tmGx3gSUl1bSpppSN2USQfwl4CeRhYw/7udhZDPnZuqb4yX77ZzVl WfI9akxEeK+9J6eduIG9I89U05bj/WkcnSLrJf/JmySXz2U8oJBPq5Ysr0oFgdlWJGXY pB24OXVLABUvNu3nsAVBjCJTnvTKeFltsfC8iziiRhgJfqkXCP8HLKMsnxiIKEECZPYP 42K5bvUIbGkf+InmDhekWljCreuXn/iV5MJ1UTag+Sof1I+a6+tpYxFmr1l2ndDR6blG BL3A== 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=4dMhrQFZiqYY0bOZ0Jn6bsC/rEVN47hHED+m/27ywZE=; b=CBPw0YGvdGtwacVw1jwIdQDjK4ydMOOWwljV8JbwiKI4/VfT390UcbnAO7jUNTdc8t yp8qT01ctc/jkw6vngahJLH8VDQQGQWUl809H7TvCH14zfYisM+HCD8FzqNBd8+nJNrX nO9KPAV/1dS5JWoa8jKknxA8fCgS+Dby6GzLBgkp1mbrBxfFornBHH2crrlGzB56RN0r oa+oy/M8OXEG5iesGQcvnYoUtspkDsIpcKEU/VhaYMh8x+5IKuKFjggpQHClHn+iLAVe APEPeYZRbEm4W4ytx4cQyGeKxXzh6uqu8boFtPlFt0yENTYjDtW3nk9Oh92+2CibmQeI A7lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=sEd9PZmW; 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 s125si9119065pgc.468.2018.03.05.16.37.51; Mon, 05 Mar 2018 16:38:05 -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=sEd9PZmW; 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 S933319AbeCFAgL (ORCPT + 99 others); Mon, 5 Mar 2018 19:36:11 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:40742 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933206AbeCFA0b (ORCPT ); Mon, 5 Mar 2018 19:26:31 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w260LaJX187383; Tue, 6 Mar 2018 00:26:27 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=4dMhrQFZiqYY0bOZ0Jn6bsC/rEVN47hHED+m/27ywZE=; b=sEd9PZmW9NUq2J0V6inhxasI+csbetYzMZ1rohD8vJ8icpZePhMfubR7j7sTIH/zIS9m GNM7YE/GUyQVBFslTfBqMLGtiKwCw5+9jzpOf/9M6xATpaME54wBdMipA0zBG9ChhUyS sNS/1UNdisGPdexgYHyIPzt7Q2Ze0wiz99dB37Li439CpqlVQZ+EARVfvAViJyi8tL0q kCsZsnmM76uuOwPxxT4WAmHnkY92hwleYes6Jqnikb0MEjZW5Ss228X8P6/KbNUwGI+N cqUOOgnOM7rvmgWR5QtMqAh+MWQIpbtDnjJeKm+7cLIafp+SMauBNzSBuymIKzuQzc1L HA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2ghdxf8jr6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Mar 2018 00:26:27 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w260QQ4q025640 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Mar 2018 00:26:26 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w260QQr6000344; Tue, 6 Mar 2018 00:26:26 GMT Received: from localhost.localdomain (/98.216.35.41) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Mar 2018 16:26:25 -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 31/65] kaiser: KAISER depends on SMP Date: Mon, 5 Mar 2018 19:25:04 -0500 Message-Id: <20180306002538.1761-32-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=660 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 It is absurd that KAISER should depend on SMP, but apparently nobody has tried a UP build before: which breaks on implicit declaration of function 'per_cpu_offset' in arch/x86/mm/kaiser.c. Now, you would expect that to be trivially fixed up; but looking at the System.map when that block is #ifdef'ed out of kaiser_init(), I see that in a UP build __per_cpu_user_mapped_end is precisely at __per_cpu_user_mapped_start, and the items carefully gathered into that section for user-mapping on SMP, dispersed elsewhere on UP. So, some other kind of section assignment will be needed on UP, but implementing that is not a priority: just make KAISER depend on SMP for now. Also inserted a blank line before the option, tidied up the brief Kconfig help message, and added an "If unsure, Y". Signed-off-by: Hugh Dickins Acked-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman (cherry picked from commit d94df20135ccfdfb77b1479c501564e9b4ab5bc9) Signed-off-by: Pavel Tatashin --- security/Kconfig | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/security/Kconfig b/security/Kconfig index cdad6dd3693a..5f4b656bfa4c 100644 --- a/security/Kconfig +++ b/security/Kconfig @@ -30,14 +30,16 @@ config SECURITY model will be used. If you are unsure how to answer this question, answer N. + config KAISER bool "Remove the kernel mapping in user mode" default y - depends on X86_64 - depends on !PARAVIRT + depends on X86_64 && SMP && !PARAVIRT help - This enforces a strict kernel and user space isolation in order to close - hardware side channels on kernel address information. + This enforces a strict kernel and user space isolation, in order + to close hardware side channels on kernel address information. + + If you are unsure how to answer this question, answer Y. config KAISER_REAL_SWITCH bool "KAISER: actually switch page tables" -- 2.16.2