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] [day] [month] [year] [list]
Message-ID: <4f4f5a8c-7488-5ea6-0f1b-6ac95c259b4a@redhat.com>
Date:   Mon, 27 Sep 2021 14:17:47 -0400
From:   Waiman Long <llong@...hat.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     Zefan Li <lizefan.x@...edance.com>,
        Johannes Weiner <hannes@...xchg.org>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cgroup/debug: Fix lockdep splat with "%pK" format
 specifier

On 9/27/21 12:43 PM, Tejun Heo wrote:
> Hello,
>
> On Sun, Sep 26, 2021 at 10:58:07PM -0400, Waiman Long wrote:
>> The lockdep splat is caused by the fact that the debug controller use the
>> "%pK" format specifier to print out address of cset's with css_set_lock
>> held. Under some circumstances, the use of "%pK" format specifier may
>> acquire the selinux_ss.policy_rwlock.
>>
>> To avoid this possible deadlock scenario, we have to abandon the use of
>> the "%pK" format specifier and just use "%p" to always hash the cset
>> addresses. The actual cset addresses aren't that important as long as
>> they are unique for matching purpose.
> Isn't the right thing to do here making the selinux rwlock an irqsafe one?
> It's a bit crazy to have printf specifier to have restrictive locking
> requirements.

I just realize that upstream had get rid of the policy_rwlock since 
v5.10 and use RCU instead. So this patch isn't applicable then.

My original thought was that policy_rwlock were referenced over 60 times 
in security/selinux/ss/services.c whereas we only use a few %pK format 
specifier in the debug controller. Anyway, it is moot now.

Sorry for the noise.

Cheers,
Longman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ