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=-0.9 required=3.0 tests=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 5BF04C2BA1E for ; Mon, 6 Apr 2020 17:27:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1E95224A02 for ; Mon, 6 Apr 2020 17:27:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="TqT24X/r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E95224A02 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 B6E198E0054; Mon, 6 Apr 2020 13:26:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B1E778E000D; Mon, 6 Apr 2020 13:26:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A35978E0054; Mon, 6 Apr 2020 13:26:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0229.hostedemail.com [216.40.44.229]) by kanga.kvack.org (Postfix) with ESMTP id 8D05C8E000D for ; Mon, 6 Apr 2020 13:26:59 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 488BD801C417 for ; Mon, 6 Apr 2020 17:26:59 +0000 (UTC) X-FDA: 76678110558.09.glass50_28e304bf1652 X-HE-Tag: glass50_28e304bf1652 X-Filterd-Recvd-Size: 4178 Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Apr 2020 17:26:57 +0000 (UTC) Received: by mail-lf1-f65.google.com with SMTP id m2so135849lfo.6 for ; Mon, 06 Apr 2020 10:26:56 -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=BZ491r7mDp3NDGymaETOvU1g3XqdwBRrxA5tOEnLogQ=; b=TqT24X/roRyAPe/JsynU8OkUqA1rxBWWzcUz5j29g3Du7td4vZHNVUC2hMk5WxnZd7 c+wZk984zgeiXHuk1D3Kt5ZpxP8uIhsfoiMSa9R8Gp0iWBBs407XpAutonvox1XnKfup 764yY8jwfyqkWl6S3b1Pd2NMdj7LmkhrBR+b0= 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=BZ491r7mDp3NDGymaETOvU1g3XqdwBRrxA5tOEnLogQ=; b=S3fASKpa7j4LUuAFZvaeA2BPG3TYD802mlNH1NiLYNSDCa+VV4ONICYFhfekncqMf/ P942FqFTnBVU6zPA545ZW45tWNpAn9XUq9LF8CM/UK1DrVLnTQ7+fvMgnXD+XdRb6qSs YhORixxzssGdu3NXazidfrmvVH0IJVtgypHxLh1b1a7RRS4VnNGm1iazC/TuLBbeaL6D YGlelfok+DBGCAsHXY9nMZZXVORl2Qq33w8LmwIYrPG/5Enyc+ChzGC+olk+vCV9dytz 1tyeu6Q7Pb2K6NHNXubJ2GrZqxdGd7qPY0yTnWNiM98kxrtP7SGjrwiXtYbwmc8RJCvo 01Tg== X-Gm-Message-State: AGi0PubzOQwOVwfS936TeW9B+ZKhjRVJogFHWPvWkdlaNOLxO2UsyQgU 7oCTU85j4nyxebJiMHSGbtxCOdK6rtM= X-Google-Smtp-Source: APiQypJbQ8FnvRyBuzz8yzMtvDLakGNDDTVDnNSxwheLU6GhaKAPv+IIqbEiQ97QFvK42PURaPfTHA== X-Received: by 2002:a05:6512:108a:: with SMTP id j10mr14106644lfg.38.1586194014879; Mon, 06 Apr 2020 10:26:54 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id y20sm10565922ljy.100.2020.04.06.10.26.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 10:26:54 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id r7so504765ljg.13 for ; Mon, 06 Apr 2020 10:26:53 -0700 (PDT) X-Received: by 2002:a2e:9b8e:: with SMTP id z14mr214337lji.150.1586194013190; Mon, 06 Apr 2020 10:26:53 -0700 (PDT) MIME-Version: 1.0 References: <20200406023700.1367-1-longman@redhat.com> <319765.1586188840@warthog.procyon.org.uk> <334933.1586190389@warthog.procyon.org.uk> In-Reply-To: From: Linus Torvalds Date: Mon, 6 Apr 2020 10:26:37 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm: Add kvfree_sensitive() for freeing sensitive data objects To: Joe Perches Cc: David Howells , Waiman Long , Andrew Morton , Jarkko Sakkinen , James Morris , "Serge E. Hallyn" , Linux-MM , keyrings@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" 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 Mon, Apr 6, 2020 at 10:12 AM Joe Perches wrote: > > Add yet another alloc flag like __GFP_SENSITIVE > and have kfree operate on that and not have a > kfree_sensitive at all. That sounds potentially sensible. Maybe even a SLAB_SENSITIVE to mark a whole slab cache sensitive for kmem_cache_create(). I'm not sure how controlled the allocations are, though. The allocations that get used for keys etc might come from outside the crypto layer. Linus