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 390A6C6FD1D for ; Mon, 20 Mar 2023 13:38:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231376AbjCTNi4 (ORCPT ); Mon, 20 Mar 2023 09:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231282AbjCTNiw (ORCPT ); Mon, 20 Mar 2023 09:38:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A1511BDF for ; Mon, 20 Mar 2023 06:38:03 -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 ams.source.kernel.org (Postfix) with ESMTPS id 722B2B80E8F for ; Mon, 20 Mar 2023 13:38:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D295BC433D2; Mon, 20 Mar 2023 13:37:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679319480; bh=5Fj7q2Vm2mdGMDZzxM9uDY+A8NFQW/3j+SwERkR4DYY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FWx2F8AyjIoUZm44ZaPpPBPc/H/JIoePfR10McXG9YQ+Ffq2W6XPmfK76qhEoOZac UxBW/4TaupuzCLukkZrsQt1d/+mPQAYaTaKXmgGdEkV6qp6pheP81OLptLudIpN780 K1SrBppssrQ3CSeNSdGM48LPimlluE3eggnXBlq5suiCQjc3lghyOB/QrD0F7Qqvgm mJOe/4tZYKxF9gBQPnEUBAmrhOn6UC0tK4Hq8jhFIV3XVi+9SYH0wi+4+jSQO/RX9+ H74L9WM16NZbftFhOgce+MXcVvmL+XCokGc3fYC/Nk21i7lh9To8fYmpGJNrnukRpl cB9CKU0K3GuOA== Date: Mon, 20 Mar 2023 15:37:56 +0200 From: Jarkko Sakkinen To: James Bottomley Cc: linux-integrity@vger.kernel.org, "Jason A. Donenfeld" , Mario Limonciello Subject: Re: tpm: fix build break in tpm-chip.c caused by AMD fTPM quirk Message-ID: <20230320133756.owgccfew4qahw4zv@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Mon, Mar 20, 2023 at 07:15:52AM -0400, James Bottomley wrote: > The test for the AMD fTPM problem, which just went in, actually uses > the wrong function template for request_locality(). It's missing an > argument so the build breaks: > > drivers/char/tpm/tpm-chip.c:568:8: error: too few arguments to function ‘tpm_request_locality’ > ret = tpm_request_locality(chip); > ^~~~~~~~~~~~~~~~~~~~ > drivers/char/tpm/tpm-chip.c:43:12: note: declared here > static int tpm_request_locality(struct tpm_chip *chip, int locality) > ^~~~~~~~~~~~~~~~~~~~ > > Fix this by requesting zero locality. > > Signed-off-by: James Bottomley > Fixes: f1324bbc4011 ("tpm: disable hwrng for fTPM on some AMD designs") > > --- > > diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c > index c04d101c7779..fee061780468 100644 > --- a/drivers/char/tpm/tpm-chip.c > +++ b/drivers/char/tpm/tpm-chip.c > @@ -565,7 +565,7 @@ static bool tpm_amd_is_rng_defective(struct tpm_chip *chip) > if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) > return false; > > - ret = tpm_request_locality(chip); > + ret = tpm_request_locality(chip, 0); > if (ret) > return false; > > Thank you, I sent a PR for rc4. BR, Jarkko