Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp990190ybh; Wed, 22 Jul 2020 19:41:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz5uCk4VZYF6eKg/Py9u8pW6iKBhmA5/nF2l6Oc6tVkdMtKpS1duKjnjR4LWtcmhaiHOam X-Received: by 2002:aa7:d90f:: with SMTP id a15mr2154413edr.86.1595472095279; Wed, 22 Jul 2020 19:41:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595472095; cv=none; d=google.com; s=arc-20160816; b=ppPBq6ScCDXoDzR+qtdZPg3hufPQgDqjlPjgqCzz7eWXaMaf5a+pOwpHCftVW6liS9 ZVTE1cVM71BGSmg43p0PqPAMsn0yP9xm6ESsJLjNN1ZV0J+ge/nwsbF9cyfO7uA7Imq/ fkbWAt3iN+vmJjC3Sn4J00o6bRJilv4upbTSvs8fNkgGQZchA4+bYcxNlJFhL8UHgy24 yR61THeendQ5aIm90We1/3ezFkt/UjhCxFU1s1fWIVQlQvHfjo2QMz29gEFnVM1CHtWV RuH9fHt2eReqndjhuHz12KupGbWC/ezSaLMD3QBkEr68DzlPXhYte/m9vTxllSnFdFN4 Kvzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=Fr+uPPpSmy/P1apFDo84gbfKY3VNN9tZW1mwO6LMaig=; b=dE2Z1I23QHDuWiX5DOCvIGl/+eCB4n3PPF1y5Iur6WcvAWWm1/lZMzyn4mrFFQO5yF ByS7w5P9CAEiKQKj7/i5/2sUMszb/xra7y2+cPbuO2U3oV7XVbYR9dDfUvSH8rupSQA3 hYjVkY6jlUQWaz2B6DFkuhaAjUsMsEcbXlB/4g0g/axhq8DnM+FGk5lHO7KuRQxSe6mK gis7CsggTwQRPmIfk1vn7u4qluY5HnaHP8w1ykKJKLD7IF/krZ40LpP0FSKc94zvngI1 gp56OdeF1eu8mF+2+bVU5CwglML5YDMQktIArhwYG+Ulj7/uykgl5NsbTcPn53jVJ1NQ R9QQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg8si1157762edb.184.2020.07.22.19.41.11; Wed, 22 Jul 2020 19:41:35 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387414AbgGWCkC (ORCPT + 99 others); Wed, 22 Jul 2020 22:40:02 -0400 Received: from mga05.intel.com ([192.55.52.43]:50097 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730837AbgGWCkB (ORCPT ); Wed, 22 Jul 2020 22:40:01 -0400 IronPort-SDR: Fszeu6/UJJqPZtklAQCYq2uF4CH5pvsyt4zBRsFo22vW+mTu+hvApetUh1EPkuoiU0Tl0qjnhf +MYcKjR0lsaw== X-IronPort-AV: E=McAfee;i="6000,8403,9690"; a="235325252" X-IronPort-AV: E=Sophos;i="5.75,385,1589266800"; d="scan'208";a="235325252" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2020 19:40:01 -0700 IronPort-SDR: v7v2cW3YGBSNRm4IH61Nw2j81BfF4tn9vG2sDk9InOKJE689Puu7Ck4QnV1pPg5MtQ24gVHIFc LXr0CbCTfWBw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,385,1589266800"; d="scan'208";a="462682361" Received: from schwings-mobl.ger.corp.intel.com (HELO localhost) ([10.252.33.132]) by orsmga005.jf.intel.com with ESMTP; 22 Jul 2020 19:39:56 -0700 Date: Thu, 23 Jul 2020 05:39:54 +0300 From: Jarkko Sakkinen To: Joe Perches Cc: Tom Rix , dhowells@redhat.com, jmorris@namei.org, serge@hallyn.com, denkenz@gmail.com, marcel@holtmann.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] KEYS: remove redundant memset Message-ID: <20200723023954.GJ45081@linux.intel.com> References: <20200722134610.31947-1-trix@redhat.com> <2bdd6b8ec731d180023d593b679afc66def19b4f.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 01:20:00PM -0700, Joe Perches wrote: > On Wed, 2020-07-22 at 13:10 -0700, Tom Rix wrote: > > On 7/22/20 1:02 PM, Joe Perches wrote: > > > On Wed, 2020-07-22 at 06:46 -0700, trix@redhat.com wrote: > > > > 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]") > > > At best, this is a micro optimization. > > Yes > > > How is this appropriate for a Fixes: line? > > Removing unneeded code is not a fix? > > IMO: there's no "bug" here. > > It's not a logic defect causing some unintended outcome. > It doesn't need backporting to stable branches. > > Documentation/process/submitting-patches.rst-If your patch fixes a bug in a specific commit, e.g. you found an issue using > Documentation/process/submitting-patches.rst:``git bisect``, please use the 'Fixes:' tag with the first 12 characters of > Documentation/process/submitting-patches.rst-the SHA-1 ID, and the one line summary. I agree. At worst it can cause unnecessary merge conflicts when backporting bug fixes. No measurable gain merging it. /Jarkko