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: <20170325181344.46xj4k3xsuq4xxjy@pd.tnic>
Date:   Sat, 25 Mar 2017 19:13:44 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        kernel test robot <fengguang.wu@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>, LKP <lkp@...org>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...nel.org>, wfg@...ux.intel.com
Subject: Re: [locking/lockdep] 383776fa75:  INFO: trying to register
 non-static key.

On Mon, Mar 20, 2017 at 12:41:08PM +0100, Peter Zijlstra wrote:
> Subject: lockdep: Fix per-cpu static objects
> From: Peter Zijlstra <peterz@...radead.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@...el.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>

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

-- 
Regards/Gruss,
    Boris.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ