Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp527721ybh; Wed, 22 Jul 2020 06:49:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3mZgw/xgwdw0iwkemnUaInOeHghrOnG8PmmN+iIvZzpz9Wi7WLgSJ9ZXFnXAyVQHHXs4y X-Received: by 2002:a17:906:1f53:: with SMTP id d19mr29661514ejk.327.1595425764754; Wed, 22 Jul 2020 06:49:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595425764; cv=none; d=google.com; s=arc-20160816; b=Ry7wbHiQQEwJMZWvgac3ZwQHrj7g6waSNls3m6cgWfbONbbmAXHgh9ZTHW02AiSqK9 BQzmO/TwcdjyqkOhNZFUli/VDcU9CduQ7HY1N6xbTwG77+YB7wlaQyUMel8mmALxxJCd udJLW1zTM/T7Bsln92aWKM8JuPDgqI/87Ai0iFc75GL+5H39T/T7NeyaW2sS0tJlWfQk OOwbxE+2eE78qLgPDXk9vPaGHVrMZgwJPjzfJchv0z4NQfmBr7XXdxu7TGwi1yLTPnUt V1sTnrzAb7loG+8v5NWPaeEy3axUU7Eityq8M1rxOocjs1rcEuUIt1SF36Mx4/FYPA8+ P9nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=LoVB2XkV/JmhdiMIi0eaHtAvVvJ9iBBJWs8+jEnq95c=; b=VZkVJ2GCkslVOXUsOJl8mwrJOfQBijvsM0LmQGhjwNFBzuq3qquZZdUzdDf0yypGEM 6SwZiHvUMhZaqXCCSzuoy/CXEnsURO1rNZsmIxlUYT+8oliQbd3ywZL677gpizB/0dCn GIHzeiuMgOtrZTSD40g8sACgiEA3r+THiQ7Ag7B2bUlB31wH1hDdH1J4acQmYnQbg09u 4wOBnVoCkPVHabiBPtpvnMqOmuLLF2TGuK/xbUFJQtL2i6CFirL17aV+JKRKsflf899K jjXwhBSzIGvCuUfn202EBpaqCssGskH5K0z9QtlGjbVulxZ05Se1WGNhMgH5QM4fa1Wy AoiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TvGgedDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si22373edt.401.2020.07.22.06.49.01; Wed, 22 Jul 2020 06:49:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TvGgedDO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732650AbgGVNqW (ORCPT + 99 others); Wed, 22 Jul 2020 09:46:22 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:47937 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732639AbgGVNqV (ORCPT ); Wed, 22 Jul 2020 09:46:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595425580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=LoVB2XkV/JmhdiMIi0eaHtAvVvJ9iBBJWs8+jEnq95c=; b=TvGgedDOacKeexhXymoKk5NCekvnSO1pxj30YTEOD6lPwH5tGOU+5OHeQBKGxRN9UP6wcZ O5FEMhnATlmxn9L9jGJuO7EXI3h4kw/jrgjNks9m10XKOCb8nkjdCrJeUn8NqEsxtUpHFq Ai9Ht8IQ/DOWeTxPIt7c/kETrb347R0= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-29-Tp0_8Cp0MMCu388gSIIg9Q-1; Wed, 22 Jul 2020 09:46:16 -0400 X-MC-Unique: Tp0_8Cp0MMCu388gSIIg9Q-1 Received: by mail-qv1-f72.google.com with SMTP id s2so1448162qvn.19 for ; Wed, 22 Jul 2020 06:46:16 -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; bh=LoVB2XkV/JmhdiMIi0eaHtAvVvJ9iBBJWs8+jEnq95c=; b=kqBF/jDpUDoQ7rgfBsXlYSIUnHdX8xXlyNZF5tFUjclH3Cs86fetuTeVBY/9B8+nk7 SOYlXTsOaM4Zfk8EOmb13M6TUd+RO7t8piEfET6pHIJXOA8uDZam0eCH+vTvbyx9ifcq oDISO2gflWykeART2mZ9i1XX6vzqEWAMT5BFyguUvOhVYZrRq3gX4Dr0DVuyHqgxi8Ep VCRhYbQNTEPhA+V015bUrRTHEXe7PraMnx/qwLP6jXh8kzsR3PIsJQgo5B5iJ+pIUCfh wBQg47HNMEygWNU2+8ohD/KaoVqEPMllpTtN1D99ae0c9ui8Emgq/EN/geowDegbKcZR FKTQ== X-Gm-Message-State: AOAM530FndBTOy09Z5VFf21dUV7f+Cnhu/55mqABTW0ezxnBZ8BMw6yS dN97WFqKhvuOkxuL6oZLhmFQg2G41Sk2xMAcmdEH/HW+4qTgzjL61QLLF3nJmGM3nb/o6NjijEC Xcj5IPjFUSRb54aMPZ/hDzFm/ X-Received: by 2002:ac8:32b8:: with SMTP id z53mr33969613qta.273.1595425576162; Wed, 22 Jul 2020 06:46:16 -0700 (PDT) X-Received: by 2002:ac8:32b8:: with SMTP id z53mr33969597qta.273.1595425575967; Wed, 22 Jul 2020 06:46:15 -0700 (PDT) Received: from trix.remote.csb (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id w28sm4803247qkw.92.2020.07.22.06.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2020 06:46:15 -0700 (PDT) From: trix@redhat.com To: dhowells@redhat.com, jarkko.sakkinen@linux.intel.com, jmorris@namei.org, serge@hallyn.com, denkenz@gmail.com, marcel@holtmann.org Cc: keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Rix Subject: [PATCH v2] KEYS: remove redundant memset Date: Wed, 22 Jul 2020 06:46:10 -0700 Message-Id: <20200722134610.31947-1-trix@redhat.com> X-Mailer: git-send-email 2.18.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Rix Reviewing use of memset in keyctrl_pkey.c keyctl_pkey_params_get prologue code to set params up memset(params, 0, sizeof(*params)); params->encoding = "raw"; keyctl_pkey_query has the same prologue and calls keyctl_pkey_params_get. So remove the prologue. Fixes: 00d60fd3b932 ("KEYS: Provide keyctls to drive the new key type ops for asymmetric keys [ver #2]") Signed-off-by: Tom Rix --- v1: remove change to keyctl_pkey_params_get_2 security/keys/keyctl_pkey.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/security/keys/keyctl_pkey.c b/security/keys/keyctl_pkey.c index 931d8dfb4a7f..5de0d599a274 100644 --- a/security/keys/keyctl_pkey.c +++ b/security/keys/keyctl_pkey.c @@ -166,8 +166,6 @@ long keyctl_pkey_query(key_serial_t id, struct kernel_pkey_query res; long ret; - memset(¶ms, 0, sizeof(params)); - ret = keyctl_pkey_params_get(id, _info, ¶ms); if (ret < 0) goto error; -- 2.18.1