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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 38FFDC43470 for ; Tue, 18 May 2021 10:06:55 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9D9960725 for ; Tue, 18 May 2021 10:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9D9960725 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id ABE3B100EB358; Tue, 18 May 2021 03:06:53 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=david@redhat.com; receiver= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 26831100EB350 for ; Tue, 18 May 2021 03:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621332409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dFkmeu2athwSt2LK0RUUi/E/grHFe/dKRRuvCpK8qJo=; b=XEcE8fBbLoLU6ZJirZ8BoG9FTYmuyIQvP5iUQM92lmYipET+JAp1Th2aixoxs0P1qPa4xN V92AOvN5YQ4RmFoBIGWURT4IhOdQfMjJjJM7r9SQWfWKmf/rI1qd+js7fgy9mozOPDOm21 /2aEjMhK7qyowuN7cffnKG8R+GVYqko= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-A4NLYjIWNpGOpKH293PghQ-1; Tue, 18 May 2021 06:06:47 -0400 X-MC-Unique: A4NLYjIWNpGOpKH293PghQ-1 Received: by mail-wr1-f70.google.com with SMTP id d12-20020adfc3cc0000b029011166e2f1a7so4393101wrg.19 for ; Tue, 18 May 2021 03:06:47 -0700 (PDT) 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:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=dFkmeu2athwSt2LK0RUUi/E/grHFe/dKRRuvCpK8qJo=; b=DacSD9YacreUfviyWHRIX8Hi98HuA5q/ckzY3jy8lFak7QZJ04E4cUlGq/xAGxqGlk OTFVh66yCSzI8ocSW4YrfVVMNXi7+7ce6wlcYjhjNq+oObNRfCdRDSeqwDlb2NIXyGCk Z79Nb80fFfzKiZ1KlA0WzgCli4I68CsorxxCDno5EHGqI6CBGnGsZN1gsoPT0WAT1IPp 6n7E6InLiw++DoJFq8AWsseH476Ugqtf4KTn48gnFKKD4dUYnJc9ok1sPUHYS9AoIvXS idNzkVXRJFfffT3N8aZeBQy6O98k7RQhUKY7scnjSwaZuNFmoyr7afQaWZlgWMNGL2v7 1kow== X-Gm-Message-State: AOAM530O+UHDrgNRVJfMI+lZ+VOX+f3cvUWiQtyZXAqj4zovvFOCUuxI Fkdn2SwV5jOAqsFcV3SXzRcWHs1WmTNyli81xz43EbM2jJ7E6HYFS+OlrF8E2TwFoqskmRxS3FU S67Ef9HBvb7B/8+u/gomK X-Received: by 2002:a05:6000:1ac5:: with SMTP id i5mr5879978wry.6.1621332406615; Tue, 18 May 2021 03:06:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiVxI2VqHM3UC3HkCv7YVP9ChZhf/paSvmhTbK/1R/b2aClM7EAkaKYj9OwIH5AzvG3tEX6Q== X-Received: by 2002:a05:6000:1ac5:: with SMTP id i5mr5879787wry.6.1621332405164; Tue, 18 May 2021 03:06:45 -0700 (PDT) Received: from [192.168.3.132] (p5b0c64fd.dip0.t-ipconnect.de. [91.12.100.253]) by smtp.gmail.com with ESMTPSA id f14sm8395872wry.40.2021.05.18.03.06.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 May 2021 03:06:44 -0700 (PDT) Subject: Re: [PATCH v19 5/8] mm: introduce memfd_secret system call to create "secret" memory areas To: Michal Hocko , Mike Rapoport References: <20210513184734.29317-1-rppt@kernel.org> <20210513184734.29317-6-rppt@kernel.org> From: David Hildenbrand Organization: Red Hat Message-ID: <8e114f09-60e4-2343-1c42-1beaf540c150@redhat.com> Date: Tue, 18 May 2021 12:06:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Message-ID-Hash: IWHMERSPA5V6IV5MGGDCYUZLBMFFOXV6 X-Message-ID-Hash: IWHMERSPA5V6IV5MGGDCYUZLBMFFOXV6 X-MailFrom: david@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: Andrew Morton , Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dave Hansen , Elena Reshetova , "H. Peter Anvin" , Hagen Paul Pfeifer , Ingo Molnar , James Bottomley , Kees Cook , "Kirill A. Shutemov" , Matthew Wilcox , Matthew Garrett , Mark Rutland , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , "Rafael J. Wysocki" , Rick Edgecombe , Roman Gushchin , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , Yury Norov , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit On 18.05.21 11:59, Michal Hocko wrote: > On Sun 16-05-21 10:29:24, Mike Rapoport wrote: >> On Fri, May 14, 2021 at 11:25:43AM +0200, David Hildenbrand wrote: > [...] >>>> + if (!page) >>>> + return VM_FAULT_OOM; >>>> + >>>> + err = set_direct_map_invalid_noflush(page, 1); >>>> + if (err) { >>>> + put_page(page); >>>> + return vmf_error(err); >>> >>> Would we want to translate that to a proper VM_FAULT_..., which would most >>> probably be VM_FAULT_OOM when we fail to allocate a pagetable? >> >> That's what vmf_error does, it translates -ESOMETHING to VM_FAULT_XYZ. > > I haven't read through the rest but this has just caught my attention. > Is it really reasonable to trigger the oom killer when you cannot > invalidate the direct mapping. From a quick look at the code it is quite > unlikely to se ENOMEM from that path (it allocates small pages) but this > can become quite sublte over time. Shouldn't this simply SIGBUS if it > cannot manipulate the direct mapping regardless of the underlying reason > for that? > OTOH, it means our kernel zones are depleted, so we'd better reclaim somehow ... -- Thanks, David / dhildenb _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org