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]
Date:   Thu, 4 Apr 2019 11:36:04 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Bart Van Assche <bvanassche@....org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-kernel@...r.kernel.org, Will Deacon <will.deacon@....com>,
        Waiman Long <longman@...hat.com>, shenghui <shhuiw@...mail.com>
Subject: Re: [PATCH v2] locking/lockdep: Zap lock classes even with lock
 debugging disabled

On Wed, Apr 03, 2019 at 04:35:52PM -0700, Bart Van Assche wrote:
> Commit a0b0fd53e1e6 ("locking/lockdep: Free lock classes that are no longer
> in use") changed the behavior of lockdep_free_key_range() from
> unconditionally zapping lock classes into only zapping lock classes if
> debug_lock == true. Not zapping lock classes if debug_lock == false leaves
> dangling pointers in several lockdep datastructures, e.g. lock_class::name
> in the all_lock_classes list. The shell command "cat /proc/lockdep" causes
> the kernel to iterate the all_lock_classes list. Hence the "unable to
> handle kernel paging request" issue that Shenghui encountered by running
> cat /proc/lockdep. Since the new behavior can cause cat /proc/lockdep to
> crash, restore the pre-v5.1 behavior.
> 
> This patch avoids that cat /proc/lockdep triggers the following crash
> with debug_lock == false:
> 
> BUG: unable to handle kernel paging request at fffffbfff40ca448
> PGD 13bfde067 P4D 13bfde067 PUD 13bf7a067 PMD 1167d3067 PTE 0
> Oops: 0000 [#1] PREEMPT SMP KASAN
> CPU: 4 PID: 4529 Comm: cat Tainted: G    B   W  O      5.1.0-rc1-dbg+ #4
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
> RIP: 0010:__asan_load1+0x28/0x50
> Call Trace:
>  string+0xac/0x180
>  vsnprintf+0x23e/0x820
>  seq_vprintf+0x82/0xc0
>  seq_printf+0x92/0xb0
>  print_name+0x34/0xb0
>  l_show+0x184/0x200
>  seq_read+0x59e/0x6c0
>  proc_reg_read+0x11f/0x170
>  __vfs_read+0x4d/0x90
>  vfs_read+0xc5/0x1f0
>  ksys_read+0xab/0x130
>  __x64_sys_read+0x43/0x50
>  do_syscall_64+0x71/0x210
>  entry_SYSCALL_64_after_hwframe+0x49/0xbe
> 
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Will Deacon <will.deacon@....com>
> Cc: Waiman Long <longman@...hat.com>
> Cc: shenghui <shhuiw@...mail.com>
> Reported-by: shenghui <shhuiw@...mail.com>
> Fixes: a0b0fd53e1e6 ("locking/lockdep: Free lock classes that are no longer in use") # v5.1-rc1.
> Signed-off-by: Bart Van Assche <bvanassche@....org>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ