Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1299645iol; Fri, 10 Jun 2022 04:48:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfpQzq6FGl5c0hOSxtRszuY29qSpETvmRNlrrJExyahjQ4c8/cqlsYWu3QMezHrlvAY3fe X-Received: by 2002:a17:906:51d5:b0:711:f4c7:5085 with SMTP id v21-20020a17090651d500b00711f4c75085mr12225319ejk.650.1654861717996; Fri, 10 Jun 2022 04:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654861717; cv=none; d=google.com; s=arc-20160816; b=pC5d0vPwImksYqmikZbAZuiOYSPHc2hXga8jDeR8YQdR8xCAEEeZU6AaLcT6y8QrWs rBpV8HjJN74Nb5SnKCMG72lh9W4phpFx/nyQpbrsipKywLVgCzDkcCHRW629mFrdh0qE eCTU9Zm7UVse8/wGhCvj+v697vzjypAcWMrHtjLFgi9BVgkxLHnsVH2A80SoawUwZN+F oeGLk2SxVeMg0OtBkmYQTW0N6LWjkjE2WVn4gw3DMLiWt9qzjmU5VxvNBSFuM0Qrao3w ChK5aQtQSpbnYkPAASzz4hZAM61ZSOEkZK8aDPr5Mo4UcqrRHdgPZigxORuB+Kk6CCez pSOw== 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=O45VmH8NuxzGZD4XqpbBWPkt09hOK0EdvFcOYQOngco=; b=VLjLYg2HftXvqgRqiYh9VIolGrBW6dFwuW92VgZ9HnNVhp1P9xba8RfIqIowYzc4jA VBLh+z/GgonuAvG06vi8BHVkRUKt21Jf7WdzrfYDgDx6cIkeMEccubUQWtuCW5pidnyP 0qEdJLfmRRkViIf6+U6ad4VApsyBvgE4poY2vDIFNWYOs7Uj4eo4fHVPM4MPWf8lj2QQ Ks9RKcBpLlZKexETYHvVCWBPvzBhMK0FxQjkfCc38wuGMYQqJO+7mpnIsTpnQ62nwyRH /VwoOeUctMh5G7Y4Cwv0TGWSRrlClGTw3Rlxe6v9NQcsyZ5RhxoL2OEuNLVR2Q7YM68u y4/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=XUJ4KEBO; 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 c19-20020a05640227d300b0042f79c03344si11209262ede.3.2022.06.10.04.48.08; Fri, 10 Jun 2022 04:48:37 -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=XUJ4KEBO; 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 S1349192AbiFJLJu (ORCPT + 99 others); Fri, 10 Jun 2022 07:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348108AbiFJLJX (ORCPT ); Fri, 10 Jun 2022 07:09:23 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7FFC14642A; Fri, 10 Jun 2022 04:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1654859346; bh=O45VmH8NuxzGZD4XqpbBWPkt09hOK0EdvFcOYQOngco=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=XUJ4KEBOFPQEsECL8OmhSz9RoumufW+odPQuCknWFgKaS+1cwtdt2G0bUwELwSP4+ +GHGuMZmiQh0ekfiCtpfp2sNmXsnu44GtxyvDeDwjt98dc9DhynGODLQa2AkbDOsOX h8dWOlynCn2VasbYdKoEYy7Ah6J/yJfPFUZNOePQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.3.165]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MxDkw-1noqxF3HVg-00xY1S; Fri, 10 Jun 2022 13:09:05 +0200 From: LinoSanfilippo@gmx.de 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 v5 07/10] tmp, tmp_tis: Implement usage counter for locality Date: Fri, 10 Jun 2022 13:08:43 +0200 Message-Id: <20220610110846.8307-8-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220610110846.8307-1-LinoSanfilippo@gmx.de> References: <20220610110846.8307-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:73KXtmhSPA6z0Ps5tcxg1HoBOwfkc5Jk0+wV0CmquaXV+7z05O3 aqDSmUVnsO3xpKCNG5BMtrLphY4YGBfJSpLR84thdCOTio3z1BPd1amY3YVcdo0rj1pzUZe Cl3STbGbuFRuF6/e5dIQlMrVk8iVGPslpyXPxh8fcigMqRgKs25+E2bED+PEc1nXaPUfseU eobIvmN/CKirKOqvu/4Zg== X-UI-Out-Filterresults: notjun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mDKfwPvXoeG4j8BUbnHH9z0nbDoWjm0b62WOoWu2m52GIiDbqoerAm+tUrXYnBujJpI2R UalgGtv0TRNYpyGHRYwU++tElfmz2yfOHBeDcClOQNdKzAycFFeCJnYeQ== 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 dXB0IGhhbmRsZXIgYXQgdGhlIHNhbWUgdGltZSB3aXRob3V0IHRoZSBkYW5nZX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