Skip to contentSkip to conversation

New: Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

Bug 206501 [email protected] 1 participant 12 messages Feb 11, 2020 – Feb 26, 2020

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=206501

Bug ID: 206501
Summary: Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with
CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]
Product: Platform Specific/Hardware
Version: 2.5
Kernel Version: 5.6.0-rc1
Hardware: PPC-32
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: PPC-32
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Created attachment 287311
--> https://bugzilla.kernel.org/attachment.cgi?id=287311&action=edit
screenshot

The G4 boots fine with CONFIG_VMAP_STACK=n, but fails to boot with CONFIG_VMAP_STACK=y.

[...]
NIP [c001c194] create_hpte+0xa8/0x120
LR [c001c0c4] add_hash_page+0x88/0xb0

Call Trace:
[f101dde8] [cO181568] alloc_set_pte+0x184/0x214 (unreliable)
[f101de18] [cO14d168] filemap_map_pages+0x21c/0x250
[f101de68] [c0181cf4] handle_mm_fault+0x66c/0x90c
[f101dee8] [c0019aac] do_page_fault+0x690/0x804
[f101df38] [c0014450] handle_page_fault+0x10/0x3c
--- interrupt: 401 at Oxb77ffd10
    LR = 0x0
Instruction dump:
6c64003f 6884ffx0 3884fff8 7c0903a6 84x40008 7c062800 4002fff8 41a2008c
68a50040 7c0903a6 3883fff8 84c40008 <54c60001> 4002fff8 41a20070 3c80c08e
---[ end trace cd24dd23c7db9d53 ]---

Machine check in kernel mode.
Caused by (from SRR1=141020): Transfer error ack signal

Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000007

(OCRed screenshot + corrections by hand)

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

--- Comment #1 from Erhard F. ([email protected]) --- Created attachment 287313
--> https://bugzilla.kernel.org/attachment.cgi?id=287313&action=edit
kernel .config (5.6.0-rc1, PowerMac G4 DP)

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

Christophe Leroy ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #2 from Christophe Leroy ([email protected]) --- Created attachment 287321
--> https://bugzilla.kernel.org/attachment.cgi?id=287321&action=edit
powerpc/32s: Fix add_hash_page() for CONFIG_VMAP_STACK

Please test this patch.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

--- Comment #3 from Christophe Leroy ([email protected]) --- Could you also test the patch https://patchwork.ozlabs.org/patch/1236804/
instead of the above patch.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

--- Comment #4 from Erhard F. ([email protected]) --- Created attachment 287329
--> https://bugzilla.kernel.org/attachment.cgi?id=287329&action=edit
dmesg (5.6.0-rc1 + Fix DSI and ISI... patch , PowerMac G4 DP)

First patch was not successful, I got no stacktrace but the boot process still got still stuck.

Second patch was succesful to the point where the G4 was able to boot up to the point of revealing a dmesg full of other problems, e.g. some 'Unrecoverable exceptions' ;)

Please find the dmesg attached.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#5 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

--- Comment #5 from Christophe Leroy ([email protected]) --- Interesting.

NIP:  00000550
NIP:  0000045c
NIP:  00000c38
NIP:  00000370

The kernel seems to badly fault on the first write to the stack. This suggests that there is no page allocated for the stack yet. Which is unexpected because in copy_thread_tls() several writes to the stack are performed so the pages must exist in page tables.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#6 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

--- Comment #6 from Christophe Leroy ([email protected]) --- I found the reason I think. I just realised that the things saved to SPRN_SPRG and in thread struct get overwriten by the DSI taken at stack write.

I'll prepare something to fix that.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#7 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

--- Comment #7 from Christophe Leroy ([email protected]) --- Can you try version v2 of the patch,
https://patchwork.ozlabs.org/patch/1237387/

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#8 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

--- Comment #8 from Erhard F. ([email protected]) --- (In reply to Christophe Leroy from comment #7)

Quoted 2 lines

Can you try version v2 of the patch,
https://patchwork.ozlabs.org/patch/1237387/

I can confirm that v2 works as intended. The G4 completes booting with VMAP_STACK enabled and without producing further stack traces. Thanks!

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#11 lore raw

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=206501

Erhard F. ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #11 from Erhard F. ([email protected]) --- Fix landed in 5.6-rc3, works now as expected. Thanks!

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.