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: <20250710062528.T-Obm39T@linutronix.de>
Date: Thu, 10 Jul 2025 08:25:28 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: "Chen, Yu C" <yu.c.chen@...el.com>
Cc: kernel test robot <oliver.sang@...el.com>,
	Ingo Molnar <mingo@...nel.org>, oe-lkp@...ts.linux.dev,
	lkp@...el.com, linux-kernel@...r.kernel.org, x86@...nel.org,
	Peter Zijlstra <peterz@...radead.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Juri Lelli <juri.lelli@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Mel Gorman <mgorman@...e.de>,
	Shrikanth Hegde <sshegde@...ux.ibm.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Valentin Schneider <vschneid@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	aubrey.li@...ux.intel.com
Subject: Re: [tip:sched/core] [sched/smp] 06ddd17521:
 BUG:using_smp_processor_id()in_preemptible

On 2025-07-10 11:18:29 [+0800], Chen, Yu C wrote:
> > [ 25.235357][ T1] dump_stack_lvl (lib/dump_stack.c:123 (discriminator 1))
> > [ 25.235357][ T1] check_preemption_disabled (arch/x86/include/asm/preempt.h:85 lib/smp_processor_id.c:53)
> > [ 25.235357][ T1] __kvm_is_vmx_supported (arch/x86/include/asm/cpuid/api.h:74 arch/x86/include/asm/cpuid/api.h:113 arch/x86/kvm/vmx/vmx.c:2789)
> > [ 25.235357][ T1] vmx_init (arch/x86/kvm/vmx/vmx.c:2808 arch/x86/kvm/vmx/vmx.c:8653)
> > [ 25.235357][ T1] vt_init (arch/x86/kvm/vmx/main.c:1072)
…
> I took a glance at the warning, before this patch,
> is_percpu_thread() always return true when CONFIG_SMP is not set.
> After this patch,
> is_percpu_thread() checks the current task's CPU affinity.
> So debug_smp_processor_id() -> check_preemption_disabled() ->
> is_percpu_thread() might not always return true anymore, which caused
> the warning.
> 
> Actually the issue is in __kvm_is_vmx_supported(), should
> we use something like this below:

No, it should not. If you look closely you will see that the call chains
is
   vmx_init() -> kvm_is_vmx_supported() -> __kvm_is_vmx_supported()

There is a migrate_disable() around __kvm_is_vmx_supported(). So why
does this warning trigger then?

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ