Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1215422pxy; Sat, 1 May 2021 07:05:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxxWXddmucoMlK8K3U3JuElG/jbgBUKh/i9F89Zi5CqdV8xgv6EPE30+gnmdvP9Zuu2BsH X-Received: by 2002:a17:906:1fca:: with SMTP id e10mr9121810ejt.486.1619877920106; Sat, 01 May 2021 07:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619877920; cv=none; d=google.com; s=arc-20160816; b=LE73fjuzMBV6ArZwjY8Z3OSDsoc/FnYDUdstaqG9U7ULjPTicx2SqtOCXPO4Q4RQ68 rYzPpzB1TJWJ949l/HSvmlIZ7TaUnJrPHDlPt0XbiUe5uG2pljM4H32ZjQ/VO7+eeLqZ 2by93UjeQel6TFD9GElkPE9Qrn0A2COr/yvNpx3YbFy2abGEBOGtOC3ujnIKBdkhk2BP 91p9AKsgUgUXAlCMWI5ss0ncbPR+gjPfElUsBAME5/2Bc5GQdz2sc/kPuXVJ1uyYrEIB hvbZxae1LeVdvQHTNlzBunhL6gAIVVjUmeOMky1nnYn5VH3OyVjYOYqXAdf5JpqAPjF2 nwow== 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=T0Fd1bzwcjESFjSMFc7M/35dAUEogjYlT/6DN2d89Vs=; b=BYG2Sb9DcdrK2P691InMi0NWl2ieScWGPA0sVXGGnUpB+fQQvMfJXg9XpVHJu+AvED 4tmjUvXyG+mWDYfgn6PzhxC0iKORdWrDf9nRxi+vH/115WhavjtsXLEiIorc8xgoMkmS 4lzsGeijsHwnEg8jNzfmq8WdbV/a4+t1P74hJ4Jb5QGgSfuDabIPwRwaYPJiWNlGN7ml 9vt6yltXwtjRw/ca0xYWRpUhEb4mcDTDVQXbwJ9a5VuEG4VKI1RulwadLKC9Crbt0+e9 oZEvNT4tcJbdOfwNmaVwgiOFMnsq1mLinPAqlXgVIyd7+7LB4O5Wnvv+tFFCYC7Cs4ru 2z0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=KDzslDkq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si4569245edv.396.2021.05.01.07.04.56; Sat, 01 May 2021 07:05:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=KDzslDkq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232201AbhEAOC3 (ORCPT + 99 others); Sat, 1 May 2021 10:02:29 -0400 Received: from mout.gmx.net ([212.227.17.20]:52391 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232136AbhEAOC2 (ORCPT ); Sat, 1 May 2021 10:02:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619877686; bh=T0Fd1bzwcjESFjSMFc7M/35dAUEogjYlT/6DN2d89Vs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=KDzslDkqJFJBL33wfwg3hQfu918SHPcViLDdoMlZHYa6dy5NfvLBTRoHoj9QsnlS6 7BjnBhIhLf7yq+/Ff/KOQh5wAcH4iWLPVXMYkPSaQDN/NE0R+u5/VBoRJZYGkWxCO5 r0ETN0LQHupyWUdRAECUgPVIFM2PWJhA1/yhmSyo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([78.42.220.31]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mlw3X-1lCt1B09AJ-00iyze; Sat, 01 May 2021 16:01:26 +0200 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca Cc: stefanb@linux.vnet.ibm.com, James.Bottomley@hansenpartnership.com, keescook@chromium.org, jsnitsel@redhat.com, ml.linux@elloe.vision, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, LinoSanfilippo@gmx.de Subject: [PATCH v3 2/4] tpm: Simplify locality handling Date: Sat, 1 May 2021 15:57:25 +0200 Message-Id: <20210501135727.17747-3-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210501135727.17747-1-LinoSanfilippo@gmx.de> References: <20210501135727.17747-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:OvJNB7A4vqxmwwT+wqDxULsbp48SDBs1Byb6p5U0IpGzb/5vC3C 462n/fSPbZKIL9NdmCy5li4QbQfp6nQifBfJPO2OhZdpVmzJiB4CmIha2PlN8RrZHbM+OJJ JwHA/K1WsFdB20a6qCdJV9wu0MhPi6v16HZSqpBXlACqaU+wUBxSqy6qeGP/foM95N5hrlu 6Bi/3mNQBXfB/1r+BAAXA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:czHwvHrGdNg=:761gljfEtc4Bpa1OQfFZ65 n4EiFkRYP7DhlWakUatNxx+KOxlaLABgBoImASRoikSH5mMiafIwUKY5olPciircUIwPc7mbK eFxwXmqiI1M8/y9AUUmctMBnPP7zP43hcFx1wKBQ5CtYiDcioG3Wd+wnW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