linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
	Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <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>,
	Pavel Begunkov <asml.silence@gmail.com>
Subject: Re: [PATCH] iov_iter: separate direction from flavour
Date: Sun, 4 Jul 2021 23:47:12 +0100	[thread overview]
Message-ID: <YOI6cES6C0vTS/DU@casper.infradead.org> (raw)
In-Reply-To: <CAHk-=whD38FwDPc=gemuS6wNMDxO-PyVbtvcta3qXyO1ROc4EQ@mail.gmail.com>

On Sun, Jul 04, 2021 at 03:44:17PM -0700, Linus Torvalds wrote:
> On Sun, Jul 4, 2021 at 2:47 PM Guenter Roeck <linux@roeck-us.net> wrote:
> >
> > How about the following ?
> >
> >         WARN_ON_ONCE(IS_ENABLED(CONFIG_MMU) && uaccess_kernel());
> 
> Nope, that doesn't work either, because there are no-MMU setups that
> don't make the same mistake no-mmu arm and m68k do.
> 
> Example: xtensa. But afaik also generic-asm/uaccess.h unless the
> architecture overrides something.
> 
> So this literally seems like just an arm/m68k bug.

We could slip:

#ifndef uaccess_user
#define uaccess_user() !uaccess_kernel()
#endif

into asm-generic, switch the test over and then make it arm/m68k's
problem to define uaccess_user() to true?

  reply	other threads:[~2021-07-04 22:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-04 17:29 Guenter Roeck
2021-07-04 18:31 ` 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 [this message]
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=YOI6cES6C0vTS/DU@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=anton@tuxera.com \
    --cc=asml.silence@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: [PATCH] iov_iter: separate direction from flavour' \
    /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

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).