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: <CABCJKucEkjnYf4aEXccoc8Yk=dm07HfqiPBBmw_tFsnbHM5vSA@mail.gmail.com>
Date:   Wed, 17 Nov 2021 08:40:45 -0800
From:   Sami Tolvanen <samitolvanen@...gle.com>
To:     Marc Zyngier <maz@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        kernel-team@...roid.com,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mark Rutland <mark.rutland@....com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] clocksource/drivers/arm_arch_timer: Force inlining of erratum_set_next_event_generic()

On Wed, Nov 17, 2021 at 3:35 AM Marc Zyngier <maz@...nel.org> wrote:
>
> With some specific kernel configuration and Clang, the kernel fails
> to like with something like:
>
> ld.lld: error: undefined symbol: __compiletime_assert_200
> >>> referenced by arch_timer.h:156 (./arch/arm64/include/asm/arch_timer.h:156)
> >>>               clocksource/arm_arch_timer.o:(erratum_set_next_event_generic) in archive drivers/built-in.a
>
> ld.lld: error: undefined symbol: __compiletime_assert_197
> >>> referenced by arch_timer.h:133 (./arch/arm64/include/asm/arch_timer.h:133)
> >>>               clocksource/arm_arch_timer.o:(erratum_set_next_event_generic) in archive drivers/built-in.a
> make: *** [Makefile:1161: vmlinux] Error 1
>
> These are due to the BUILD_BUG() macros contained in the low-level
> accessors (arch_timer_reg_{write,read}_cp15) being emitted, as the
> access type wasn't known at compile time.
>
> Fix this by making erratum_set_next_event_generic() __force_inline,
> resulting in the 'access' parameter to be resolved at compile time,
> similarly to what is already done for set_next_event().
>
> Fixes: 4775bc63f880 ("Add build-time guards for unhandled register accesses")
> Reported-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
> Cc: Sami Tolvanen <samitolvanen@...gle.com>
> Cc: Nick Desaulniers <ndesaulniers@...gle.com>
> ---
>  drivers/clocksource/arm_arch_timer.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Thanks, Marc. I can confirm that this fixes the build issue for me.

Tested-by: Sami Tolvanen <samitolvanen@...gle.com>

Sami

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ