Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88EAFC433EF for ; Thu, 9 Dec 2021 19:39:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbhLITmt (ORCPT ); Thu, 9 Dec 2021 14:42:49 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:42748 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbhLITms (ORCPT ); Thu, 9 Dec 2021 14:42:48 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id C25991C0B77; Thu, 9 Dec 2021 20:39:12 +0100 (CET) Date: Thu, 9 Dec 2021 20:38:57 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: David Brazdil , Rob Herring , Jonathan Corbet , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Hans de Goede , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Andrew Scull , Will Deacon Subject: Re: [PATCH v2 2/2] misc: dice: Add driver to forward secrets to userspace Message-ID: <20211209193857.GA28088@duo.ucw.cz> References: <20211209151123.3759999-1-dbrazdil@google.com> <20211209151123.3759999-3-dbrazdil@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > + memzero_explicit(kaddr, dice_rmem->size); > > + devm_memunmap(dice_misc.this_device, kaddr); >=20 > Do you really need to call memzero_explicit()? This isn't "local" > memory, if the compiler "optimizes away" a normal call, it would be > _VERY_ broken. For clearing secrets, I believe memzero_explicit is nice documentation. Best regards, Pavel =09 --=20 http://www.livejournal.com/~pavelmachek --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYbJbUQAKCRAw5/Bqldv6 8n71AKCBLAVJBcsdGVg79i0seELqu5h7sQCgwIkrRK7FCzRulLPs8MlHx0SeYBg= =GH6l -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx--