mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Borislav Petkov <bp@alien8.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Ingo Molnar <mingo@kernel.org>, Juergen Gross <jgross@suse.com>,
	Jason Baron <jbaron@akamai.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] static_key: Improve uninizialized key warning
Date: Wed, 18 Oct 2017 07:15:14 -0400	[thread overview]
Message-ID: <20171018071514.191d0506@gandalf.local.home> (raw)
In-Reply-To: <20171018103913.21857-1-bp@alien8.de>

On Wed, 18 Oct 2017 12:39:13 +0200
Borislav Petkov <bp@alien8.de> wrote:

> From: Borislav Petkov <bp@suse.de>
> 
> Right now it says:
> 
>   static_key_disable_cpuslocked used before call to jump_label_init
>   ------------[ cut here ]------------
>   WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:161 static_key_disable_cpuslocked+0x68/0x70
>   Modules linked in:
>   CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.0-rc5+ #1
>   Hardware name: SGI.COM C2112-4GP3/X10DRT-P-Series, BIOS 2.0a 05/09/2016
>   task: ffffffff81c0e480 task.stack: ffffffff81c00000
>   RIP: 0010:static_key_disable_cpuslocked+0x68/0x70
>   RSP: 0000:ffffffff81c03ef0 EFLAGS: 00010096 ORIG_RAX: 0000000000000000
>   RAX: 0000000000000041 RBX: ffffffff81c32680 RCX: ffffffff81c5cbf8
>   RDX: 0000000000000001 RSI: 0000000000000092 RDI: 0000000000000002
>   RBP: ffff88807fffd240 R08: 726f666562206465 R09: 0000000000000136
>   R10: 0000000000000000 R11: 696e695f6c656261 R12: ffffffff82158900
>   R13: ffffffff8215f760 R14: 0000000000000001 R15: 0000000000000008
>   FS:  0000000000000000(0000) GS:ffff883f7f400000(0000) knlGS:0000000000000000
>   CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>   CR2: ffff88807ffff000 CR3: 0000000001c09000 CR4: 00000000000606b0
>   Call Trace:
>    static_key_disable+0x16/0x20
>    start_kernel+0x15a/0x45d
>    ? load_ucode_intel_bsp+0x11/0x2d
>    secondary_startup_64+0xa5/0xb0
>   Code: 48 c7 c7 a0 15 cf 81 e9 47 53 4b 00 48 89 df e8 5f fc ff ff eb e8 48 c7 c6 \
> 	c0 97 83 81 48 c7 c7 d0 ff a2 81 31 c0 e8 c5 9d f5 ff <0f> ff eb a7 0f ff eb \
> 	b0 e8 eb a2 4b 00 53 48 89 fb e8 42 0e f0
> 
> but it doesn't tell me which key it is. So dump its address too:
> 
>   static_key_disable_cpuslocked, key ffffffff81c32680 used before call to jump_label_init
> 
> so that it can be found:
> 
>   $ objdump -D vmlinux | grep ffffffff81c32680
>   ffffffff81c32680 <virt_spin_lock_key>:
>   ffffffff81c32680:       01 00                   add    %eax,(%rax)
> 
> The problem is then obvious:
> 
>   smp_prepare_boot_cpu() ->
>   native_smp_prepare_boot_cpu()->
>   native_pv_lock_init()
> 
> which disables that key gets called before jump_label_init().
> 
> Signed-off-by: Borislav Petkov <bp@suse.de>
>


Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

  reply	other threads:[~2017-10-18 11:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 10:39 Borislav Petkov
2017-10-18 11:15 ` Steven Rostedt [this message]
2017-10-18 13:19 ` Ingo Molnar
2017-10-18 13:27   ` Steven Rostedt
2017-10-18 15:24     ` [PATCH v2] " Borislav Petkov
2017-10-18 16:06       ` Steven Rostedt
2017-10-18 16:08         ` Steven Rostedt
2017-10-19  5:33           ` Ingo Molnar
2017-10-19  5:52       ` [tip:locking/core] locking/static_keys: Improve uninitialized " tip-bot for Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171018071514.191d0506@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=hannes@stressinduktion.org \
    --cc=jbaron@akamai.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®