[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87le3exfx2.ffs@tglx>
Date: Sun, 09 Jun 2024 18:02:49 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Sam Sun <samsun1006219@...il.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, syzkaller-bugs@...glegroups.com, peterz@...radead.org,
jpoimboe@...nel.org, jbaron@...mai.com, ardb@...nel.org, mingo@...hat.com,
Borislav Petkov <bp@...en8.de>, dave.hansen@...ux.intel.com,
hpa@...or.com, xrivendell7@...il.com, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Tejun Heo <tj@...nel.org>
Subject: Re: [Linux kernel bug] WARNING in static_key_slow_inc_cpuslocked
On Sun, Jun 09 2024 at 10:25, Steven Rostedt wrote:
> On Sun, 09 Jun 2024 16:06:05 +0200
> Thomas Gleixner <tglx@...utronix.de> wrote:
>> CPU 0 CPU 1
>>
>> kernfs_fop_write_iter() kernfs_fop_write_iter()
>> set_attr_rdpmc() set_attr_rdpmc()
>> arch_jump_label_transform_queue() arch_jump_label_transform_queue()
>> mutex_lock(text_mutex) mutex_lock(text_mutex)
>> __jump_label_patch()
>> text_poke_queue()
>> mutex_unlokc(text_mutex)
>> __jump_label_patch()
>>
>> CPU 1 sees the original text and not the expected because CPU 0 did not
>> yet invoke arch_jump_label_transform_apply().
>>
>> So clearly set_attr_rdpmc() lacks serialization, no?
>>
> Hmm, but should jump labels fail when that happens? Or should it catch
> it, and not cause a BUG?
Well the bug is there to detect inconsistency and that clearly works :)
But I clearly can't read, because the jump label operations are
serialized via jump_label_mutex. Hrm...
Powered by blists - more mailing lists