Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3184700pxy; Sun, 25 Apr 2021 16:50:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnqFBkb49yAwsOuBKwCRZ7KlIVRBQ13wlC5QvIB3bKO7cY5/TdbwWNBWHbBVTbc97FIqu1 X-Received: by 2002:a62:170e:0:b029:1fa:7161:fd71 with SMTP id 14-20020a62170e0000b02901fa7161fd71mr14811548pfx.35.1619394654714; Sun, 25 Apr 2021 16:50:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619394654; cv=none; d=google.com; s=arc-20160816; b=CelXB9a/x/ORqhwWCfKGE7y1ml7Xfci7R3FddAjJ729hO/JEsu+w5hrQVC+mF7VCGq 6J1j2AVD/OEZwV/9mBqNZRMcai8PfK7qdE8X8wy4lVQrrwRaEarH3t8o2S4Fm+jbbgpS 8kDF7EpTZm6uzXZsBcs/sxqQJmkGgc6DorA1RjVb1yNO0acimwbuuE42+NlVPf8a+QCG rtYvm6Chj/zqoeM690B/zqLRt44MGS0KaBHA9LpD6bW8f5OZWzOuB0Rzh37TecXszmFP 2NBzySeamorRlhG1Yty2SqzfA76zCVpNue5p4Q2CtlhUSBujwSMnlawZLn6sC1yecR48 OE2w== 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=Xww4Ajq5FtsV2InsBHbQvTZ0c/V2QTCq+DzOOmOMrTU=; b=G6DZZDI6cSZCPS49KsuQjvegIdjSM+p/8Rgii3XCVIGCGFwopz4ulTlWZWsU+JcCF0 v8GHYHga7bzW5Ky5lghOb8MhWfV3C3wKqGHfO7B9yr3Q0eoJaITehPRF/qwyfA+k/gnv rhOdT32ZSvvSj8qWvV0XIplGxOZs1EVK0HQqcfu/EPSBxFmh7wy8IVARqFem4pDsz00s qw3TAVD04CVwB2RjoGTcyh884aUgRHM+VaGhcBgoyM63kdVkkJoAq5rQyK1LI5B77rSS NW3YOi5vwUY8pyP4QZaB1M3ZRcnfVBTLnX8pgTFfx1ItLXuZ7ITvgkoBM+Q0SLIVo7cG UpSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=QpRhy7kV; 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 w186si19004517pfw.241.2021.04.25.16.50.15; Sun, 25 Apr 2021 16:50:54 -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=QpRhy7kV; 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 S231432AbhDYXt2 (ORCPT + 99 others); Sun, 25 Apr 2021 19:49:28 -0400 Received: from mout.gmx.net ([212.227.15.15]:48203 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231390AbhDYXt2 (ORCPT ); Sun, 25 Apr 2021 19:49:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1619394515; bh=Xww4Ajq5FtsV2InsBHbQvTZ0c/V2QTCq+DzOOmOMrTU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=QpRhy7kVrTPPDnMO6TynlsUbffsvejK/Q16hrM2K97oOGn4FRR4/6915TKCy0b3EP SaUWQhwtsGlaYk52tJxjcYgGwLNpfAXllKwQuF3C+2uXKF+gPOSGOtmTmlehHGfKeL tpjt3pR2ixAxlnIgIqN4a7XfutFTqLRd3teiIU9o= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([78.42.220.31]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MCKBc-1lk7tY3TW6-009Psi; Mon, 26 Apr 2021 01:48:34 +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 v2 2/4] tpm: Simplify locality handling Date: Mon, 26 Apr 2021 01:47:18 +0200 Message-Id: <1619394440-30646-3-git-send-email-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1619394440-30646-1-git-send-email-LinoSanfilippo@gmx.de> References: <1619394440-30646-1-git-send-email-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:MhFeeekzXwlyQvicCmDig9fh5Z7o7xbqM1w2TmkX3EEzwfquFR8 U03udUqErY5gQ74ZvOgW85KlNRkdyxEao7LvxCCziXeCQ4V5IDzQLuIRC6uPFRy2eeuJgql cQFtDd59/tkMf115aSUDf54Jd+7Sarhr593FqGeaUu41/9tX9V6H4VmPIj+sSWXfzohWi58 U8kPcnA0BJMHCufTkDmbw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:bAsRxkr/G+E=:PlOk/vdDvn2Bkx5SVw2Z8j JRFODMoy0nPxlJWQRd1vH9+2o2XWRgAMAyF5QQSsqUuTjMiWeXMPsaY0XMuUGDuJYX3jB1Ix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