Received: by 10.223.185.116 with SMTP id b49csp2845574wrg; Mon, 12 Feb 2018 16:41:41 -0800 (PST) X-Google-Smtp-Source: AH8x226hautcBHopWTmUKzajl5HzqQun6hy8smvDxsFQTHufNkyxn0WFSxh+PA5PPS0nmnm1AQuN X-Received: by 2002:a17:902:3383:: with SMTP id b3-v6mr12203191plc.240.1518482500945; Mon, 12 Feb 2018 16:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518482500; cv=none; d=google.com; s=arc-20160816; b=opoCqG0BS0Qj4oKBZJY1DFVhCxQ1s6tvyOxBOHnLH1mSMwNAxCSpmQo44Cgy/GgEhy tlz51Rvn2vDi9lvxUY8XSzrOzVMPNptFatRxCG4cXIfKfoNxuRR0npzJxYL7i2060yXu JQnQsaLR8/bWzgpkeE4SvZ7P921b2s/W15oGu9seo37enyTGVc0dAdKWENpM8qdwg5yI 6HaWYy98rMBmJO9mux0MFuC3ibPcfWym0Y0I0cEh79idr0gxBYXmpobhxKn+O3yfhp3o SI3oaH2cN+qbN3Mj4vLk8OaEJEVud1U+5C5bMZLGBWQ3eSXUnd2qfxKp/KVFg0x/JwXq qGBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=Ru3pkGVKqmWMsL9s1P38nF9SelU4RWhwjsnI0yuJRsI=; b=b/Ab19d4w70tMO7cNWJXoxE+UurMmpxm8PRy2pf6jBFju/Ghb5D/1goby+UlIQQzp+ kSzZt2pi9Ph4q+DzBYfU/AS0/oUwycQTVfymiZOoiwGG+UbJ0m6LWS1dt2Ilhx2U0JRI mBs0otsnKoy6fobYOUO9dlwOToypKEie+Yv9Acuh/Db7g73DaElrFZzrYSh3FDBVK16/ /F7QO0UG0BiKwlGZctDeOfnoe5n0s+6u6kzt+SN4Om19evrOEDP5Yzsac5F0xd61x4il aJ155LxAso0s3eSTimW4iyDrU6It2p293gMe1rjZKw+l0qyribewJBQmgVwl6VFQkni4 tDvw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si1913831pln.126.2018.02.12.16.41.26; Mon, 12 Feb 2018 16:41:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933050AbeBMAkq (ORCPT + 99 others); Mon, 12 Feb 2018 19:40:46 -0500 Received: from mail-ot0-f171.google.com ([74.125.82.171]:33122 "EHLO mail-ot0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932792AbeBMAko (ORCPT ); Mon, 12 Feb 2018 19:40:44 -0500 Received: by mail-ot0-f171.google.com with SMTP id q9so15765809oti.0 for ; Mon, 12 Feb 2018 16:40:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Ru3pkGVKqmWMsL9s1P38nF9SelU4RWhwjsnI0yuJRsI=; b=Q8piypxQjAG0haOX9/en3P3vz0iRQ1QScCUOd77/Ru7pS/sHYHgrfCzUKSGxN7H7SL RAkxYAYjzbhPjwZAtQjaPBpjD6NosygRh+LmiHy4T3E96W6MQ+Tw3ojRHTMyaacgetj7 6kbOmXgh2ALWNBW1A3/epsCYkHY3MNwKEkhZha0+LAyEWOS/4YRQCX5HchIO9a0zp+wK cjqUa5f0EawNaz2fO1Ner6GHNTsOFu2ftp+ah21Ri+Riie3e1yeYhO4BALKq8Qyhev81 A9k2eAZyIWuZKsvaywpuaoWbqMU/LQULm4Yk27HgIr2aLW5OxDLHl9TZxgQxjoNOwRa1 /rBQ== X-Gm-Message-State: APf1xPD1VzJLEWUSmvZBb4j3SlOZxMkLY6ZIDky56qFSBB4aDDYBg6WM V4Ti8LlkiTc8hGRAnd4L1pCnVA== X-Received: by 10.157.88.45 with SMTP id r45mr1570221oth.111.1518482443782; Mon, 12 Feb 2018 16:40:43 -0800 (PST) Received: from ?IPv6:2601:602:9802:a8dc::f21a? ([2601:602:9802:a8dc::f21a]) by smtp.gmail.com with ESMTPSA id b9sm5123349oih.23.2018.02.12.16.40.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 16:40:42 -0800 (PST) Subject: Re: [kernel-hardening] [PATCH 4/6] Protectable Memory To: Kees Cook , Igor Stoppa Cc: Boris Lukashev , Christopher Lameter , Matthew Wilcox , Jann Horn , Jerome Glisse , Michal Hocko , Christoph Hellwig , linux-security-module , Linux-MM , kernel list , Kernel Hardening References: <20180124175631.22925-1-igor.stoppa@huawei.com> <20180124175631.22925-5-igor.stoppa@huawei.com> <20180126053542.GA30189@bombadil.infradead.org> <8818bfd4-dd9f-f279-0432-69b59531bd41@huawei.com> <17e5b515-84c8-dca2-1695-cdf819834ea2@huawei.com> From: Laura Abbott Message-ID: <414027d3-dd73-cf11-dc2a-e8c124591646@redhat.com> Date: Mon, 12 Feb 2018 16:40:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/12/2018 03:27 PM, Kees Cook wrote: > On Sun, Feb 4, 2018 at 7:05 AM, Igor Stoppa wrote: >> On 04/02/18 00:29, Boris Lukashev wrote: >>> On Sat, Feb 3, 2018 at 3:32 PM, Igor Stoppa wrote: >> >> [...] >> >>>> What you are suggesting, if I have understood it correctly, is that, >>>> when the pool is protected, the addresses already given out, will become >>>> traps that get resolved through a lookup table that is built based on >>>> the content of each allocation. >>>> >>>> That seems to generate a lot of overhead, not to mention the fact that >>>> it might not play very well with the MMU. >>> >>> That is effectively what i'm suggesting - as a form of protection for >>> consumers against direct reads of data which may have been corrupted >>> by some irrelevant means. In the context of pmalloc, it would probably >>> be a separate type of ro+verified pool >> ok, that seems more like an extension though. >> >> ATM I am having problems gaining traction to get even the basic merged :-) >> >> I would consider this as a possibility for future work, unless it is >> said that it's necessary for pmalloc to be accepted ... > > I would agree: let's get basic functionality in first. Both > verification and the physmap part can be done separately, IMO. Skipping over physmap leaves a pretty big area of exposure that could be difficult to solve later. I appreciate this might block basic functionality but I don't think we should just gloss over it without at least some idea of what we would do. Thanks, Laura