Message ID | cover.1678926164.git.ackerleytng@google.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp204273wrt; Wed, 15 Mar 2023 17:33:37 -0700 (PDT) X-Google-Smtp-Source: AK7set8CJzcG/ko+2bJYPajBf7RqxQspBrBfV2a7PSudsGLwtHgcs/OkC1nDGZ4M6TB5te48uyPC X-Received: by 2002:a17:903:706:b0:19f:188c:3e34 with SMTP id kk6-20020a170903070600b0019f188c3e34mr1328640plb.53.1678926817373; Wed, 15 Mar 2023 17:33:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678926817; cv=none; d=google.com; s=arc-20160816; b=nQRGiBnAB/ekmU/RnwNTl7rN16NWKtfmC9UP4gisXUze+a6CMoNJVXWj//FewYaVPj w9i7gtozJQfEVQZjawTAhYFLdQeVSA3lFmn7AIhXoQqmaOii6k1gQfplAzeZYk6qa3Yl KftkAtk4QTidnYb8t9eINo5P1ptcsvr69k2gM1wEz9kP63mDoFljPd786yxa9OICBsmw jGxk3lzaqQ6NFs5o7Zkv6d4vMYKVpnWOU1DzYNLBpcuv1+zcvwrg6d10fpKpd3Ramu/1 y8ehK7tEwRwZ1JyVKUzE13gN7JcTllRbvkHLzgTsQhvVwEWvNnRmYlGGtseN5xp0mzxE 3YWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:from:subject :message-id:mime-version:date:dkim-signature; bh=hT7y2XaFexWW4GTLeQpLaRg79NNFfwA0Go2glRLgBd0=; b=KtynpNUJGt9iROEPJcuGIXXeqTTu+p0fHnXAuEvdFinGmj8ZkfmOCOYKlVdcyfdk35 d2ZUl+TKhb3CFlrpcrS/pforsuLFa92Lvxes2IzuS/9HG7dbZxAKl8D0PTwbuwTQI/Ci mxd2J/vKrO8h+93h9Hd8Iyes2zDao+itbbOAtbVQPnnyw9SIelUbBuDW5C0QBSHJTk5+ gOKYr6j+YNV3uaZcK+hz9Db90Eycl/kvw6S0k5uUiQUPkYmsOounHJq2VL1B++I5JLgR ZSGnnGF3R53gDBa1rI8Q1SPl2JPo94M2k4RY0oZ3EiYvnJ4TcvKEkVWqOqbxZxB+alqN Xs9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Nz5kUB5U; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ju5-20020a170903428500b001884ba979e7si6174506plb.194.2023.03.15.17.33.22; Wed, 15 Mar 2023 17:33: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=@google.com header.s=20210112 header.b=Nz5kUB5U; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233120AbjCPAbU (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Wed, 15 Mar 2023 20:31:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233082AbjCPAbP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 20:31:15 -0400 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31CCEA17E6 for <linux-kernel@vger.kernel.org>; Wed, 15 Mar 2023 17:31:13 -0700 (PDT) Received: by mail-pf1-x449.google.com with SMTP id i7-20020a626d07000000b005d29737db06so169614pfc.15 for <linux-kernel@vger.kernel.org>; Wed, 15 Mar 2023 17:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678926672; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:from:to:cc:subject:date:message-id:reply-to; bh=hT7y2XaFexWW4GTLeQpLaRg79NNFfwA0Go2glRLgBd0=; b=Nz5kUB5UsktVLM+1ioYn0/f+EE3tG8bYDmBZ7k4J/Gt/p5gTfQtvXXnoIclpQPuDya iUSZv4Ya8c29iPtlOA7O8kWfsasypPc8z6XfRhbOcsmBwYKUvOolqz9fQyk7NgQiLh/7 c/HaSbFKMHr9gsoqPFgvukhunTri9uzxM+/T1bb2dlQR9ihIBftzfIgbbB2EA9ig0QfN QH/Qst7Frnk64y0MYkI8/9p+OMNZJnbfWHBkKL+LoqwoHnfU22JRu1wnbHr5/KauoW4g wseQ2RJb2qNMKAO2J1HN6p/Ws+7+zkBAtzloNtEG5key9qZ2BL1aJc7RLJD21ClZZS8U CQZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678926672; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hT7y2XaFexWW4GTLeQpLaRg79NNFfwA0Go2glRLgBd0=; b=6es86w9gu0AR2/pQ4lqoePclz1kP6kzPrYjR5I4haStFbwDNBB5KdsC0sGYI+vmM3x 4EZBNQ/3ncwhJc3NeYxa7ZvS28127pO4pwlP7T1aj5VPvPuXolXt3JNgs9+ayIO7n+oh oL/5hYPVDkKZbcmhR0JQDO4a9t379bzzAC4OgFnGHIxL9Vsdt37ST7MPCJwEopWMmPb0 POuxfAbT4unARsd0JaQS2FKwXH7bZpY8ZTvVIM4g4Hcscybk/CSZDAxKED6aP0wOB5vG L2Kro32jn2dGbbPXT4ZPzU6cmSPmWos2lHK/unJJHNFO9v/pv3Kkavz6cX4RBmgD6ucz CoIQ== X-Gm-Message-State: AO0yUKVtNbzksvl4yocde6ZuqbkjK7iYJS8EqBvMZJJfQEI7G/q29CmI m1MJV/kZBQcWyPtDlDnHvJMt0NfJam2zS09OCw== X-Received: from ackerleytng-cloudtop.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1f5f]) (user=ackerleytng job=sendgmr) by 2002:a17:90a:ea89:b0:237:2516:f76a with SMTP id h9-20020a17090aea8900b002372516f76amr548955pjz.2.1678926672510; Wed, 15 Mar 2023 17:31:12 -0700 (PDT) Date: Thu, 16 Mar 2023 00:30:53 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.40.0.rc2.332.ga46443480c-goog Message-ID: <cover.1678926164.git.ackerleytng@google.com> Subject: [RFC PATCH 00/10] Additional selftests for restrictedmem From: Ackerley Tng <ackerleytng@google.com> To: kvm@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, qemu-devel@nongnu.org Cc: aarcange@redhat.com, ak@linux.intel.com, akpm@linux-foundation.org, arnd@arndb.de, bfields@fieldses.org, bp@alien8.de, chao.p.peng@linux.intel.com, corbet@lwn.net, dave.hansen@intel.com, david@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, hpa@zytor.com, hughd@google.com, jlayton@kernel.org, jmattson@google.com, joro@8bytes.org, jun.nakajima@intel.com, kirill.shutemov@linux.intel.com, linmiaohe@huawei.com, luto@kernel.org, mail@maciej.szmigiero.name, mhocko@suse.com, michael.roth@amd.com, mingo@redhat.com, naoya.horiguchi@nec.com, pbonzini@redhat.com, qperret@google.com, rppt@kernel.org, seanjc@google.com, shuah@kernel.org, steven.price@arm.com, tabba@google.com, tglx@linutronix.de, vannapurve@google.com, vbabka@suse.cz, vkuznets@redhat.com, wanpengli@tencent.com, wei.w.wang@intel.com, x86@kernel.org, yu.c.zhang@linux.intel.com, Ackerley Tng <ackerleytng@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760482366772202640?= X-GMAIL-MSGID: =?utf-8?q?1760482366772202640?= |
Series |
Additional selftests for restrictedmem
|
|
Message
Ackerley Tng
March 16, 2023, 12:30 a.m. UTC
Hello, This is a series containing additional selftests for restrictedmem, prepared to be used with the next iteration of the restrictedmem series after v10. restrictedmem v10 is available at https://lore.kernel.org/lkml/20221202061347.1070246-1-chao.p.peng@linux.intel.com/T/. The tree can be found at https://github.com/googleprodkernel/linux-cc/tree/restrictedmem-additional-selftests-rfc-v1/. Dependencies + The next iteration of the restrictedmem series + branch: https://github.com/chao-p/linux/commits/privmem-v11.4 + commit: https://github.com/chao-p/linux/tree/ddd2c92b268a2fdc6158f82a6169ad1a57f2a01d + Proposed fix to adjust VM's initial stack address to align with SysV ABI spec: https://lore.kernel.org/lkml/20230227180601.104318-1-ackerleytng@google.com/ Ackerley Tng (10): KVM: selftests: Test error message fixes for memfd_restricted selftests KVM: selftests: Test that ftruncate to non-page-aligned size on a restrictedmem fd should fail KVM: selftests: Test that VM private memory should not be readable from host KVM: selftests: Exercise restrictedmem allocation and truncation code after KVM invalidation code has been unbound KVM: selftests: Generalize private_mem_conversions_test for parallel execution KVM: selftests: Default private_mem_conversions_test to use 1 memslot for test data KVM: selftests: Add vm_userspace_mem_region_add_with_restrictedmem KVM: selftests: Default private_mem_conversions_test to use 1 restrictedmem file for test data KVM: selftests: Add tests around sharing a restrictedmem fd KVM: selftests: Test KVM exit behavior for private memory/access tools/testing/selftests/kvm/Makefile | 1 + .../selftests/kvm/include/kvm_util_base.h | 4 + tools/testing/selftests/kvm/lib/kvm_util.c | 46 ++- .../selftests/kvm/set_memory_region_test.c | 29 +- .../kvm/x86_64/private_mem_conversions_test.c | 295 +++++++++++++++--- .../kvm/x86_64/private_mem_kvm_exits_test.c | 124 ++++++++ tools/testing/selftests/vm/memfd_restricted.c | 9 +- 7 files changed, 455 insertions(+), 53 deletions(-) create mode 100644 tools/testing/selftests/kvm/x86_64/private_mem_kvm_exits_test.c -- 2.40.0.rc2.332.ga46443480c-goog