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>] [day] [month] [year] [list]
Message-ID: <87wn096t8y.ffs@tglx>
Date:   Mon, 12 Jun 2023 09:21:17 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     mm-commits@...r.kernel.org, mcgrof@...nel.org,
        keescook@...omium.org, chenhuacai@...ngson.cn
Subject: Re: + kthread-unify-kernel_thread-and-user_mode_thread.patch added
 to mm-nonmm-unstable branch

On Sun, Jun 11 2023 at 14:59, Eric W. Biederman wrote:
> Andrew Morton <akpm@...ux-foundation.org> writes:
>
>> The patch titled
>>      Subject: kthread: Unify kernel_thread() and user_mode_thread()
>> has been added to the -mm mm-nonmm-unstable branch.  Its filename is
>>      kthread-unify-kernel_thread-and-user_mode_thread.patch
>
> Andrew.
>
> My fuzzy memory thinks Linus asked for the current split.

Correct. It was in a discussion about a nasty security hole due to a
race in the original code which did _not_ have the distinction.

> Plus this change just obfuscates the code making the most important
> detail the argument to a boolean parameter.  Meaning you have to have
> an interface that has only 3 callers memorized to even begin to make
> sense of it.

Right. Losing the clear distinction of the function names is a horrible
idea.

If at all this should at least keep user_mode_thread() and
kernel_thread() as inline wrappers around a common function.

Just blindly unifying code is a patently bad idea.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ