From patchwork Fri Mar 4 05:17:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 12768478 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 C1681C433F5 for ; Fri, 4 Mar 2022 05:20:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FA8A8D000A; Fri, 4 Mar 2022 00:20:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A9C48D0001; Fri, 4 Mar 2022 00:20:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 471988D000A; Fri, 4 Mar 2022 00:20:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 3964C8D0001 for ; Fri, 4 Mar 2022 00:20:30 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id EDC3A8249980 for ; Fri, 4 Mar 2022 05:20:29 +0000 (UTC) X-FDA: 79205553378.31.3F69AF6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf30.hostedemail.com (Postfix) with ESMTP id 7AB868000F for ; Fri, 4 Mar 2022 05:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646371229; 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=/LhV/Ezx1y/irXCjQ5LcN5y8nixtLOeiBAqYVpW0dWs=; b=f/ykolbZ8pHHDBTqjEigSUZYO2EyTRylYR4gx4V6FrttfhXFXRUCJoNDH3wny/xZytr6FI H4cP/4oNh0yRbZXht4v2tbZAe4s5sy9zGic7yIrsMgGGVfCnat2f+u7aGYyx9OdNjWxrnQ /cXsHlolZQ/mrAW+rex88mufW/dXUoo= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-500-6Ml0gXcWOgiv9z0TWnLBpg-1; Fri, 04 Mar 2022 00:20:28 -0500 X-MC-Unique: 6Ml0gXcWOgiv9z0TWnLBpg-1 Received: by mail-pg1-f198.google.com with SMTP id v8-20020a654608000000b0037d5ef9cfa0so212854pgq.8 for ; Thu, 03 Mar 2022 21:20:28 -0800 (PST) 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=/LhV/Ezx1y/irXCjQ5LcN5y8nixtLOeiBAqYVpW0dWs=; b=ZNLDngfg1sXo6wk/h0mdeF3dTo6rJU2FEAO87oIR0S78sD3l7MbFxYCRE88XPSTUPO Ozac/NQYu+hl/Hiy/oIcOUNIZ5UDF/T9tY729gkdtqjH37CxSm0+z4Cbn9JFLO9ZqTFY hluVewAP2YVIZsXAZ6uesuXEkuNRJq7GA4GIz636bs8cgH96h8IRz6NlxtdU8LV1aVEb PhxJvxABdmY8AcB9/l60kMj/2UmQfD7vKzioyrHX39NrenlsvP0vIBA96TZ4zHfNMhtS YRptg1zWE6Nqqik78aaU6HE5IjUt5NmB4Woaih9WwLods9uA8VnQyLCaZDXfAPYDUDTu 5q+w== X-Gm-Message-State: AOAM532NLF+qhezKiM0e38tWkpRnHlSIUuG4eVLrASAnmyZn8x/2vjaw vUi8E49+iBuwvqAI6F7Aq/oCjo7bWWtzytcma5Aw8miB13OL9G41YqBHd4dNmlF+RRKIYN2nZmV yr+8r1FPtneVJ7LykkRRJaNTwbAAuCrqZHg3BVRpSX3GBf/uDe89h3IyfcsBR X-Received: by 2002:a17:90b:17cb:b0:1bf:138d:e0f8 with SMTP id me11-20020a17090b17cb00b001bf138de0f8mr5251925pjb.157.1646371226981; Thu, 03 Mar 2022 21:20:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1mSRuLkPo2ioYs6r74omrthJGnPJt2ZsaElav8kmbyVq3KwqPqDcyzWlHKXdEjHb9j9zBKw== X-Received: by 2002:a17:90b:17cb:b0:1bf:138d:e0f8 with SMTP id me11-20020a17090b17cb00b001bf138de0f8mr5251896pjb.157.1646371226610; Thu, 03 Mar 2022 21:20:26 -0800 (PST) Received: from localhost.localdomain ([94.177.118.59]) by smtp.gmail.com with ESMTPSA id p16-20020a056a000b5000b004f669806cd9sm4323865pfo.87.2022.03.03.21.20.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Mar 2022 21:20:26 -0800 (PST) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, Nadav Amit , Hugh Dickins , David Hildenbrand , Axel Rasmussen , Matthew Wilcox , Alistair Popple , Mike Rapoport , Andrew Morton , Jerome Glisse , Mike Kravetz , "Kirill A . Shutemov" , Andrea Arcangeli Subject: [PATCH v7 23/23] selftests/uffd: Enable uffd-wp for shmem/hugetlbfs Date: Fri, 4 Mar 2022 13:17:08 +0800 Message-Id: <20220304051708.86193-24-peterx@redhat.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220304051708.86193-1-peterx@redhat.com> References: <20220304051708.86193-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 7AB868000F X-Stat-Signature: 5x75ms1fpy5ftc761fwyagcfmt6a4tax Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="f/ykolbZ"; spf=none (imf30.hostedemail.com: domain of peterx@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspam-User: X-HE-Tag: 1646371229-706747 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 fe404398c65a..d91668df8135 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; @@ -1597,8 +1597,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;