Received: by 10.223.176.5 with SMTP id f5csp997667wra; Sat, 3 Feb 2018 15:32:44 -0800 (PST) X-Google-Smtp-Source: AH8x224Ux3QaRqOHrob1VVD1pZL4f4OBnBstLmM1Bq4XoPFaBfKgr6PjVfjSN21aUs0J5qhwpUdk X-Received: by 2002:a17:902:7042:: with SMTP id h2-v6mr8490533plt.217.1517700764014; Sat, 03 Feb 2018 15:32:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517700763; cv=none; d=google.com; s=arc-20160816; b=ZbzY3/sE8o4nHtNs/EEhm0bKGc93ujsrileP+CejOC7xD3DDxYXRImUetrttc2KRLG hLVI7C9KsWft3hGeXKHySZm965xYCI44YthwvBODlXHwtzim/M1xysIYl6FYWXDBLk5k 70A9WvgwthuW2SSZPa7mXUC450wxcgdM87Tv7KiMVq6S/Wr5QlHm5UbCjUu056iMnLh4 /5lykUhTnqFfSLtBbqDYruXlKK1WypmUo2WHx6ro9HTZDQdUx9YDUM0U4VBBENs1fDNp Hyh5TJInK9lHI5cMh+/UkDz2aWYx/8zSvlSk2O3Y2zXqMgOLcQJP5vo4oglPpZFnjncb QpyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=9mb3tdu9ZGh0R7T5nHZshl5Tv3ni5T+voO1FmPyxoSU=; b=a+ZUdviTs/Cq7UAJiX15JfY5zQWrnm2DCnCpp9+ZnX1cAfCaQ0sLM1wMzYsPI28FFr eUuRFJNe4u8jWQE9QRNhHozx8qPnA0hQFy0ATA3xzJIUkr2uPJgYr+6v+cX5mR/wet5S NxasqiBl1KOlD5gE4KWU0M0QsVHZ2sljXgQDCfxdr2mQQqXTCZ/XUzcvXcaGx8QAg8Dd l4jXWrvyBiKruQguPG8qL5fgLXU0bzuAxVK4kTBTqnnvnElmqklh4fXbiYxiYv9qRJBS Nw3jmKD/oI/2PSb9sCCDfqc5Dghc/gxljLy8KYXWQdfOKhQtWG00hIIdnmdG1Fh6qiId MyNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sempervictus-com.20150623.gappssmtp.com header.s=20150623 header.b=GhGsQuKV; 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 k189si3215975pgc.250.2018.02.03.15.32.29; Sat, 03 Feb 2018 15:32:43 -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; dkim=pass header.i=@sempervictus-com.20150623.gappssmtp.com header.s=20150623 header.b=GhGsQuKV; 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 S1753137AbeBCUM1 (ORCPT + 99 others); Sat, 3 Feb 2018 15:12:27 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:44827 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752994AbeBCUMV (ORCPT ); Sat, 3 Feb 2018 15:12:21 -0500 Received: by mail-pl0-f66.google.com with SMTP id f8so8895787plk.11 for ; Sat, 03 Feb 2018 12:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sempervictus-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9mb3tdu9ZGh0R7T5nHZshl5Tv3ni5T+voO1FmPyxoSU=; b=GhGsQuKV1Sq3EPFj+E9iKwBH1JwX+6sJIYfPVk5JLnAdGhAeWIUGbFHzFNSGBLpeCa iq1iuQh0S4rBR7evtAygjlOzocKUF5ch3w++YLz3T6B7kdDwViXKC+sbsn+VRvkBwrXH NMglrxS93u2cXfg1gOSwaAHfx8qYEBZftP5GirgQ9R7chQD0VYDhT67vPlobhaBpj9E0 QiTfZYdkFkCNpae6qDPCg1jtKpQaWlCz7JFN7mCecjoX/UYC+vWubIVcdjE8geOdK36V sBWmF0Euv3uCEprTGYv5LN81x5nRvNGJVEI4uRjh5qy1En1fmaKpI1WcLSD6exsl35NH jN/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9mb3tdu9ZGh0R7T5nHZshl5Tv3ni5T+voO1FmPyxoSU=; b=NhO2SrnmeGczrLVjB62aLDCMEbmRZiyyu8HXjmz+YuBUn05BjAqYDWjr6g9yBtNToS pGFbPNif7ukXGmEmO89UPLF0ZG5gCcPB9O/bHCMGr2ISMeXIcfIwuzraslu+niuBlHR3 IlQWzFZiaq97AP6VzSBvfUbwczjqhnUchDqJ/bnG9yO4g9ZL1zoit9LTJ9dA0JK4wCCq gOB/k2zsjfH0sEtfOCFAsuYvThy678HeTv7lpL1ejU0UKconQZsSbyslljNc2s0I96l6 qTKoRBjQ9QRiBjaMefXjjEtQ0IbrArFnQoP0GY5U7rSYw03Z/kYjXJpatJ/CK6PeS//Z JUiQ== X-Gm-Message-State: AKwxytfk3hLIvzCnt0zyXyTb6ixAkBas76aa7odQtnzDvX30r34byZht uEsIGFODV4ZPVVngZ1NS0I78vg6mSURrtdFn+i+V7Q== X-Received: by 2002:a17:902:6945:: with SMTP id k5-v6mr29715073plt.389.1517688740665; Sat, 03 Feb 2018 12:12:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.236.140.141 with HTTP; Sat, 3 Feb 2018 12:12:20 -0800 (PST) X-Originating-IP: [72.70.61.204] In-Reply-To: References: <20180124175631.22925-1-igor.stoppa@huawei.com> <20180124175631.22925-5-igor.stoppa@huawei.com> <20180126053542.GA30189@bombadil.infradead.org> From: Boris Lukashev Date: Sat, 3 Feb 2018 15:12:20 -0500 Message-ID: Subject: Re: [kernel-hardening] [PATCH 4/6] Protectable Memory To: Igor Stoppa Cc: Christopher Lameter , Matthew Wilcox , Jann Horn , Jerome Glisse , Kees Cook , Michal Hocko , Laura Abbott , Christoph Hellwig , linux-security-module , Linux-MM , kernel list , Kernel Hardening Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 3, 2018 at 2:57 PM, Igor Stoppa wrote: >>> On Thu, 25 Jan 2018, Matthew Wilcox wrote: > >>>> It's worth having a discussion about whether we want the pmalloc API >>>> or whether we want a slab-based API. > I'd love to have some feedback specifically about the API. > > I have also some idea about userspace and how to extend the pmalloc > concept to it: > > http://www.openwall.com/lists/kernel-hardening/2018/01/30/20 > > I'll be AFK intermittently for about 2 weeks, so i might not be able to > reply immediately, but from my perspective this would be just the > beginning of a broader hardening of both kernel and userspace that I'd > like to pursue. > > -- > igor Regarding the notion of validated protected memory, is there a method by which the resulting checksum could be used in a lookup table/function to resolve the location of the protected data? Effectively a hash table of protected allocations, with a benefit of dedup since any data matching the same key would be the same data (multiple identical cred structs being pushed around). Should leave the resolver address/csum in recent memory to check against, right? -- Boris Lukashev Systems Architect Semper Victus