Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp345463yba; Fri, 26 Apr 2019 00:43:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwp0uMJyiFrVbmZK60tDU/Zi0vygQoYJOrcYaACwrJ9NB/ZefjTnXDJam7XyMIx5qbIPC2E X-Received: by 2002:aa7:8096:: with SMTP id v22mr45309907pff.94.1556264624504; Fri, 26 Apr 2019 00:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556264624; cv=none; d=google.com; s=arc-20160816; b=qo8wLD1+GyMujLAI4Vwst1w/jaVwGkIBL3ttUd/6tjuvAYeGhveUesjTozJpcbU7Rk YideyWlP7fC+l7OszpWVkql9A/6t6gWuB5dUGxnAW2Vbqc82fyenYcZFi+S5dF6hhEUG splowuLoH+yKC+PmVADI/qFBUWXuDA53rE38NZrPP5kaMfPo2bPCEoUWvKj8FIbK7fQo lsgpEaWF4rgOsCTZP/VDLWyV6ydle5eUtPPvM0jlpXWwP1P6UJ5CJVZAl4ZnA3LUSRSm 2FGZrDVRoFQ7QKxctxQOJ7WZ3JGQHK6UGuL9xVw56fUm8BsH02d7qayLA3S40MrNO8tS c6uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VSMhN+nfzaw1tZG3jJEpjZvzXxWyKbRMlymqbYuBFjg=; b=UtxDRC/3MLopM3u7pex3nh2pnA6hYSG9U2JnLx74hhEVSMEBjyazx4+2ctsoO8w/db m16zoSwSqzEPvV24UznA82OSp4qP+zG5IBvXbPj2VbpfUB/NqFws5V3DAfvb8Z+X1qpy kjumg1ENouDOTKWDbK6WG6UVfBaohzCZqWlQYw4vNPIqHXhGeeXQS9KUK7K/oQkhHI4p 0jE+iSGwaEVmkTVVGKEYz0Q37+OAEwIgHt1aE9+9gClxHQOvwTdj+1kXctLm3mMcWBXD vFPOjaFHck8cjtvLNn5/gPMBw7QaF4WzFd0j2YoQDEycW3HzrmifjAkrwKXy7vna8X/L x7Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HzSM0zqj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n15si24071073pgg.308.2019.04.26.00.43.28; Fri, 26 Apr 2019 00:43:44 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=HzSM0zqj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726124AbfDZHmi (ORCPT + 99 others); Fri, 26 Apr 2019 03:42:38 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43812 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbfDZHmi (ORCPT ); Fri, 26 Apr 2019 03:42:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VSMhN+nfzaw1tZG3jJEpjZvzXxWyKbRMlymqbYuBFjg=; b=HzSM0zqj3Ao+/TzgNdgd1swkv JUIT5sLDscQK7QUjPui60Fvql3zrVQm8NFusS8MfvwLnn55u3O48d96ky/W/rckJ6suzG75KqhZvp goK9pKaYevwe0u0lWHZ/+tgW9cfR9Rhl3MSHvwuZ7mpfbVrxMvYP44caQxNOw681WR2JB4Hn9raAF SoVI0o6PWu/nkXUh6kwm/JtEvs9Tw/s3BJSK1mR7t1FTOJki6PrvzB1LUl2J022GsIZyhT+n+oqh/ WFMNNLbCiyBzUksflqli8vZGvY7c1Ng1ZDfA4aDL35wGDW56lsq8MBGvtNgQMfbfcuCMquiyDm4dL GfZMyX+tA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJvV3-0005gQ-VC; Fri, 26 Apr 2019 07:42:26 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CB82029D1A321; Fri, 26 Apr 2019 09:42:23 +0200 (CEST) Date: Fri, 26 Apr 2019 09:42:23 +0200 From: Peter Zijlstra To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Alexandre Chartre , Andy Lutomirski , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , James Bottomley , Jonathan Adams , Kees Cook , Paul Turner , Thomas Gleixner , linux-mm@kvack.org, linux-security-module@vger.kernel.org, x86@kernel.org Subject: Re: [RFC PATCH 5/7] x86/mm/fault: hook up SCI verification Message-ID: <20190426074223.GY4038@hirez.programming.kicks-ass.net> References: <1556228754-12996-1-git-send-email-rppt@linux.ibm.com> <1556228754-12996-6-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1556228754-12996-6-git-send-email-rppt@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 26, 2019 at 12:45:52AM +0300, Mike Rapoport wrote: > If a system call runs in isolated context, it's accesses to kernel code and > data will be verified by SCI susbsytem. > > Signed-off-by: Mike Rapoport > --- > arch/x86/mm/fault.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) There's a distinct lack of touching do_double_fault(). It appears to me that you'll instantly trigger #DF when you #PF, because the #PF handler itself will not be able to run. And then obviously you have to be very careful to make sure #DF can, _at_all_times_ run, otherwise you'll tripple-fault and we all know what that does.