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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DFC0C282DD for ; Wed, 8 Jan 2020 16:05:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0F7922070E for ; Wed, 8 Jan 2020 16:05:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbgAHQFA (ORCPT ); Wed, 8 Jan 2020 11:05:00 -0500 Received: from mga07.intel.com ([134.134.136.100]:7093 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726922AbgAHQE7 (ORCPT ); Wed, 8 Jan 2020 11:04:59 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 08:04:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,410,1571727600"; d="scan'208";a="211580709" Received: from dkurtaev-mobl.ccr.corp.intel.com ([10.252.22.167]) by orsmga007.jf.intel.com with ESMTP; 08 Jan 2020 08:04:55 -0800 Message-ID: <80272f0259d967fe61dacd1036cbbd9f555b8402.camel@linux.intel.com> Subject: Re: [PATCH] tpm: handle negative priv->response_len in tpm_common_read From: Jarkko Sakkinen To: Tadeusz Struk Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-integrity@vger.kernel.org, labbott@redhat.com In-Reply-To: References: <157843468820.24718.10808226634364669421.stgit@tstruk-mobl1> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 08 Jan 2020 18:04:49 +0200 User-Agent: Evolution 3.34.1-2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-01-08 at 17:58 +0200, Jarkko Sakkinen wrote: > On Tue, 2020-01-07 at 14:04 -0800, Tadeusz Struk wrote: > > The priv->responce_length can hold the size of an response or > > an negative error code, and the tpm_common_read() needs to handle > > both cases correctly. Changed the type of responce_length to > > signed and accounted for negative value in tpm_common_read() > > > > Cc: stable@vger.kernel.org > > Fixes: d23d12484307 ("tpm: fix invalid locking in NONBLOCKING mode") > > Reported-by: Laura Abbott > > Signed-off-by: Tadeusz Struk > > Reviewed-by: Jarkko Sakkinen > > Adding to the next PR. Applied but had to fix bunch of typos, missing punctaction and missing parentheses in the commit message. Even checkpatch.pl was complaining :-/ Thanks. /Jarkko