Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4868554iob; Mon, 9 May 2022 03:37:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweMBGkp/nk6duCJiUAoDged1egdcZfumPwERgdgset4BHWG9ZAS7PzkM6vPFsWL7dWbUE8 X-Received: by 2002:a17:902:e5c1:b0:15e:b847:2958 with SMTP id u1-20020a170902e5c100b0015eb8472958mr15415169plf.101.1652092644871; Mon, 09 May 2022 03:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652092644; cv=none; d=google.com; s=arc-20160816; b=iBGK7HQUUCfK3pqWplf3nNayk1o8tjQsGtCIbwphG1qnzVICLtZCtj2dCEILzLJu2r GQWLQxhk6vWurmtqrBL6icZEYI5WLNAHY30TaUPNpt6jZTzRrdwazXtT0PhZmOJSVeqS l7iWGVg2jkIqb7LgxNmnXUY/eWJqnpwIs6/nf6vsJhfgSSEdHnFGIgP/QwI/Ie/6UeWB TVPjISZ4WQG3XYu6a9VdrLgkVsS8UHaCQim6Q5/pTkz9vHJbivHuZZphDnCoQf1Fr9Ah MwSErQ/9AS3wvDsBjVBBWoA00VfjgvU9aBrUO84j8Zgz9/R8vGwo+CRhiZHzP6xX/ev0 sSlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xOpvZ8BgGCUz6IDaFNm7AWkuquQ2TTNkNVxmdRJZRIo=; b=jjUWg42boHKY7K4pJOVjGrNBfojmDjUx/HC1NFRlE5+IJVaQtUy5OZwVkTLZgpVSjG 9l6m0CqsfS0P9jIT2doiZDL/jls2/D6VD3pO29Uy5PxX297OcLlMwFs5CqqpKNbXsNi1 u90GUxggaDRwdgBMnP4WrN63JIFoRcgg7s/xPh8Cp0LpW5ITFjLA4hFoNHCyQPasWmJD zDqjwA6+KM6y6ZuB4Y7dd3H2xxEhtf+BMfjTaFUlP2DhIyo1kposy3LDC+J4HLWpg5S/ 6qX3hDPJaBD7RgjGP9ZSXJ7xiL1UVkjxQ8FNqkKyhlbCaPP0B+V+6wtG7OhzfQQhQK+5 XZIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=E2vrTJ8P; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t3-20020a170902a5c300b001542a6e4c9bsi10572070plq.485.2022.05.09.03.37.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:37:24 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=E2vrTJ8P; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3D8F1FB2EF; Mon, 9 May 2022 03:05:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232464AbiEII0P (ORCPT + 99 others); Mon, 9 May 2022 04:26:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235727AbiEIIOx (ORCPT ); Mon, 9 May 2022 04:14:53 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA61515D31D; Mon, 9 May 2022 01:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1652083627; bh=xOpvZ8BgGCUz6IDaFNm7AWkuquQ2TTNkNVxmdRJZRIo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=E2vrTJ8P0DxVREsgDXGdGC/uKskZK8QkaM951p2q8ytXOAa41Vx+vtL0AfSCZNxij a/+x9fmIn7/t4Vbdm1+8sy0vG5a+Iik2P1pts7SfpSf35Skolpu3MJlzhdKmc/rrlw drIwxuoi46gCXDqo8bJZlrT87J4ec3/6JtZOpYww= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.3.89]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbAgq-1oKpCF03EO-00bdkT; Mon, 09 May 2022 10:07:07 +0200 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, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH v4 4/6] tpm, tpm_tis: avoid CPU cache incoherency in irq test Date: Mon, 9 May 2022 10:05:57 +0200 Message-Id: <20220509080559.4381-5-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220509080559.4381-1-LinoSanfilippo@gmx.de> References: <20220509080559.4381-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:4t6mWcZUnR8Zow/cWZDz9hnDGH0BwWHhkduqhaFeeoJCNlegYyq WMw8AKELkLhuUBk2K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VN2mJnNCJiXUBcUb6dEbQRr03es FlLnTyDPFtbSiOQg3I0f2m5AymsqzDN2P/2lCHsdhQQyV+67+N6lRmT+kt1lkydKPrfjQCqgs oQuZ3lDi7iVYbEX7RVHTwbDDAY2HqdwmTMf1pH/ngxMHOw3Kh2KfwowtTHebTl2iK+61LgLIi MRyLB67p4ZszC6lls1FFxt6MRCu2e/rBbYjh441/ER7CeHSyR65zViVwf1HhwLYU6HOjbizbT z/FU8od+I6f6vQ= X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MIME_BASE64_TEXT, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KClRoZSBpbnRl cnJ1cHQgaGFuZGxlciB0aGF0IHNldHMgaXJxX3Rlc3RlZCB0byBpbmRpY2F0ZSB0aGF0IGludGVy cnVwdHMgYXJlCndvcmtpbmcgbWF5IHJ1biBvbiBhbm90aGVyIENQVSB0aGFuIHRoZSB0aHJlYWQg dGhhdCBjaGVja3MgdGhpcyB2YXJpYWJsZSBpbgp0bXBfdGlzX3NlbmQoKS4KClNpbmNlIG5vIHN5 bmNocm9uaXphdGlvbiBpcyB1c2VkIHRvIGFjY2VzcyBpcnFfdGVzdGVkLCB0aGVyZSBpcyBubwpn dWFyYW50ZWUgZm9yIGNhY2hlIGNvaGVyZW5jeSBiZXR3ZWVuIHRoZSBDUFVzLCBzbyB0aGF0IHRo ZSB2YWx1ZSBzZXQgYnkKdGhlIGludGVycnVwdCBoYW5k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