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: <c6c86d68-dcae-2397-a3f3-aca7bff93d6c@kernel.org>
Date:   Fri, 18 Aug 2023 10:25:26 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Oleg Nesterov <oleg@...hat.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Christian Brauner <brauner@...nel.org>,
        Kees Cook <keescook@...omium.org>, linux-ia64@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kill do_each_thread()

On 18. 08. 23, 10:16, Oleg Nesterov wrote:
> On 08/18, Jiri Slaby wrote:
>>
>> On 17. 08. 23, 18:37, Oleg Nesterov wrote:
>>> Eric has pointed out that we still have 3 users of do_each_thread().
>>> Change them to use for_each_process_thread() and kill this helper.
>>
>> Is there any change in behavior?
> 
> No.
> 
> Well, there is a subtle change, after do_each_thread/while_each_thread
> g == t == &init_task, while after for_each_process_thread() they both
> point to nowhere, but this doesn't matter.
> 
>> Why is for_each_process_thread() better than do_each_thread()?
> 
> Say, for_each_process_thread() is rcu safe, do_each_thread() is not.
> 
> And certainly
> 
> 	for_each_process_thread(p, t) {
> 		do_something(p, t);
> 	}
> 
> looks better than
> 
> 	do_each_thread(p, t) {
> 		do_something(p, t);
> 	} while_each_thread(p, t);
> 
> And again, there are only 3 users of this awkward helper left.
> It should have been killed years ago and in fact I thought it
> had already been killed. It uses while_each_thread() which needs
> some changes.

Sounds like a perfect commit log now... Unless squashed to the patch, it 
will be Linked at least. Thanks for explanation.

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ