From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arvind Sankar <nivedita@alum.mit.edu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>,
youling 257 <youling257@gmail.com>
Subject: Re: [PATCH] early init: open /dev/console with O_LARGEFILE
Date: Thu, 2 Jan 2020 18:53:00 +0100 [thread overview]
Message-ID: <20200102175300.GA292871@light.dominikbrodowski.net> (raw)
In-Reply-To: <CAHk-=whzgLPi4szh8xOKysuS9CKaQESngc=n0omBVpwdQ822aw@mail.gmail.com>
On Wed, Jan 01, 2020 at 01:39:00PM -0800, Linus Torvalds wrote:
> I'm not saying that the revert is wrong at this point,
Linus, I'd like you to revert the patch nonetheless -- it was quite broken,
it is still broken and probably needs, besides your fix, the O_LARGEFILE
patch I sent out a few days ago.
What is more, I think a different approach is saner, leads to smaller code,
and creates far less risks. And maybe Al Viro likes it a bit more as well :)
At
https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git ksys-next
there are a few proof-of-concept patches for three in-kernel-syscalls:
(1) Both ksys_open() and ksys_unlink() can trivially operate properly on a
kernelspace pointer (by means of calling getname_kernel() instead of
getname()), such as:
-static inline long ksys_unlink(const char __user *pathname)
+/* note: operates on a kernelspace pointer to pathname */
+static inline long ksys_unlink(const char *pathname)
{
- return do_unlinkat(AT_FDCWD, getname(pathname));
+ return do_unlinkat(AT_FDCWD, getname_kernel(pathname));
}
(with all callers of ksys_unlinked() checked, of course).
(2) For ksys_mkdir(), we already have a fully vfs-in-kernelspace variant in
devtmpfs::dev_mkdir(), which we can use for ksys_mkdir() as well.
What do you (and others) think of these alternative approaches? If we should
work in this direction, please revert the patch -- the new patches should go
into v5.6 at earliest, and probably be routed via Al Viro (unless he and/or
you want me to have this tree managed independently, and included in
linux-next separately).
Thanks,
Dominik
prev parent reply other threads:[~2020-01-02 17:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 15:02 Dominik Brodowski
2019-12-31 15:55 ` youling 257
2020-01-01 0:30 ` Arvind Sankar
2020-01-01 10:43 ` Dominik Brodowski
2020-01-01 13:27 ` youling 257
2020-01-01 17:24 ` Dominik Brodowski
2020-01-01 17:59 ` Arvind Sankar
2020-01-01 18:42 ` Dominik Brodowski
2020-01-01 18:49 ` youling 257
2020-01-01 18:32 ` Arvind Sankar
2020-01-01 21:39 ` Linus Torvalds
2020-01-01 22:50 ` Arvind Sankar
2020-01-01 23:01 ` Linus Torvalds
2020-01-01 23:08 ` Arvind Sankar
2020-01-02 3:09 ` youling 257
2020-01-02 4:00 ` Linus Torvalds
2020-01-02 4:10 ` Arvind Sankar
2020-01-02 17:53 ` Dominik Brodowski [this message]
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=20200102175300.GA292871@light.dominikbrodowski.net \
--to=linux@dominikbrodowski.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nivedita@alum.mit.edu \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=youling257@gmail.com \
/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
all inboxes | Powered by JetHome®