From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507AbdJ0JVf (ORCPT ); Fri, 27 Oct 2017 05:21:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:57109 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752016AbdJ0JVe (ORCPT ); Fri, 27 Oct 2017 05:21:34 -0400 Subject: Re: [PATCH] paravirt/locks: avoid modifying static key before jump_label_init() To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, arnd@arndb.de, peterz@infradead.org, Dou Liyang References: <20171023134948.24886-1-jgross@suse.com> <20171027084312.k2ay4pfh6h3ajatn@gmail.com> From: Juergen Gross Message-ID: <187967ca-a700-b770-90fe-ae8cd294b0d1@suse.com> Date: Fri, 27 Oct 2017 11:21:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171027084312.k2ay4pfh6h3ajatn@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/10/17 10:43, Ingo Molnar wrote: > > * Juergen Gross wrote: > >> Don't try to set the static virt_spin_lock_key to a value before >> jump_label_init() has been called, as this will result in a WARN(). >> >> Solve the problem by introducing a new lock_init() hook called after >> jump_label_init() instead of doing the call inside of >> smp_prepare_boot_cpu(). >> >> Signed-off-by: Juergen Gross >> --- >> Based on kernel/git/tip/tip.git locking/core > > Just a quick ping: what's the conclusion of the discussion, do we want this patch > as-is? Dou Liyang (CC-ed) suggested another alternative he wanted to test. This would be much less intrusive. I can send a patch based on his idea in case he doesn't react in time: he basically suggested moving the call of native_pv_lock_init() to native_smp_prepare_cpus() - this will need another small adaption in Xen, but this is really simple. > Also, it's unclear from the changelog under what circumstances this bug was > observed and what symptoms there are and how severe the bug - can the warning > trigger on vanilla v4.14? No, the patch introducing the bug is in the tip tree only. Juergen