Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3819070iog; Tue, 21 Jun 2022 06:38:44 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8sHN9O6JqGCaY0ulh+Qh0oVeM+iBQzVSVD8aX11LBqM6StwDW6K4tXgJiOmUVh2U/R0sZ X-Received: by 2002:a17:906:2756:b0:718:d986:d3e3 with SMTP id a22-20020a170906275600b00718d986d3e3mr25865959ejd.425.1655818724136; Tue, 21 Jun 2022 06:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655818724; cv=none; d=google.com; s=arc-20160816; b=gchYzIEF5BTgv4p5ha9skNhh+tJcq4u5Uze+f+k2L5C//Nd/+BE39xiDETFf6DAwjw bFmMBt6LyU1EOAHyiyzUnDzVJL2PQmZyvaE0zFxhqE670WFWWY05/JaISeLlh/VsI+er 9oAG9xXP8kNlu99wOr0dquADHpJNr5j/86cLInhPs9yLVrN2lTbXSdOupOV8nd22RUMU 3Lls5Ldp533ooR581rBBl1/I7a2I8yjeegmP6LgN6tBU//llb+10ovXkCJBxBHOveApJ 8jVkVBF+r+VzX1o6QbwsWct5+/r5Y9j5ZSvbtNgPbwdUvpxOX0VozEUItHs2pBim8tlw U0cw== 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=UqrXeJeyucbWKhNmptMWsyd6uHrhoNhsf8+CRRXH2jk=; b=xfERe8hQIO0jkyEXdyYCIGRhw/WN1FQv/kiIPnyoNkzIQgNv6G/3H0gq33vd8rGfEs WEoumeL3evVPlj6BdMKx73impwRUF3KVJKzlJp7k9+Kr314kEv/fvw4SrcD3fxMZR9NQ 2rNkDwEHRn6smtpEQBXXmSw8ZGYfCqxS/m/QU6NMyZ9G+vezIaKenKrc6z7EqfcCNWl+ c2C81TSDGUK8Wn7OxOuhEZUeg6m7UKoF0Axyg2NOOAj5GN5GpmglLQEPZphKJrWIyT7t ExRl808DqDnU136Eu2jS0ce4ZKzaKgfdVAN47HgjXXiFDWjgJBd/mNsOg/t4PcCY+kZC YiDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Rp4vy+NY; 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=fail (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 nb19-20020a1709071c9300b006e82f2c77cfsi2245805ejc.199.2022.06.21.06.38.18; Tue, 21 Jun 2022 06:38:44 -0700 (PDT) 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.net header.s=badeba3b8450 header.b=Rp4vy+NY; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230521AbiFUNex (ORCPT + 99 others); Tue, 21 Jun 2022 09:34:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351479AbiFUNbC (ORCPT ); Tue, 21 Jun 2022 09:31:02 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 695B82AE1A; Tue, 21 Jun 2022 06:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1655817938; bh=UqrXeJeyucbWKhNmptMWsyd6uHrhoNhsf8+CRRXH2jk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Rp4vy+NYBHbZuabQdJKfPHAGgjpz3NRRkDylO+Gj6wfCOSVmWwhYjOao90t8zXY6f 5nYAbnpViF4V/7knSmVQjgEZfpgmPSa3KzyQF0yekdQpQJBbdE5KgVEcbpg/tIlxDo XHT+l6C+pUasnhksqIYYwennOqFsts2/OoFKrJ2I= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.2.162]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N4QwW-1neiO41Mpy-011ODK; Tue, 21 Jun 2022 15:25:38 +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, l.sanfilippo@kunbus.com, LinoSanfilippo@gmx.de, lukas@wunner.de, p.rosenberger@kunbus.com Subject: [PATCH v6 6/9] tmp, tmp_tis: Implement usage counter for locality Date: Tue, 21 Jun 2022 15:24:44 +0200 Message-Id: <20220621132447.16281-7-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621132447.16281-1-LinoSanfilippo@gmx.de> References: <20220621132447.16281-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:EucHbQAyhaDO2OFslHJYpn5K9j86a67vVh2xprBNsZmGLRt+qR5 0UxqXz0bYGV4O480o0mLSwNE72TQrseinaQpAx/pwXllfuNAeFINyfiN4Ui68SbdUsxwD3U viSxqvtqkfrPQ4+SySz7GGK0L+Xq00z+u7otqCBfF1aO+/5WAh0rxKJiRUPOPpyFldRYP78 cM37USIIz6vhlAn6iGhFw== X-UI-Out-Filterresults: notjunk:1;V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ICAi83RFWlS/rsUH9C3FQ7u20tA0xe6yxFd1rut5rbfaobq1buEr8Jsj0s9 NXpgFcnc8VO1KlnIeztQURhuIClownuAc8QGx0fEF2lt/TtOUSrcOBedA== X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MIME_BASE64_TEXT,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KCkltcGxlbWVu dCBhIHVzYWdlIGNvdW50ZXIgZm9yIHRoZSAoZGVmYXVsdCkgbG9jYWxpdHkgdXNlZCBieSB0aGUg VFBNIFRJUwpkcml2ZXI6ClJlcXVlc3QgdGhlIGxvY2FsaXR5IGZyb20gdGhlIFRQTSBpZiBpdCBo YXMgbm90IGJlZW4gY2xhaW1lZCB5ZXQsIG90aGVyd2lzZQpvbmx5IGluY3JlbWVudCB0aGUgY291 bnRlci4gQWxzbyByZWxlYXNlIHRoZSBsb2NhbGl0eSBpZiB0aGUgY291bnRlciBpcyAwCm90aGVy d2lzZSBvbmx5IGRlY3JlbWVudCB0aGUgY291bnRlci4gRW5zdXJlIHRocmVhZC1zYWZldHkgYnkg cHJvdGVjdGluZwp0aGUgY291bnRlciB3aXRoIGEgbXV0ZXguCgpUaGlzIGFsbG93cyB0byByZXF1 ZXN0IGFuZCByZWxlYXNlIHRoZSBsb2NhbGl0eSBmcm9tIGEgdGhyZWFkIGFuZCB0aGUKaW50ZXJy dXB0IGhhbmRsZXIgYXQgdGhlIHNhbWUgdGltZSB3aXRob3V0IHRoZSBkYW5nZXIgdG8gaW50Z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