Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp246757pxa; Thu, 27 Aug 2020 00:41:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR/sGnT51GVj9kW48gP7EhJhb8ef0oCRGTV/fXh60PX4Ahhm37htbgpvsIbPuQWWkAG8YY X-Received: by 2002:a17:906:fcc8:: with SMTP id qx8mr1476076ejb.13.1598514073647; Thu, 27 Aug 2020 00:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598514073; cv=none; d=google.com; s=arc-20160816; b=BV1HYu3U+fSRefgBaaFmk7QTOVecYgJVi96HUB+TBRMy8U59LF1suVzoxaAnoCB7gP dRmBbWGH4R1ZLQNhC0nSiCTbCKoI9JNuFCFGqs+FkJGgNdN0g3DVEGybvknXDV2pfBNx Z6DJPPELetC2cYjVr1JHCsAYQpQceWGjlYSR1Fn/WvcH1r6vr+BHlKAxtH6mV3T1Ly8b 3f+sEKw1Lur2dgbj1/XvuzztNzyf2LZGJDG3aJVSITPptZX/xK/xoUeVfMYiDSCUufPx 6wxtUuAdqfN1e1rcWvayZe8I/pbpjPlfiWkY1H8CWQr3QrDXlhrb2YWhsvAXVVEI8gIE zc+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Xi4/bpC2nOhERW4W6wGYCHYDZC3N2KKX9AfZgS9TOgk=; b=Or3wAiATBssCvt+9g+eA3CtnP7U2JaC4FBdDPwxFXSiLOXD4PMsobTgj4TavG+ILsW Y3DM57HZdGjCKdWPTs1GfAewaith6SqDqo7U4NEsO0yzfjHPX7isTNK1UDPU6RJmWMVs aOrBT/gI6uFZJN48ta/ASZrvr1Yv4i10vt7YpfTxiYKfY+H/ZDSsTSOwvBwktps5gHQP 38d0zlZKKKAiFANBWX0OZMRSDgxmm9kFStH6XTNXDY3uaCgL9+FD01gZWaKWMAPS6HfH 9C3xza9umjP2aCMLvrHGr+TqLOHq2S3GEhu1rM91g+i0UDMzePGzv6pYGbRhLtmEaety olkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si1009836edn.390.2020.08.27.00.40.40; Thu, 27 Aug 2020 00:41:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbgH0Hki (ORCPT + 99 others); Thu, 27 Aug 2020 03:40:38 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41408 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727048AbgH0Hkg (ORCPT ); Thu, 27 Aug 2020 03:40:36 -0400 Received: by mail-lj1-f196.google.com with SMTP id f26so5291497ljc.8; Thu, 27 Aug 2020 00:40:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Xi4/bpC2nOhERW4W6wGYCHYDZC3N2KKX9AfZgS9TOgk=; b=pvXPGrMEVSxGOWACjDkrCiz8SXSMwlC8nFXZLmNhheSqAIULoq8rgGY5rFhlspegiH NvoTdiThCKDIYJfIN/TADWYv40Q9FRCvN5h+p+8haPjkhaHH8W2Mv8LMKr6IqQEHXdYt L9giiTg9WBdqcqk6dKVXTBPXtPZ6we4lke+kInzkcw8cZKWEr/BdnikFRGYiV+ehpWeF MGlxkdBkQnNrTMsuvGpMhTgBKRl+nxREOAxMcWgxdluICR0pVxku9mOBrc+G9iBkfNF6 xGUFR0Erizp6C5hHHtOqqf2OpbWMpuiC0jjiIi3YpG72K1CmMh4HzXp9lfVxkaYc1J2f uexQ== X-Gm-Message-State: AOAM530D7GtmTNNPTyoaNvQ62tieIaD5h0uGEuHW6mhoG/rFcyMOKlOf VqB//dnM55sen0ftqcowxow= X-Received: by 2002:a2e:7014:: with SMTP id l20mr8695707ljc.162.1598514034102; Thu, 27 Aug 2020 00:40:34 -0700 (PDT) Received: from localhost.localdomain ([213.87.147.111]) by smtp.googlemail.com with ESMTPSA id 7sm289520ljf.38.2020.08.27.00.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 00:40:33 -0700 (PDT) From: Denis Efremov To: Corentin Labbe Cc: Denis Efremov , Herbert Xu , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: sun8i-ss - remove redundant memzero_explicit() Date: Thu, 27 Aug 2020 10:40:23 +0300 Message-Id: <20200827074023.15565-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Remove redundant memzero_explicit() in sun8i_ss_cipher() before calling kfree_sensitive(). kfree_sensitive() will zero the memory with memzero_explicit(). Signed-off-by: Denis Efremov --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c index deb8b39a86db..ed2a69f82e1c 100644 --- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c @@ -248,7 +248,6 @@ static int sun8i_ss_cipher(struct skcipher_request *areq) offset = areq->cryptlen - ivsize; if (rctx->op_dir & SS_DECRYPTION) { memcpy(areq->iv, backup_iv, ivsize); - memzero_explicit(backup_iv, ivsize); kfree_sensitive(backup_iv); } else { scatterwalk_map_and_copy(areq->iv, areq->dst, offset, -- 2.26.2