From: Guenter Roeck <linux@roeck-us.net>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
David Sterba <dsterba@suse.com>,
Miklos Szeredi <miklos@szeredi.hu>,
Anton Altaparmakov <anton@tuxera.com>,
David Howells <dhowells@redhat.com>,
Matthew Wilcox <willy@infradead.org>,
Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH] iov_iter: separate direction from flavour
Date: Sun, 4 Jul 2021 10:29:48 -0700 [thread overview]
Message-ID: <20210704172948.GA1730187@roeck-us.net> (raw)
Hi,
On Thu, Apr 22, 2021 at 02:50:39PM -0400, Al Viro wrote:
> Instead of having them mixed in iter->type, use separate ->iter_type
> and ->data_source (u8 and bool resp.) And don't bother with (pseudo-)
> bitmap for the former - microoptimizations from being able to check
> if the flavour is one of two values are not worth the confusion for
> optimizer. It can't prove that we never get e.g. ITER_IOVEC | ITER_PIPE,
> so we end up with extra headache.
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This patch results in the following runtime warning on nommu systems.
[ 8.567154] Run /init as init process
[ 8.572112] ------------[ cut here ]------------
[ 8.572248] WARNING: CPU: 0 PID: 1 at lib/iov_iter.c:468 iov_iter_init+0x35/0x58
[ 8.572484] CPU: 0 PID: 1 Comm: init Not tainted 5.13.0-09606-g303392fd5c16 #1
[ 8.572695] Hardware name: MPS2 (Device Tree Support)
[ 8.573278] [<2100ae75>] (unwind_backtrace) from [<2100a2bb>] (show_stack+0xb/0xc)
[ 8.573594] [<2100a2bb>] (show_stack) from [<2100da03>] (__warn+0x5f/0x80)
[ 8.573738] [<2100da03>] (__warn) from [<2100da55>] (warn_slowpath_fmt+0x31/0x60)
[ 8.573886] [<2100da55>] (warn_slowpath_fmt) from [<210d8e1d>] (iov_iter_init+0x35/0x58)
[ 8.574044] [<210d8e1d>] (iov_iter_init) from [<21059cab>] (vfs_read+0x89/0xc6)
[ 8.574191] [<21059cab>] (vfs_read) from [<2105d92b>] (read_code+0x15/0x2e)
[ 8.574329] [<2105d92b>] (read_code) from [<21085a8d>] (load_flat_file+0x341/0x4f0)
[ 8.574481] [<21085a8d>] (load_flat_file) from [<21085e03>] (load_flat_binary+0x47/0x2dc)
[ 8.574639] [<21085e03>] (load_flat_binary) from [<2105d581>] (bprm_execve+0x1fd/0x32c)
[ 8.574797] [<2105d581>] (bprm_execve) from [<2105dbb3>] (kernel_execve+0xa3/0xac)
[ 8.574947] [<2105dbb3>] (kernel_execve) from [<211e7095>] (kernel_init+0x31/0xb0)
[ 8.575099] [<211e7095>] (kernel_init) from [<2100814d>] (ret_from_fork+0x11/0x24)
[ 8.575287] Exception stack(0x21429fb0 to 0x21429ff8)
[ 8.575433] 9fa0: 00000000 00000000 00000000 00000000
[ 8.575593] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 8.575743] 9fe0: 00000000 00000000 00000000 00000000 00000000 00000000
[ 8.575933] ---[ end trace ba15568c05035a77 ]---
This is with qemu's mps2-an385 emulation and and mps2_defconfig.
The same warning is also observed with m68k and mcf5208evb,
though the traceback isn't as nice.
WARNING: CPU: 0 PID: 1 at lib/iov_iter.c:468 0x40135e4e
...
Call Trace:
[<402b0f42>] 0x402b0f42
[<402b0fea>] 0x402b0fea
[<40135e4e>] 0x40135e4e
[<40135e4e>] 0x40135e4e
[<4009c610>] 0x4009c610
...
Reverting this patch fixes the problem for both mps2-an385 and mcf5208evb.
Guenter
next reply other threads:[~2021-07-04 17:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-04 17:29 Guenter Roeck [this message]
2021-07-04 18:31 ` [PATCH] iov_iter: separate direction from flavour Linus Torvalds
2021-07-04 18:54 ` Guenter Roeck
2021-07-04 19:04 ` Linus Torvalds
2021-07-04 20:28 ` Guenter Roeck
2021-07-04 20:41 ` Linus Torvalds
2021-07-04 21:47 ` Guenter Roeck
2021-07-04 22:44 ` Linus Torvalds
2021-07-04 22:47 ` Matthew Wilcox
2021-07-04 22:53 ` Linus Torvalds
2021-07-04 23:34 ` Linus Torvalds
2021-07-05 5:17 ` Christoph Hellwig
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=20210704172948.GA1730187@roeck-us.net \
--to=linux@roeck-us.net \
--cc=anton@tuxera.com \
--cc=asml.silence@gmail.com \
--cc=dhowells@redhat.com \
--cc=dsterba@suse.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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