Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21100104rwd; Thu, 29 Jun 2023 10:57:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oL+Lf0kJjLxKAj6nash9kkjWTz+2/KVaMCly90Ui4aQD6KBCzuka4XwfPQ4ipRxddGwWv X-Received: by 2002:a05:6a20:1b24:b0:104:35ec:c25c with SMTP id ch36-20020a056a201b2400b0010435ecc25cmr323228pzb.41.1688061425656; Thu, 29 Jun 2023 10:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688061425; cv=none; d=google.com; s=arc-20160816; b=DrJgewhXzk4KFdSO78wnIHCmLIk58j8mG7xOiKLTJtVGc4C4nGomEilxFLLqLX7gGY uUz0aVLTwblnrn08yA27I1pH/8Ub6cKdufkswm3e+hxZfdWaZV9hiGt+cnTf6wb092lo d6LmUmlwc4oU9e5AeDcHlFQKU4KnTYLcw8rG7Gxh6RGZ/7xWhFu/9mkqpnJks4Xr59pk UzwpT3pIGeBZ64Y3POyreZk5sv9uei9KFOZ7HUHOEWIDO1RZ0fUm7w/EyZxqKvWTDl88 oEURJTm9ZJhF3xX0JcuABD2jrY7hPUiFiWktOJ33mvKoAWE2aJ6h5Vh+dUWj+qgXR3HF fz5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EuVtH4//9ixVPbYzIxcKCDvS3vv7wF8XPbIE+9o6mxc=; fh=hNUys+7/a/MRIzlGIh4mXyPnC1eCrcW+jPqa6uLuGi0=; b=PhmAENY0KFUYmHb+42U7zV7c7EtpjbA7ASYE4hR+VCJcFB0I/uofrDAfofcaowJoER 7m9Ii32NRngMyqpNEoBHUqOIAXLeW4AwW73Omo7dyxVUK9mlEeMHAnPgzDJOogo3JazD 3t6jEfDffdJ9Vgype9ZppKGhX2fA5qay5I9GLbDJoIsN9rr7Oe1I/aial85dd9nMJ7vV VulXi/e4vLcPTySAaoWwwY8r6iQ8/cueoxDaGO9dsbVOGdYLikwV8vtdurS+1ktkBUUb lQj7oN1E6E9XvbDswJiLXsbATEIkmhX9E/rHonNSetZpbveE1NtIIhfohI/sfQdpgIoz QJ8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EtrkpOKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r188-20020a632bc5000000b0054fdafd5b45si11040562pgr.740.2023.06.29.10.56.47; Thu, 29 Jun 2023 10:57:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EtrkpOKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229575AbjF2RoJ (ORCPT + 99 others); Thu, 29 Jun 2023 13:44:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbjF2RoI (ORCPT ); Thu, 29 Jun 2023 13:44:08 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13C3719B for ; Thu, 29 Jun 2023 10:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688060596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EuVtH4//9ixVPbYzIxcKCDvS3vv7wF8XPbIE+9o6mxc=; b=EtrkpOKZ0OiOPzGnkzhdBhHHVyCA1fFjhnjPAA60aU3eLH2TItTiAgX0Xi7K1KgYLmr5V5 DGAbS3NlmvV7rHHa1GRGP+ixk3jHzG9W7pPXZDoJHQ36w1Aqunj5uWJwCcd3/WWdXBrx77 pYjA4tnbx5wu7BKj+4y+cR72eoZZFLY= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-368-JgE6t5JIM2GP8UzXvkLeKw-1; Thu, 29 Jun 2023 13:43:14 -0400 X-MC-Unique: JgE6t5JIM2GP8UzXvkLeKw-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7624ca834b5so112783685a.0 for ; Thu, 29 Jun 2023 10:43:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688060594; x=1690652594; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EuVtH4//9ixVPbYzIxcKCDvS3vv7wF8XPbIE+9o6mxc=; b=aDpZ0TEHeu1BeKNdMtcvYwhFDeAWf45PS1r0IyDLI8uxYRIts3FOAtCwdGh5poOGu4 6zvOtKpCKBlTAP4M7eNnpcRDVwues8m9qZIFL0Xzf2gG8ooLF6anJfegQtgZaGrICdtn SKdUKYiSgU1kXE7tfa1ewKWRIm+4r1fWJXsA9eyHM7H8xhekNJlIB0/wLQl0ezpg1FqM kNXfL6MSOi3fy84psuE7/Ke2eBn8BsHh9e4Cp3AKycMwiZavqu62HBW1EJLV0rSNGFfg Vn+hw/B3excHymsV1+9Tyg7I+HTMQF1DE8SKf6uizPXD7jVmokiOMXw6oe2xVYaouxVg Dj/A== X-Gm-Message-State: AC+VfDzxKbLwWwNrOwEI4LHxzpacRmuEPoAKJo4NLsQGw1ABokO0ow// pC0yzObdJhKXxRuOS6Go0OvlTZp5MOLWRWBhifT9z/li0WsHFQR/Rx/5lTM9vmHClrSD7X1twSi iwMsWvnsj5oaLNkZAlIfjAk+3 X-Received: by 2002:a05:620a:2983:b0:765:4e03:b136 with SMTP id r3-20020a05620a298300b007654e03b136mr12908472qkp.53.1688060594466; Thu, 29 Jun 2023 10:43:14 -0700 (PDT) X-Received: by 2002:a05:620a:2983:b0:765:4e03:b136 with SMTP id r3-20020a05620a298300b007654e03b136mr12908457qkp.53.1688060594241; Thu, 29 Jun 2023 10:43:14 -0700 (PDT) Received: from localhost (ip98-179-76-75.ph.ph.cox.net. [98.179.76.75]) by smtp.gmail.com with ESMTPSA id h14-20020a05620a10ae00b007670ee46528sm3106075qkk.116.2023.06.29.10.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 10:43:13 -0700 (PDT) Date: Thu, 29 Jun 2023 10:43:12 -0700 From: Jerry Snitselaar To: "Limonciello, Mario" Cc: Michael Ellerman , Linux regressions mailing list , Sachin Sant , open list , linuxppc-dev , "jarkko@kernel.org" , "linux-integrity@vger.kernel.org" Subject: Re: [6.4-rc6] Crash during a kexec operation (tpm_amd_is_rng_defective) Message-ID: References: <99B81401-DB46-49B9-B321-CF832B50CAC3@linux.ibm.com> <87o7lhfmoh.fsf@mail.lhotse> <675a8893-429d-05be-b647-089b249c814c@leemhuis.info> <87o7l7oer1.fsf@mail.lhotse> <3f5a37f1-70e0-3dcf-3bd3-acc8a04e53ee@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 29, 2023 at 05:28:58PM +0000, Limonciello, Mario wrote: > [Public] > > > -----Original Message----- > > From: Jerry Snitselaar > > Sent: Thursday, June 29, 2023 12:07 PM > > To: Limonciello, Mario > > Cc: Michael Ellerman ; Linux regressions mailing list > > ; Sachin Sant ; open > > list ; linuxppc-dev > dev@lists.ozlabs.org>; jarkko@kernel.org; linux-integrity@vger.kernel.org > > Subject: Re: [6.4-rc6] Crash during a kexec operation > > (tpm_amd_is_rng_defective) > > > > On Thu, Jun 22, 2023 at 09:38:04AM -0500, Limonciello, Mario wrote: > > > > > > On 6/22/2023 7:36 AM, Michael Ellerman wrote: > > > > "Linux regression tracking (Thorsten Leemhuis)" > > writes: > > > > > Hi, Thorsten here, the Linux kernel's regression tracker. Top-posting > > > > > for once, to make this easily accessible to everyone. > > > > > > > > > > As Linus will likely release 6.4 on this or the following Sunday a quick > > > > > question: is there any hope this regression might be fixed any time > > > > > soon? > > > > No. > > > > > > > > I have added the author of the commit to Cc, maybe they can help? > > > > > > > > The immediate question is, is it expected for chip->ops to be NULL in > > > > this path? Obviously on actual AMD systems that isn't the case, > > > > otherwise the code would crash there. But is the fact that chip->ops is > > > > NULL a bug in the ibmvtpm driver, or a possibility that has been > > > > overlooked by the checking code. > > > > > > > > cheers > > > > > > All that code assumes that the TPM is still functional which > > > seems not to be the case for your TPM. > > > > > > This should fix it: > > > > > > diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c > > > index 5be91591cb3b..7082b031741e 100644 > > > --- a/drivers/char/tpm/tpm-chip.c > > > +++ b/drivers/char/tpm/tpm-chip.c > > > @@ -525,6 +525,9 @@ static bool tpm_amd_is_rng_defective(struct > > tpm_chip > > > *chip) > > > u64 version; > > > int ret; > > > > > > + if (!chip->ops) > > > + return false; > > > + > > > if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) > > > return false; > > > > > > Should tpm_amd_is_rng_defective compile to nothing on non-x86 > > architectures? This code is all about > > working around an issue with the AMD fTPM, right? > > > > That's a good point. Yes it could and that would also solve this problem. > Or I guess more accurately for non-x86 it should be: static bool tpm_amd_is_rng_defective(struct tpm_chip *chip) { return false; }