Message ID | 20210310004511.51996-2-peterx@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=Civr=II=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAD35C433E6 for <linux-mm@archiver.kernel.org>; Wed, 10 Mar 2021 00:45:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7DC80650A2 for <linux-mm@archiver.kernel.org>; Wed, 10 Mar 2021 00:45:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DC80650A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 794FE8D015C; Tue, 9 Mar 2021 19:45:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6CE158D0148; Tue, 9 Mar 2021 19:45:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 484828D015C; Tue, 9 Mar 2021 19:45:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id 2D8D18D0148 for <linux-mm@kvack.org>; Tue, 9 Mar 2021 19:45:20 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E55545DC6 for <linux-mm@kvack.org>; Wed, 10 Mar 2021 00:45:19 +0000 (UTC) X-FDA: 77902120758.11.2A3D489 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf06.hostedemail.com (Postfix) with ESMTP id 74D13C0007CC for <linux-mm@kvack.org>; Wed, 10 Mar 2021 00:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615337118; 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=DIKqEnVKGNcLQtEUyRYn0WMFjt909MFugpYoUyiruog=; b=Ei/zyAWMZB6ybpxR+P5G3NdVh2+0GTaBzEy/wSits/CYZC2ujnQbXOGucIL+DknTxNP7Cg CuhK5PoYeYj8U/m1Ta4nSTJWTBHLcyi871Shr7ObAz8wFCJ69nti8iZPFOECZIiVp1/+sn eAr3l3RKFHBrVs31cIK72kFM0yoEKE8= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-392-GhEFQa9jOSmIUfNp696fwQ-1; Tue, 09 Mar 2021 19:45:15 -0500 X-MC-Unique: GhEFQa9jOSmIUfNp696fwQ-1 Received: by mail-qv1-f70.google.com with SMTP id b15so11509603qvz.15 for <linux-mm@kvack.org>; Tue, 09 Mar 2021 16:45:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DIKqEnVKGNcLQtEUyRYn0WMFjt909MFugpYoUyiruog=; b=fF9UWZV3HuuFA1yDKBWa4rxYHoaJEKqx2TmfreA5Pew5EWfVQNKaPjk+apge26R77G /u98wHe8z61K81jSdd275nwzk8SfWCAtwPSxYdiLgmi0JXmatdGV5Qa3lA+Htg8NXe7q BabxoEOIzxY3F7hFggDICVxNI848hE/gpExTFbWx2L8pi4sZFoZ79ejfds40IcouK6ZL 86hR34v8udIA+Po4VDQXtUcmLooKUMVn2dW0ADsx1DA4o5WV4upX3dLWdr8E0z65Avf7 yaeFQHK20MTc3kEXRwBa6CItSDCZCxPQxiv15pHfdfQHpx9ra02NkF0ma4Ca8ec1fZeQ /zag== X-Gm-Message-State: AOAM531TQY0X7vKtZ/nOw+B0Xuslt1quW95Eq7Ic+/P8Kw9V6kKfuMAx 68TLQe0gt1737aMT0tBnm+6GqAvCqJTAxRIGomqndd8iVdZr0K2B8/+42V6qYBKOvzM1izoUtTN HTr1oC/CK1BmlWskxQxTzR+xvzrHzEepJHvtNK6Ky9KwgH6QQYIA310DFkIbC X-Received: by 2002:a05:620a:142b:: with SMTP id k11mr403979qkj.46.1615337114430; Tue, 09 Mar 2021 16:45:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTC9hbLM/m7Kg8/pWXWJFOEAIOs735VU1B7Iv6yPZNnqF1n9Z/Dvdr7fwVIgy27JbpOXBgqg== X-Received: by 2002:a05:620a:142b:: with SMTP id k11mr403956qkj.46.1615337114167; Tue, 09 Mar 2021 16:45:14 -0800 (PST) Received: from xz-x1.redhat.com (bras-vprn-toroon474qw-lp130-25-174-95-95-253.dsl.bell.ca. [174.95.95.253]) by smtp.gmail.com with ESMTPSA id b27sm11418173qkl.102.2021.03.09.16.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 16:45:13 -0800 (PST) From: Peter Xu <peterx@redhat.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Axel Rasmussen <axelrasmussen@google.com>, Andrew Morton <akpm@linux-foundation.org>, peterx@redhat.com, Andrea Arcangeli <aarcange@redhat.com>, Nadav Amit <nadav.amit@gmail.com> Subject: [PATCH 1/5] userfaultfd/selftests: Use user mode only Date: Tue, 9 Mar 2021 19:45:07 -0500 Message-Id: <20210310004511.51996-2-peterx@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210310004511.51996-1-peterx@redhat.com> References: <20210310004511.51996-1-peterx@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="US-ASCII" X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 74D13C0007CC X-Stat-Signature: 3w7txqadmixozq47pkoiriayw8jonfxd Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from="<peterx@redhat.com>"; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615337119-27572 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
userfaultfd/selftests: A few cleanups
|
expand
|
diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index f31e9a4edc55..6dab8ef034a0 100644 --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/tools/testing/selftests/vm/userfaultfd.c @@ -381,7 +381,7 @@ static int userfaultfd_open(uint64_t *features) { struct uffdio_api uffdio_api; - uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); + uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK | UFFD_USER_MODE_ONLY); if (uffd < 0) { fprintf(stderr, "userfaultfd syscall not available in this kernel\n");
Userfaultfd selftest does not need to handle kernel initiated fault. Set user mode so it can be run even if unprivileged_userfaultfd=0 (which is the default). Signed-off-by: Peter Xu <peterx@redhat.com> --- tools/testing/selftests/vm/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)