From patchwork Thu Sep 30 21:23:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Rasmussen X-Patchwork-Id: 12529339 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27E01C433F5 for ; Thu, 30 Sep 2021 21:23:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C7C4761A38 for ; Thu, 30 Sep 2021 21:23:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C7C4761A38 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 64C599400D0; Thu, 30 Sep 2021 17:23:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FDE994003A; Thu, 30 Sep 2021 17:23:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EB439400D0; Thu, 30 Sep 2021 17:23:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id 3DE4E94003A for ; Thu, 30 Sep 2021 17:23:18 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id ED8E01828DEA7 for ; Thu, 30 Sep 2021 21:23:17 +0000 (UTC) X-FDA: 78645515634.25.424DF65 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf14.hostedemail.com (Postfix) with ESMTP id ACB696001E62 for ; Thu, 30 Sep 2021 21:23:17 +0000 (UTC) Received: by mail-yb1-f201.google.com with SMTP id i83-20020a252256000000b005b67a878f56so10423607ybi.17 for ; Thu, 30 Sep 2021 14:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=CzR1tKPYxsGrhthMkcPeA5o22pdPd8tz6Qctx/cVYlY=; b=gWIUXo1GdYI/2/V6Rr0Wcg/w/YTCaQEWkjRdUxQleTXkOlKZoiyug35UB8njWqwc6N Sd8W8Xmk66GFnN6D6r5b5/zz+7i6TDEK1IY7LROn/GarYUXH7jOiR+N0kqZejScVN8v0 1JsSHVa99roHMJQY9Wvb7OaU+3AIjLtjCFm3HXKKfxI5ORI4dwR0wFjvQbMLfp6FGZkT zwND7qotqTvMzSTUuuzdeWJAGuRhO+D0r4kVe9v9lhsFIWcbTDJGT2m9WVaetBIN4xWe y2mMalw2He5t5A/H5Fyt6RQiRlieDHoKS2g3NmKS5NEgR++Q0WSFpGVmy/tg7vaI7DPq H8XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=CzR1tKPYxsGrhthMkcPeA5o22pdPd8tz6Qctx/cVYlY=; b=DwBpXaLFELcElxngRPG2w3EMGK2XnfjCkN4YsuCBESteQhrWZ3sSlZah8QGwA+o6a2 Y5pjEDQq7zCiKQFGc3Mp6FKQ6tjX4d0A3zgK4shrtprRPhezAcHcslMt8rvY9DilZEK/ YvvDk2WoaGruepM2hg6CidNzBcGZYG4bHVqBVVwz0S2yxdQccA8UpjQ1AV56gLk56D42 /5geJhbgWxhqfjB2ty8aUeiYEOFdlhUJdD/f51bYzlokD9DocimfX7GdWbskid1v5k/P IOL4HEJ7xgkpHbgLcboflwiNqnf1Ik1bB7o5GPGIkPmwgCrPQPi+xnllMhJfBpGTOchk s0ow== X-Gm-Message-State: AOAM531j02aBMCRCkFEwx03k1IToO1ewk3G4vREyaEQV5SwuioXKn8TE D8z0g+KUiDz2DFNUKZG1swMvCB++h4yK5MBkrAUU X-Google-Smtp-Source: ABdhPJyqGFnp6gcLABO3XZ/sJo1FcUdnzqjMRKQS555L9bpcOLELdLIvGzrLuAxjw5MiSpIQdd2Au+KnI0Hv5Q12xu9/ X-Received: from ajr0.svl.corp.google.com ([2620:15c:2cd:203:fa06:3b29:d3c:37e6]) (user=axelrasmussen job=sendgmr) by 2002:a25:90b:: with SMTP id 11mr1685537ybj.192.1633036996833; Thu, 30 Sep 2021 14:23:16 -0700 (PDT) Date: Thu, 30 Sep 2021 14:23:06 -0700 Message-Id: <20210930212309.4001967-1-axelrasmussen@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog Subject: [PATCH v2 0/3] Small userfaultfd selftest fixups From: Axel Rasmussen To: Andrew Morton , Peter Xu , Shuah Khan Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Axel Rasmussen Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=gWIUXo1G; spf=pass (imf14.hostedemail.com: domain of 3xCpWYQ0KCIMh4lsyhzt1zzlunvvnsl.jvtspu14-ttr2hjr.vyn@flex--axelrasmussen.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3xCpWYQ0KCIMh4lsyhzt1zzlunvvnsl.jvtspu14-ttr2hjr.vyn@flex--axelrasmussen.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: ACB696001E62 X-Stat-Signature: 9e4pffwpmerxduuou6ps7caq4hdpejuy X-HE-Tag: 1633036997-685219 X-Bogosity: Ham, tests=bogofilter, spamicity=0.008152, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Changes from v1 -> v2: - Substantially rewrote "fix feature support detection"; previously, it tried to do some larger refactor wherein the global test_uffdio_* variables were removed. This was controversial, so it now simply queries features in set_test_type, and leaves the rest of the program structure largely the same. - The "fix calculation of expected ioctls" patch is conceptually the same as v1, but changed slightly to fit with the modified feature support detection in v2. - Moved patch 3/3 to 1/3, since it is uncontroversial and could be merged on its own. I don't want the other two to cause merge conflicts for it in future versions. - Picked up a R-B. Axel Rasmussen (3): userfaultfd/selftests: don't rely on GNU extensions for random numbers userfaultfd/selftests: fix feature support detection userfaultfd/selftests: fix calculation of expected ioctls tools/testing/selftests/vm/userfaultfd.c | 157 +++++++++++------------ 1 file changed, 73 insertions(+), 84 deletions(-) --- 2.33.0.800.g4c38ced690-goog