Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2396940yba; Thu, 25 Apr 2019 16:01:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTqwjf2+cdvQ8nKjUp+Ip5AGI3GapcE5ZfFcUrPKiwECIR6irvKvhFBPU5kPNft1z+OSsS X-Received: by 2002:a62:6f47:: with SMTP id k68mr43479406pfc.196.1556233298168; Thu, 25 Apr 2019 16:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556233298; cv=none; d=google.com; s=arc-20160816; b=VCFlwZzi2BcgcS9WSwZu+scqWRu0ksIHIZ1hhj85k5iGiK1S8J5Th75rbBusmptLe1 f03wh91203qQj50VXezBawHixr98g+7XbWJOocX0jzQ9qQex7TGY/MJ443gfEJZwQaiO 43fQ5hn98W3zlVxrChphz92jMHlL7GfE8PfjFDQptJrQW5EPmPnpuPTXP+dWAAml4t1s CAYYyI1MwRX8fZbTuaWE06xA1pMNdej3Zg9z41ljL2fOFdxJdPTQAX8WO43oQO61GCG+ 3KQ5nIXD0oqMrmVNJigWsuZCvc0+vTgfqK4mm63SIYKERgQUPcEu/7j20+Z8tnt7Hl/e 1ZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=pnEsqrTuMh8TRPOlpDImzZG2jQNFm6MrhzsaXJdo7Gs=; b=d848K3k39pDhd5pW4vsbjriY9/PFNCKsLRVmRF6GmxMiVNsyFLMVLe/AizYynf5DOG hTL1ztGw3Q2fcJeIpkYhY9AUkXYnV48dNukrCWocuKq38rbVlw2MLt92M60ukUT1Z6jn ZNqWSQPuKrfCOsjKVxpWJtI8HMrLYZ59TDytl/HBfj9YPYBecGHC68FGbcPxpDHMQ7Wl 2j+NgYfTtc03Ey03llvr5qNxu48gF8wkkaAsYa/JcCh+ZqsVLeqUdD3cx8HPAdpCEvYL uVdTR70dSQxuDLYioIFP7PppEYa4g8xoQKWLTPE0FDX4koAN9MqkuCQk3a+a/hnaObqs ITaA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k14si22499098pll.126.2019.04.25.16.01.09; Thu, 25 Apr 2019 16:01:38 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388167AbfDYVqS (ORCPT + 99 others); Thu, 25 Apr 2019 17:46:18 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46994 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388132AbfDYVqP (ORCPT ); Thu, 25 Apr 2019 17:46:15 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3PLeaVE127158 for ; Thu, 25 Apr 2019 17:46:14 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s3n0vr5eq-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 25 Apr 2019 17:46:13 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Apr 2019 22:46:11 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 25 Apr 2019 22:46:07 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3PLk6X347775906 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 Apr 2019 21:46:06 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7DB174C044; Thu, 25 Apr 2019 21:46:06 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0DA044C04E; Thu, 25 Apr 2019 21:46:04 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.204.209]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 25 Apr 2019 21:46:03 +0000 (GMT) Received: by rapoport-lnx (sSMTP sendmail emulation); Fri, 26 Apr 2019 00:46:03 +0300 From: Mike Rapoport To: linux-kernel@vger.kernel.org Cc: Alexandre Chartre , Andy Lutomirski , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , James Bottomley , Jonathan Adams , Kees Cook , Paul Turner , Peter Zijlstra , Thomas Gleixner , linux-mm@kvack.org, linux-security-module@vger.kernel.org, x86@kernel.org, Mike Rapoport Subject: [RFC PATCH 1/7] x86/cpufeatures: add X86_FEATURE_SCI Date: Fri, 26 Apr 2019 00:45:48 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556228754-12996-1-git-send-email-rppt@linux.ibm.com> References: <1556228754-12996-1-git-send-email-rppt@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 19042521-0012-0000-0000-000003150D15 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19042521-0013-0000-0000-0000214D68D7 Message-Id: <1556228754-12996-2-git-send-email-rppt@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-25_18:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=748 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904250133 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The X86_FEATURE_SCI will be set when system call isolation is enabled. Signed-off-by: Mike Rapoport --- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/disabled-features.h | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 6d61225..a01c6dd 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -221,6 +221,7 @@ #define X86_FEATURE_ZEN ( 7*32+28) /* "" CPU is AMD family 0x17 (Zen) */ #define X86_FEATURE_L1TF_PTEINV ( 7*32+29) /* "" L1TF workaround PTE inversion */ #define X86_FEATURE_IBRS_ENHANCED ( 7*32+30) /* Enhanced IBRS */ +#define X86_FEATURE_SCI ( 7*32+31) /* "" System call isolation */ /* Virtualization flags: Linux defined, word 8 */ #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */ diff --git a/arch/x86/include/asm/disabled-features.h b/arch/x86/include/asm/disabled-features.h index a5ea841..79947f0 100644 --- a/arch/x86/include/asm/disabled-features.h +++ b/arch/x86/include/asm/disabled-features.h @@ -62,6 +62,12 @@ # define DISABLE_PTI (1 << (X86_FEATURE_PTI & 31)) #endif +#ifdef CONFIG_SYSCALL_ISOLATION +# define DISABLE_SCI 0 +#else +# define DISABLE_SCI (1 << (X86_FEATURE_SCI & 31)) +#endif + /* * Make sure to add features to the correct mask */ @@ -72,7 +78,7 @@ #define DISABLED_MASK4 (DISABLE_PCID) #define DISABLED_MASK5 0 #define DISABLED_MASK6 0 -#define DISABLED_MASK7 (DISABLE_PTI) +#define DISABLED_MASK7 (DISABLE_PTI|DISABLE_SCI) #define DISABLED_MASK8 0 #define DISABLED_MASK9 (DISABLE_MPX|DISABLE_SMAP) #define DISABLED_MASK10 0 -- 2.7.4