[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3XiScgpL2cGy_e8-zK0U48Z0VMLJWDYKRM+BRUFC0TSg@mail.gmail.com>
Date: Thu, 3 Dec 2020 19:00:30 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Fangrui Song <maskray@...gle.com>
Cc: Arnd Bergmann <arnd@...db.de>,
linux-arch <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Nathan Chancellor <natechancellor@...il.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] firmware_loader: Align .builtin_fw to 8
On Thu, Dec 3, 2020 at 6:05 PM 'Fangrui Song' via Clang Built Linux
<clang-built-linux@...glegroups.com> wrote:
>
> arm64 references the start address of .builtin_fw (__start_builtin_fw)
> with a pair of R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_LDST64_ABS_LO12_NC
> relocations. The compiler is allowed to emit the
> R_AARCH64_LDST64_ABS_LO12_NC relocation because struct builtin_fw in
> include/linux/firmware.h is 8-byte aligned.
>
> The R_AARCH64_LDST64_ABS_LO12_NC relocation requires the address to be a
> multiple of 8, which may not be the case if .builtin_fw is empty.
> Unconditionally align .builtin_fw to fix the linker error.
>
> Fixes: 5658c76 ("firmware: allow firmware files to be built into kernel image")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1204
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Fangrui Song <maskray@...gle.com>
Acked-by: Arnd Bergmann <arnd@...db.de>
I found the same thing in randconfig testing, but you beat me to
sending the fix.
Powered by blists - more mailing lists