From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Network Development <netdev@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
Kees Cook <keescook@chromium.org>,
kernel-hardening@lists.openwall.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
the arch/x86 maintainers <x86@kernel.org>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Alan Cox <alan@linux.intel.com>,
David Miller <davem@davemloft.net>
Subject: Re: [RFC][PATCH] get rid of the use of set_fs() (by way of kernel_recvmsg()) in sunrpc
Date: Thu, 18 Jan 2018 17:10:20 +0000 [thread overview]
Message-ID: <20180118171020.GA13338@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20180118162957.GA16649@infradead.org>
On Thu, Jan 18, 2018 at 08:29:57AM -0800, Christoph Hellwig wrote:
> > We could turn ->msg_control/->msg_controllen into another
> > iov_iter, but seeing that we never do scatter-gather for those
> > IMO that would be a massive overkill. A flag controlling whether
> > ->msg_control is kernel or userland pointer would do, especially
> > since we already have a flag for "do we want a native or compat
> > layout for cmsg" in there.
>
> While your current hack seems like a nice short term improvement
> I think we need an iov_iter or iov_iter-light there in the long run.
For one caller in the entire history of the kernel?
> Same for ioctl so that we can pass properly typed kernel or user
> buffers through without all these set_fs hacks.
Umm... Most of the PITA with ioctls is due to compat ones being
reformatted for native and fed under set_fs(). I actually have
a series dealing with most of such places for net ioctls. Sure,
there's also ioctl_by_bdev(), but for those we might be better
off exposing the things like ->get_last_session() and its ilk to
filesystems that want to deal with cdroms...
It's kernel_setsockopt() that is the real PITA...
next prev parent reply other threads:[~2018-01-18 17:10 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-13 18:17 [PATCH v3 0/9] core, x86: prevent bounds-check bypass via speculative execution Dan Williams
2018-01-13 18:17 ` Dan Williams
2018-01-13 18:17 ` [PATCH v3 1/9] Documentation: document array_ptr Dan Williams
2018-01-13 18:17 ` Dan Williams
2018-01-13 18:17 ` [PATCH v3 2/9] arm64: implement ifence_array_ptr() Dan Williams
2018-01-13 18:17 ` [PATCH v3 3/9] arm: " Dan Williams
2018-01-13 18:17 ` Dan Williams
2018-01-13 18:17 ` [PATCH v3 4/9] x86: implement ifence() Dan Williams
2018-01-13 18:17 ` Dan Williams
2018-01-13 18:17 ` [PATCH v3 5/9] x86: implement ifence_array_ptr() and array_ptr_mask() Dan Williams
2018-01-13 18:17 ` Dan Williams
2018-01-13 18:17 ` [PATCH v3 6/9] asm/nospec: mask speculative execution flows Dan Williams
2018-01-13 18:17 ` Dan Williams
2018-01-13 18:18 ` [PATCH v3 7/9] x86: introduce __uaccess_begin_nospec and ASM_IFENCE Dan Williams
2018-01-13 18:18 ` Dan Williams
2018-01-13 18:18 ` [PATCH v3 8/9] x86: use __uaccess_begin_nospec and ASM_IFENCE in get_user paths Dan Williams
2018-01-13 18:18 ` Dan Williams
2018-01-13 19:05 ` Linus Torvalds
2018-01-13 19:33 ` Linus Torvalds
2018-01-13 20:22 ` Eric W. Biederman
2018-01-13 20:22 ` Eric W. Biederman
2018-01-16 22:23 ` Dan Williams
2018-01-16 22:23 ` Dan Williams
[not found] ` <CA+55aFxAFG5czVmCyhYMyHmXLNJ7pcXxWzusjZvLRh_qTGHj6Q@mail.gmail.com>
2018-01-16 22:41 ` Linus Torvalds
2018-01-17 14:17 ` Alan Cox
2018-01-17 18:52 ` Al Viro
2018-01-17 18:52 ` Al Viro
2018-01-17 19:54 ` Dan Williams
2018-01-17 19:54 ` Dan Williams
2018-01-17 20:05 ` Al Viro
2018-01-17 20:14 ` Dan Williams
2018-01-18 3:06 ` [RFC][PATCH] get rid of the use of set_fs() (by way of kernel_recvmsg()) in sunrpc Al Viro
2018-01-18 3:06 ` Al Viro
2018-01-18 3:16 ` Linus Torvalds
2018-01-18 3:16 ` Linus Torvalds
2018-01-18 4:43 ` Al Viro
2018-01-18 16:29 ` Christoph Hellwig
2018-01-18 16:29 ` Christoph Hellwig
2018-01-18 17:10 ` Al Viro [this message]
2018-01-18 19:31 ` Al Viro
2018-01-18 20:33 ` Al Viro
2018-01-19 3:27 ` Al Viro
2018-01-19 3:27 ` Al Viro
2018-01-17 19:26 ` [PATCH v3 8/9] x86: use __uaccess_begin_nospec and ASM_IFENCE in get_user paths Linus Torvalds
2018-01-17 20:01 ` Eric Dumazet
2018-01-17 20:01 ` Eric Dumazet
2018-01-18 16:38 ` Christoph Hellwig
2018-01-18 16:49 ` Linus Torvalds
2018-01-18 16:49 ` Linus Torvalds
2018-01-18 18:12 ` Al Viro
2018-01-17 4:30 ` Dan Williams
2018-01-17 6:28 ` Al Viro
2018-01-17 6:28 ` Al Viro
2018-01-17 6:50 ` Dan Williams
2018-01-17 6:50 ` Dan Williams
2018-01-17 10:07 ` David Laight
2018-01-17 10:07 ` David Laight
2018-01-17 18:12 ` Dan Williams
2018-01-17 19:16 ` Linus Torvalds
2018-01-17 19:16 ` Linus Torvalds
2018-01-13 18:18 ` [PATCH v3 9/9] vfs, fdtable: prevent bounds-check bypass via speculative execution Dan Williams
2018-01-13 18:18 ` Dan Williams
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=20180118171020.GA13338@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@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).