From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 D94BC328254 for ; Fri, 19 Dec 2025 14:02:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766152931; cv=none; b=FYaG+qGQkFdMwK8Lthi2jNQCVLKa6/NyBaOJNu2LBfRt/mqi/5p8N8AINbe30In20XgrcxDHa4CBXh1CZHM3oY+HoULtVgWPFmWiOoSXz3m10PaWR+xssZrjWO6p4cc8i4Zfqwx5Xmnd0EUtCMH3ngks+Az/CX+kJRluTmspAIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766152931; c=relaxed/simple; bh=lYIXcGcrOPmOZzFUGlVjofb/tOUmKZRLWpRMjul5nf0=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=eBoziqt9chZiD6NgwJHDTDJmAoI+4OQzB+tOHrwpWom1ERaPEGVGfsf3Q+wcTBq4gHRoLz82ZIDY0elILuBqtf4gARhMHdozLr7dbPGVIHoFGF9mr9PrTXJNO0hEvfSNd5qLbcPA+J+4hBUtnBWE1yWmzIxwbmIQhTKydnaRHUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Az+gek4V; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Az+gek4V" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766152926; 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=yzNnOFBqwNj3DGyLxibs+wwctNsN2xP1MIdjPWFUw7s=; b=Az+gek4VUbn8tKHaJS/+Up7L7zmvXocCh9TiZ5BqANwsV12wi/N8WwUT8fqUZywamDA9Od qG5/TozaiNflsa/7T/ecZP/WmJGw19P5CHgTtHO0/7SL9Jsz2z4iJeKvMbVU8Ppfiu6OlU mzvhKK+wmG2bU7sgq0WEx4hyJhSRR5E= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-454-ou7AYO8ANTehcnavAX8JjA-1; Fri, 19 Dec 2025 09:02:05 -0500 X-MC-Unique: ou7AYO8ANTehcnavAX8JjA-1 X-Mimecast-MFC-AGG-ID: ou7AYO8ANTehcnavAX8JjA_1766152923 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1DA8E1955DD1; Fri, 19 Dec 2025 14:02:02 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.5]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6616D30001A2; Fri, 19 Dec 2025 14:01:58 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20251210-virtio_trans_iter-v1-1-92eee6d8b6db@codewreck.org> <8622834.T7Z3S40VBb@weasel> To: Dominique Martinet Cc: dhowells@redhat.com, Christian Schoenebeck , Eric Van Hensbergen , Latchesar Ionkov , Chris Arges , v9fs@lists.linux.dev, linux-kernel@vger.kernel.org, Matthew Wilcox , linux-fsdevel@vger.kernel.org Subject: Re: 9p read corruption of mmaped content (Was: [PATCH] 9p/virtio: restrict page pinning to user_backed_iter() iovec) 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="us-ascii" Content-ID: <818488.1766152917.1@warthog.procyon.org.uk> Date: Fri, 19 Dec 2025 14:01:57 +0000 Message-ID: <818489.1766152917@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Dominique Martinet wrote: > netfs_collect_folio: R=00001b55 ix=00003 r=3000-4000 t=3000/5fb2 > netfs_folio: i=157f3 ix=00003-00003 read-done > netfs_folio: i=157f3 ix=00003-00003 read-unlock > netfs_collect_folio: R=00001b55 ix=00004 r=4000-5000 t=4000/5fb2 > netfs_folio: i=157f3 ix=00004-00004 read-done > netfs_folio: i=157f3 ix=00004-00004 read-unlock > netfs_collect_folio: R=00001b55 ix=00005 r=5000-5fb2 t=5000/5fb2 > netfs_folio: i=157f3 ix=00005-00005 read-done > netfs_folio: i=157f3 ix=00005-00005 read-unlock > ... > netfs_collect_stream: R=00001b55[0:] cto=5fb2 frn=ffffffff > netfs_collect_state: R=00001b55 col=5fb2 cln=6000 n=c > netfs_collect_stream: R=00001b55[0:] cto=5fb2 frn=ffffffff > netfs_collect_state: R=00001b55 col=5fb2 cln=6000 n=8 > ... > netfs_sreq: R=00001b55[2] ZERO SUBMT f=000 s=5fb2 0/4e s=0 e=0 > netfs_sreq: R=00001b55[2] ZERO TERM f=102 s=5fb2 4e/4e s=5 e=0 This would seem to show a problem, if not the problem. We unlocked page ix=00005 before doing the ZERO subreq that clears the page tail. That shouldn't have happened since the collection point hasn't reached the end of the folio yet. David