All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Schmitz <schmitzmic@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	linux-m68k <linux-m68k@lists.linux-m68k.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH v2] m68k: save extra registers on more syscall entry points
Date: Sat, 19 Jun 2021 14:17:18 +1200	[thread overview]
Message-ID: <596b6fa5-a533-7c80-0138-5d0de756e707@gmail.com> (raw)
In-Reply-To: <CAHk-=wjFG7zfO7RXu8RUOkuRPE59-OuqzBFsH-Zk1ieSKYbrYA@mail.gmail.com>

Hi Linus,

Am 19.06.2021 um 13:54 schrieb Linus Torvalds:
> On Fri, Jun 18, 2021 at 6:32 PM Michael Schmitz <schmitzmic@gmail.com> wrote:
>>
>> *** FORMAT ERROR ***   FORMAT=0
>> Current process id is 1
>> BAD KERNEL TRAP: 00000000
>> Modules linked in:
>> PC: [<00002af0>] resume_userspace+0x14/0x16
>> SR: 2204  SP: (ptrval)  a2: 00000000
>> d0: 00000000    d1: 00000000    d2: 00000000    d3: 00000000
>> d4: 00000000    d5: 00000000    a0: 00000000    a1: 00000000
>
> Yeah, so that's presumably the rte that causes an exception due to
> garbage on the stack.
>
> The registers being zero at that point is actually expected, so that's
> not much of a hint. But yeah, clearly I got some stack initialization
> offset or something wrong there, and I don't know modern m68k nearly
> well enough to even guess where I screwed up.

It might have been me screwing up - I hand applied the patch on top of 
my last one and fat fingered one bit (forgot to remove the addql #4,sp@ 
I had added before the switch stack save).

With the patch correctly applied, I get this dump:

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
CPU: 0 PID: 1 Comm: init Not tainted 5.13.0-rc1-atari-fpuemu-exitfix+ #1126
Stack from 0081be08:
         0081be08 003363d8 003363d8 002aebaa 000000ff 00000001 0002fa64 
00818a90
         0081a000 0000000b 0081be70 00028610 0032df62 0000000b 0000000b 
0002e0d2
         0002fa64 00000001 001a978c 0000000b 0081bf30 0081daf8 0081bf44 
00000000
         00000000 00000000 0081ec40 00029458 0000000b 0081a007 00030504 
0000000b
         00000000 00000000 00000000 00000000 00818550 00000000 0081bf90 
0081bf30
         00000000 0081bf68 00030066 0081da30 000042c4 0081bf30 00000000 
00000000
Call Trace: [<002aebaa>] panic+0xc0/0x282
  [<0002fa64>] do_signal_stop+0x0/0x14a
  [<00028610>] do_exit+0x152/0x6f4
  [<0002e0d2>] recalc_sigpending+0x0/0x1e
  [<0002fa64>] do_signal_stop+0x0/0x14a
  [<001a978c>] memcpy+0x0/0x88
  [<00029458>] do_group_exit+0x40/0x7e
  [<00030504>] get_signal+0x22c/0x510
  [<00030066>] force_sig_info_to_task+0x7e/0x8a
  [<000042c4>] do_notify_resume+0x3c/0x484
  [<000302b2>] force_sig_fault_to_task+0x30/0x3c
  [<000302d2>] force_sig_fault+0x14/0x1a
  [<00005eb8>] send_fault_sig+0x24/0x86
  [<00002b14>] do_signal_return+0x10/0x1a
  [<00007008>] atari_reset+0x90/0xbc
  [<0000c000>] clr_mant+0x8/0x14

No registers dumped at all - no idea how that happened.

I'll try your latest patch next ... bear with me, got a 9-year old 
chewing my ear off to entertain in between tests.

Cheers,

	Michael


>
>              Linus
>

  parent reply	other threads:[~2021-06-19  2:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  1:27 [PATCH v2] m68k: save extra registers on more syscall entry points Michael Schmitz
2021-06-18 17:17 ` Linus Torvalds
2021-06-18 22:34   ` Michael Schmitz
2021-06-18 23:38     ` Linus Torvalds
2021-06-18 23:59       ` Michael Schmitz
2021-06-19  1:32       ` Michael Schmitz
2021-06-19  1:54         ` Linus Torvalds
2021-06-19  2:13           ` Linus Torvalds
2021-06-19  2:52             ` Michael Schmitz
2021-06-19  2:17           ` Michael Schmitz [this message]
2021-06-18 18:39 ` Eric W. Biederman
2021-06-18 19:06   ` 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=596b6fa5-a533-7c80-0138-5d0de756e707@gmail.com \
    --to=schmitzmic@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=schwab@linux-m68k.org \
    --cc=torvalds@linux-foundation.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.