Re: [PATCH v2] ARM: initialize jump labels before setup_machine_fdt()
From: Jason A. Donenfeld
Date: Tue Jun 07 2022 - 11:44:31 EST
Hi Phil,
On Tue, Jun 07, 2022 at 04:35:32PM +0100, Phil Elwell wrote:
> Jason,
>
> On 07/06/2022 16:14, Jason A. Donenfeld wrote:
> > Hey again,
> >
> > On Tue, Jun 07, 2022 at 10:15:27AM +0100, Phil Elwell wrote:
> >> On 07/06/2022 09:43, Jason A. Donenfeld wrote:
> >>> Hi Phil,
> >>>
> >>> On Tue, Jun 7, 2022 at 10:29 AM Phil Elwell <phil@xxxxxxxxxxxxxxx> wrote:
> >>>>
> >>>> This patch is fatal for me in the downstream Raspberry Pi kernel - it locks up
> >>>> on boot even before the earlycon output is available. Hacking jump_label_init to
> >>>> skip the jump_entry for "crng_is_ready" allows it to boot, but is likely to have
> >>>> consequences further down the line.
> >>>
> >>> Also, reading this a few times, I'm not 100% sure I understand what
> >>> you did to hack around this and why that works. Think you could paste
> >>> your hackpatch just out of interest to the discussion (but obviously
> >>> not to be applied)?
> >>
> >> This is the minimal version of my workaround patch that at least allows the
> >> board to boot. Bear in mind that it was written with no previous knowledge of
> >> jump labels and was arrived at by iteratively bisecting the list of jump_labels
> >> until the first dangerous one was found, then later working out that there was
> >> only one.
> >
> > Looks like this patch fails due to CONFIG_STRICT_KERNEL_RWX.
> > Investigating deeper now, but that for starters seems to be the
> > differentiating factor between my prior test rig and one that reproduces
> > the error. I assume your raspi also sets CONFIG_STRICT_KERNEL_RWX.
>
> Yes, it does, as does multi_v7_defconfig.
Oh good. Adjusting my CI now to have that.
Having tickled arch/arm/ a little bit now, this is looking sort of
complicated. So I think I might be leaning toward giving up and just
rolling with <https://git.zx2c4.com/linux-rng/commit/?id=78f79dda>.
Unless of course somebody has some ARM chops and can think of a quick
easy fix.
Jason