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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C03A3C38A02 for ; Sun, 30 Oct 2022 08:16:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbiJ3IQm (ORCPT ); Sun, 30 Oct 2022 04:16:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiJ3IQl (ORCPT ); Sun, 30 Oct 2022 04:16:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36FC5267 for ; Sun, 30 Oct 2022 01:16:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C729160B88 for ; Sun, 30 Oct 2022 08:16:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6865EC433D6; Sun, 30 Oct 2022 08:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667117800; bh=PN4xCUSNDQA1YfStIttqniRpnc5FWE8xJudEQIYRDRk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ris92oJHYz8JAg8PnExby+oK9W7y+54SbX1d9QDsWm9kS4gb2anhWE0IU+Dl60sXp YRr4Putmq/UtrT1O6kd+/2vBeQcUznHsbZ88hB7S4Y8KndsL1ZbYfU72pmq8TbdLYN NmzKAAOt5mVN3tX8uc/t/gSU9PoIHUIuNuo98pMiwDlyXyCzg9ERopgWKKlOEZqRD6 8OZ/IPOE5N+G5HMuefFhOFxil9xV1rmf9v0ic2dTEppjJpDxAyw+aPcNgx5FR1eA9C wvT1sGHrYxodCfDbE1gE27jGTrGxLf7eHMrm/PL1nabd7fnuwbNyFCarseXLUFRld5 Meqy8j6BCXWwA== Date: Sun, 30 Oct 2022 10:16:35 +0200 From: Leon Romanovsky To: Sabrina Dubroca Cc: netdev@vger.kernel.org, Antoine Tenart Subject: Re: [PATCH net v2 5/5] macsec: clear encryption keys from the stack after setting up offload Message-ID: References: <685b32aea1db3864560f7c72f280bd44ac7b3450.1666793468.git.sd@queasysnail.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <685b32aea1db3864560f7c72f280bd44ac7b3450.1666793468.git.sd@queasysnail.net> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Oct 26, 2022 at 11:56:27PM +0200, Sabrina Dubroca wrote: > macsec_add_rxsa and macsec_add_txsa copy the key to an on-stack > offloading context to pass it to the drivers, but leaves it there when > it's done. Clear it with memzero_explicit as soon as it's not needed > anymore. > > Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure") > Signed-off-by: Sabrina Dubroca > --- > drivers/net/macsec.c | 2 ++ > 1 file changed, 2 insertions(+) > Thanks, Reviewed-by: Leon Romanovsky