lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a1GhoqbcdLHosHNe0QNX3oA5XmE2R-MXfD+eOsJjY5-=Q@mail.gmail.com>
Date:   Thu, 23 Dec 2021 22:48:25 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Sekhar Nori <nsekhar@...com>, Bartosz Golaszewski <brgl@...ev.pl>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Issue with booting multi_v5_defconfig kernel with GCC 11

On Thu, Dec 23, 2021 at 6:58 PM Nathan Chancellor <nathan@...nel.org> wrote:

> da850_evm_config_emac: soc_info: c0dd7288
> da850_evm_config_emac: emac_pdata: 00000000
>
> I don't really see how that is possible, as I can see this member
> assigned in the davinci_soc_info_* variables but maybe there is some
> race during initialization or problem because the QEMU machine is not
> one of these machines?

Right, the problem is that da850_evm_config_emac() gets called
unconditionally for all machines, but davinci_soc_info only gets
populated on davinci machines.

> I think that the GCC commit just makes it so that the rmii_en member is
> read earlier, rather than at the point of use.
>
> Regardless, something like this resolves this panic for me but I have no
> idea if it is proper or not, hence just the report :)
>
> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
> index 428012687a80..7f7f6bae21c2 100644
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
> @@ -1101,11 +1101,13 @@ static int __init da850_evm_config_emac(void)
>         int ret;
>         u32 val;
>         struct davinci_soc_info *soc_info = &davinci_soc_info;
> -       u8 rmii_en = soc_info->emac_pdata->rmii_en;
> +       u8 rmii_en;
>
>         if (!machine_is_davinci_da850_evm())
>                 return 0;
>
> +       rmii_en = soc_info->emac_pdata->rmii_en;
> +
>         cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);
>
>         val = __raw_readl(cfg_chip3_base);
>

This is the correct fix.

Fixes: bae105879f2f ("davinci: DA850/OMAP-L138 EVM: implement
autodetect of RMII PHY")
Reviewed-by: Arnd Bergmann <arnd@...db.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ