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 E50C3C2D0EC for ; Tue, 7 Apr 2020 22:54:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A064620730 for ; Tue, 7 Apr 2020 22:54:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ObfqlF+q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A064620730 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2E4678E0005; Tue, 7 Apr 2020 18:54:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26D088E0001; Tue, 7 Apr 2020 18:54:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 136348E0005; Tue, 7 Apr 2020 18:54:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id ECA698E0001 for ; Tue, 7 Apr 2020 18:54:27 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9799640D0 for ; Tue, 7 Apr 2020 22:54:27 +0000 (UTC) X-FDA: 76682564574.03.scarf51_9cccb9dc1125 X-HE-Tag: scarf51_9cccb9dc1125 X-Filterd-Recvd-Size: 4037 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Apr 2020 22:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586300066; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LZDDid3a3ePfhLodTyOmZRjnrTotcjxlg26rXizPwJc=; b=ObfqlF+qr4JzEZfMc1rh6YNj/qk9jWVGcJbMwmyVPo9oqFOhTYBdXnsJGUx3Jk6zCjOl2Z stUNY3gX0QRSSyhL8YaHdDfhC7AxUYWjL7TjQjpUCJfoESIBTz8eM8QoJXB6901KYyc5Wr q6P/xqlY6MOf541foeWRhA4d1MotEdY= 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-435-VXoG6dq-MCGFzhVdysVHAQ-1; Tue, 07 Apr 2020 18:54:19 -0400 X-MC-Unique: VXoG6dq-MCGFzhVdysVHAQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 061BE13F9; Tue, 7 Apr 2020 22:54:17 +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 428C55DA60; Tue, 7 Apr 2020 22:54:11 +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: <20200406185827.22249-1-longman@redhat.com> <699292.1586294051@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 , Matthew Wilcox , David Rientjes , law@redhat.com Subject: Re: [PATCH v2] mm: Add kvfree_sensitive() for freeing sensitive data objects MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <749734.1586300050.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Tue, 07 Apr 2020 23:54:10 +0100 Message-ID: <749735.1586300050@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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: Linus Torvalds wrote: > > It might be worth asking the compiler folks to give us an __attribute_= _ for > > that - even if they don't do anything with it immediately. So we migh= t have > > something like: > > > > void free(const volatile void *ptr) __attribute__((free(1))); > = > Yeah, that sounds sane. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94527 > Even if it wasn't initially used for anything it wouldn't hurt, and mayb= e > some day it would improve warnings (and allow the compiler to do the dea= d > store elimination that started this whole long set of threads in the fir= st > place..) With regard to this, I've got back "not sure what Linus was talking about = WRT DSE, if he's got examples he could pass along, they'd be appreciated" David