From: Christoph Hellwig <hch@lst.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Christoph Hellwig <hch@lst.de>,
Greg Ungerer <gerg@linux-m68k.org>,
linux-m68k <linux-m68k@lists.linux-m68k.org>,
uClinux development list <uclinux-dev@uclinux.org>
Subject: Re: [PATCH] m68knommu: remove set_fs()
Date: Tue, 6 Jul 2021 06:13:53 +0200 [thread overview]
Message-ID: <20210706041353.GA10889@lst.de> (raw)
In-Reply-To: <CAHk-=wgjWebav7K_F7WS7KiwOAYr8KktsZiaV+jYP5LU5RB3Sg@mail.gmail.com>
On Mon, Jul 05, 2021 at 01:39:03PM -0700, Linus Torvalds wrote:
> On Mon, Jul 5, 2021 at 1:46 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > Probably this should be
> >
> > select SET_FS if CPU_HAS_ADDRESS_SPACES
>
> Actually, I don't think m68k has a single real "set_fs()" at all, and
> it should just be converted as-is to not use CONFIG_SET_FS.
>
> Yes, there is a "set_fs()" function, but none of the remaining uses
> actually are the traditional kernel style of "use kernel addresses as
> user addresses". So as far as the *kernel* is concerned, m68k already
> looks like a no-SET_FS architecture, and "set-fs()" is purely a
> syntactic thing.
It still needs "real" kernel-style set_fs for the mm/maccess.c routines,
but adding __{get,put}_kernel_nofault should not be too hard.
> So I think the right thing to do looks something like this:
>
> - make the rule be that SFC/DFC is always normally USER_DATA
>
> - the special m68k sequences that need to play with special segments
> will always do
>
> preempt_disable();
> set_segment(..whatever segment they need..);
> .. do the special operation ..
> set_segment(USER_DATA);
> preempt_enable();
>
> - set_fs() goes away entirely, because the user access functions
> always work on USER_DATA and SFC/DFC is always right for them.
Yes, that's what I mean with needing a more work.
next prev parent reply other threads:[~2021-07-06 4:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-05 5:57 RFC: stop implementing set_fs for m68knommu Christoph Hellwig
2021-07-05 5:57 ` [PATCH] m68knommu: remove set_fs() Christoph Hellwig
2021-07-05 8:44 ` Geert Uytterhoeven
2021-07-05 8:56 ` Christoph Hellwig
2021-07-05 11:33 ` Geert Uytterhoeven
2021-07-05 11:51 ` Christoph Hellwig
2021-07-05 20:39 ` Linus Torvalds
2021-07-06 4:13 ` Christoph Hellwig [this message]
2021-07-06 18:36 ` Linus Torvalds
2021-07-07 14:25 ` Christoph Hellwig
2021-07-07 17:41 ` Linus Torvalds
2021-07-08 1:39 ` Michael Schmitz
2021-07-08 3:40 ` Michael Schmitz
2021-07-08 4:14 ` Linus Torvalds
2021-07-08 4:17 ` Christoph Hellwig
2021-07-08 6:33 ` Michael Schmitz
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=20210706041353.GA10889@lst.de \
--to=hch@lst.de \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=torvalds@linux-foundation.org \
--cc=uclinux-dev@uclinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.