From patchwork Tue Apr 5 01:49:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12800979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 317ECC433F5 for ; Tue, 5 Apr 2022 01:59:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D64CE6B0096; Mon, 4 Apr 2022 21:49:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D141F6B0098; Mon, 4 Apr 2022 21:49:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB4D56B0099; Mon, 4 Apr 2022 21:49:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0030.hostedemail.com [216.40.44.30]) by kanga.kvack.org (Postfix) with ESMTP id AD80B6B0096 for ; Mon, 4 Apr 2022 21:49:47 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 51F58ACF50 for ; Tue, 5 Apr 2022 01:49:37 +0000 (UTC) X-FDA: 79321143594.18.5096534 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf22.hostedemail.com (Postfix) with ESMTP id D23B3C001D for ; Tue, 5 Apr 2022 01:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649123376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9fEneeyQr1XaNwKhMDQcOUUZbbgPBUxsqyNto4zx3Io=; b=crTcWsT0NyYuBfrbtsS2+n7VpKWvXtb0FIh0ubKJgDTo4FE335fzDZTYiahFaiG9ImCjZH ZOgEx0u0Xsjg59GpD8aGFIn9vLnXGpNT9m5c+tAgQBeL9Fa2+TICkwVfVJEqqnRLx1+87n uTd6cpXucMMLfw0LyiSvd8lyNV4e98c= Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-392-8G63YEqmOh-l84zer9S3lg-1; Mon, 04 Apr 2022 21:49:35 -0400 X-MC-Unique: 8G63YEqmOh-l84zer9S3lg-1 Received: by mail-io1-f70.google.com with SMTP id i19-20020a5d9353000000b006495ab76af6so7508635ioo.0 for ; Mon, 04 Apr 2022 18:49:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9fEneeyQr1XaNwKhMDQcOUUZbbgPBUxsqyNto4zx3Io=; b=m2shPMS12RbjRwnH29e+EtpdrMFk24/ucD0qDHm7+uVgjwWTPpfsdvPwuk/zewb/FJ v0f/mhywL20Vs+7iHY/fCJzBcRcnh7corDdO65tDXwVMg9f5COXEwJpliIBBP06FZWH/ 5Kc894JS6RS1deQUgJK/k4LAU0FHfQGyJxKh74ZkyihrYP0I8cwzLGu+FLwvZkSHtnuK d8VrDjGStDnBd44T+0VQnOamHc/4Xe58OxaAEMVfM3Ra5oaApMim19ZShyIq8t7zQ61U IEBUpeWePDS2vRun/1G7MoCCHNH1xEjpDYS9+BElJFvXyavcvEuYKUSqbu3eRsMMBgqj i57w== X-Gm-Message-State: AOAM531zgzcXImeADtBs86iO7pBOn6sNCQgYcdsb3yHLhGm0XU64kLdh xNcpu6qRfnu/PomuF4dRNSbvGHSKQsOyMW2PCbRNPszQOQ5hsRSyoRTyLzpMXH4vrDE4nd1SSKf TdZzxHHooOno= X-Received: by 2002:a92:2e01:0:b0:2ca:1f0d:fe5d with SMTP id v1-20020a922e01000000b002ca1f0dfe5dmr531917ile.201.1649123374741; Mon, 04 Apr 2022 18:49:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6gsEsxVDLt+Q8uilC+AQSvDlTB1lbfOZtS3HSLlBkhdkp9NXI433lqCZ74NP5YsBF3yosQw== X-Received: by 2002:a92:2e01:0:b0:2ca:1f0d:fe5d with SMTP id v1-20020a922e01000000b002ca1f0dfe5dmr531898ile.201.1649123374449; Mon, 04 Apr 2022 18:49:34 -0700 (PDT) Received: from localhost.localdomain (cpec09435e3e0ee-cmc09435e3e0ec.cpe.net.cable.rogers.com. [99.241.198.116]) by smtp.gmail.com with ESMTPSA id s10-20020a6b740a000000b006413d13477dsm7272806iog.33.2022.04.04.18.49.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Apr 2022 18:49:34 -0700 (PDT) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Mike Kravetz , Nadav Amit , Matthew Wilcox , Mike Rapoport , David Hildenbrand , Hugh Dickins , Jerome Glisse , "Kirill A . Shutemov" , Andrea Arcangeli , Andrew Morton , Axel Rasmussen , Alistair Popple , peterx@redhat.com Subject: [PATCH v8 23/23] selftests/uffd: Enable uffd-wp for shmem/hugetlbfs Date: Mon, 4 Apr 2022 21:49:32 -0400 Message-Id: <20220405014932.15212-1-peterx@redhat.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220405014646.13522-1-peterx@redhat.com> References: <20220405014646.13522-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Stat-Signature: pd1fkkzksu7czazni5te3mhatui6rcjr X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: D23B3C001D Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=crTcWsT0; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf22.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com X-Rspam-User: X-HE-Tag: 1649123376-63334 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: After we added support for shmem and hugetlbfs, we can turn uffd-wp test on always now. Signed-off-by: Peter Xu --- tools/testing/selftests/vm/userfaultfd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index 92a4516f8f0d..bbc4a6d8cf7b 100644 --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/tools/testing/selftests/vm/userfaultfd.c @@ -82,7 +82,7 @@ static int test_type; static volatile bool test_uffdio_copy_eexist = true; static volatile bool test_uffdio_zeropage_eexist = true; /* Whether to test uffd write-protection */ -static bool test_uffdio_wp = false; +static bool test_uffdio_wp = true; /* Whether to test uffd minor faults */ static bool test_uffdio_minor = false; @@ -1594,8 +1594,6 @@ static void set_test_type(const char *type) if (!strcmp(type, "anon")) { test_type = TEST_ANON; uffd_test_ops = &anon_uffd_test_ops; - /* Only enable write-protect test for anonymous test */ - test_uffdio_wp = true; } else if (!strcmp(type, "hugetlb")) { test_type = TEST_HUGETLB; uffd_test_ops = &hugetlb_uffd_test_ops;