Received: by 10.223.176.5 with SMTP id f5csp2653689wra; Mon, 5 Feb 2018 07:41:13 -0800 (PST) X-Google-Smtp-Source: AH8x224EnSSjzIUQ52jV/tUHJgNMejj9craemlxCc9zO+ZVPn76UDij9zQnX2A1PmrKj8FjdovDQ X-Received: by 10.101.65.71 with SMTP id x7mr38269836pgp.379.1517845273446; Mon, 05 Feb 2018 07:41:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517845273; cv=none; d=google.com; s=arc-20160816; b=VLyrjYnWV56MKXqyCTrXPoy+6Us9aKImV8dwtXO7tDFD4LWqRrleMFl1YCzbyY2uP4 x3fnJIxk3Z51X6IN+IUuJYQZwc45zZ6sE9c8GMMsJyhijdQCchv5O3eO89JDhy4UGT4Z ejoq7coakXTTg6hlAo1uKqEFVZADb/6qpd6kym6rVzJxxTIN90rVQtcKctvyLPab4cNZ 1n1b6YmnEf/7VcEwfzTnpUl57w/2jzYNJBbLIrH7zG7Hp7NcXBjQKdBSFu03SgIRe/H9 4fHs9rpzmIj/r9YE1R1N81s2BPwuZUw3wLm03GfSljfmfuaNlCLG+KxukGo08xHLtdGN HhpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=IzN8ktAM/vEp+lB+VbU6GbAjZMh2oZm5qoY2RtDWm7o=; b=QtgWeb07Gfi5u9Tx31PguyXuk98KLtIa4gfp5VWvUV0msrR3h6+ausSBYeur24McE/ P7MHTvrF91C8rvJ1Xi5pVrOs97E8Wu1yeQVXpGzBetfl9+NaAL3hfFZ68c6+zd7VJzvw 1gJyXdtuMoSz444ZTGVR1iXxWHfyQSqAQJyXTU1vXXNRJmdm7DmFhIirHMZNeuLy4CVN qRwjFKYRlXYaVDtHddk/EbvzwBawiDLoAHu5VssXiaZHV9HOBsOgIiYNErvWgARxkr3y IRZLqFhmak5zVdgZAghp3J+35k6vK4hQQakte0UD0Q6CVJW2HlGfyk/GqCA4aVZO8FKu 4eFQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si5549339pgp.606.2018.02.05.07.40.58; Mon, 05 Feb 2018 07:41:13 -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; 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 S1753223AbeBEPkL (ORCPT + 99 others); Mon, 5 Feb 2018 10:40:11 -0500 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:44288 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752914AbeBEPkH (ORCPT ); Mon, 5 Feb 2018 10:40:07 -0500 Received: from resomta-ch2-10v.sys.comcast.net ([69.252.207.106]) by resqmta-ch2-11v.sys.comcast.net with ESMTP id iisHeQFwJAbquiisJeoLll; Mon, 05 Feb 2018 15:40:07 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-10v.sys.comcast.net with SMTP id iisGeQa10xVSTiisHeG33n; Mon, 05 Feb 2018 15:40:06 +0000 Received: by gentwo.org (Postfix, from userid 1001) id 7CBCB116038E; Mon, 5 Feb 2018 09:40:04 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 7958D116012A; Mon, 5 Feb 2018 09:40:04 -0600 (CST) Date: Mon, 5 Feb 2018 09:40:04 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Igor Stoppa cc: Matthew Wilcox , Boris Lukashev , Jann Horn , jglisse@redhat.com, Kees Cook , Michal Hocko , Laura Abbott , Christoph Hellwig , linux-security-module@vger.kernel.org, linux-mm@kvack.org, kernel list , Kernel Hardening Subject: Re: [kernel-hardening] [PATCH 4/6] Protectable Memory In-Reply-To: Message-ID: References: <20180124175631.22925-1-igor.stoppa@huawei.com> <20180124175631.22925-5-igor.stoppa@huawei.com> <20180126053542.GA30189@bombadil.infradead.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfOuDenMWjvRTdB3OucW8B35Hwl+YpqUNNKozVBgi8IOqxnfGik3gQ0feLbH3YoTTPc60hubgIWujyEa+Pxa6piPEFNMlsAGjgKjHl8Bu5j5XHl9CkYqX 1SRuxXs5U3rNXqJlAzD8xd6HnQfCqRKGI1AGHjeif+xTIcp20zMxwn1Js47PInZBsK38vq/TIxN+T5FG88kW8Q7Ux0LvAFqWVS1QYRdTG3+hS+HJW43AVp4h buarqIXfoC4AB8kqvFH0gecNh2yiLiPFFAA418eI7reHTasf2O361A07cymjS1sBRXWP2xCV+MFItFPbP67cEvf1dJteNVOWmqL3naHcfSIvNIIXtBkWOf9k gkSj0gXI1BpHBI8uDE1YKR1Ktam2cAL792Z7ObCCdBlPNqdjDnZZHIL5tVplPhRtC1CHIBxbBzbo1E6QxDYF+Gdr8QBxNAaOewid7+RkqrA3HJW5k3oPjePL +xScujzgyY3pir1ZB8/pyC9ZsCHRqfxIJJHJeay6ILhprZ3diWmFYRZiSfOvmxbnO86Brb7o+1gKqRo0jnGt9o3Cz+Acrs5v1zw0CA0p4aNw/+P6BAQjLwv7 mPg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 3 Feb 2018, Igor Stoppa wrote: > > We could even do this in a more thorough way. Can we use a ring 1 / 2 > > distinction to create a hardened OS core that policies the rest of > > the ever expanding kernel with all its modules and this and that feature? > > What would be the differentiating criteria? Furthermore, what are the > chances > of invalidating the entire concept, because there is already an > hypervisor using > the higher level features? > That is what you are proposing, if I understand correctly. Were there not 4 rings as well as methods by the processor vendors to virtualize them as well? > > I think that will long term be a better approach and allow more than the > > current hardening approaches can get you. It seems that we are willing to > > tolerate significant performance regressions now. So lets use the > > protection mechanisms that the hardware offers. > > I would rather *not* propose significant performance regression :-P But we already have implemented significant kernel hardening which causes performance regressions. Using hardware capabilities allows the processor vendor to further optimize these mechanisms whereas the software preventative measures are eating up more and more performance as the pile them on. Plus these are methods that can be worked around. Restrictions implemented in a higher ring can be enforced and are much better than just "hardening" (which is making life difficult for the hackers and throwing away performannce for the average user).