Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1jedRb-0007mu-VA for mharc-grub-devel@gnu.org; Fri, 29 May 2020 07:45:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jedRa-0007kh-01 for grub-devel@gnu.org; Fri, 29 May 2020 07:44:58 -0400 Received: from dibed.net-space.pl ([84.10.22.86]:51828) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:192) (Exim 4.90_1) (envelope-from ) id 1jedRZ-0005xA-3l for grub-devel@gnu.org; Fri, 29 May 2020 07:44:57 -0400 Received: from router-fw.i.net-space.pl ([192.168.52.1]:45854 "EHLO tomti.i.net-space.pl") by router-fw-old.i.net-space.pl with ESMTP id S356936AbgE2Low (ORCPT ); Fri, 29 May 2020 13:44:52 +0200 X-Comment: RFC 2476 MSA function at dibed.net-space.pl logged sender identity as: dkiper Date: Fri, 29 May 2020 13:44:50 +0200 From: Daniel Kiper To: Javier Martinez Canillas Cc: Daniel Kiper , grub-devel@gnu.org, cjwatson@ubuntu.com, higgi1pt@gmail.com, fsf@martin-whitaker.me.uk, mailing-lists@martin-whitaker.me.uk, mjg59@srcf.ucam.org, olaf@aepfle.de, phcoder@gmail.com Subject: Re: [PATCH 4/6] tpm: Drop unneeded code Message-ID: <20200529114450.rc2np53lry3hdved@tomti.i.net-space.pl> References: <20200525190215.16390-1-daniel.kiper@oracle.com> <20200525190215.16390-5-daniel.kiper@oracle.com> <4ed69a2c-8b48-d477-00a2-12424cfd477b@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ed69a2c-8b48-d477-00a2-12424cfd477b@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) Received-SPF: pass client-ip=84.10.22.86; envelope-from=dkiper@net-space.pl; helo=dibed.net-space.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/29 07:35:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 11:44:58 -0000 On Thu, May 28, 2020 at 09:22:34AM +0200, Javier Martinez Canillas wrote: > On 5/25/20 9:02 PM, Daniel Kiper wrote: > > Drop unused grub_tpm*_execute() and declaration of nonexistent grub_tpm_init(). > > > > Signed-off-by: Daniel Kiper > > --- > > [snip] > > > -static grub_err_t > > -grub_tpm2_execute (grub_efi_handle_t tpm_handle, > > - PassThroughToTPM_InputParamBlock *inbuf, > > - PassThroughToTPM_OutputParamBlock *outbuf) > > -{ > > - grub_efi_status_t status; > > - grub_efi_tpm2_protocol_t *tpm; > > - grub_uint32_t inhdrsize = sizeof (*inbuf) - sizeof (inbuf->TPMOperandIn); > > - grub_uint32_t outhdrsize = > > - sizeof (*outbuf) - sizeof (outbuf->TPMOperandOut); > > - > > - tpm = grub_efi_open_protocol (tpm_handle, &tpm2_guid, > > - GRUB_EFI_OPEN_PROTOCOL_GET_PROTOCOL); > > - > > - if (!grub_tpm2_present (tpm)) > > - return 0; > > - > > - /* UEFI TPM protocol takes the raw operand block, no param block header. */ > > - status = efi_call_5 (tpm->submit_command, tpm, > > - inbuf->IPBLength - inhdrsize, inbuf->TPMOperandIn, > > - outbuf->OPBLength - outhdrsize, outbuf->TPMOperandOut); > > - > > I think this would be useful if we ever add support for sending TPM commands. > But I agree that should be removed since is unused and can always be brought > back from the git history if needed. Yeah, I was thinking about mentioning something about this but later forgot about it. I will add following clarification to the commit message before pushing the patch: If somebody needs the functionality implemented in the dropped code then he/she can readd it later. Now it only increases the GRUB code/image size. > Reviewed-by: Javier Martinez Canillas Thanks a lot for review! Daniel