linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Schmitz <schmitzmic@gmail.com>
To: Christoph Hellwig <hch@lst.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	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: Thu, 8 Jul 2021 13:39:45 +1200	[thread overview]
Message-ID: <8bda396e-0e19-85a5-8274-4f881e045539@gmail.com> (raw)
In-Reply-To: <20210707142531.GA26080@lst.de>

Hi Christoph,

On 8/07/21 2:25 am, Christoph Hellwig wrote:
> On Tue, Jul 06, 2021 at 11:36:26AM -0700, Linus Torvalds wrote:
>> On Mon, Jul 5, 2021 at 9:13 PM Christoph Hellwig <hch@lst.de> wrote:
>>> 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.
>> Yeah, it's not that it wants set-fs(), it's that I missed that m68k
>> doesn't have HAVE_GET_KERNEL_NOFAULT.
>>
>> Implementing __get/put_kernel_nofault() should be fairly
>> straightforward: they are basically the same thing as the
>> __get/put_user() functions, except they should just use "move" instead
>> of "moves".
>>
>> The m68k uaccess.h file already kind of has support for that, but it's
>> hardcoded to the CONFIG_CPU_HAS_ADDRESS_SPACES config, rather than
>> being available as two different versions.
> So I've come up with a whole (compile tested only) series.  We don't
> really need the preempt_disable either given the m68k saves and restores
> the SFC/DFC registers on context switch:
>
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/m68k-set_fs

I tried your patches (on top of m68k 5.14).

Doesn't manage to start init, independent of what disk image I use:

Starting init: /bin/sh exists but couldn't execute it (error -22)
Kernel panic - not syncing: No working init found.  Try passing init= 
option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
CPU: 0 PID: 1 Comm: sh Not tainted 5.13.0-atari-fpuemu-exitfix+ #1198
Stack from 01031f8c:
         01031f8c 00360249 00360249 002c7032 00000001 000bc486 00000000 
000020c0
         00000000 00000000 00000000 002d3ffa 00355111 002d3f28 00002980 
00000000
         00000000 00000000 00000000 00000000 00000000 00000000 00000000 
00000000
         00000000 00000000 00000000 20000000 00000000
Call Trace: [<002c7032>] panic+0xc0/0x282
  [<000bc486>] kfree+0x0/0x60
  [<000020c0>] try_to_run_init_process+0x0/0x36
  [<002d3ffa>] kernel_init+0xd2/0xd8
  [<002d3f28>] kernel_init+0x0/0xd8
  [<00002980>] ret_from_kernel_thread+0xc/0x14

---[ end Kernel panic - not syncing: No working init found.  Try passing 
init= option to kernel. See Linux Documentation/admin-guide/init.rst for 
guidance. ]---

And I don't think it's the return value issue Linus pointed out - the 
same thing happens with my own (quite similar, though much less 
sophisticated) patches based on what I sent in response to Linus' 
suggestions earlier...

I'll send the last version of mine that did still boot shortly.

Cheers,

     Michael







  parent reply	other threads:[~2021-07-08  1:39 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
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 [this message]
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=8bda396e-0e19-85a5-8274-4f881e045539@gmail.com \
    --to=schmitzmic@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=gerg@linux-m68k.org \
    --cc=hch@lst.de \
    --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 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).