From: Dave Hansen <dave.hansen@intel.com>
To: Oleg Nesterov <oleg@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>,
Mark Brown <broonie@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/process: fix the misleading comment about PF_USER_WORKERs in copy_thread()
Date: Wed, 20 Aug 2025 14:42:08 -0700 [thread overview]
Message-ID: <7996ef64-59af-4146-be76-95a8aeccfc7a@intel.com> (raw)
In-Reply-To: <20250820164651.GA18799@redhat.com>
On 8/20/25 09:46, Oleg Nesterov wrote:
> if (unlikely(args->fn)) {
> /*
> - * A user space thread, but it doesn't return to
> - * ret_after_fork().
> + * A non-PF_KTHREAD thread, but it doesn't return from
> + * ret_from_fork().
> + *
> + * Either a PF_USER_WORKER kernel thread, in this case
> + * arg->fn() must not return.
> + * Or a user space task created by user_mode_thread(), in
> + * this case arg->fn() can only return after a successful
> + * kernel_execve().
> *
> * In order to indicate that to tools like gdb,
> * we reset the stack and instruction pointers.
> *
> * It does the same kernel frame setup to return to a kernel
> - * function that a kernel thread does.
> + * function that a PF_KTHREAD thread does.
> */
I'm not sure that comment clarifies things, especially the new
paragraph. This does _not_ seem like the place to me to be explaining
what the conventions are around arg->fn(). It would be better to put it
near the definition or 'kernel_clone_args' or the place the function
gets called, but not here.
next prev parent reply other threads:[~2025-08-20 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 16:46 Oleg Nesterov
2025-08-20 21:42 ` Dave Hansen [this message]
2025-08-21 9:50 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7996ef64-59af-4146-be76-95a8aeccfc7a@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=broonie@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®