From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: kernel test robot <yujie.liu@intel.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
linux-kernel@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org
Subject: Re: [tip:sched/core] [sched] af7f588d8f: WARNING:at_kernel/sched/core.c:#sched_mm_cid_after_execve
Date: Fri, 30 Dec 2022 08:46:25 -0500 [thread overview]
Message-ID: <fb7343a9-dc48-52f6-e899-d0283046a011@efficios.com> (raw)
In-Reply-To: <202212301353.5c959d72-yujie.liu@intel.com>
On 2022-12-30 01:48, kernel test robot wrote:
> Greeting,
>
> FYI, we noticed WARNING:at_kernel/sched/core.c:#sched_mm_cid_after_execve due to commit (built with gcc-11):
>
[...]
> [ 17.747520][ T48] bprm_execve (exec.c:?)
> [ 17.748358][ T48] ? call_usermodehelper_exec_work (umh.c:?)
> [ 17.749462][ T48] kernel_execve (??:?)
> [ 17.750332][ T48] call_usermodehelper_exec_async (umh.c:?)
> [ 17.751363][ T48] ? call_usermodehelper_exec_work (umh.c:?)
> [ 17.752163][ T48] ret_from_fork (??:?)
I suspect this check:
void sched_mm_cid_after_execve(struct task_struct *t)
{
struct mm_struct *mm = t->mm;
unsigned long flags;
WARN_ON_ONCE((t->flags & PF_KTHREAD) || !t->mm);
is too strict. AFAIU the usermodehelper thread is a kernel thread, which
happens to have a non-NULL mm after execve. We want to allow
usermodehelper threads to use rseq, so I think the appropriate approach
here would be to just warn if !t->mm:
WARN_ON_ONCE(!t->mm);
We should probably apply a similar change to the warning in
sched_mm_cid_fork() as well.
Thoughts ?
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2022-12-30 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 6:48 [tip:sched/core] [sched] af7f588d8f: WARNING:at_kernel/sched/core.c:#sched_mm_cid_after_execve kernel test robot
2022-12-30 13:46 ` Mathieu Desnoyers [this message]
2023-01-02 14:04 ` Borislav Petkov
2023-01-02 15:53 ` [tip: sched/core] sched/rseq: Fix concurrency ID handling of usermodehelper kthreads tip-bot2 for Mathieu Desnoyers
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=fb7343a9-dc48-52f6-e899-d0283046a011@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
--cc=yujie.liu@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.