From patchwork Thu Mar 21 23:20:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Liaw X-Patchwork-Id: 13599462 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 C7289C6FD1F for ; Thu, 21 Mar 2024 23:20:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E2BF6B0083; Thu, 21 Mar 2024 19:20:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1931F6B0088; Thu, 21 Mar 2024 19:20:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 05AC26B0089; Thu, 21 Mar 2024 19:20:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E71146B0083 for ; Thu, 21 Mar 2024 19:20:32 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6A8791C1918 for ; Thu, 21 Mar 2024 23:20:32 +0000 (UTC) X-FDA: 81922617504.26.C659220 Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) by imf21.hostedemail.com (Postfix) with ESMTP id A50611C000E for ; Thu, 21 Mar 2024 23:20:30 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=TqKQpNWc; spf=pass (imf21.hostedemail.com: domain of 3vcD8ZQYKCGgKJROGcMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--edliaw.bounces.google.com designates 209.85.215.201 as permitted sender) smtp.mailfrom=3vcD8ZQYKCGgKJROGcMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--edliaw.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711063230; h=from:from:sender: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:in-reply-to: references:dkim-signature; bh=fJkna889vaoG1pUyPc+t29CTNaYEYMQM72LV9bOJhDM=; b=HSQKBs9jJvwQax/ENrsdd1I9pka4KbvPBMwmhrKVoU/tc6XaB/HuDgSbTmXf4ISk90UTWM HcO4WhlPJ6o1F/McxvyUxxeUDxCRj0MFxY9QZ39E6XUTNUcq0c/tXBI/UzNF2vhvCeR4MP EQyTzanurd98iJWGC+fn7rAeInn2RC4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711063230; a=rsa-sha256; cv=none; b=besfjfFKz6ZIF+UVrLdCUiVytHFI/HgNHSN9RZppeUprs3urCEDMkrX3QN0MtIdFbDE9QL XcJoi2xA9YXPySsOcQQDev+l0H5snouyLoYqN7q/gFzPPBeHLqsgxn9Fs0UrhEpYQYNlSF cPcd0YZYxleQe+BjA7lot4dTVpORN0g= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=TqKQpNWc; spf=pass (imf21.hostedemail.com: domain of 3vcD8ZQYKCGgKJROGcMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--edliaw.bounces.google.com designates 209.85.215.201 as permitted sender) smtp.mailfrom=3vcD8ZQYKCGgKJROGcMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--edliaw.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-5e4f312a995so671715a12.2 for ; Thu, 21 Mar 2024 16:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711063229; x=1711668029; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=fJkna889vaoG1pUyPc+t29CTNaYEYMQM72LV9bOJhDM=; b=TqKQpNWcW0B8eDcoV6+Ava/FMcPhpZskvF3rjDQwo9+MkpsIS/jAyMP2oPLVNav1rr oVgmUhYtpUsvSzNznTKZHrUrBv39goXAcFu6K8oOPjC4ttHvoMj0si5RVdC+xfksEJbo 4zY/JulPYSgOMfCz5nOSYp4aNdUQz9US/0wDvJWtdtR+zPHozkcEY0IXctEEXv7O1D0b B1MVD+8Kblw8xIciGcZGtcUNG8ELbHBCWZTp3UIZjQkIN3teNRU+qZ/jkHk4mxyOd2XT jygviOzUmoHAorm/5lajTwMx+eV6wUsC/6aWh7hKE4YPKcTiG5rND5LeFSe3cx+kDik6 ue3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711063229; x=1711668029; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fJkna889vaoG1pUyPc+t29CTNaYEYMQM72LV9bOJhDM=; b=LyhDt0LQ1UwAESuxpeQPS1D8C7AvRwSxEbLgyaUo0kz4nbQRoVNG92MCxUq5K+p3O2 XNkOzirlgk5lghH41YZBSguF4j21VHUlkXrg5h1CSMzpSgc7S7aNYWMbbI94GUtBo3Du DxRKa9d3IflI3G010tqZQ0aGmc74apvPC0X10JbnpZmcwLWTEVMZhFez3L2b6paMrwcI PrT/9jw7ZOejohj7Dc+++W1NXDExtpeLRXZ8lDtWMj47VzaLhtpBidz1ZNJduh5Zg9Vn AH1eBhBsJZQodj2esXcFw3cBg2UZm8N57knOOczA7MUncTntRGBXvAKq1hdzm3v0Mbxo vQRQ== X-Forwarded-Encrypted: i=1; AJvYcCXDiCe8DAcv45Ud5OU0AhwuPlnZnJB0dkhiAHSBYwqDTxXXBH1Z4bVrs9Suit3jPz7vcTb0p2MDXmNz/+Z2U9MQmSw= X-Gm-Message-State: AOJu0Yy4mElLecNztV25JeLtW435D6IG+MzpexoilmxtntbpNKX8uG3g eTFnPqEjn4JiLX1zM54Zg95vuaMu8yWomnv0FAauYPkdjN7obg1DaE7jdgiUTfhqFJUk9gupvrn ylA== X-Google-Smtp-Source: AGHT+IHy7n9urU4OinfJFgbLw+GEQU4fI6k6GosyucewtA/EmPr7Kyb5FxEC4vw7lvW9PN/ezx1bGic7M9g= X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a63:e304:0:b0:5dc:1cc9:36ab with SMTP id f4-20020a63e304000000b005dc1cc936abmr1620pgh.12.1711063229245; Thu, 21 Mar 2024 16:20:29 -0700 (PDT) Date: Thu, 21 Mar 2024 23:20:21 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.44.0.396.g6e790dbe36-goog Message-ID: <20240321232023.2064975-1-edliaw@google.com> Subject: [PATCH v1] selftests/mm: sigbus-wp test requires UFFD_FEATURE_WP_HUGETLBFS_SHMEM From: Edward Liaw To: linux-kernel@vger.kernel.org, Andrew Morton , Shuah Khan Cc: linux-kselftest@vger.kernel.org, kernel-team@android.com, Edward Liaw , linux-mm@kvack.org X-Rspamd-Queue-Id: A50611C000E X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: adxkhy4ho39kcus847hi66e5rp6zur96 X-HE-Tag: 1711063230-472601 X-HE-Meta: U2FsdGVkX1+6u2m+yWBuIBanNo0PL2Cc2vI5NhPJa4J3mtErxLAbwpehyPK6k41oLjZ3/s1ZuWUnkm+yO6pLAB9QjTrn2BkhBYwPgIytS7rj/azJd8lB0TiqK3UEWRbkEE0mgvOUh/37N0skKBUp9sox9UsYNlO/fGMy2GehOAFJ2GrQ3aqLQGQC8FdCShLi6xnyKEfnWhoUgu4T1IEBsAADBSPA3ITWGY3UcM6MSI6x5Ynho4WcfpY/ouDRXXnmxqXAXHaxhyKoeC/Hx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gXQdMf/93S3MtYbn4edLppZ3d4Bj2Xa+2fWpvRPr5714/63DK7BJkIXdbrdTg/8CFSXriIXokGfvtkUIIgQJMUuir9TrEBVfb8zj34aWt+I1LPbZuOAeNqeTS3pxZbkgMhnqNRp2u9ZAClsSODEj+xBcd9XfcW0HIaCrzpz+6PCE1n7bkgIHDTdwJQJtHeCF+TaGf6qK9zqkgalPQXPUanVWq6GoF/GABeDqn1AE8/HTEZjOKuX0/aSRIt5UdPa5KOsrrKptMi83/WymnC26T371DZNnJgXsFvGgetUg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.003645, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The sigbus-wp test requires the UFFD_FEATURE_WP_HUGETLBFS_SHMEM flag for shmem and hugetlb targets. Otherwise it is not backwards compatible with kernels <5.19 and fails with EINVAL. Signed-off-by: Edward Liaw --- tools/testing/selftests/mm/uffd-unit-tests.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-unit-tests.c b/tools/testing/selftests/mm/uffd-unit-tests.c index 4a48dc617c6b..21ec23206ab4 100644 --- a/tools/testing/selftests/mm/uffd-unit-tests.c +++ b/tools/testing/selftests/mm/uffd-unit-tests.c @@ -1437,7 +1437,8 @@ uffd_test_case_t uffd_tests[] = { .uffd_fn = uffd_sigbus_wp_test, .mem_targets = MEM_ALL, .uffd_feature_required = UFFD_FEATURE_SIGBUS | - UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_PAGEFAULT_FLAG_WP, + UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_PAGEFAULT_FLAG_WP | + UFFD_FEATURE_WP_HUGETLBFS_SHMEM, }, { .name = "events",