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: <87ild0w5qs.fsf@email.froward.int.ebiederm.org>
Date:   Wed, 10 May 2023 10:44:43 -0500
From:   "Eric W. Biederman" <ebiederm@...ssion.com>
To:     Huacai Chen <chenhuacai@...ngson.cn>
Cc:     Luis Chamberlain <mcgrof@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Kees Cook <keescook@...omium.org>, chenhuacai@...nel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] kthread: Unify kernel_thread() and user_mode_thread()

Huacai Chen <chenhuacai@...ngson.cn> writes:

> Commit 343f4c49f2438d8 ("kthread: Don't allocate kthread_struct for init
> and umh") introduces a new function user_mode_thread() for init and umh.
> But the name is a bit confusing because init and umh are indeed kernel
> threads at creation time, the real difference is "they will become user
> processes".

No they are not "kernel threads" at creation time.  At creation time
init and umh are threads running in the kernel.

It is a very important distinction and you are loosing it.

Because they don't have a kthread_struct such tasks in the kernel
are not allowed to depend on anything that is ``kthread''.

Having this a separate function highlights the distinction.
Highlighting should hopefully cause people to ask why there is a
distinction, and what is going on.

> So let's unify the kernel_thread() and user_mode_thread() to
> kernel_thread() again, and add a new 'user' parameter for init and
> umh

Now that is confusing.

Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ