Re: [linus:master] [x86] 3c516f89e1: WARNING:CPU:#PID:#at_call_timer_fn

From: Nathan Chancellor
Date: Wed Aug 02 2023 - 13:42:18 EST


On Wed, Aug 02, 2023 at 10:59:03AM +0800, kernel test robot wrote:
> Hello,
>
> kernel test robot noticed "WARNING:CPU:#PID:#at_call_timer_fn" on:
>
> commit: 3c516f89e17e56b4738f05588e51267e295b5e63 ("x86: Add support for CONFIG_CFI_CLANG")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>
> [test failed on linus/master 12214540ad87ce824a8a791a3f063e6121ec5b66]
> [test failed on linux-next/master d7b3af5a77e8d8da28f435f313e069aea5bcf172]
> [test failed on fix commit 883bbbffa5a4ffd1915f8b42934dab81b7f87226]
>
> in testcase: boot
>
> compiler: clang-16
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
> the config to build this commit has below difference with the one for parent:
>
> --- /pkg/linux/x86_64-randconfig-r034-20230729/clang-16/a4b7a12c5594fe5e6ab2a5aa514a9ae3c0b85573/.config 2023-07-31 12:32:40.547938738 +0800
> +++ /pkg/linux/x86_64-randconfig-r034-20230729/clang-16/3c516f89e17e56b4738f05588e51267e295b5e63/.config 2023-07-31 12:33:11.354874788 +0800
> @@ -610,6 +610,10 @@ CONFIG_HAVE_STACKPROTECTOR=y
> CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
> CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
> CONFIG_LTO_NONE=y
> +CONFIG_ARCH_SUPPORTS_CFI_CLANG=y
> +CONFIG_ARCH_USES_CFI_TRAPS=y
> +CONFIG_CFI_CLANG=y
> +CONFIG_CFI_PERMISSIVE=y
> CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y
> CONFIG_HAVE_CONTEXT_TRACKING_USER=y
> CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=y
>
> we are not sure if that we can see below WARNINGs on this commit is just
> expected.
>
> we also tested on linus/master linux-next/master when this bisection done,
> as well as one fix commit 883bbbffa5, we found the
> dmesg.WARNING:CPU:#PID:#at_call_timer_fn (below (1)) still exists on them,
> while others (below (2)(3)(4)) are gone. not sure if there are some further
> fixes.
>
> a4b7a12c5594fe5e 3c516f89e17e56b4738f05588e5
> ---------------- ---------------------------
> fail:runs %reproduction fail:runs
> | | |
> :6 100% 6:6 dmesg.WARNING:CPU:#PID:#at_call_timer_fn (1)
> :6 100% 6:6 dmesg.WARNING:CPU:#PID:#at_do_basic_setup (2)
> :6 100% 6:6 dmesg.WARNING:CPU:#PID:#at_sha256_finup (3)
> :6 100% 6:6 dmesg.WARNING:CPU:#PID:#at_sha256_update (4)
>
>
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-lkp/202308020936.58787e6c-oliver.sang@xxxxxxxxx
>
>
>
> [ 28.182726][ C1] CFI failure at call_timer_fn+0x161/0x390 (target: dsp_cmx_send+0x0/0x212f; expected type: 0x91b4a83a)

Thanks a lot for the report, this does seem expected. I have sent a
patch:

https://lore.kernel.org/20230802-fix-dsp_cmx_send-cfi-failure-v1-1-2f2e79b0178d@xxxxxxxxxx/

Cheers,
Nathan