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 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 49EA0C2BA1E for ; Mon, 6 Apr 2020 17:58:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 112D120719 for ; Mon, 6 Apr 2020 17:58:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="KNwNWy4P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 112D120719 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 A1DEA8E000F; Mon, 6 Apr 2020 13:58:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CEE58E000D; Mon, 6 Apr 2020 13:58:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8BDDC8E000F; Mon, 6 Apr 2020 13:58:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 73C718E000D for ; Mon, 6 Apr 2020 13:58:49 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2DAE8181AEF15 for ; Mon, 6 Apr 2020 17:58:49 +0000 (UTC) X-FDA: 76678190778.29.grass63_872c94f4a1931 X-HE-Tag: grass63_872c94f4a1931 X-Filterd-Recvd-Size: 4373 Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Apr 2020 17:58:48 +0000 (UTC) Received: by mail-lj1-f196.google.com with SMTP id p14so632096lji.11 for ; Mon, 06 Apr 2020 10:58:48 -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=rwJPlRCUFnxKeScoq9dq7EwMroxlXzzHMUmRogd2GBw=; b=KNwNWy4PqTz3d8ivjq4Wv2SVKLUlrGcnZzRu5TWm1tL4bj+xqqAC2eb1HfogpT8GzY awqOimgf5tSIhuRneuYUClX/pzpekyMMK3wJtqt8VBs7OdIkv3s/sLCnBMlTYKNxgYQu l6FhxVKpYjqBSeFRzCii+BTz3gnKU9IF2qOXc= 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=rwJPlRCUFnxKeScoq9dq7EwMroxlXzzHMUmRogd2GBw=; b=Bw4tK1SfHM0AXfEsoyw8FBDj9UHIlL8jGW1qOQETkCE7mkz/AdGssprDwcyGdtVwfR OlM0VGSHRiFVBVZt51KHsmsOFWbOAlnyS+DAj9YYnXwNZvfuCAlkY0G+AQ9UFYnAGJeA IHIMHZlUPDkxjbuMLaCQW6UJk6oOmw35as/YYvMQmR08n9iAzpCcc98p03qMoW21UQe8 uDgF1RXNkINa6qJ31RHjuYLex7GHxidleNhs6wcLyKQfrEcoR9gJidYpqzWwbCSPEm99 jG09toLsTiwyqTJa8xrTirSCWRTfQVM9E1b/S97M5CPpVg/JO/iij14Nv+BZwO15CaMV Hx+A== X-Gm-Message-State: AGi0PuYFjHxLwYv2vstQvJZqu+O6rfgOWGOcGZBuiDMLGLHdT8KvRXvX Spg8JumuUEFt9Y0usjpnjvTKGlMkotM= X-Google-Smtp-Source: APiQypI5KISO1mfb3H0vIajYELq/u3PIBYKC+qXNOL9KpDUhcLgiQeox0Qcxr9B5k65J6sezy8JgPg== X-Received: by 2002:a2e:87cc:: with SMTP id v12mr269667ljj.127.1586195926571; Mon, 06 Apr 2020 10:58:46 -0700 (PDT) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id a4sm12976260ljb.27.2020.04.06.10.58.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 10:58:45 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id i20so671039ljn.6 for ; Mon, 06 Apr 2020 10:58:44 -0700 (PDT) X-Received: by 2002:a2e:b4cb:: with SMTP id r11mr273540ljm.201.1586195924658; Mon, 06 Apr 2020 10:58:44 -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> <354824.1586195497@warthog.procyon.org.uk> In-Reply-To: <354824.1586195497@warthog.procyon.org.uk> From: Linus Torvalds Date: Mon, 6 Apr 2020 10:58:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm: Add kvfree_sensitive() for freeing sensitive data objects To: David Howells Cc: Joe Perches , 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:51 AM David Howells wrote: > > The allocation might be by vmalloc rather than kmalloc. I'm not sure if that > makes things more difficult. It does add yet another place where we'd have to save the "this allocation is special", but it's not insurmountable. That said, I think the short-term and simple solution is to just teach people that sensitive free's are different, and at least have the key subsystem with sane naming. And yes, then eventually convert the existing crypto subsystem uses too for consistency. Linus