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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,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 75AE1C2BA1B for ; Mon, 6 Apr 2020 17:51:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 52038206C0 for ; Mon, 6 Apr 2020 17:51:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KaA0V+B5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726627AbgDFRvv (ORCPT ); Mon, 6 Apr 2020 13:51:51 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:39124 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726491AbgDFRvv (ORCPT ); Mon, 6 Apr 2020 13:51:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586195509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AjnKQhZRrlXMg/3NDwu03y4zJEpSBlgOKpKNn5skTkQ=; b=KaA0V+B5UjZWV8EvU60cvleTitZs6tsjM0e0TXuJly6gDi9Nc3RRDyrQ129bU0dW/P62EK MWco43+y71JqKVHIq/ZGOmUjNW6UAcRFmITLXMqnYSGb1lrb7kG8KrUjJdF7qeIDZhWOVy W4u95+JiXkSz+lJ2ROQRIYPv0O6Phog= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-268-zg1BvAKROxCedjT3i4NrUQ-1; Mon, 06 Apr 2020 13:51:46 -0400 X-MC-Unique: zg1BvAKROxCedjT3i4NrUQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 470A08017CE; Mon, 6 Apr 2020 17:51:44 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-224.rdu2.redhat.com [10.10.112.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D334118F3F; Mon, 6 Apr 2020 17:51:38 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20200406023700.1367-1-longman@redhat.com> <319765.1586188840@warthog.procyon.org.uk> <334933.1586190389@warthog.procyon.org.uk> To: Linus Torvalds Cc: dhowells@redhat.com, Joe Perches , Waiman Long , Andrew Morton , Jarkko Sakkinen , James Morris , "Serge E. Hallyn" , Linux-MM , keyrings@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] mm: Add kvfree_sensitive() for freeing sensitive data objects MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <354823.1586195497.1@warthog.procyon.org.uk> Date: Mon, 06 Apr 2020 18:51:37 +0100 Message-ID: <354824.1586195497@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds 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(). The allocation might be by vmalloc rather than kmalloc. I'm not sure if that makes things more difficult. David