From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1480C47E49 for ; Mon, 28 Oct 2019 12:31:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 96E89214D9 for ; Mon, 28 Oct 2019 12:31:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="f1WGJM1k" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 96E89214D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3A5FC6B0007; Mon, 28 Oct 2019 08:31:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 32FA26B0008; Mon, 28 Oct 2019 08:31:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 21E936B000A; Mon, 28 Oct 2019 08:31:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id EFB726B0007 for ; Mon, 28 Oct 2019 08:31:25 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 743318249980 for ; Mon, 28 Oct 2019 12:31:25 +0000 (UTC) X-FDA: 76093128930.11.hand37_80c6e1991e637 X-HE-Tag: hand37_80c6e1991e637 X-Filterd-Recvd-Size: 4323 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Oct 2019 12:31:24 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id f4so1656829lfk.7 for ; Mon, 28 Oct 2019 05:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=cIXc50+5NShj5GVfLHp2Ko6erwsoS1EC2cpl3eH9z0g=; b=f1WGJM1kyUToCExwbx/CdRQ76h7eSHjP+Y2ccs7CiP8DAWylaZe+hpT8xFznruu1DT 7ajCJV0H9YK/GJpA+RJ5fJgGUN3PA3nB6KeRngGp4hqooSTu6FsxJxQ1B/r7ohchci1J rOdq7M75ixPhHlQlbvE/6BfBwcQBea5JRZn0jBwi5s8lO0Iw410C6OV1CBEefaFxV0wE gQ9Y2fVed8YRw7RTDjOevxVTVHdbKabSDZSwr2y0wl1HVfJemKYwWHjL06zOfxDuqLEP lBE4RP4mp8ioGF3UESn0+NOuFrS+O1PUkD+bE3LdcWSC1rFzkUTJQgSUGXXGhk6G+/8v 21Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=cIXc50+5NShj5GVfLHp2Ko6erwsoS1EC2cpl3eH9z0g=; b=KLE4phhwyho8qn7fllcEq3v/4XHJPyTXRNoLSKcNjWgMDE1J+Ax4clg5uwYQqRhM0H ifZiOFjQySBHxVjs2FtZEH/QBDWTZaJzi2zUoZhbWXvpqQHBEpa1TdH98sjc39dgb4ER eTGgQ36yJK+CJ+Hgn7OgDvgW1OAwMzQwhasxNMpBxuxTr4wwjWSDsgqUsSB/8uLKFpPa JojMRfwWdXcclpDdtAztn6p/zz5C0V80uXGJxTw37iVpAueKQyvcR4po4sE36SiqiEuS gervEDKr882AV9m8vXSGuCSxmge8mivafQdw0UE0S/s5PfVaxD6yoElrEVI3kWqN7Sjr uwtw== X-Gm-Message-State: APjAAAXjrYOOwmu5qbrx9b3lSaSEoL6iIO1qpe+Ny/KxcLoN3O2UkBrN TTwAyRpPicworw91/6dEaMvvkQ== X-Google-Smtp-Source: APXvYqzXshtDXv1YEsaKl5HV85rzz0BM+nqGCOx2pc/Myp1qFpjohRxVgQfnpbkmMhUoV9YmeetT/g== X-Received: by 2002:a19:c790:: with SMTP id x138mr4355216lff.61.1572265883446; Mon, 28 Oct 2019 05:31:23 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id e8sm7535160ljf.1.2019.10.28.05.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 05:31:22 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id B38B1100242; Mon, 28 Oct 2019 15:31:24 +0300 (+03) Date: Mon, 28 Oct 2019 15:31:24 +0300 From: "Kirill A. Shutemov" To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Dave Hansen , James Bottomley , Peter Zijlstra , Steven Rostedt , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-api@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, Mike Rapoport Subject: Re: [PATCH RFC] mm: add MAP_EXCLUSIVE to create exclusive user mappings Message-ID: <20191028123124.ogkk5ogjlamvwc2s@box> References: <1572171452-7958-1-git-send-email-rppt@kernel.org> <1572171452-7958-2-git-send-email-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1572171452-7958-2-git-send-email-rppt@kernel.org> User-Agent: NeoMutt/20180716 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Oct 27, 2019 at 12:17:32PM +0200, Mike Rapoport wrote: > From: Mike Rapoport > > The mappings created with MAP_EXCLUSIVE are visible only in the context of > the owning process and can be used by applications to store secret > information that will not be visible not only to other processes but to the > kernel as well. > > The pages in these mappings are removed from the kernel direct map and > marked with PG_user_exclusive flag. When the exclusive area is unmapped, > the pages are mapped back into the direct map. I probably blind, but I don't see where you manipulate direct map... -- Kirill A. Shutemov