From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Aditya Pakki <pakki001@umn.edu>
Cc: kjlu@umn.edu, Peter Huewe <peterhuewe@gmx.de>,
Jason Gunthorpe <jgg@ziepe.ca>, Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tpm/ppi: remove impossible assertion in tpm_eval_dsm
Date: Thu, 19 Dec 2019 02:05:34 +0200 [thread overview]
Message-ID: <6b67a2ae58aa627711808a52122c998fab350da3.camel@linux.intel.com> (raw)
In-Reply-To: <20191218154825.11634-1-pakki001@umn.edu>
On Wed, 2019-12-18 at 09:48 -0600, Aditya Pakki wrote:
> In tpm_eval_dsm, BUG_ON on ppi_handle is used as an assertion.
> However, if ppi_handle is NULL, the kernel crashes. The patch
> removes the unnecessary check.
>
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
> v1: replaced the recovery code to completely eliminate the check,
> as suggested by Jason Gunthorpe.
> ---
> drivers/char/tpm/tpm_ppi.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
> index b2dab941cb7f..603f7806f9af 100644
> --- a/drivers/char/tpm/tpm_ppi.c
> +++ b/drivers/char/tpm/tpm_ppi.c
> @@ -42,7 +42,6 @@ static inline union acpi_object *
> tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type,
> union acpi_object *argv4, u64 rev)
> {
> - BUG_ON(!ppi_handle);
> return acpi_evaluate_dsm_typed(ppi_handle, &tpm_ppi_guid,
> rev, func, argv4, type);
> }
Hmm.. maybe omitting completely is actually better idea (since
it never should happen anyway).
Lets go with that.
Thanks.
/Jarkko
prev parent reply other threads:[~2019-12-19 0:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 15:48 Aditya Pakki
2019-12-19 0:05 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b67a2ae58aa627711808a52122c998fab350da3.camel@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jgg@ziepe.ca \
--cc=kjlu@umn.edu \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pakki001@umn.edu \
--cc=peterhuewe@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome