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: <e68b4c88-a278-90d0-0ce0-9d4e161366cc@I-love.SAKURA.ne.jp>
Date:   Sat, 14 Jan 2023 18:53:15 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2 (repost)] locking/lockdep: add
 debug_show_all_lock_holders()

On 2023/01/14 18:36, Ingo Molnar wrote:
> Yeah, so note how you introduce a function with a parameter:
> 
> 	void __debug_show_all_locks(bool show_stack)
> 
> ... only to then *hide* the new parameter via helper functions:
> 
> 	static inline void debug_show_all_locks(void)
> 	{
> 		__debug_show_all_locks(false);
> 	}
> 
> 	static inline void debug_show_all_lock_holders(void)
> 	{
> 		__debug_show_all_locks(true);
> 	}
> 
> ... which is a *strong* hint by our universe that the new parameter was 
> probably a bad idea to begin with.
> 
> Given how small debug_show_all_locks() is to begin with, I'd suggest simply 
> duplicating the loop into debug_show_all_lock_holders() or so.

Initial version at https://lkml.kernel.org/r/82af40cc-bf85-2b53-b8f9-dfc12e66a781@I-love.SAKURA.ne.jp
was duplicating the loop.

Waiman Long suggested me not to duplicate the loop at
https://lkml.kernel.org/r/3e027453-fda4-3891-3ec3-5623f1525e56@redhat.com .

Please talk with Waiman. I'm fine with either approach.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ