Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3557630ybb; Mon, 6 Apr 2020 11:00:40 -0700 (PDT) X-Google-Smtp-Source: APiQypIc+mTlr0E4klk0vOxHTqbaSZ40poHTECGViIk4MjC8CZVixM28u+HElaxXreeAjhwfe2WC X-Received: by 2002:aca:c45:: with SMTP id i5mr291746oiy.101.1586196040067; Mon, 06 Apr 2020 11:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586196040; cv=none; d=google.com; s=arc-20160816; b=GAMhQyLCEp47VfFedEdf/gxhV+BZO9aEw0N4zW0WsrBUxXc+ihTqqzMI2CteGWnNYZ R051qLZyocj2FbmHxLmhzDO5DIi2AmpllK1+YgARFVLmD4/ZDaAOEKPxeDCLrFe1DYFK k+qkcQrisX9pT/5ABAnOinJhrH2/srfnloSgoJYcno8kXeDrhWeIWDQJOhky++orbdIq hauOQyC7dmJ3gMzykb+73HIcBFiemR0BSy3uaIx831rWebPNAckODLYJ6Rmr4tmq97Bt K4gPvj0c4Zu0iUFx6GK7dgweySiTP0Ow9v7dZqmZU4MQz1novnNB2RL+rrb8eeZMkWsz 7Swg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rwJPlRCUFnxKeScoq9dq7EwMroxlXzzHMUmRogd2GBw=; b=KhJiDPH7KmGYvpelBP+fRChtMmtxF1BoyW/i47v9sWPft3B9SrtTevEyEOSOJO4EgT QOuz6QIJRCNK3P+rq+wPqmTpAxA9UeG07aaGdI5nNXTjxqdvSeJRvXLGIRmPbgRQEZ8G TaJpv02rps6s1pd88Dm1w7rjVSip6KRXD8Dc4bpp16JAjSblPsg+xe033QZV+4Pp7PwF e8/oxEK197RB/iAvg+6O+Zi7iRTORCxfY/LLWFJk9Dabz4k8C9CnbgYf+Q3P9DZcfaPx 2XLzHLh4N3lYYnsKWIqMucnJZUV1NaghwbcgayW1ThFEtGYImJP+/S1eUzQYZ/IsPBEm qyhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KNwNWy4P; 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 r63si2975917oib.217.2020.04.06.11.00.23; Mon, 06 Apr 2020 11:00:40 -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=pass header.i=@linux-foundation.org header.s=google header.b=KNwNWy4P; 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 S1727001AbgDFR6u (ORCPT + 99 others); Mon, 6 Apr 2020 13:58:50 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:45090 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgDFR6u (ORCPT ); Mon, 6 Apr 2020 13:58:50 -0400 Received: by mail-lj1-f196.google.com with SMTP id t17so626228ljc.12 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=XIQhPDyGxFHtH29LS8eM3jEoamlHPfcHSnf25JetzO6BuZTtP7NVS3+LaJpOOtdRS6 XA9/BT8pzTP2Kk2BOOyXhd//B3LHkb8AmYgPLoOyZMMlAQa0u5qR6lWi8hxFmN+vD/DD jyXKUSwKC/jkY1R5PXfDUKNXJrUHIZ2/atdPhTbiuZ7ce7qk6cdEIt6w6oY7LUFB/4HL JznFLb2bKwoAnKLr/OtqA0IBdMZpuVROsjX3x5pwaky1asLPUjCrgNxBAuzMsVCs3DM4 2bCN4V2jMAA1jareF0Oz4SuIke0S7bgLAlC7eQW0lvjybeFlaf7vQ6MVzF8JndBZb4xQ nI/Q== X-Gm-Message-State: AGi0PuZpKjHG7jJJkeKNpIHo7OH2/fk3LyxlbzShy5HTefYKBWKPqZze HihHz6eJ6/osCiBsU03gerVjRpC326M= X-Received: by 2002:a2e:8084:: with SMTP id i4mr263909ljg.185.1586195926418; Mon, 06 Apr 2020 10:58:46 -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 o2sm10424011ljm.2.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-f181.google.com with SMTP id r7so616989ljg.13 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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