All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH RFC v2] m68k: remove get_fs()/set_fs()
Date: Wed, 7 Jul 2021 19:51:45 -0700	[thread overview]
Message-ID: <CAHk-=whRp-m0DFPF27=OZzMq4b=16J+6bQEG_jeDM=osuuZF2w@mail.gmail.com> (raw)
In-Reply-To: <1625708899-29013-1-git-send-email-schmitzmic@gmail.com>

On Wed, Jul 7, 2021 at 6:48 PM Michael Schmitz <schmitzmic@gmail.com> wrote:
>
> Followup to my patch "Fixes to Linus' 'remove set_fs patch'", with
> kernel mode copy macros used in __get/put_kernel_nofault().
> (As soon as I use the same __get/put_user_asm() macros with
> parameters, like in Christoph's patch, everything falls to pieces.)

Ok, strange. If this works for you, then the _concept_ is fine, and
there's something odd going on with the "macros with 'moves' vs 'move'
as a parameter" thing.

> The fact that I had to touch include/linux/uaccess.h at all means
> I got something horribly wrong in my use of MAKE_MM_SEG() to
> set the segments.

Oh, that's straightforward enough: the m68k segment code uses the same
'mm_segment_t' type that the geberic kernel just wants to make empty
for the non-CONFIG_SET_FS case.

So the m68k segment type should just use a different name.

In fact, the m68k manuals call them "alternate function code
registers", so maybe it shouldn't be about "mm_segment_t" at all, but
the type should really be named as such.

The "segment" naming is just legacy x86 nomenclature, so I suspect it
would be a good thing to really walk away from that and make it very
explicit about what this is on m68k.

So maybe it could be

    typedef struct {
        unsigned char val:3;
    } function_code_reg_t;

or something like that.

I suspect some real m68k person should make up the name, not me. The
alternate function code registers are all from after my time ;)

              Linus

  reply	other threads:[~2021-07-08  2:52 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  1:48 [PATCH RFC v2] m68k: remove get_fs()/set_fs() Michael Schmitz
2021-07-08  2:51 ` Linus Torvalds [this message]
2021-07-08  3:01   ` Linus Torvalds
2021-07-08  3:37     ` Michael Schmitz
2021-07-08  4:31     ` Christoph Hellwig
2021-07-08  4:33       ` Michael Schmitz
2021-07-08  4:58         ` Christoph Hellwig
2021-07-08  5:48           ` Michael Schmitz
2021-07-08 12:57             ` Christoph Hellwig
2021-07-08 18:20               ` Linus Torvalds
2021-07-09  0:05                 ` Michael Schmitz
2021-07-08 19:28               ` Michael Schmitz
2021-07-09  0:31                 ` Michael Schmitz
2021-07-09  4:22                   ` Christoph Hellwig
2021-07-09  5:47                     ` Michael Schmitz
2021-07-09  7:29                     ` Geert Uytterhoeven
2021-07-09  8:34                       ` Michael Schmitz
2021-07-09  8:53                         ` Christoph Hellwig
2021-07-09  9:00                           ` Michael Schmitz
2021-07-09 11:20                             ` Geert Uytterhoeven
2021-07-09 19:25                               ` Michael Schmitz
2021-07-09 19:52                                 ` Michael Schmitz
2021-07-09 20:03                                   ` Linus Torvalds
2021-07-09 20:13                                     ` Linus Torvalds
2021-07-09 19:53                                 ` Linus Torvalds
2021-07-09 21:08                                   ` Michael Schmitz
2021-07-09 21:18                                     ` Linus Torvalds
2021-07-10  2:30                                       ` Michael Schmitz
2021-07-09 11:35                           ` Geert Uytterhoeven
2021-07-08  7:36     ` Andreas Schwab
2021-07-08  4:28   ` 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='CAHk-=whRp-m0DFPF27=OZzMq4b=16J+6bQEG_jeDM=osuuZF2w@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=hch@lst.de \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=schmitzmic@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 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.