Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3538302ybb; Mon, 6 Apr 2020 10:37:04 -0700 (PDT) X-Google-Smtp-Source: APiQypI478f6R0uXua0sM+GdDhFHBj+qbgxp7kqn2kHgP0ph9T0C/16/mzbad4TOn96fmWJIQkAL X-Received: by 2002:aca:5f8a:: with SMTP id t132mr259697oib.132.1586194623965; Mon, 06 Apr 2020 10:37:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586194623; cv=none; d=google.com; s=arc-20160816; b=NQRQ4V7TP1BF630EqwDrf/7jW2a3fv4yHjggal2/hpzRFBatcOyQBUizKe/7ZTeFHM 8xG6Kfkgsh9CEu2/kd8aICqrpDgB8fic2h7K4BCCoIkS3L6E4Fa1teTXUofgyqBrrKMs BKZrbJ5dgfeb5K9q8SYs0kqjELYVzBN/PelrksMSJFLKBe8/cfg8rpMoxtKbCYdSZf2P ZuO/gD6zERXtB/Rs6XrrP2OyCMph1cd5nZkmJhJM/wR5Z/KOlYlhp15YyxdoG3NnCKy2 oGdZE2beTdbYTqrsDPsY69KrvcVU+DNUDKMckJTcbQgCVpKvNBliHefvnJ6cMzSAzgK5 2DTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CbTeDSEPwtaCzw6yjO0kB3OJ1K9g71GqZ7e8uE+/IlU=; b=slMuAJ2OhkVaSLTxxv6eUlJpSgeOT2jY+xrZpek8D9egaNFYxxfDP6UQkV2H2jzpmm otXHUkbBMvSC+7AwHjg8feR68KNealgLgqQ1EeDEArTD5gECnZmIJPvy1EXsyQciqp/L PqWQCkLKes1td5KclF5qbSvfJH0yDLtqc4VNudHhhQM+pzx/cAL4iryxtS2xuucD55dg CQ4upjo6gDTOLwfHTvdkNJXsxMbtCvUoW3TppWPBGG41Eum0ApyN2h5d+vQ9Rjgy8Lf+ I7c9wjVFtnsUFHgPjMMJshNpc7q55aZIM6w5PWTbH3Wu0WzBpcA/MJz6uW5dw8bzI8p5 lfFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=O+aZuVVc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z24si84724ool.40.2020.04.06.10.36.51; Mon, 06 Apr 2020 10:37:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=O+aZuVVc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728927AbgDFRYx (ORCPT + 99 others); Mon, 6 Apr 2020 13:24:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35562 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726637AbgDFRYx (ORCPT ); Mon, 6 Apr 2020 13:24:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CbTeDSEPwtaCzw6yjO0kB3OJ1K9g71GqZ7e8uE+/IlU=; b=O+aZuVVcCdlpNcA+sNO1Ued0KP ZR9UWZ6reaACpuBx+ucTaAQB5/U2W7yy+goHjJgwttK8J/DLJSqnYFVsOjAW4RRrdvNon8mbwzrQc EJ+T175Hofiqqon9aClUvjZUm3DVtg42OMmNCNqD5z1a4HlulRC/n8CM//KdMw3nQgIGepO8nzsbq KNNX1HIiagz2ZmxeiIZlHFnkJUaAQoQUy3SU6IGdSRP2nN/hXgQZU/F6YlGV96vNPdXbCMcG1t+zk MYbM9yFD2OF5z1QZ4GKZoH+dop45A6A9E/bGA202PNAxfWvQNfxfQfzKpEy9oXtuJ52DcfcjOPgeI 5lKHaKXg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLVUK-0003Az-2X; Mon, 06 Apr 2020 17:24:44 +0000 Date: Mon, 6 Apr 2020 10:24:44 -0700 From: Matthew Wilcox To: Joe Perches Cc: David Howells , Waiman Long , Andrew Morton , Jarkko Sakkinen , James Morris , "Serge E. Hallyn" , linux-mm@kvack.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH] mm: Add kvfree_sensitive() for freeing sensitive data objects Message-ID: <20200406172444.GG21484@bombadil.infradead.org> References: <20200406023700.1367-1-longman@redhat.com> <319765.1586188840@warthog.procyon.org.uk> <334933.1586190389@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 06, 2020 at 10:10:20AM -0700, Joe Perches wrote: > On Mon, 2020-04-06 at 17:26 +0100, David Howells wrote: > > Joe Perches wrote: > > > > > While I agree with Linus about the __ prefix, > > > the z is pretty common and symmetric to all > > > the zalloc uses. > > > > > > And if _sensitive is actually used, it'd be > > > good to do a s/kzfree/kfree_sensitive/ one day > > > sooner than later. > > > > How much overhead would it be to always use kvfree_sensitive() and never have > > a kfree_sensitive()? > > Another possibility: > > Add yet another alloc flag like __GFP_SENSITIVE > and have kfree operate on that and not have a > kfree_sensitive at all. kfree() doesn't take GFP flags.