Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8951279rwb; Thu, 24 Nov 2022 06:19:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf75iPyljjUT+iVwUTy5dR+UhROQWLs7YcE5CJSINHHpsZ6c2gANQ1auxgIm04fvLKeBXNuC X-Received: by 2002:a17:90b:804:b0:20a:7ec2:c96d with SMTP id bk4-20020a17090b080400b0020a7ec2c96dmr35053793pjb.178.1669299562574; Thu, 24 Nov 2022 06:19:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669299562; cv=none; d=google.com; s=arc-20160816; b=09k4JCIfjueBeX6GxNeRIcsu/7PyIbcdpTOwYgiUuL+JV+q2XGy90aGBwqXg8Q4+72 KR0k/tLGijd/qekZwom4xQwYyaa3n7rUK2KyQaP6drXWA9cJZ+q3CuLnTBrKgkLcLghr GeIxrGEYD4bKcSHy5wOgCoJhm3eN2Wk2XFCjg2adbaZbgJfYFlvcYUrPDKRokGINGOJO tbqhwU20ezm7EKl5f1OIrDojd7NXKSpS8oH23eE+nFoGdLp4K0iato21svulm9aetmuc 2pKMSf5kgjbuJAI61bxocGsQfHqjZ2dF9PHndUIOdQb13ZZroDwqq5N8TnxV7mkj7pGB EAzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nfj6LxEEakS1d9oZm1Vln0mVngkSUD4WhjDUy9R8goU=; b=08KvaMStT0/W4rPrBlqWNJeyuGyO9T/15THw/iYVXZ0wefxDj0mZie2O/5cj0Dou+h oSJsBRTtVN/GD0D60UX5GchEHQ09EGasn+y4DCfMqV1yNkG6LhWgiaW2vPW5W98r2t42 yOk1VcI31S0d7OpSE5bL51We7aUD4BCQMxXgpVrdZactYXOYFb9rptiiAnWYwtnO6ZgU gEgDbNFG9gFBC4o5Xe/D5qUZIk0eHB8sMUlfbLb4+1VfuxQrCrgW58FOelmZ5sgjO+ea WL6Td8PnT8g7JeUtw9x/86ir2RtPA4d7VdNkDtITqGZQmBm5831TN4J0pCpu9+G9z8MQ DlTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=SIpKaQvo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob10-20020a17090b390a00b00218592c28casi1335624pjb.33.2022.11.24.06.19.11; Thu, 24 Nov 2022 06:19:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=SIpKaQvo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbiKXN5P (ORCPT + 86 others); Thu, 24 Nov 2022 08:57:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230134AbiKXN4g (ORCPT ); Thu, 24 Nov 2022 08:56:36 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B75CE11604C; Thu, 24 Nov 2022 05:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1669298171; bh=nfj6LxEEakS1d9oZm1Vln0mVngkSUD4WhjDUy9R8goU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=SIpKaQvo39+/4NrHUTAzIjtNS5X9hGHJXHnX2qgwSeaYMSlJAWLIEIOrpYEZJ5YJb B0FJwZQ6RQrFs2+hPoNhUklaYNeB+c+bHvNV/20JwkWh3cr1XpvJme9DSfu9WDBgiZ AYOnCW2Nte1anJo7A70I0jbPaI0gIS4wOcGbfuyCLvNBHwCgmXLvJQ7694NghaNXt9 KjrCrIwLFuYGHuXZdVXm9Zz5jNnla+R2GMK3sYObxu0LszAQqUkVx9JjcbZLP0uo8U SVXp280OBqTY5qX+yrhhefftRzbsp6nAjJ8pwSucyofUNTAGwhEdvxUN5P7HV6fEZo A12ltdQolCm3g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from Venus.speedport.ip ([84.162.7.17]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mjj8D-1pLgY42t7j-00lBsR; Thu, 24 Nov 2022 14:56:11 +0100 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca Cc: stefanb@linux.vnet.ibm.com, linux@mniewoehner.de, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, jandryuk@gmail.com, pmenzel@molgen.mpg.de, l.sanfilippo@kunbus.com, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com Subject: [PATCH v11 05/14] tpm, tpm_tis: Claim locality before writing interrupt registers Date: Thu, 24 Nov 2022 14:55:29 +0100 Message-Id: <20221124135538.31020-6-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221124135538.31020-1-LinoSanfilippo@gmx.de> References: <20221124135538.31020-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:VB7psXmoZkW0IM+pjguIbLL50aHa+0pp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tFlfobyQM63xai5jf6t23bZjMYvBY/jKZw2yLJ1ONWUVqjNQfj5p3x4If7x 3M1b8oZqBUUUt3e/yauhsJsqo0atO3Ql4r/feU7yc5R2wOKJsZiD/Evi5UpjkHbKBJ9sh11IQ Az97XcDFLwnor90Ro5xyscPImiM= X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MIME_BASE64_TEXT, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KCkluIHRwbV90 aXNfcHJvYmVfc2luZ2xlX2lycSgpIGludGVycnVwdCByZWdpc3RlcnMgVFBNX0lOVF9WRUNUT1Is ClRQTV9JTlRfU1RBVFVTIGFuZCBUUE1fSU5UX0VOQUJMRSBhcmUgbW9kaWZpZWQgdG8gc2V0dXAg dGhlIGludGVycnVwdHMuCkN1cnJlbnRseSB0aGVzZSBtb2RpZmljYXRpb25zIGFyZSBkb25lIHdp dGhvdXQgaG9sZGluZyBhIGxvY2FsaXR5IHRodXMgdGhleQpoYXZlIG5vIGVmZmVjdC4gRml4IHRo aXMgYnkgY2xhaW1pbmcgdGhlIChkZWZhdWx0KSBsb2NhbGl0eSBiZWZvcmUgdGhlCnJlZ2lzdGVy cyBhcmUgd3JpdHRlbi4KClNpbmNlIG5vdyB0cG1fdGlzX2dlbl9pbnRlcnJ1cHQoKSBpcyBjYWxs ZWQgd2l0aCB0aGUgbG9jYWxpdHkgYWxyZWFkeQpjbGFpbWVkIHJlbW92ZSBsb2NhbGl0eSByZXF1 ZXN0IGFuZCByZ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