[syzbot] [kernel?] WARNING in do_clear_cpu_cap

1 view
Skip to first unread message

syzbot

unread,
1:13 PM (3 hours ago) 1:13 PM
to ak...@linux-foundation.org, b...@alien8.de, dave....@linux.intel.com, h...@zytor.com, linux-...@vger.kernel.org, mi...@redhat.com, senoz...@chromium.org, syzkall...@googlegroups.com, tg...@kernel.org, tg...@linutronix.de, x...@kernel.org
Hello,

syzbot found the following issue on:

HEAD commit: 11028ab62899 Merge tag 'probes-fixes-v7.2-rc5' of git://gi..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=14e3d9b9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb17729fb04b1e3a
dashboard link: https://syzkaller.appspot.com/bug?extid=6cdbd5e494b199d820c3
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13b271b9580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=118a97b1580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/bc967be819a3/disk-11028ab6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6e9f003c9cc8/vmlinux-11028ab6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5c292926486f/bzImage-11028ab6.xz

The issue was bisected to:

commit 684826f8271ad97580b138b9ffd462005e470b99
Author: Sergey Senozhatsky <senoz...@chromium.org>
Date: Wed Sep 11 02:54:56 2024 +0000

zram: free secondary algorithms names

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=175175b9580000
final oops: https://syzkaller.appspot.com/x/report.txt?x=14d175b9580000
console output: https://syzkaller.appspot.com/x/log.txt?x=10d175b9580000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6cdbd5...@syzkaller.appspotmail.com
Fixes: 684826f8271a ("zram: free secondary algorithms names")

Disabled fast string operations
------------[ cut here ]------------
alternatives_patched
WARNING: arch/x86/kernel/cpu/cpuid-deps.c:127 at do_clear_cpu_cap+0x416/0x450 arch/x86/kernel/cpu/cpuid-deps.c:127, CPU#1: swapper/1/0
Modules linked in:
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G S syzkaller #0 PREEMPT_{RT,(full)}
Tainted: [S]=CPU_OUT_OF_SPEC
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:do_clear_cpu_cap+0x416/0x450 arch/x86/kernel/cpu/cpuid-deps.c:127
Code: 00 00 00 75 2d 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d e9 4c 42 d8 09 cc e8 d6 8c 56 00 90 0f 0b 90 eb 94 e8 cb 8c 56 00 90 <0f> 0b 90 e9 06 fd ff ff e8 dd 75 d4 09 48 c7 c1 58 83 af 8f 80 e1
RSP: 0000:ffffc900001d7ba0 EFLAGS: 00010093
RAX: ffffffff816f4e25 RBX: dffffc0000000001 RCX: ffff88801cec8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc900001d7cd8 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed10170e4903 R12: 0000000000000070
R13: dffffc0000000000 R14: 0000000000000001 R15: 0000000000000070
FS: 0000000000000000(0000) GS:ffff888125d41000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000000dfb0000 CR4: 00000000003506b0
Call Trace:
<TASK>
early_init_intel+0xb3d/0xea0 arch/x86/kernel/cpu/intel.c:309
init_intel+0x28/0x780 arch/x86/kernel/cpu/intel.c:528
identify_cpu+0xc7a/0x3660 arch/x86/kernel/cpu/common.c:2053
identify_secondary_cpu+0xaa/0x160 arch/x86/kernel/cpu/common.c:2177
ap_starting+0x9c/0x150 arch/x86/kernel/smpboot.c:190
start_secondary+0x66/0x110 arch/x86/kernel/smpboot.c:280
common_startup_64+0x13e/0x157
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

Andrew Morton

unread,
1:35 PM (2 hours ago) 1:35 PM
to syzbot, b...@alien8.de, dave....@linux.intel.com, h...@zytor.com, linux-...@vger.kernel.org, mi...@redhat.com, senoz...@chromium.org, syzkall...@googlegroups.com, tg...@kernel.org, tg...@linutronix.de, x...@kernel.org
On Fri, 31 Jul 2026 10:13:34 -0700 syzbot <syzbot+6cdbd5...@syzkaller.appspotmail.com> wrote:

> syzbot found the following issue on:
>
> HEAD commit: 11028ab62899 Merge tag 'probes-fixes-v7.2-rc5' of git://gi..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=14e3d9b9580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=cb17729fb04b1e3a
> dashboard link: https://syzkaller.appspot.com/bug?extid=6cdbd5e494b199d820c3
> compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13b271b9580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=118a97b1580000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/bc967be819a3/disk-11028ab6.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/6e9f003c9cc8/vmlinux-11028ab6.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/5c292926486f/bzImage-11028ab6.xz
>
> The issue was bisected to:
>
> commit 684826f8271ad97580b138b9ffd462005e470b99
> Author: Sergey Senozhatsky <senoz...@chromium.org>
> Date: Wed Sep 11 02:54:56 2024 +0000
>
> zram: free secondary algorithms names

Thanks. I don't see how zram could have caused this.

fwiw (which might not be a lot), Gemini concluded


Core Issue & Summary

Root Cause: CPU capability clearing (clear_cpu_cap /
setup_clear_cpu_cap) was executed during late CPU feature detection
on a secondary core (identify_secondary_cpu()) after kernel
alternatives patching was finalized (alternatives_patched == true).

Fix Location:

The bug needs to be addressed in arch/x86/kernel/cpu/intel.c
(specifically around early_init_intel()) by ensuring that capability
overrides/clears are done prior to alternative patching or handled
via per-CPU feature suppression mechanisms that don't invoke full
feature mask clearing post-patching.

https://gemini.google.com/share/0cdd1930799f?skid=006fb41e-8e42-4330-9f52-62c4cf089ce0

Borislav Petkov

unread,
2:22 PM (1 hour ago) 2:22 PM
to Andrew Morton, syzbot, dave....@linux.intel.com, h...@zytor.com, linux-...@vger.kernel.org, mi...@redhat.com, senoz...@chromium.org, syzkall...@googlegroups.com, tg...@kernel.org, tg...@linutronix.de, x...@kernel.org
if (c->x86_vfm >= INTEL_PENTIUM_M_DOTHAN) {
rdmsrq(MSR_IA32_MISC_ENABLE, misc_enable);
if (misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING) {
/* X86_FEATURE_ERMS is set based on CPUID */
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
} else {
pr_info("Disabled fast string operations\n");
<--- setup_clear_cpu_cap(X86_FEATURE_REP_GOOD);
setup_clear_cpu_cap(X86_FEATURE_ERMS);
}
}


So the guest tried to read MSR_IA32_MISC_ENABLE and the google HV did whatever
it wanted to intercept or not that MSR but the
MSR_IA32_MISC_ENABLE_FAST_STRING bit was clear so we complain because we clear
our flags too late here.

Nothing to see here...

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette
Reply all
Reply to author
Forward
0 new messages