All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
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: Fri, 13 Nov 2020 20:01:24 -0700	[thread overview]
Message-ID: <20201114030124.GA236@Ryzen-9-3900X.localdomain> (raw)
In-Reply-To: <20201114011754.GL3576660@ZenIV.linux.org.uk>

On Sat, Nov 14, 2020 at 01:17:54AM +0000, Al Viro wrote:
> On Fri, Nov 13, 2020 at 04:54:53PM -0700, Nathan Chancellor wrote:
> 
> > This patch in -next (6a9f696d1627bacc91d1cebcfb177f474484e8ba) breaks
> > WSL2's interoperability feature, where Windows paths automatically get
> > added to PATH on start up so that Windows binaries can be accessed from
> > within Linux (such as clip.exe to pipe output to the clipboard). Before,
> > I would see a bunch of Linux + Windows folders in $PATH but after, I
> > only see the Linux folders (I can give you the actual PATH value if you
> > care but it is really long).
> > 
> > I am not at all familiar with the semantics of this patch or how
> > Microsoft would be using it to inject folders into PATH (they have some
> > documentation on it here:
> > https://docs.microsoft.com/en-us/windows/wsl/interop) and I am not sure
> > how to go about figuring that out to see why this patch breaks something
> > (unless you have an idea). I have added the Hyper-V maintainers and list
> > to CC in case they know someone who could help.
> 
> Out of curiosity: could you slap WARN_ON(!iov_iter_count(iter)); right in
> the beginning of seq_read_iter() and see if that triggers?

Sure thing, it does trigger.

[    0.235058] ------------[ cut here ]------------
[    0.235062] WARNING: CPU: 15 PID: 237 at fs/seq_file.c:176 seq_read_iter+0x3b3/0x3f0
[    0.235064] CPU: 15 PID: 237 Comm: localhost Not tainted 5.10.0-rc2-microsoft-cbl-00002-g6a9f696d1627-dirty #15
[    0.235065] RIP: 0010:seq_read_iter+0x3b3/0x3f0
[    0.235066] Code: ba 01 00 00 00 e8 6d d2 fc ff 4c 89 e7 48 89 ee 48 8b 54 24 10 e8 ad 8b 45 00 49 01 c5 48 29 43 18 48 89 43 10 e9 61 fe ff ff <0f> 0b e9 6f fc ff ff 0f 0b 45 31 ed e9 0d fd ff ff 48 c7 43 18 00
[    0.235067] RSP: 0018:ffff9c774063bd08 EFLAGS: 00010246
[    0.235068] RAX: ffff91a77ac01f00 RBX: ffff91a50133c348 RCX: 0000000000000001
[    0.235069] RDX: ffff9c774063bdb8 RSI: ffff9c774063bd60 RDI: ffff9c774063bd88
[    0.235069] RBP: 0000000000000000 R08: 0000000000000000 R09: ffff91a50058b768
[    0.235070] R10: ffff91a7f79f0000 R11: ffffffffbc2c2030 R12: ffff9c774063bd88
[    0.235070] R13: ffff9c774063bd60 R14: ffff9c774063be48 R15: ffff91a77af58900
[    0.235072] FS:  000000000029c800(0000) GS:ffff91a7f7bc0000(0000) knlGS:0000000000000000
[    0.235073] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.235073] CR2: 00007ab6c1fabad0 CR3: 000000037a004000 CR4: 0000000000350ea0
[    0.235074] Call Trace:
[    0.235077]  seq_read+0x127/0x150
[    0.235078]  proc_reg_read+0x42/0xa0
[    0.235080]  do_iter_read+0x14c/0x1e0
[    0.235081]  do_readv+0x18d/0x240
[    0.235083]  do_syscall_64+0x33/0x70
[    0.235085]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    0.235086] RIP: 0033:0x22c483
[    0.235086] Code: 4e 66 48 0f 7e c8 48 83 f8 01 48 89 d0 48 83 d0 ff 48 89 46 08 66 0f 7f 46 10 48 63 7f 78 b8 13 00 00 00 ba 02 00 00 00 0f 05 <48> 89 c7 e8 15 bb ff ff 48 85 c0 7e 34 48 89 c1 48 2b 4c 24 08 76
[    0.235087] RSP: 002b:00007ffca2245ca0 EFLAGS: 00000257 ORIG_RAX: 0000000000000013
[    0.235088] RAX: ffffffffffffffda RBX: 0000000000a58120 RCX: 000000000022c483
[    0.235088] RDX: 0000000000000002 RSI: 00007ffca2245ca0 RDI: 0000000000000005
[    0.235089] RBP: 00000000ffffffff R08: fefefefefefefeff R09: 8080808080808080
[    0.235089] R10: 00007ab6c1fabb20 R11: 0000000000000257 R12: 0000000000a58120
[    0.235089] R13: 00007ffca2245d90 R14: 0000000000000001 R15: 00007ffca2245ce7
[    0.235091] CPU: 15 PID: 237 Comm: localhost Not tainted 5.10.0-rc2-microsoft-cbl-00002-g6a9f696d1627-dirty #15
[    0.235091] Call Trace:
[    0.235092]  dump_stack+0xa1/0xfb
[    0.235094]  __warn+0x7f/0x120
[    0.235095]  ? seq_read_iter+0x3b3/0x3f0
[    0.235096]  report_bug+0xb1/0x110
[    0.235097]  handle_bug+0x3d/0x70
[    0.235098]  exc_invalid_op+0x18/0xb0
[    0.235098]  asm_exc_invalid_op+0x12/0x20
[    0.235100] RIP: 0010:seq_read_iter+0x3b3/0x3f0
[    0.235100] Code: ba 01 00 00 00 e8 6d d2 fc ff 4c 89 e7 48 89 ee 48 8b 54 24 10 e8 ad 8b 45 00 49 01 c5 48 29 43 18 48 89 43 10 e9 61 fe ff ff <0f> 0b e9 6f fc ff ff 0f 0b 45 31 ed e9 0d fd ff ff 48 c7 43 18 00
[    0.235101] RSP: 0018:ffff9c774063bd08 EFLAGS: 00010246
[    0.235101] RAX: ffff91a77ac01f00 RBX: ffff91a50133c348 RCX: 0000000000000001
[    0.235102] RDX: ffff9c774063bdb8 RSI: ffff9c774063bd60 RDI: ffff9c774063bd88
[    0.235102] RBP: 0000000000000000 R08: 0000000000000000 R09: ffff91a50058b768
[    0.235103] R10: ffff91a7f79f0000 R11: ffffffffbc2c2030 R12: ffff9c774063bd88
[    0.235103] R13: ffff9c774063bd60 R14: ffff9c774063be48 R15: ffff91a77af58900
[    0.235104]  ? seq_open+0x70/0x70
[    0.235105]  ? path_openat+0xbc0/0xc40
[    0.235106]  seq_read+0x127/0x150
[    0.235107]  proc_reg_read+0x42/0xa0
[    0.235108]  do_iter_read+0x14c/0x1e0
[    0.235109]  do_readv+0x18d/0x240
[    0.235109]  do_syscall_64+0x33/0x70
[    0.235110]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    0.235111] RIP: 0033:0x22c483
[    0.235111] Code: 4e 66 48 0f 7e c8 48 83 f8 01 48 89 d0 48 83 d0 ff 48 89 46 08 66 0f 7f 46 10 48 63 7f 78 b8 13 00 00 00 ba 02 00 00 00 0f 05 <48> 89 c7 e8 15 bb ff ff 48 85 c0 7e 34 48 89 c1 48 2b 4c 24 08 76
[    0.235112] RSP: 002b:00007ffca2245ca0 EFLAGS: 00000257 ORIG_RAX: 0000000000000013
[    0.235113] RAX: ffffffffffffffda RBX: 0000000000a58120 RCX: 000000000022c483
[    0.235113] RDX: 0000000000000002 RSI: 00007ffca2245ca0 RDI: 0000000000000005
[    0.235113] RBP: 00000000ffffffff R08: fefefefefefefeff R09: 8080808080808080
[    0.235114] R10: 00007ab6c1fabb20 R11: 0000000000000257 R12: 0000000000a58120
[    0.235114] R13: 00007ffca2245d90 R14: 0000000000000001 R15: 00007ffca2245ce7
[    0.235115] ---[ end trace 92966dbcf1e9cae5 ]---

Cheers,
Nathan

  reply	other threads:[~2020-11-14  3:01 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  8:27 support splice reads on seq_file based procfs files v2 Christoph Hellwig
2020-11-04  8:27 ` [PATCH 1/6] seq_file: add seq_read_iter Christoph Hellwig
2020-11-10 21:32   ` Al Viro
2020-11-10 21:35     ` Al Viro
2020-11-10 23:20       ` Al Viro
2020-11-11  7:55         ` Christoph Hellwig
2020-11-11 17:54         ` Linus Torvalds
2020-11-11 21:52           ` Al Viro
2020-11-11 22:21             ` Al Viro
2020-11-11 22:27               ` Linus Torvalds
2020-11-11 23:00                 ` Al Viro
2020-11-13 23:54               ` Nathan Chancellor
2020-11-14  1:17                 ` Al Viro
2020-11-14  3:01                   ` Nathan Chancellor [this message]
2020-11-14  3:54                     ` Al Viro
2020-11-14  4:14                       ` Nathan Chancellor
2020-11-14  5:50                         ` Al Viro
2020-11-14  6:19                           ` Nathan Chancellor
2020-11-14  7:00                             ` Al Viro
2020-11-14 20:50                               ` Al Viro
2020-11-15 15:53                                 ` Al Viro
2020-11-15 16:56                                   ` Linus Torvalds
2020-11-15 21:41                                   ` Nathan Chancellor
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
2020-11-04  8:27 ` [PATCH 2/6] proc: wire up generic_file_splice_read for iter ops Christoph Hellwig
2020-11-04  8:27 ` [PATCH 3/6] proc/cpuinfo: switch to ->read_iter Christoph Hellwig
2020-11-04  8:27 ` [PATCH 4/6] proc/stat: " Christoph Hellwig
2020-11-04  8:27 ` [PATCH 5/6] proc "single files": " Christoph Hellwig
2020-11-04  8:27 ` [PATCH 6/6] proc "seq " Christoph Hellwig
2020-11-04 17:53 ` support splice reads on seq_file based procfs files v2 Linus Torvalds

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=20201114030124.GA236@Ryzen-9-3900X.localdomain \
    --to=natechancellor@gmail.com \
    --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=sthemmin@microsoft.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.