* [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2
@ 2023-12-24 0:52 Geoff Levand
2023-12-27 1:27 ` Michael Ellerman
2023-12-31 11:07 ` Michael Ellerman
0 siblings, 2 replies; 5+ messages in thread
From: Geoff Levand @ 2023-12-24 0:52 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman
Commit 8c5fa3b5c4df3d071dab42b04b971df370d99354 (powerpc/64: Make ELFv2 the
default for big-endian builds), merged in Linux-6.5-rc1 changes the calling ABI
in a way that is incompatible with the current code for the PS3's LV1 hypervisor
calls.
This change just adds the line '# CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not set'
to the ps3_defconfig file so that the PPC64_ELF_ABI_V1 is used.
Fixes run time errors like these:
BUG: Kernel NULL pointer dereference at 0x00000000
Faulting instruction address: 0xc000000000047cf0
Oops: Kernel access of bad area, sig: 11 [#1]
Call Trace:
[c0000000023039e0] [c00000000100ebfc] ps3_create_spu+0xc4/0x2b0 (unreliable)
[c000000002303ab0] [c00000000100d4c4] create_spu+0xcc/0x3c4
[c000000002303b40] [c00000000100eae4] ps3_enumerate_spus+0xa4/0xf8
Signed-off-by: Geoff Levand <geoff@infradead.org>
---
arch/powerpc/configs/ps3_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index 2b175ddf82f0..aa8bb0208bcc 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -24,6 +24,7 @@ CONFIG_PS3_VRAM=m
CONFIG_PS3_LPM=m
# CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
CONFIG_KEXEC=y
+# CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not set
CONFIG_PPC_4K_PAGES=y
CONFIG_SCHED_SMT=y
CONFIG_PM=y
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2
2023-12-24 0:52 [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2 Geoff Levand
@ 2023-12-27 1:27 ` Michael Ellerman
2023-12-27 9:44 ` Geoff Levand
2023-12-31 11:07 ` Michael Ellerman
1 sibling, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2023-12-27 1:27 UTC (permalink / raw)
To: Geoff Levand, linuxppc-dev
Geoff Levand <geoff@infradead.org> writes:
> Commit 8c5fa3b5c4df3d071dab42b04b971df370d99354 (powerpc/64: Make ELFv2 the
> default for big-endian builds), merged in Linux-6.5-rc1 changes the calling ABI
> in a way that is incompatible with the current code for the PS3's LV1 hypervisor
> calls.
I'll take this for now.
But medium term we would like to switch to only using ELFv2, so it would
be good if we can work out what the actual problem is.
> This change just adds the line '# CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not set'
> to the ps3_defconfig file so that the PPC64_ELF_ABI_V1 is used.
>
> Fixes run time errors like these:
>
> BUG: Kernel NULL pointer dereference at 0x00000000
> Faulting instruction address: 0xc000000000047cf0
> Oops: Kernel access of bad area, sig: 11 [#1]
>
> Call Trace:
> [c0000000023039e0] [c00000000100ebfc] ps3_create_spu+0xc4/0x2b0 (unreliable)
> [c000000002303ab0] [c00000000100d4c4] create_spu+0xcc/0x3c4
> [c000000002303b40] [c00000000100eae4] ps3_enumerate_spus+0xa4/0xf8
That can't be the first hvcall we've done, there's one in
ps3_setup_arch(). So I guess only some hcalls are failing?
cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2
2023-12-27 1:27 ` Michael Ellerman
@ 2023-12-27 9:44 ` Geoff Levand
2024-01-09 8:55 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Geoff Levand @ 2023-12-27 9:44 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev, Nicholas Piggin
Hi Michael,
On 12/27/23 10:27, Michael Ellerman wrote:
> Geoff Levand <geoff@infradead.org> writes:
>> Commit 8c5fa3b5c4df3d071dab42b04b971df370d99354 (powerpc/64: Make ELFv2 the
>> default for big-endian builds), merged in Linux-6.5-rc1 changes the calling ABI
>> in a way that is incompatible with the current code for the PS3's LV1 hypervisor
>> calls.
>
> I'll take this for now.
>
> But medium term we would like to switch to only using ELFv2, so it would
> be good if we can work out what the actual problem is.
I've been looking into converting the LV1 hypercalls to v2.
>> This change just adds the line '# CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not set'
>> to the ps3_defconfig file so that the PPC64_ELF_ABI_V1 is used.
>>
>> Fixes run time errors like these:
>>
>> BUG: Kernel NULL pointer dereference at 0x00000000
>> Faulting instruction address: 0xc000000000047cf0
>> Oops: Kernel access of bad area, sig: 11 [#1]
>>
>> Call Trace:
>> [c0000000023039e0] [c00000000100ebfc] ps3_create_spu+0xc4/0x2b0 (unreliable)
>> [c000000002303ab0] [c00000000100d4c4] create_spu+0xcc/0x3c4
>> [c000000002303b40] [c00000000100eae4] ps3_enumerate_spus+0xa4/0xf8
>
> That can't be the first hvcall we've done, there's one in
> ps3_setup_arch(). So I guess only some hcalls are failing?
I guess because ps3_create_spu has 7 input parameters and returns
6 parameters, so it hits some difference between V1 and V2 that
the other LV1 calls up to that point have not hit.
-Geoff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2
2023-12-24 0:52 [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2 Geoff Levand
2023-12-27 1:27 ` Michael Ellerman
@ 2023-12-31 11:07 ` Michael Ellerman
1 sibling, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2023-12-31 11:07 UTC (permalink / raw)
To: linuxppc-dev, Geoff Levand
On Sun, 24 Dec 2023 09:52:46 +0900, Geoff Levand wrote:
> Commit 8c5fa3b5c4df3d071dab42b04b971df370d99354 (powerpc/64: Make ELFv2 the
> default for big-endian builds), merged in Linux-6.5-rc1 changes the calling ABI
> in a way that is incompatible with the current code for the PS3's LV1 hypervisor
> calls.
>
> This change just adds the line '# CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not set'
> to the ps3_defconfig file so that the PPC64_ELF_ABI_V1 is used.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2
https://git.kernel.org/powerpc/c/482b718a84f08b6fc84879c3e90cc57dba11c115
cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2
2023-12-27 9:44 ` Geoff Levand
@ 2024-01-09 8:55 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2024-01-09 8:55 UTC (permalink / raw)
To: Geoff Levand; +Cc: linuxppc-dev, Nicholas Piggin
Hi Geoff,
On Wed, 27 Dec 2023, Geoff Levand wrote:
> On 12/27/23 10:27, Michael Ellerman wrote:
>> Geoff Levand <geoff@infradead.org> writes:
>>> Commit 8c5fa3b5c4df3d071dab42b04b971df370d99354 (powerpc/64: Make ELFv2 the
>>> default for big-endian builds), merged in Linux-6.5-rc1 changes the calling ABI
>>> in a way that is incompatible with the current code for the PS3's LV1 hypervisor
>>> calls.
>>
>> I'll take this for now.
>>
>> But medium term we would like to switch to only using ELFv2, so it would
>> be good if we can work out what the actual problem is.
>
> I've been looking into converting the LV1 hypercalls to v2.
Until then, you may want to add "depends on !CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2"
to config PPC_PS3.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-09 9:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-24 0:52 [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2 Geoff Levand
2023-12-27 1:27 ` Michael Ellerman
2023-12-27 9:44 ` Geoff Levand
2024-01-09 8:55 ` Geert Uytterhoeven
2023-12-31 11:07 ` Michael Ellerman
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).