Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp988221ybc; Tue, 12 Nov 2019 12:20:44 -0800 (PST) X-Google-Smtp-Source: APXvYqyNEvepysyIarxeayILMYcvcn7Qv0kAFaL+CBYpMr9UbDKsyNN6ZP8n5xvbPPaNHlKSydWj X-Received: by 2002:aa7:c954:: with SMTP id h20mr35296953edt.159.1573590044740; Tue, 12 Nov 2019 12:20:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573590044; cv=none; d=google.com; s=arc-20160816; b=zo2PrYxNxi3xRNqlBPQR4hVEm1gGzt9WDzQEEjpZTpOzEWqy3LbsbINgO+z5wHYYN0 ox1QKBw8Ko0r58qFxuKUkr00LNiPLbHMBrOxVpuPo1ANczeEXZPlduGodqsxDRDRzXPf kKr11uNy6897qU877F+YL75KWYyFinNjBKE8d+rt7E59GCYhZg4fhD8Td7WkCGl+IrmP 8cPGj5jInx7R0UeLS10QCXIZaa3aUvyluL0meqfpYQX0kFzFcDc3WPRYzCnbX0X20BUi EHNLPAFstrCfgVRXnP7aU8grp7tJgSLiPesNZQsXEy4kWPqz1l0erBnqgo6my9JrJyR+ G5PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=3GmwyTOsJSPTtHB7PX8zOk8FoNxrjLvxcj8ZvxF1wFM=; b=VGHMnjFzjUieA0tV47MjOXc6fOlWM+tkudshSBkrW/NRz1gCe9GoK4PPkGPRPNhQjq Y5+s4kGPxQKDj83PedwCIo03BFqlB9jAMRIu0VfUTs0q/DX4l68PNowoPV6+9VKATw8o uBkc/mok8FP9PORvFuVzOqa8ZriuYCc1nZ38BN4KLk7cj+JqCXAzjaKqSEWy23GsUDLX op/5AeiLikC4AuZuYEkW3phR6masRJ+vLQRjN/oVeg0OWy7RQFeAr6UEQlBVX80MzmnM IdluPQ8N6s0anF8aFD4cW2eib4o/t8vLRBx7pV3sgKnria0L+q+suUg1MtvOxdfpnTEM a8KQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2si770090ejx.38.2019.11.12.12.20.20; Tue, 12 Nov 2019 12:20:44 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726957AbfKLURU (ORCPT + 99 others); Tue, 12 Nov 2019 15:17:20 -0500 Received: from mga12.intel.com ([192.55.52.136]:23123 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726376AbfKLURU (ORCPT ); Tue, 12 Nov 2019 15:17:20 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2019 12:17:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,297,1569308400"; d="scan'208";a="378999660" Received: from joshbuck-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.20.68]) by orsmga005.jf.intel.com with ESMTP; 12 Nov 2019 12:17:17 -0800 Date: Tue, 12 Nov 2019 22:17:16 +0200 From: Jarkko Sakkinen To: Stefan Berger Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: question about setting TPM_CHIP_FLAG_IRQ in tpm_tis_core_init Message-ID: <20191112201716.GA12340@linux.intel.com> References: <20191112033637.kxotlhm6mtr5irvd@cantor> <6d6f0899-8ba0-d6cf-ef3b-317ca698b687@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6d6f0899-8ba0-d6cf-ef3b-317ca698b687@linux.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 08:28:57AM -0500, Stefan Berger wrote: > I set this flag for the TIS because it wasn't set anywhere else. > tpm_tis_send() wouldn't set the flag but go via the path: > > if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || priv->irq_tested) > > ??????? return tpm_tis_send_main(chip, buf, len); Wondering why this isn't just "if (priv->irq_tested)"? Isn't that the whole point. The tail is the test part e.g. should be executed when IRQ testing is done. /Jarkko