From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2018-10-08 04:10:28
HMIs will crash the kernel due to
BRANCH_LINK_TO_FAR(hmi_exception_realmode)
Calling into the OPD instead of the actual code.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This hack fixes it for me, but it's not great. Nick, any better idea ?
From: Nicholas Piggin <npiggin@gmail.com> Date: 2018-10-08 07:12:54
On Mon, 08 Oct 2018 15:08:31 +1100
Benjamin Herrenschmidt [off-list ref] wrote:
HMIs will crash the kernel due to
BRANCH_LINK_TO_FAR(hmi_exception_realmode)
Calling into the OPD instead of the actual code.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This hack fixes it for me, but it's not great. Nick, any better idea ?
Is it a hack because the ifdef gunk, or because there's something
deeper wrong with using the .sym?
I guess all those handlers that load label address by hand could have
the bug silently creep in. Can we have them use the DOTSYM() macro?
Thanks,
Nick
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2018-10-08 09:55:59
On Mon, 2018-10-08 at 17:04 +1000, Nicholas Piggin wrote:
On Mon, 08 Oct 2018 15:08:31 +1100
Benjamin Herrenschmidt [off-list ref] wrote:
quoted
HMIs will crash the kernel due to
BRANCH_LINK_TO_FAR(hmi_exception_realmode)
Calling into the OPD instead of the actual code.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This hack fixes it for me, but it's not great. Nick, any better idea ?
Is it a hack because the ifdef gunk, or because there's something
deeper wrong with using the .sym?
I'd say ifdef gunk, also the KVM use doesn't need it bcs the kvm entry
isn't an OPD.
I guess all those handlers that load label address by hand could have
the bug silently creep in. Can we have them use the DOTSYM() macro?
The KVM one doesnt have a dotsym does it ?
Also should we load the TOC from the OPD ?
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2018-10-09 10:39:47
Benjamin Herrenschmidt [off-list ref] writes:
On Mon, 2018-10-08 at 17:04 +1000, Nicholas Piggin wrote:
quoted
On Mon, 08 Oct 2018 15:08:31 +1100
Benjamin Herrenschmidt [off-list ref] wrote:
quoted
HMIs will crash the kernel due to
BRANCH_LINK_TO_FAR(hmi_exception_realmode)
Calling into the OPD instead of the actual code.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
This hack fixes it for me, but it's not great. Nick, any better idea ?
Is it a hack because the ifdef gunk, or because there's something
deeper wrong with using the .sym?
I'd say ifdef gunk, also the KVM use doesn't need it bcs the kvm entry
isn't an OPD.
quoted
I guess all those handlers that load label address by hand could have
the bug silently creep in. Can we have them use the DOTSYM() macro?
The KVM one doesnt have a dotsym does it ?
Also should we load the TOC from the OPD ?
Technically yes. But I thought because we build with mcmodel=medium
we'll never actually get multiple TOCs in the kernel itself, so it
doesn't actually matter.
So this seems to work for now:
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2018-10-09 12:31:19
On Tue, 2018-10-09 at 21:37 +1100, Michael Ellerman wrote:
Technically yes. But I thought because we build with mcmodel=medium
we'll never actually get multiple TOCs in the kernel itself, so it
doesn't actually matter.
So this seems to work for now:
Ok, fine. I forgot about DOTSYM. Will do for now.
Cheers,
Ben.
From: Michael Ellerman <hidden> Date: 2018-12-23 14:21:39
On Mon, 2018-10-08 at 04:08:31 UTC, Benjamin Herrenschmidt wrote:
HMIs will crash the kernel due to
BRANCH_LINK_TO_FAR(hmi_exception_realmode)
Calling into the OPD instead of the actual code.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>