Received: by 10.223.164.202 with SMTP id h10csp289482wrb; Mon, 6 Nov 2017 06:42:18 -0800 (PST) X-Google-Smtp-Source: ABhQp+RifhVOVrdBIWIvkX8BLvLn7sANKJXeq99wLme1+olnFeKLe2ByN4Mee/ZULvU78TTONiOU X-Received: by 10.84.129.4 with SMTP id 4mr14733187plb.320.1509979338406; Mon, 06 Nov 2017 06:42:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509979338; cv=none; d=google.com; s=arc-20160816; b=hQ3YmcaUKBBUpp7fxV+LENNOqtvyDSXWiG/1ruFfQK6e70gd7CPcS0fEpCsY7b4CZ6 Msj1ZPuWCU27eceYqPMOjSnTcPQ6EksTPq4LiOwDqDQL2FwkG4Cz1EUllDAMq0uoHrRF u0/zu5D0XVvnvJbAs15V6mUaOsJcolRUMcl83mugEzurrQDQSIJ9nTJjYZ89wqokjviw qcWK6wbnxbh3npq3k2R4JTfF4zmHM7lJDzgrIA3c6Q+VxScDAnpqdtLWEReAn0kpTPxo 369EeBsmZdFIsMqND7KX3cccAWOHKAzCtk8OZCcvsy8SPtBrtGwgTTTJDp0SYP6Mi/n8 Vvww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=8j9SgQA1VIITtF/UpqK0b6SuPXIWhUR4lnnb/oJCaNc=; b=m0ijCekZ12uM7hNCm0yQwCvpuPeEMlMs/IDx/uuVAsjU3ev6rBr3csDm/00qztnSQb orj+s7TAehhcK/DtBud+2VvLetEXV3IWRK0DW1r+2gzr5eFWzzdEa+fwTlKtvt9EUMcQ 8fnEyerWlfroEljxufHFA36C/JOAZj/HkjgIm0R+rTpLh5KwAOUx6k4/Fi6eg55bOTSJ EjVJVf2ytO1hkmSF33zVi5bc8PywyYTO5Zm2moz4Vu6hmVS53CoyYT+B9+vGXiyowXoa rWa01j4g/c94FjpQ7+uTLyaMCvykg4I9JnOIY06AKotxs6CRSB0wsFVFMVmDtVBZemyU HCVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13si10669158plk.466.2017.11.06.06.42.05; Mon, 06 Nov 2017 06:42:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932438AbdKFOju (ORCPT + 97 others); Mon, 6 Nov 2017 09:39:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50614 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753591AbdKFOjt (ORCPT ); Mon, 6 Nov 2017 09:39:49 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 13D83C058ED2; Mon, 6 Nov 2017 14:39:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 13D83C058ED2 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcandre.lureau@redhat.com Received: from localhost (ovpn-112-67.ams2.redhat.com [10.36.112.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9F0F5D6A9; Mon, 6 Nov 2017 14:39:45 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: aarcange@redhat.com, hughd@google.com, nyc@holomorphy.com, mike.kravetz@oracle.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 0/9] memfd: add sealing to hugetlb-backed memory Date: Mon, 6 Nov 2017 15:39:35 +0100 Message-Id: <20171106143944.13821-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 06 Nov 2017 14:39:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Recently, Mike Kravetz added hugetlbfs support to memfd. However, he didn't add sealing support. One of the reasons to use memfd is to have shared memory sealing when doing IPC or sharing memory with another process with some extra safety. qemu uses shared memory & hugetables with vhost-user (used by dpdk), so it is reasonable to use memfd now instead for convenience and security reasons. Thanks! v1->v2: after Mike review, - add "memfd-hugetlb:" prefix in memfd-test - run fuse test on hugetlb backend memory - rename function memfd_file_get_seals() -> memfd_file_seals_ptr() - update commit messages - added reviewed-by tags RFC->v1: - split rfc patch, after early review feedback - added patch for memfd-test changes - fix build with hugetlbfs disabled - small code and commit messages improvements Marc-André Lureau (9): shmem: unexport shmem_add_seals()/shmem_get_seals() shmem: rename functions that are memfd-related hugetlb: expose hugetlbfs_inode_info in header hugetlbfs: implement memfd sealing shmem: add sealing support to hugetlb-backed memfd memfd-tests: test hugetlbfs sealing memfd-test: add 'memfd-hugetlb:' prefix when testing hugetlbfs memfd-test: move common code to a shared unit memfd-test: run fuse test on hugetlb backend memory fs/fcntl.c | 2 +- fs/hugetlbfs/inode.c | 39 +++-- include/linux/hugetlb.h | 11 ++ include/linux/shmem_fs.h | 6 +- mm/shmem.c | 59 ++++--- tools/testing/selftests/memfd/Makefile | 5 + tools/testing/selftests/memfd/common.c | 45 ++++++ tools/testing/selftests/memfd/common.h | 9 ++ tools/testing/selftests/memfd/fuse_test.c | 36 +++-- tools/testing/selftests/memfd/memfd_test.c | 212 ++++--------------------- tools/testing/selftests/memfd/run_fuse_test.sh | 2 +- tools/testing/selftests/memfd/run_tests.sh | 1 + 12 files changed, 195 insertions(+), 232 deletions(-) create mode 100644 tools/testing/selftests/memfd/common.c create mode 100644 tools/testing/selftests/memfd/common.h -- 2.15.0.rc0.40.gaefcc5f6f From 1583461117132335762@xxx Wed Nov 08 01:56:38 +0000 2017 X-GM-THRID: 1583407406859169939 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread