Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1609202

Re: [locking/lockdep] 383776fa75: INFO: trying to register non-static key.

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [locking/lockdep] 383776fa75: INFO: trying to register non-static key.
Date 2017-03-25 19:20 +0100
Message-ID <toYs9-4Ag-3@gated-at.bofh.it> (permalink)
References <tlI0y-25v-23@gated-at.bofh.it> <tm0A9-7ex-9@gated-at.bofh.it> <tm1mx-7VB-11@gated-at.bofh.it> <tn3Z0-48j-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Mar 20, 2017 at 12:41:08PM +0100, Peter Zijlstra wrote:
> Subject: lockdep: Fix per-cpu static objects
> From: Peter Zijlstra <peterz@infradead.org>
> Date: Mon Mar 20 12:26:55 CET 2017
> 
> Since commit:
> 
>   383776fa7527 ("locking/lockdep: Handle statically initialized PER_CPU locks properly")
> 
> we try to collapse per-cpu locks into a single class by giving them
> all the same key. For this key we choose the canonical address of the
> per-cpu object, which would be the offset into the per-cpu area.
> 
> This has two problems:
> 
>  - there is a case where we run !0 lock->key through static_obj() and
>    expect this to pass; it doesn't for canonical pointers.
> 
>  - 0 is a valid canonical address.
> 
> Cure both issues by redefining the canonical address as the address of
> the per-cpu variable on the boot CPU.
> 
> Since I didn't want to rely on CPU0 being the boot-cpu, or even
> existing at all, track the boot CPU in a variable.
> 
> Fixes: 383776fa7527 ("locking/lockdep: Handle statically initialized PER_CPU locks properly")
> Reported-by: kernel test robot <fengguang.wu@intel.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Tested-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [locking/lockdep] 383776fa75:  INFO: trying to register  non-static key. Peter Zijlstra <peterz@infradead.org> - 2017-03-17 15:00 +0100
  Re: [locking/lockdep] 383776fa75:  INFO: trying to register  non-static key. Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-03-17 15:50 +0100
    Re: [locking/lockdep] 383776fa75:  INFO: trying to register  non-static key. Peter Zijlstra <peterz@infradead.org> - 2017-03-20 12:50 +0100
      Re: [locking/lockdep] 383776fa75:  INFO: trying to register  non-static key. Borislav Petkov <bp@alien8.de> - 2017-03-25 19:20 +0100
      [tip:locking/core] lockdep: Fix per-cpu static objects tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2017-03-26 11:50 +0200
      [tip:locking/core] lockdep: Fix per-cpu static objects tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2017-03-26 15:30 +0200

csiph-web