From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF3B61CDA1C; Thu, 24 Oct 2024 11:22:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729768942; cv=none; b=ZouIgyq28hEUKyr9Fq2R8lkyqn+8ysArzAXXFuoe9NeHuyqGFyA0eMmsXQO+O/WVWCtI1QdAkFe8aQOXMJrCyt/AakF8eEbqqk/opr9qG8O4L5pY3cLBXfL7ryYYsgydjiSRNBTKZdjNYZnRowqm7COxrio1XIwLzi5SfRqzh5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729768942; c=relaxed/simple; bh=CnUNKt4stBuax4eI8NnoLAFYCHPwGJdu2d5Qca/R/Nk=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=NPEj+40HURnZIHq335lM2Fx2Nk3k5pOuEiwTvEBzy3SPvKiZV3l32tpAiR1aCBMU/4WHohqugVp8gL6tZuVouqovQ0MEIYUymnAwaKXAa7bWcRtfUp3YWXkkkZLb3e4l2NekcCraHB/j9B6f68tW+cVtgx3MD+a1deMvb6xCP4s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=maYJeymI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="maYJeymI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD128C4CECD; Thu, 24 Oct 2024 11:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729768942; bh=CnUNKt4stBuax4eI8NnoLAFYCHPwGJdu2d5Qca/R/Nk=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=maYJeymIdDhTuDsj/E+l/Hanp8AGmW7Wy4Vn8Y/SpvyTZGmGsh/A4LAhK/eIW67tn wOrweEB+hNIRlIjuoEI9DeY2uiZeidSxPBW0V7aiBPjzgahyK6WlWKpv1F2fpS+ae8 s/k4tOpkleSY1CUFHvXDYAphCtaXlWpiNUlOnX9GzELfhW6PeNO77u3FzTr3Xu5LZm rDNGI5Iq9aEpsNYAoiLQ4KWmEErgnAdsm4W2RMrNhf2Lf3yobw/iX6j+8lnQfnt3x5 V+A7Ev0E41Ws4Ywz6QAEICEAWuKDbIrJaU++FAaxqML88C7rUwYr4v5Al5Au0aJLXL wtTqITGuukJrw== Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 24 Oct 2024 14:22:17 +0300 Message-Id: Cc: "David Howells" , "Mimi Zohar" , "Roberto Sassu" , , Subject: Re: [PATCH v7 1/5] tpm: Return on tpm2_create_null_primary() failure From: "Jarkko Sakkinen" To: "Stefan Berger" , , "Peter Huewe" , "Jason Gunthorpe" , "James Bottomley" X-Mailer: aerc 0.18.2 References: <20241021053921.33274-1-jarkko@kernel.org> <20241021053921.33274-2-jarkko@kernel.org> In-Reply-To: On Wed Oct 23, 2024 at 8:46 PM EEST, Stefan Berger wrote: > > > On 10/21/24 1:39 AM, Jarkko Sakkinen wrote: > > tpm2_sessions_init() does not ignore the result of > > tpm2_create_null_primary(). Address this by returning -ENODEV to the > > caller. Given that upper layers cannot help healing the situation > > It looks like returning -ENODEV applied to a previous version of the patc= h. > > > further, deal with the TPM error here by > > This sounds like an incomplete sentence... It looks like totally corrupted, thanks for the remark. "tpm2_sessions_init() ignores the return value of tpm2_create_null_primary(= ). Fail early and return back to the caller if it fails. Fine-tune the error message while at it." =09 Is this sufficient? BR, Jarkko