Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1548183lqp; Mon, 15 Apr 2024 09:27:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6H5OJ9FMChRI7XnnbLGy7+iU/iFuWCoEUV3/5wEcYnDyJec5gZ5kmyqVarioft1eVuaHXHlmRke6TQwdalGv9eqsv8aOeQuPVPjj6og== X-Google-Smtp-Source: AGHT+IFJw6fVKXAI5bxYtLbR9cYZTuOpux5VLBee44QY6h4PVeTOcAwibpw30d8bbDA6rkb6N8tl X-Received: by 2002:a05:6808:302:b0:3c7:c64:e726 with SMTP id i2-20020a056808030200b003c70c64e726mr4813466oie.13.1713198427301; Mon, 15 Apr 2024 09:27:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713198427; cv=pass; d=google.com; s=arc-20160816; b=kcL6RsvI4mfD50VfzkOc6oftZIHr5UER5SmIMYI8SzA8+IbOwdVneYZ50kYsEHxcPs XZYwNGAnl84YX6//TnJLTEiCwIVFdbZOPEFFC5R2utx3MtVEEOY4zHJnjQIFvgTofZNT dygyTgtWq1b2Es44+w+COjP2x1mPTsNOG7eCjwYgn45i1Tj0LSBOk6ZOmN4hdRMlmrin mYeXa5ouRly6WCfWuQq+JO/StHBzhqj7AAS+13pi8iM/dBFdQ2VTbyz6JYCSEAQNMIMB s6uCb9mfptm0gYGD+t7PGfCunrRol3PmmatJzuyOQl/+4kdQk4GfeF6q8KggQ4XBWwW8 SmCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aT/STpxKuekl2Fk6nZChHwEDDzTToAFhme+ALYu4XrI=; fh=OdivOln3zsQk9cCmPQAJMtxdd84Bh350PO6wfvxPmrI=; b=bfWTJ7Jegyz3Za1aLVBrZpB+Lb1QFHwrasgAjwcTakaobF+lYN/HN+gvtwyE0DjH2t K3xItAfHg/YGeM05MLHNoIkLTC7DwgMkMZIxNTwe9GnBXJ7rLrQfmdWjcE7vMRVrDETh eI49vIezoXw1wovCQ82FT99hrl+S4iFvZIgrNegkTnoe0HBVIc5dvgjR2M13LBBfzNVi aIayzQuo9bQ7eM+pTG63aGkPSFDiD8z7Az0zfTnx0rJcBFIChuHFRPujppp7KKhZOVCU qoeAWDTkMt/CEHaJvwpgbhm7YIdZMN+p2TUKXguiud6f39IOIqj4e85OXu43xBTjrnUQ z9vQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Yt43Wfdr; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-145547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145547-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y19-20020ac85f53000000b00434a9c150b7si10749207qta.189.2024.04.15.09.27.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 09:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Yt43Wfdr; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-145547-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145547-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 03AFF1C22401 for ; Mon, 15 Apr 2024 16:27:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECDB680BF0; Mon, 15 Apr 2024 16:27:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Yt43Wfdr" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D86D58063C for ; Mon, 15 Apr 2024 16:26:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713198420; cv=none; b=BNvenlO9PEaXtdfSegTLaXqbvO9I/SsNcdRRTu31CLC84x+HTX6PBj9S8gxncRGgNYtq7WTaHKHZxqqOcB4uCt4fw8ABVxDcs3d6qmv+rp9P29c9yVGKKBCddP6TETGXW71TmRhYGZUaX55kZTosuQrjUnZqEPBkLOvVPYzfNJY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713198420; c=relaxed/simple; bh=FsGXC95MuRbTCP5YYvZkGQEOjfnV4rG+8AuKvodSm1Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FvdHLeCshUpG/vZwBV5XBhbN0pLoi+MGv5vSLQdLMDZziXwo3afL41GcQqN0XIKEgHH740UL9oBvgoK4VuepPSBOXNBG+LuwwkE2tu9hYDwyNB6xcv0+k+7XgDU9bYCHyVsa0y273GMxxK1XltveFBrUfg3VbIJINOTF8zycaA4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=Yt43Wfdr; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=aT/STpxKuekl2Fk6nZChHwEDDzTToAFhme+ALYu4XrI=; b=Yt43WfdrZ6/nZjiMfl6ZwLHc/Z DOAORuym87Iw+/zOBrF5v5QSO41Gm29B11h18EiZq6jGLDiK1MWIzTvOxGk6j0r+TxKLe/f6Dxgp/ C2rXA8ENTXC1wOrzCMZiM1iozZSfbIht3rxz6OZf4YH+gjORzzx7DOwYaqPTbo0FQV7Qw8rLz4JE6 G7UvVni4t3vWECTLNLqL93/7RHTMrPo/8DdfPfEwS0zYiuQ7uE2mdN5u2ez6kJIjXdk0W7DuwGYKB BunDjU0jjREVckAE0HseP4KB4I6H1sZLywiLbGjHWoW9wn5RWsoyvD2A/WKiF1UbGxP7L7yUh2jkH tbCq6unw==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rwPAV-0000000G3pm-29OT; Mon, 15 Apr 2024 16:26:55 +0000 Date: Mon, 15 Apr 2024 17:26:55 +0100 From: Matthew Wilcox To: Suren Baghdasaryan Cc: Peter Xu , "Liam R. Howlett" , LKML , linux-mm@kvack.org, Andrew Morton , Lokesh Gidra , Alistair Popple Subject: Re: [PATCH] mm: Always sanity check anon_vma first for per-vma locks Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Apr 15, 2024 at 09:19:06AM -0700, Suren Baghdasaryan wrote: > On Mon, Apr 15, 2024 at 9:13 AM Matthew Wilcox wrote: > > The tcp vma is not file backed, but I'm pretty sure that COW is not > > something they want, so there's never an anon_vma. It's for pages > > that contain received TCP packets; ie it's mmaped TCP. > > I was following > tcp_zerocopy_receive()->tcp_zerocopy_vm_insert_batch()->vm_insert_pages()->insert_page_in_batch_locked()->validate_page_before_insert() > which errors out for PageAnon(page). So, I assumed this path works on > file-backed pages but I'm not familiar with this code at all. It turns out there are pages which are neither file nor anon ;-) I have a partial list here: https://kernelnewbies.org/MatthewWilcox/Memdescs but I don't even have TCP on that list. I haven't looked into what they need -- I don't think they need mapping, index, etc, but I need to figure that out.