From: Al Viro <viro@zeniv.linux.org.uk>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@lst.de>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] exec: open code copy_string_kernel
Date: Fri, 1 May 2020 23:04:49 +0100 [thread overview]
Message-ID: <20200501220449.GQ23230@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20200501144013.be5bf036ab7f2d2303676bce@linux-foundation.org>
On Fri, May 01, 2020 at 02:40:13PM -0700, Andrew Morton wrote:
> On Fri, 1 May 2020 22:30:48 +0100 Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> > On Fri, May 01, 2020 at 02:19:03PM -0700, Andrew Morton wrote:
> > > On Fri, 1 May 2020 12:41:05 +0200 Christoph Hellwig <hch@lst.de> wrote:
> > >
> > > > Currently copy_string_kernel is just a wrapper around copy_strings that
> > > > simplifies the calling conventions and uses set_fs to allow passing a
> > > > kernel pointer. But due to the fact the we only need to handle a single
> > > > kernel argument pointer, the logic can be sigificantly simplified while
> > > > getting rid of the set_fs.
> > > >
> > >
> > > I don't get why this is better? copy_strings() is still there and
> > > won't be going away - what's wrong with simply reusing it in this
> > > fashion?
> > >
> > > I guess set_fs() is a bit hacky, but there's the benefit of not having
> > > to maintain two largely similar bits of code?
> >
> > Killing set_fs() would be a very good thing...
>
> Why is that? And is there a project afoot to do this?
Long story - basically, it's been a source of massive headache too many times.
No formal project, but there are several people (me, Arnd, Christoph) who'd
been reducing its use. For more than a decade now, I think...
FWIW, I doubt that it will be entirely killable; Christoph appears to be
more optimistic. In any case, its use has been greatly reduced and having
it narrowed down to even fewer places would be a good thing.
In the same direction: use_mm()/unuse_mm() regularization wrt set_fs(), getting
rid of it in coredump code, some movements towards killing ioctl_by_bdev();
not sure if I've spotted everything - Christoph?
next prev parent reply other threads:[~2020-05-01 22:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 10:41 remove set_fs from copy_strings_kernel Christoph Hellwig
2020-05-01 10:41 ` [PATCH 1/2] exec: simplify the copy_strings_kernel calling convention Christoph Hellwig
2020-05-01 10:41 ` [PATCH 2/2] exec: open code copy_string_kernel Christoph Hellwig
2020-05-01 12:50 ` Al Viro
2020-05-01 19:26 ` Christoph Hellwig
2020-05-01 21:43 ` Al Viro
2020-05-01 21:19 ` Andrew Morton
2020-05-01 21:30 ` Al Viro
2020-05-01 21:40 ` Andrew Morton
2020-05-01 22:04 ` Al Viro [this message]
2020-05-02 6:23 ` 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=20200501220449.GQ23230@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.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).