[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fb7343a9-dc48-52f6-e899-d0283046a011@efficios.com>
Date: Fri, 30 Dec 2022 08:46:25 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: kernel test robot <yujie.liu@...el.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: oe-lkp@...ts.linux.dev, lkp@...el.com,
linux-kernel@...r.kernel.org, x86@...nel.org, linux-mm@...ck.org
Subject: Re: [tip:sched/core] [sched] af7f588d8f:
WARNING:at_kernel/sched/core.c:#sched_mm_cid_after_execve
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
Powered by blists - more mailing lists