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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250130200112.6ba7316e@pumpkin>
Date: Thu, 30 Jan 2025 20:01:12 +0000
From: David Laight <david.laight.linux@...il.com>
To: Naresh Kamboju <naresh.kamboju@...aro.org>
Cc: linux-phy@...ts.infradead.org, open list <linux-kernel@...r.kernel.org>,
 lkft-triage@...ts.linaro.org, Linux Regressions
 <regressions@...ts.linux.dev>, David Laight <david.laight@...lab.com>,
 Vinod Koul <vkoul@...nel.org>, Adam Ford <aford173@...il.com>, Arnd
 Bergmann <arnd@...db.de>, Dan Carpenter <dan.carpenter@...aro.org>, Anders
 Roxell <anders.roxell@...aro.org>, Adam Ford <aford173@...il.com>, Frieder
 Schrempf <frieder.schrempf@...tron.de>, Vinod Koul <vkoul@...nel.org>
Subject: Re: linus: arm64: error: call to '__compiletime_assert_536'
 declared with attribute error: FIELD_PREP: value too large for the field

On Thu, 30 Jan 2025 15:22:06 +0530
Naresh Kamboju <naresh.kamboju@...aro.org> wrote:

> The arm64 build failed with defconfig with gcc-8 toolchain failed due to
> following build warnings / errors on the mainline linux master branch.
> But the gcc-13 builds pass.
> 
> First seen on v6.13-9485-g72deda0abee6 on Jan. 30, 2025
> Good:  v6.13-9338-g05dbaf8dd8bf on Jan. 29, 2025
> Bad:  v6.13-9485-g72deda0abee6 on Jan. 30, 2025
> 
> arm64:
>   build:
>     * gcc-8-i386_defconfig
> 
> Reported-by: Linux Kernel Functional Testing
> 
> Build log:
> ---
> ake --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=arm64
> CROSS_COMPILE=aarch64-linux-gnu-
> CROSS_COMPILE_COMPAT=arm-linux-gnueabihf- 'CC=sccache
> aarch64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
> In file included from <command-line>:
> In function 'fsl_samsung_hdmi_phy_configure_pll_lock_det.isra.10',
>     inlined from 'fsl_samsung_hdmi_phy_configure' at
> drivers/phy/freescale/phy-fsl-samsung-hdmi.c:469:2:
> include/linux/compiler_types.h:542:38: error: call to
> '__compiletime_assert_536' declared with attribute error: FIELD_PREP:
> value too large for the field
...
> drivers/phy/freescale/phy-fsl-samsung-hdmi.c:344:9: note: in expansion
> of macro 'FIELD_PREP'
>   writeb(FIELD_PREP(REG12_CK_DIV_MASK, div), phy->regs + PHY_REG(12));
>          ^~~~~~~~~~

Yep...
Broken by d567679f2b6a8

Preceded by:
        /* Find int_pllclk speed */
        for (div = 0; div < 4; div++) {
                int_pllclk = pclk / (1 << div);
                if (int_pllclk < (50 * MHZ))
                        break;
        }
with:
#define REG12_CK_DIV_MASK       GENMASK(5, 4)

The compiler has optimised (pessimised?) the code somewhat.
If pclk is very large the loop doesn't 'break' so div == 4.
It then does FIELD_PREP(GENMASK(5, 4), 4) - which is an error.

	David




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ