Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2088042pxb; Sat, 14 Nov 2020 12:52:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8up+6AiPkxjrp6RF33PnmHOJE24yQdhhh9BM0HTkkohLa7vWSoWVduWxjFSPxYTUZxCfU X-Received: by 2002:a50:a6d0:: with SMTP id f16mr8527846edc.135.1605387160393; Sat, 14 Nov 2020 12:52:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605387160; cv=none; d=google.com; s=arc-20160816; b=cIc+etwRXWYJtYvJHXZO17lhVIx+MYWzMnrKwD43AiJqy5WZcthGP42Wh0YYPo3M1g fz7X1azsfHxAojb5WFwSdUSwQEmiiI+vHJBouKeZ84SYxIHbwQmsOKgYoFwCpnOG0XOy 34nMia2CS4iB08lLJGcK4rSgLgz/fX6qJz9QLp54J8Da2va3Ka/peoZMN0i21tMnzYAA SwDghVrrHaY6i7EYg3B74FFxDjDe8aT4BwfNFsMl0XDjti5t8X77uWWS9q8Sn+k29ON5 P3PXAwKFx4mcMJIDMABEFqO/e6B63l8Exo0UxWrOTe1TD4BVXh9HRG7Q1233l364+mBe Y0Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CRWGqT12ScAh833wLbvkUFvEgRmdjyftyKF1vB2lMpQ=; b=Q3zMtH6/aR7EO0v1Jj48rkeh8evsIEgx/CzZDV0WooCqSWunXtT/MOJANtGuyGFebp z9eDLM++CKwyBsvmD8LRp69c1o7TLd4DuJcBbvcJ3w+ne0eQMvQux0iP8A6UmR54VEEh /odJf2xqREuywsYp7o4/xldwK51JLqmjLG9OsVGqNqqh79pLjxsKvFVWXiKVxzsbOn+R DgtqJ3oqvPWGZDw2Y+oztG8B6camPkjp7yxkFkPaQC63ALPvAic6XwBdMdxstcpsoDfe Ux9gRR1YzMi/NOoik7sHU4D2BRvpM8aW+smgMhkacQt8R/h7xq56wF59PARZJ9cTWhT4 YfVQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si8962353edj.119.2020.11.14.12.52.17; Sat, 14 Nov 2020 12:52:40 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726265AbgKNUuM (ORCPT + 99 others); Sat, 14 Nov 2020 15:50:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgKNUuM (ORCPT ); Sat, 14 Nov 2020 15:50:12 -0500 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E48DC0613D1; Sat, 14 Nov 2020 12:50:12 -0800 (PST) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1ke2Ui-0061hp-LP; Sat, 14 Nov 2020 20:50:01 +0000 Date: Sat, 14 Nov 2020 20:50:00 +0000 From: Al Viro To: Nathan Chancellor Cc: Linus Torvalds , Christoph Hellwig , Greg KH , Alexey Dobriyan , linux-fsdevel , Linux Kernel Mailing List , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH 1/6] seq_file: add seq_read_iter Message-ID: <20201114205000.GP3576660@ZenIV.linux.org.uk> References: <20201111215220.GA3576660@ZenIV.linux.org.uk> <20201111222116.GA919131@ZenIV.linux.org.uk> <20201113235453.GA227700@ubuntu-m3-large-x86> <20201114011754.GL3576660@ZenIV.linux.org.uk> <20201114030124.GA236@Ryzen-9-3900X.localdomain> <20201114035453.GM3576660@ZenIV.linux.org.uk> <20201114041420.GA231@Ryzen-9-3900X.localdomain> <20201114055048.GN3576660@ZenIV.linux.org.uk> <20201114061934.GA658@Ryzen-9-3900X.localdomain> <20201114070025.GO3576660@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201114070025.GO3576660@ZenIV.linux.org.uk> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 14, 2020 at 07:00:25AM +0000, Al Viro wrote: > On Fri, Nov 13, 2020 at 11:19:34PM -0700, Nathan Chancellor wrote: > > > Assuming so, I have attached the output both with and without the > > WARN_ON. Looks like mountinfo is what is causing the error? > > Cute... FWIW, on #origin + that commit with fix folded in I don't > see anything unusual in reads from mountinfo ;-/ OTOH, they'd > obviously been... creative with readv(2) arguments, so it would > be very interesting to see what it is they are passing to it. > > I'm half-asleep right now; will try to cook something to gather > that information tomorrow morning. 'Later... OK, so let's do this: fix in seq_read_iter() + in do_loop_readv_writev() (on entry) the following (racy as hell, but will do for debugging): bool weird = false; if (unlikely(memcmp(file->f_path.dentry->d_name.name, "mountinfo", 10))) { int i; for (i = 0; i < iter->nr_segs; i++) if (!iter->iov[i].iov_len) weird = true; if (weird) { printk(KERN_ERR "[%s]: weird readv on %p4D (%ld) ", current->comm, filp, (long)filp->f_pos); for (i = 0; i < iter->nr_segs; i++) printk(KERN_CONT "%c%zd", i ? ':' : '<', iter->iov[i].iov_len); printk(KERN_CONT "> "); } } and in the end (just before return) if (weird) printk(KERN_CONT "-> %zd\n", ret); Preferably along with the results of cat /proc//mountinfo both on that and on the working kernel...