From: Al Viro <viro@zeniv.linux.org.uk>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Christoph Hellwig <hch@lst.de>,
Greg KH <gregkh@linuxfoundation.org>,
Alexey Dobriyan <adobriyan@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
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
Date: Sat, 14 Nov 2020 20:50:00 +0000 [thread overview]
Message-ID: <20201114205000.GP3576660@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20201114070025.GO3576660@ZenIV.linux.org.uk>
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/<whatever it is>/mountinfo both
on that and on the working kernel...
next prev parent reply other threads:[~2020-11-14 20:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20201104082738.1054792-1-hch@lst.de>
[not found] ` <20201104082738.1054792-2-hch@lst.de>
[not found] ` <20201110213253.GV3576660@ZenIV.linux.org.uk>
[not found] ` <20201110213511.GW3576660@ZenIV.linux.org.uk>
[not found] ` <20201110232028.GX3576660@ZenIV.linux.org.uk>
[not found] ` <CAHk-=whTqr4Lp0NYR6k3yc2EbiF0RR17=TJPa4JBQATMR__XqA@mail.gmail.com>
[not found] ` <20201111215220.GA3576660@ZenIV.linux.org.uk>
[not found] ` <20201111222116.GA919131@ZenIV.linux.org.uk>
2020-11-13 23:54 ` [PATCH 1/6] seq_file: add seq_read_iter Nathan Chancellor
2020-11-14 1:17 ` Al Viro
2020-11-14 3:01 ` Nathan Chancellor
2020-11-14 3:54 ` Al Viro
2020-11-14 4:14 ` Nathan Chancellor
2020-11-14 5:50 ` Al Viro
[not found] ` <20201114061934.GA658@Ryzen-9-3900X.localdomain>
2020-11-14 7:00 ` Al Viro
2020-11-14 20:50 ` Al Viro [this message]
2020-11-15 15:53 ` Al Viro
2020-11-15 16:56 ` Linus Torvalds
[not found] ` <20201115214125.GA317@Ryzen-9-3900X.localdomain>
2020-11-15 23:38 ` Al Viro
2020-11-15 23:51 ` Nathan Chancellor
2020-11-16 0:25 ` Al Viro
2020-11-16 0:34 ` Nathan Chancellor
2020-11-16 3:29 ` Al Viro
2020-11-27 16:29 ` Christoph Hellwig
2020-12-08 16:35 ` Christoph Hellwig
2020-12-08 18:34 ` Linus Torvalds
2020-12-08 19:49 ` Al Viro
2020-12-08 20:25 ` Linus Torvalds
2020-12-08 20:53 ` Al Viro
2020-12-08 21:01 ` Linus Torvalds
2020-12-08 19:49 ` Greg KH
2020-11-14 21:44 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201114205000.GP3576660@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=adobriyan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=haiyangz@microsoft.com \
--cc=hch@lst.de \
--cc=kys@microsoft.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=sthemmin@microsoft.com \
--cc=torvalds@linux-foundation.org \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).