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.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 0B2CFC433E0 for ; Wed, 17 Jun 2020 08:18:42 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 765EE207DD for ; Wed, 17 Jun 2020 08:18:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="n7fvTs+/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 765EE207DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49mydC1zQSzDql5 for ; Wed, 17 Jun 2020 18:18:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::642; helo=mail-ej1-x642.google.com; envelope-from=joel.voyer@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=n7fvTs+/; dkim-atps=neutral Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49myHx6mZGzDqfY for ; Wed, 17 Jun 2020 18:03:38 +1000 (AEST) Received: by mail-ej1-x642.google.com with SMTP id dp18so1288092ejc.8 for ; Wed, 17 Jun 2020 01:03:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IoLOTj4N/UivUbV7Xr+eQksZLmcOCCkaL8Z2FZzpaSE=; b=n7fvTs+/AIa8pMpfW6aPzMLlPj+Dgki9bUAxy/WJhTzuhCBbd+H1VjHgPGq499Rpv/ 5d/Fu/pYEKH1b6nUOp+B/0rVShHG5a3F5X6E9yohIERXhGRB+jfz7fG7aLScoIpx8e+F hoa3YKo1A1lDCasydfb4WIy1UyVUOIk9DfVXXMnVNv4WGz8gFNusqZ8XbJsGTDUN9Fqb G31mdXjKpT3KyemJTlD9XocjfZeFc/GyLV2zWtdzsLpQAbvFvS3y1YSYDd18MIgGQFXl /yNkjvwU7T7hVY2TKYobQ4wa9+HTev7V+Zm0ABk5R4hLFzxjXuIxIeh+PmN3kmrE6ePT RYtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IoLOTj4N/UivUbV7Xr+eQksZLmcOCCkaL8Z2FZzpaSE=; b=fMhQs7GWnGoOIpoyNGJbcELJ/FVEIijN/4+07vV6MD8ZJhqYC91wDVo1nA0cSHfZJg JSbooLYfO2vDUqSFOzgSOCIKhwBM5idjXYYaThp6qP/viXo5i/YgdMTLCrI3JrFpIPH0 ymPa5SFhnrXjunanHFjS2nnSGTQU9BGTXEFugW0aO+7CzivFRssAwUczbyEAQQ5YzV0y zQuGKBBdOa8DTMrJ10tyqndEGPs/2dP9j3843055Q4Jk4XAbaViTNvD29mkTAk6SBhBz wBQFpCnKlWIaVMWLsnXOJoyJJ5rpQzDKWaCC6u/B2SQdXKQJk4+jPmi4nisKQmLeLUIC D+Gw== X-Gm-Message-State: AOAM530n+mw4ynEF78Py36nnHxRbachvs0xpZsyU01mrm2uTUYtx+hhM TnamebV8LfrG8VHma3cfgXw= X-Google-Smtp-Source: ABdhPJwEiLAyKqBWSBg/9gW1RJJ++WW+xletvVfauJvMuZRCPanBDVczGoSWbdvhRqSEjwIJMjoADg== X-Received: by 2002:a17:906:1149:: with SMTP id i9mr6779545eja.100.1592381013809; Wed, 17 Jun 2020 01:03:33 -0700 (PDT) Received: from [10.31.1.6] ([194.187.249.54]) by smtp.gmail.com with ESMTPSA id n16sm12971271ejl.70.2020.06.17.01.03.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jun 2020 01:03:33 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v4 0/3] mm, treewide: Rename kzfree() to kfree_sensitive() From: Jo -l In-Reply-To: <20200617003711.GD8681@bombadil.infradead.org> Date: Wed, 17 Jun 2020 10:03:30 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <29829792-2C3E-44D1-A337-E206F1B6C92A@gmail.com> References: <20200616015718.7812-1-longman@redhat.com> <20200616230130.GJ27795@twin.jikos.cz> <20200617003711.GD8681@bombadil.infradead.org> To: Matthew Wilcox X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Mailman-Approved-At: Wed, 17 Jun 2020 18:16:56 +1000 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason A. Donenfeld" , Michal Hocko , linux-btrfs@vger.kernel.org, Jarkko Sakkinen , dsterba@suse.cz, David Howells , linux-mm@kvack.org, linux-sctp@vger.kernel.org, keyrings@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, devel@driverdev.osuosl.org, linux-cifs@vger.kernel.org, linux-scsi@vger.kernel.org, James Morris , kasan-dev@googlegroups.com, linux-wpan@vger.kernel.org, David Rientjes , Waiman Long , Dan Carpenter , "Serge E. Hallyn" , linux-pm@vger.kernel.org, ecryptfs@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, virtualization@lists.linux-foundation.org, linux-integrity@vger.kernel.org, linux-nfs@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-security-module@vger.kernel.org, target-devel@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-crypto@vger.kernel.org, Johannes Weiner , Joe Perches , Andrew Morton , Linus Torvalds , netdev@vger.kernel.org, wireguard@lists.zx2c4.com, linux-ppp@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Bonjour, D=C3=A9sol=C3=A9, aucune traduction possible,=20 En fran=C3=A7ais pour comprendre! Merci slts > Le 17 06 2020 =C3=A0 02:37, Matthew Wilcox a = =C3=A9crit : >=20 > On Wed, Jun 17, 2020 at 01:01:30AM +0200, David Sterba wrote: >> On Tue, Jun 16, 2020 at 11:53:50AM -0700, Joe Perches wrote: >>> On Mon, 2020-06-15 at 21:57 -0400, Waiman Long wrote: >>>> v4: >>>> - Break out the memzero_explicit() change as suggested by Dan = Carpenter >>>> so that it can be backported to stable. >>>> - Drop the "crypto: Remove unnecessary memzero_explicit()" patch = for >>>> now as there can be a bit more discussion on what is best. It will = be >>>> introduced as a separate patch later on after this one is merged. >>>=20 >>> To this larger audience and last week without reply: >>> = https://lore.kernel.org/lkml/573b3fbd5927c643920e1364230c296b23e7584d.came= l@perches.com/ >>>=20 >>> Are there _any_ fastpath uses of kfree or vfree? >>=20 >> I'd consider kfree performance critical for cases where it is called >> under locks. If possible the kfree is moved outside of the critical >> section, but we have rbtrees or lists that get deleted under locks = and >> restructuring the code to do eg. splice and free it outside of the = lock >> is not always possible. >=20 > Not just performance critical, but correctness critical. Since = kvfree() > may allocate from the vmalloc allocator, I really think that kvfree() > should assert that it's !in_atomic(). Otherwise we can get into = trouble > if we end up calling vfree() and have to take the mutex. Jo-l joel.voyer@gmail.com