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=-6.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 52162C07E96 for ; Thu, 8 Jul 2021 18:39:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CA199616EA for ; Thu, 8 Jul 2021 18:39:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA199616EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 844A86B0011; Thu, 8 Jul 2021 14:39:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CCD46B005D; Thu, 8 Jul 2021 14:39:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61F7E6B006C; Thu, 8 Jul 2021 14:39:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0151.hostedemail.com [216.40.44.151]) by kanga.kvack.org (Postfix) with ESMTP id 384D56B0011 for ; Thu, 8 Jul 2021 14:39:19 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 7CD2D181AF5F4 for ; Thu, 8 Jul 2021 18:39:18 +0000 (UTC) X-FDA: 78340283196.16.5BDDC12 Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by imf12.hostedemail.com (Postfix) with ESMTP id A7E9D1000300 for ; Thu, 8 Jul 2021 18:39:12 +0000 (UTC) Received: by mail-lf1-f53.google.com with SMTP id p16so18205344lfc.5 for ; Thu, 08 Jul 2021 11:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZbVTQJiWMi7n2BAEqeIc/TSnkT4lgC/n0nesP0M/E38=; b=NozJVPtm7R5JYV3+i9kA9FozPErjP5t6bLpakXOVQjFpwDyPe+2KPRkXiZ/dwxqF2w 05REBgRyFck+UzCb4hHZEzkAaMxlf6qmmc+5+C/928ZWG3CQSQqVA3dZ+jOXnzbjbnkv HSNqC2aLjov4MbCalHNyU86FbyP/3WFg5gpaE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZbVTQJiWMi7n2BAEqeIc/TSnkT4lgC/n0nesP0M/E38=; b=UY40ELK02eSrbokdi6O1b3CNN7yVLBnsq7j5JN95qQ6N/PFiOQzmiZzXRNrMHCd6el Ve8SSEy2RLFjCV7We5AkcOuV2EH/+ySuue5VPJZGCXHsJ4EFlti04sOnUAwo+OlEXGO1 ebVJ0UlxqfrqOai90oYXgYYLWx7Pv95I+nXqbcLI/bPK1q3iDXVyOAbVjnwDXWM49EbY hbNFhp0seR/yS2aHrW9yTynB9Z0aHqe/U9TtfChu0opTJy1cBYoUXIf25/RNGZpc0zfh PMqlytP9rGGfwlHlAIRQcgOOGEPir4KUr/QjaxVHlG+cUji1+7Ma/fq7IWr1Ndj2V5lj dFiw== X-Gm-Message-State: AOAM532xyZvHaQQkZapQOJw+7iZev5D5bmAnKfXsOO41GpjTzprKzwDG eFh09b/+qrrPe5jFqJDQuJagIga8ErUgk1FGRgA= X-Google-Smtp-Source: ABdhPJycweREXATsYYK9oS8xIS1Ph04YhZYuDkzylacL1FWeulNNxCUKdhWFUewMsGKaM/ippcrOqg== X-Received: by 2002:ac2:54a3:: with SMTP id w3mr17540371lfk.429.1625769548299; Thu, 08 Jul 2021 11:39:08 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id h36sm100134lfv.224.2021.07.08.11.39.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Jul 2021 11:39:07 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id f30so18150307lfj.1 for ; Thu, 08 Jul 2021 11:39:07 -0700 (PDT) X-Received: by 2002:a05:6512:3585:: with SMTP id m5mr24756940lfr.253.1625769547347; Thu, 08 Jul 2021 11:39:07 -0700 (PDT) MIME-Version: 1.0 References: <20210707175950.eceddb86c6c555555d4730e2@linux-foundation.org> <20210708010803.i6RiDHM3L%akpm@linux-foundation.org> In-Reply-To: From: Linus Torvalds Date: Thu, 8 Jul 2021 11:38:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 11/54] mm: introduce memfd_secret system call to create "secret" memory areas To: Mike Rapoport Cc: Andrew Morton , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christoph Lameter , Dan Williams , Dave Hansen , David Hildenbrand , "Reshetova, Elena" , Roman Gushchin , Hagen Paul Pfeifer , Peter Anvin , James Bottomley , James Bottomley , "Kirill A . Shutemov" , Linux-MM , kernel test robot , Andrew Lutomirski , Mark Rutland , Ingo Molnar , mm-commits@vger.kernel.org, Michael Kerrisk-manpages , Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , "Edgecombe, Rick P" , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Al Viro , Will Deacon , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=NozJVPtm; dmarc=none; spf=pass (imf12.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.53 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A7E9D1000300 X-Stat-Signature: 3kmdcty91umx1um6mj36r3hreqer6cz8 X-HE-Tag: 1625769552-760276 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 Wed, Jul 7, 2021 at 10:22 PM Mike Rapoport wrote: > > This feature is off by default and should be explicitly enabled by a system > administrator. I really don't think that matters, since people would go "oh, I want secretmem" without being aware of the consequences. But: > When it is enabled, a user cannot exceed RLIMIT_MEMLOCK. I had missed that, even though it was mentioned in the long commit description. I just read the patch, and was looking at the secretmem_file_create() and missed how the the limit was there in the mmap path. So I'm fine with this. I still suspect that the "don't hibernate" should maybe at least alert the sysadmin about *why* the hibernate failed, but let's see if that ends up being an actual problem. Linus