Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3951477ybv; Tue, 25 Feb 2020 10:15:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxgxsx11GvzkLNuiD+KHbJJJqG4cy+rwgxmeuw0qV/kq/eQZ8eddyGpBwF8LYVYq5BDUuOf X-Received: by 2002:a05:6830:95:: with SMTP id a21mr46113210oto.171.1582654516825; Tue, 25 Feb 2020 10:15:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582654516; cv=none; d=google.com; s=arc-20160816; b=rJkw4/fKhNlwAQjngnyH2jS73dVIIH2jP3md6ILOVj2UsoeQ+CQO4eUiCQw7E4JqZ8 u28CZ6GPWqpaCul6qNO1zc118GNR/hJmKYgmwgbTPaBa0BTMZD0cLvcn0CDjQZw7NffQ cSjgQPPxi750jgcbjTbGjIntD0HOt/RwO1l6KFGGugcx1ElbQJdgkPvrkx9sSca/mAL+ K4z+hSgv2EMBsT+Fo9JC5EvsUKqt5MbQwbQmefUrg7h+ekLGV7n4h22lsesMqaU76xES OMT9WyCxJDUhEQBLR2OaDLX2IiUMxDQHQn/l4IMdiwzgmU0kFOm4fAUDU+3PHhgvBPsk B9BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=VedQyHzz1U8DD1rxHFOtOzQ2P863Aaj2G8pP7oh1DLY=; b=Aw6cS3pspMDvR1ePfXPJmijvjfOQkaiesSwLnxk8x6az8FthvMxmvLF2OKEssVAToO ECRlthoqeCCMTC8jmGfXv9ArI/BFXJfLUA+NxBePQg8a81CtoPVxPihIzG4wf8auwNGJ SUFUGH68uaHs3qwXtMri4N4I7RYRLFJT0U1m7P2AO1pLBtJPCpJsUhTS40CJijJhrmVw ueyOMOv0OPTfqnIRFoIc9nufp2YUSw0OEYO58eJHlu6E7mPN8uWtrxaY8eTcNHSltkSy 6CgXTU2twfA6Zcxky7Noa00opf2QhelBBpgtTfs5jcj9QkmG1773VHVEm/LdPaXiBSbX qfPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si6771462oie.148.2020.02.25.10.15.04; Tue, 25 Feb 2020 10:15:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731398AbgBYSOn (ORCPT + 99 others); Tue, 25 Feb 2020 13:14:43 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:62532 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728367AbgBYSOm (ORCPT ); Tue, 25 Feb 2020 13:14:42 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01PI9rA1038422; Tue, 25 Feb 2020 13:14:34 -0500 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 2yd4h31jhu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Feb 2020 13:14:34 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 01PIAn3H028112; Tue, 25 Feb 2020 18:14:33 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma01dal.us.ibm.com with ESMTP id 2yaux6whse-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Feb 2020 18:14:33 +0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01PIEWUa37290490 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Feb 2020 18:14:32 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6ABA1124058; Tue, 25 Feb 2020 18:14:32 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6073B12405B; Tue, 25 Feb 2020 18:14:32 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 25 Feb 2020 18:14:32 +0000 (GMT) Subject: Re: [PATCH v2 2/4] tpm: ibmvtpm: Wait for buffer to be set before proceeding To: Jarkko Sakkinen , Stefan Berger Cc: linux-integrity@vger.kernel.org, aik@ozlabs.ru, david@gibson.dropbear.id.au, linux-kernel@vger.kernel.org, nayna@linux.vnet.ibm.com, gcwilson@linux.ibm.com, jgg@ziepe.ca References: <20200213202329.898607-1-stefanb@linux.vnet.ibm.com> <20200213202329.898607-3-stefanb@linux.vnet.ibm.com> <20200225165744.GD15662@linux.intel.com> From: Stefan Berger Message-ID: <8b61d1b4-8503-88e7-271f-da2ea0fc437f@linux.ibm.com> Date: Tue, 25 Feb 2020 13:14:32 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200225165744.GD15662@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-25_06:2020-02-25,2020-02-25 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 lowpriorityscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 bulkscore=0 suspectscore=0 phishscore=0 priorityscore=1501 clxscore=1011 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002250130 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/25/20 11:57 AM, Jarkko Sakkinen wrote: > On Thu, Feb 13, 2020 at 03:23:27PM -0500, Stefan Berger wrote: >> From: Stefan Berger >> >> Synchronize with the results from the CRQs before continuing with >> the initialization. This avoids trying to send TPM commands while >> the rtce buffer has not been allocated, yet. > What is CRQ anyway an acronym of? Command request queue. > >> This patch fixes an existing race condition that may occurr if the >> hypervisor does not quickly respond to the VTPM_GET_RTCE_BUFFER_SIZE >> request sent during initialization and therefore the ibmvtpm->rtce_buf >> has not been allocated at the time the first TPM command is sent. > If it fixes a race condition, why doesn't it have a fixes tag? Which commit should I mention?   Stefan > > /Jarkko