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.7 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,URIBL_BLOCKED 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 0A1DDC07E95 for ; Thu, 8 Jul 2021 03:16:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7181761964 for ; Thu, 8 Jul 2021 03:16:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7181761964 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 358D16B0011; Wed, 7 Jul 2021 23:16:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 308D76B005D; Wed, 7 Jul 2021 23:16:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 183406B006C; Wed, 7 Jul 2021 23:16:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0162.hostedemail.com [216.40.44.162]) by kanga.kvack.org (Postfix) with ESMTP id E96496B0011 for ; Wed, 7 Jul 2021 23:16:14 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3911C8191164 for ; Thu, 8 Jul 2021 03:16:14 +0000 (UTC) X-FDA: 78337957068.11.C733C91 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by imf18.hostedemail.com (Postfix) with ESMTP id C1A55400208A for ; Thu, 8 Jul 2021 03:16:13 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id y42so10566981lfa.3 for ; Wed, 07 Jul 2021 20:16:13 -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=iQkhgc4vWZYU2b8dnDdTcTWRP8gpSBH76oPx0kv632A=; b=F9UqpMaSRPcazxsBYAKZF5tuF0hzcTaNzn6s+tK/ajt0I7feuGlUx58lZf1U4bH/Uj gqR1Ly6OZmaZHq/nWOqzepVGMCcflsGQ7r+7fBVsHDvRF4xpkxSOFjUD8EwHitbKWpB8 KhKUSuFzewh5PD9P41VRWbCNFK4geAWvDqznU= 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=iQkhgc4vWZYU2b8dnDdTcTWRP8gpSBH76oPx0kv632A=; b=ZJbOTVAaWVEDfWjOYzMRgjmv/85PbMmOlA67s3vp3t7KJFSCzw51KQaz2OLJqciqpm BVj7JxPXlFK9jGDlftTppTcGClP8Z7KmMLQyGEDpXSP+hTjydu/7TIL6kN4FVuTTtt8w oAxHGICKWn5sYQ9A5L80td9vwqi3S8Mj7CqNmzmDapPRR8f6Obyb5V2gAvypZTcA/MlA MEeF6ImIAfPagbFWylBKGqAfVpyinAS1Lq1tP4p98RhR938YZQbOYLruIuAbv9HZx2ZD qxMOToL35aTzyKcXIO2kvzKPW52C/aHcB0SzG4FBfWEukTDS5Tv0HWo2Eris8cHVFVgN fInQ== X-Gm-Message-State: AOAM530udM28NDRF8aBqH+yAhxJafQsguuzIkTxDwOytJstL83YpRzZD 8n5hbZaD65AD0LyU52PRXzQU8jyUpJbnzyI85Oc= X-Google-Smtp-Source: ABdhPJyKabsIIIidubiemO7KDDA25UxBSmMGsjHWp7d8v+N01C2PNKRLP1ZcMPcq1cV7WHCCywpTpA== X-Received: by 2002:a05:6512:b24:: with SMTP id w36mr21443303lfu.124.1625714171806; Wed, 07 Jul 2021 20:16:11 -0700 (PDT) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id z25sm95004ljn.119.2021.07.07.20.16.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jul 2021 20:16:10 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id f30so10576709lfj.1 for ; Wed, 07 Jul 2021 20:16:09 -0700 (PDT) X-Received: by 2002:a2e:b55b:: with SMTP id a27mr11302203ljn.251.1625714169485; Wed, 07 Jul 2021 20:16:09 -0700 (PDT) MIME-Version: 1.0 References: <20210707175950.eceddb86c6c555555d4730e2@linux-foundation.org> <20210708010807.hHILhs811%akpm@linux-foundation.org> In-Reply-To: <20210708010807.hHILhs811%akpm@linux-foundation.org> From: Linus Torvalds Date: Wed, 7 Jul 2021 20:15:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 12/54] PM: hibernate: disable when there are active secretmem users To: Andrew Morton Cc: 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" , Mike Rapoport , Shakeel Butt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Al Viro , Will Deacon , Matthew Wilcox Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=F9UqpMaS; spf=pass (imf18.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.47 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: C1A55400208A X-Rspam-User: nil X-Stat-Signature: ow6tacb5k7g8rdsrcodyu9mhd7quiqqx X-HE-Tag: 1625714173-828521 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 6:08 PM Andrew Morton wrote: > > Prevent hibernation whenever there are active secret memory users. So now anybody can not only use up all memory resources with these fake mlock regions, they can also force laptops to run out of battery and crash. Again, maybe I'm missing something, but I didn't see any capability checks or anything at all to limit this once it is enabled. Linus