Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3039438pxb; Tue, 13 Apr 2021 17:13:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytb4fb1+rKSnxsRoM5u0xb0h0QbbbC39qGJkI0jVLqBGhSvmvnsTymijWAYT6rqlfa73Sx X-Received: by 2002:a63:1109:: with SMTP id g9mr35193449pgl.88.1618359216890; Tue, 13 Apr 2021 17:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618359216; cv=none; d=google.com; s=arc-20160816; b=i4Q5vgXYfR3yBFyunjepx0dT5U1OJzje9JqQ+ejk/juDla4NP+VLbqxZoaSOD0gvoh uEepQqQq7WlJ3FCAdKkxzkSQ+w4HfzLbG3jpkpfgSv3mTWBRL7HIsYpbmz2sDZqnjC6b ePHEQF6Gz4Dw/6RJrTZ3f0Qil6Qmx98PpbmszoNFb672tNbA17CKkH1PPeRj1hn3hRcr 0uqqIfoYFNHUIDividnLv9CtHIkMLRPSI5MTt+GG/1fwPN8nrPcHP5q9Kv93Y1HcLOHX mDZHT2ZArhtcT4FHQNMJ0IVEDNYyBE/0Nqx4Fh/BBtfPAgsgg77KpY16UKZQhHceJ4jo GPbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iFBhLR1Gx0aeiV6J1eM1yEOIsjeKpw+FknvPJH209wU=; b=DFxJ1mrLJDDVEc5h4Pi3hVRImXR1bXr+GRtBAeNT3E9bKZIb391McX8+cgwij7tzlM 5nIsusKPeQ60kXcf/mW0zemU5RmRI714VPF6jeN5mAxWq9PhQ4zx8KS/VuPfKDE/L4ks qdlr8s9QYIjzpyHI27NzBw+Dz+LlFpuQP1jf3eZnF0TyvNwSVWDQ92SGO83bbdUFiHmc VwVNTTi/sYlHICgL4W749ap/xMz68hdchAs4GPvNjU4jsQ4/RxbNmgZhT2OONAi9VMxK nBaWVeXs51bz7JSsEm59IaR7XYFVE/QCQnznJGnBLrIivpd+BFuXD8HGVNU2q40wMy8A tx9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OfwZdNZ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x12si4364589pjk.139.2021.04.13.17.13.25; Tue, 13 Apr 2021 17:13:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OfwZdNZ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231970AbhDMURP (ORCPT + 99 others); Tue, 13 Apr 2021 16:17:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21774 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbhDMURO (ORCPT ); Tue, 13 Apr 2021 16:17:14 -0400 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-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-HN5anrSkMoyO_NPIhMZ-PA-1; Tue, 13 Apr 2021 16:16:52 -0400 X-MC-Unique: HN5anrSkMoyO_NPIhMZ-PA-1 Received: by mail-qv1-f69.google.com with SMTP id u7so10774720qvf.5 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=AlNTPpeebxAC0tNksXiwdimG+iKDQLDNbCFUylfQhGDx161mH2BW1juPkx2UcRLWEE jE/jD2vlM9e6mh6qTP4Qdyat7lbO6AadPbJriu7iZzDuG5FKmVvSENfx7T7jRbsZE6QJ E1jpD0B6rJ33DwS1D3LODZqefZUxyXfpaRWk8rqVu9vYK6zitNffmoZid5rx2tbRr1+p 2CFtLuSP5Gg+zLaMH46+/ZLPwL2z2Q21y0Yf/QZxXxRa58dtKR/141i0Mbgzk8JvfS1I LRFD59e/Qm4Vhl58LxzTT1t48m6ix8bl9FSftK1n5CNXR5G+sgUvk+5fb74KdR9ztKoy 6CYw== X-Gm-Message-State: AOAM531WFG4i7LJxxOnyqhNSpZRdLgsK/DBlQ6ZUAtBUQfwwpAoSWD4g Gbjcmf66MFB6tkxCUFnBdYj64Q3bpB8ixHOgm5d6qF0dn9GKf66tsce2JUB/8JXZ9IUvQW5VdBH I9Hb+my1LckFrGIcJXAkmiW3p X-Received: by 2002:a05:620a:22ea:: with SMTP id p10mr33673816qki.27.1618345012351; Tue, 13 Apr 2021 13:16:52 -0700 (PDT) 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210413051721.2896915-6-axelrasmussen@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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