Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751483AbdIKPCI (ORCPT ); Mon, 11 Sep 2017 11:02:08 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35583 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940AbdIKPCH (ORCPT ); Mon, 11 Sep 2017 11:02:07 -0400 X-Google-Smtp-Source: ADKCNb6OsfgE8a/ZzBKZVqbyBs8qjCZ7tpSZnhXvZzG9bb/y5DkZyUtSolgwI9Zu5M9qn4RLN/5IYA== Date: Mon, 11 Sep 2017 08:02:04 -0700 From: Tycho Andersen To: Yisheng Xie Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel-hardening@lists.openwall.com, Marco Benatto , Juerg Haefliger Subject: Re: [PATCH v6 00/11] Add support for eXclusive Page Frame Ownership Message-ID: <20170911150204.nn5v5olbxyzfafou@docker> References: <20170907173609.22696-1-tycho@docker.com> <23e5bac9-329a-3a32-049e-7e7c9751abd0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23e5bac9-329a-3a32-049e-7e7c9751abd0@huawei.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 37 Hi Yisheng, On Mon, Sep 11, 2017 at 06:34:45PM +0800, Yisheng Xie wrote: > Hi Tycho , > > On 2017/9/8 1:35, Tycho Andersen wrote: > > Hi all, > > > > Here is v6 of the XPFO set; see v5 discussion here: > > https://lkml.org/lkml/2017/8/9/803 > > > > Changelogs are in the individual patch notes, but the highlights are: > > * add primitives for ensuring memory areas are mapped (although these are quite > > ugly, using stack allocation; I'm open to better suggestions) > > * instead of not flushing caches, re-map pages using the above > > * TLB flushing is much more correct (i.e. we're always flushing everything > > everywhere). I suspect we may be able to back this off in some cases, but I'm > > still trying to collect performance numbers to prove this is worth doing. > > > > I have no TODOs left for this set myself, other than fixing whatever review > > feedback people have. Thoughts and testing welcome! > > According to the paper of Vasileios P. Kemerlis et al, the mainline kernel > will not set the Pro. of physmap(direct map area) to RW(X), so do we really > need XPFO to protect from ret2dir attack? I guess you're talking about section 4.3? They mention that that x86 only gets rw, but that aarch64 is rwx still. But in either case this still provides access protection, similar to SMAP. Also, if I understand things correctly the protections are unmanaged, so a page that had the +x bit set at some point, it could be used for ret2dir. Cheers, Tycho