From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 B296DC43461 for ; Tue, 13 Apr 2021 20:16:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 590D2611C9 for ; Tue, 13 Apr 2021 20:16:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 590D2611C9 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 E97086B0036; Tue, 13 Apr 2021 16:16:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E6CEE6B0071; Tue, 13 Apr 2021 16:16:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0E1A6B0072; Tue, 13 Apr 2021 16:16:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id B67A16B0036 for ; Tue, 13 Apr 2021 16:16:55 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 66B6C181AEF2A for ; Tue, 13 Apr 2021 20:16:55 +0000 (UTC) X-FDA: 78028452390.24.FD5E51C Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf16.hostedemail.com (Postfix) with ESMTP id 261A680192C0 for ; Tue, 13 Apr 2021 20:16:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618345014; 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: in-reply-to:in-reply-to:references:references; bh=iFBhLR1Gx0aeiV6J1eM1yEOIsjeKpw+FknvPJH209wU=; b=OfwZdNZ7FEpdjwMMGE82ZG6+x5WYimn5GoBeFLZGxp7bWBZiP6v0PMRmdKlIxMXq1vm4HM 7JEP/uGOY+ZTlh3obQKqCRKMflgJci9vLHh+RU47Xqm1qNV3MM/SNVw2yEkUbvDXi9rcv2 Bt+MIw8otm1uAd3RjJk3RCDvonQf0gw= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-573-F02gclsmOhKUdZBgI0vfnQ-1; Tue, 13 Apr 2021 16:16:52 -0400 X-MC-Unique: F02gclsmOhKUdZBgI0vfnQ-1 Received: by mail-qt1-f200.google.com with SMTP id x13-20020ac84d4d0000b02901a95d7c4bb5so449706qtv.14 for ; Tue, 13 Apr 2021 13:16:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iFBhLR1Gx0aeiV6J1eM1yEOIsjeKpw+FknvPJH209wU=; b=Vcj9uZb60OVqCJSMmKI/2awq6BUwKNEcTaEW/qgjss1VTzjHoqzp1Kt3OTpTllvlbY jdziEHAFQmqDQNLjlYHQdCudrQ8RZHT+WsfYvYmwqZm9Xpr9ocf/zU0zMfsAkB1f0Unv KiluQwCjplvyLHc7ctSs3zXYha5oxbihbdyLPEdKVBaFx44KchCriHLO4P3v0QqkseKS 4TiTF9DL+WbspFw2se3QU3zOxEqU3yL/UK6292hnsrnmp8d3uCBPP1FPO4KWx/T7DdGV V0rdfEZnqLvvSAvKfo8nLjMJa/AMhAKtt8hP1B/sNuvbr3RoprI156pCvmIBEHUi4bk2 bCIA== X-Gm-Message-State: AOAM530NEaJ2T4roVCCmuF6XCBFCcHnxAlshso4TSKA5/WfAUicgmnQR vhID2PBY7TAO7rhFO3A85AXQ5EWyRq09Y5iAqFYNp0JhwXkcds8hIWNjGV+KFegSi3rOfU7LH/b kAiOXHLfgpzo= X-Received: by 2002:a05:620a:22ea:: with SMTP id p10mr33673827qki.27.1618345012352; Tue, 13 Apr 2021 13:16:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3IttBM2aAsbOlGIkYA5j8AtGXTYyXS8sJV22svEAsTrySp6idSonzYhdMsJWvU4N7vhjqHw== X-Received: by 2002:a05:620a:22ea:: with SMTP id p10mr33673803qki.27.1618345012160; Tue, 13 Apr 2021 13:16:52 -0700 (PDT) Received: from xz-x1 (bras-base-toroon474qw-grc-88-174-93-75-154.dsl.bell.ca. [174.93.75.154]) by smtp.gmail.com with ESMTPSA id t4sm4362370qkg.75.2021.04.13.13.16.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 13:16:51 -0700 (PDT) Date: Tue, 13 Apr 2021 16:16:49 -0400 From: Peter Xu To: Axel Rasmussen Cc: Alexander Viro , Andrea Arcangeli , Andrew Morton , Hugh Dickins , Jerome Glisse , Joe Perches , Lokesh Gidra , Mike Kravetz , Mike Rapoport , Shaohua Li , Shuah Khan , Stephen Rothwell , Wang Qing , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, Brian Geffon , "Dr . David Alan Gilbert" , Mina Almasry , Oliver Upton Subject: Re: [PATCH v2 5/9] userfaultfd/selftests: use memfd_create for shmem test type Message-ID: <20210413201649.GE4440@xz-x1> References: <20210413051721.2896915-1-axelrasmussen@google.com> <20210413051721.2896915-6-axelrasmussen@google.com> MIME-Version: 1.0 In-Reply-To: <20210413051721.2896915-6-axelrasmussen@google.com> 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=utf-8 Content-Disposition: inline X-Rspamd-Queue-Id: 261A680192C0 X-Stat-Signature: afiedspudgwa5y3hh1z16xqb59firff8 X-Rspamd-Server: rspam02 Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf16; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618345014-960123 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: On Mon, Apr 12, 2021 at 10:17:17PM -0700, Axel Rasmussen wrote: > This is a preparatory commit. In the future, we want to be able to setup > alias mappings for area_src and area_dst in the shmem test, like we do > in the hugetlb_shared test. With a VMA obtained via > mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. > > So, mmap() with an fd, so we can create alias mappings. Use memfd_create > instead of actually passing in a tmpfs path like hugetlb does, since > it's more convenient / simpler to run, and works just as well. > > Future commits will: > > 1. Setup the alias mappings. > 2. Extend our tests to actually take advantage of this, to test new > userfaultfd behavior being introduced in this series. > > Also, a small fix in the area we're changing: when the hugetlb setup > fails in main(), pass in the right argv[] so we actually print out the > hugetlb file path. > > Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu -- Peter Xu