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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B595D112584F for ; Wed, 11 Mar 2026 16:01:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CC4D10E9E0; Wed, 11 Mar 2026 16:01:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="w5k5ZQ/2"; dkim-atps=neutral Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5C1F810E9D3 for ; Wed, 11 Mar 2026 16:01:40 +0000 (UTC) Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b844098869cso1293345166b.2 for ; Wed, 11 Mar 2026 09:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1773244899; x=1773849699; darn=lists.freedesktop.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=FZ9wJHN98p2eqW+aluFwwdS4VIjV0bOaQ4w+79zBhNs=; b=w5k5ZQ/2Ni2BK1whXwp0Ky64uXomrgWBYnDTJUu0/Nb6z42cZFyYXxpJ8aTR5hGt7a R1WMdkQXy8xj0I6UfX0CYNkUWOfcbpqv7NpeYj1WLHqxBffA4WsrKzhdAm+hm1Zd0Q5J gFNjw0SXL+1Qc48/ScWL6eqPkXuDGSAaeGnkJhYd42lg/Jpux08OO/WweWM2I+JJq9bs u6vJ5CFnFlDq8qdKtJb6N85G/gqqjzYgSOtNAGMBPxsRDV7+A8PqF2TVgWvc0tcTvach zN0xG4p8RFY91gJbq7q14WxjMckAlq4xFgKuhdj794kODKsvNb4Z/7AvRP/MSjDGE9GC 1qvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773244899; x=1773849699; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FZ9wJHN98p2eqW+aluFwwdS4VIjV0bOaQ4w+79zBhNs=; b=bQU/SGpFd8cFx8S6S0Hg6MUYk1oGN38tE4pGjpSUIsfV15PtxIt9ftKoyv90j3FmsK eNobdAKcr8WEPrT5tQf9hZHA9CwQfdSF6KiTvTFDJJyiBPMpD6Rcm4GZUfKfuKtaIPkr fQ8hIoiKjaUKngrWd62Ibw1i2KbQGdp3DmYrRqPSIQ51oGj/BuhH6geXAtyeR4p19FxM lhum2sPeQYfXWd85Nooc7rUkZGTWZKnGyrG1szEGNADqnmjC4XPsE4hi3AcHj8KtFrs8 o3TPqj5MKL8c8paIDJbFw26JwmNYnLCt4hi+q9Bgy64fXukZI1MZYqHeKWU0xpK/GwMf zDaQ== X-Forwarded-Encrypted: i=1; AJvYcCVQEv93PPvqCNhEipf7MS5M8M5O4nfxJ9hANKA9zl1LhgdN63BLKNODXEZqQ9x3ZKLIP+kfFVVaXj4=@lists.freedesktop.org X-Gm-Message-State: AOJu0YwTA0KajrvcLl/zomYCEiD28z5lTdilbFmIJbnOrukB6sms7WaK t9HOmN4enYeLPCuha74mCKdjcN9SFgDxjWceGVj6DBLea+jo95u3jvq28Vq1zwq8rEkmSNOSL/6 OvkAAyZAgoxe/eAVpug== X-Received: from wrbgw30.prod.google.com ([2002:a05:6000:40de:b0:439:ac29:98cb]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:6d22:b0:b93:3792:4b03 with SMTP id a640c23a62f3a-b972e4f775amr187595066b.32.1773244898034; Wed, 11 Mar 2026 09:01:38 -0700 (PDT) Date: Wed, 11 Mar 2026 16:01:36 +0000 In-Reply-To: <20260311120418.GU1687929@ziepe.ca> Mime-Version: 1.0 References: <20260227200848.114019-1-david@kernel.org> <20260227200848.114019-17-david@kernel.org> <20260309142954.GM1687929@ziepe.ca> <61df6369-333c-430a-bd18-c5b1acae68ea@kernel.org> <20260311120418.GU1687929@ziepe.ca> Message-ID: Subject: Re: [PATCH v1 16/16] mm/memory: support VM_MIXEDMAP in zap_special_vma_range() From: Alice Ryhl To: Jason Gunthorpe Cc: "David Hildenbrand (Arm)" , linux-kernel@vger.kernel.org, "linux-mm @ kvack . org" , Andrew Morton , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , David Rientjes , Shakeel Butt , "Matthew Wilcox (Oracle)" , Madhavan Srinivasan , Michael Ellerman , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Alexander Gordeev , Gerald Schaefer , Heiko Carstens , Vasily Gorbik , Jarkko Sakkinen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Greg Kroah-Hartman , "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Christian Brauner , Carlos Llamas , Ian Abbott , H Hartley Sweeten , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Leon Romanovsky , Dimitri Sivanich , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Peter Zijlstra , Arnaldo Carvalho de Melo , Namhyung Kim , Andy Lutomirski , Vincenzo Frascino , Eric Dumazet , Neal Cardwell , "David S. Miller" , David Ahern , Jakub Kicinski , Paolo Abeni , Miguel Ojeda , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-sgx@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-rdma@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, rust-for-linux@vger.kernel.org, x86@kernel.org Content-Type: text/plain; charset="utf-8" X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Mar 11, 2026 at 09:04:18AM -0300, Jason Gunthorpe wrote: > On Wed, Mar 11, 2026 at 09:38:45AM +0000, Alice Ryhl wrote: > > It doesn't really make sense to have multiple binder VMAs. What happens > > with Rust Binder is that process A is receiving transactions and has the > > VMA mapped once. > > IIRC the problem is the kernel doesn't guarentee singleton VMAs, > userspace can always clone them with fork or something. Did binder > solve this somehow? The Binder VMA is DONTCOPY, so it will not be present after fork. > Since you can't assume there is only one VMA the locking becomes a > mess to cover all the cases where userspace can trigger a VMA clone. > > address space deals with this internally. > > Thus, zap_special_vma_range() is extremely hard to use. I mean, the hard part about the locking is keeping them in sync. Binder just doesn't do that. Only the original VMA gets pages inserted or zapped. If you create a second VMA, you just get a useless read-only VMA that you can't do anything with. Alice