Re: Linux 6.2-rc2

From: Linus Torvalds
Date: Mon Jan 02 2023 - 19:26:42 EST


[ Adding Jason in case he has any ideas, and seeing if sh maintainer
emails are still valid, and Arnd in case they aren't ]

On Mon, Jan 2, 2023 at 2:57 PM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
>
> One detail to mention, though, is that sh:rts7751r2dplus_defconfig
> no longer builds with older versions of binutils (2.32). Trying to
> do so results in the following build error.
>
> `.exit.text' referenced in section `__bug_table' of drivers/char/hw_random/core.o:
> defined in discarded section `.exit.text' of drivers/char/hw_random/core.o
>
> To make this more interesting, kernels older than v5.10 do not boot
> (at least not in qemu) when images are built with binutils 2.27 or newer.
> That is why I had used binutils 2.32 in the first place.
>
> I didn't bother tracking this down but switched to binutils 2.39 when
> building v5.10+ images.

I have to admit that I can't really see myself carding deeply about
SH, but somebody else may. I don't think I've gotten an arch/sh pull
in a couple of years.

That said, I also don't see anything wrong with the arch/sh version of
BUG() and friends, so I don't see why this would hit arch/sh and not
somebody else.

I _assume_ it is the BUG_ON() in hwrng_modexit() that triggers this:

static void __exit hwrng_modexit(void)
{
mutex_lock(&rng_mutex);
BUG_ON(current_rng);
kfree(rng_buffer);
...

but again, I don't see what's special about sh here apart from maybe
"not well maintained binutils support".

Does removing the BUG_ON() fix the build?

None of this is at all new, though. Funky.

Linus