[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <663c45ee-e946-961a-d850-fc75d11a357d@oracle.com>
Date: Wed, 21 Apr 2021 10:31:06 -0400
From: Chris Hyser <chris.hyser@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>, joel@...lfernandes.org,
joshdon@...gle.com, mingo@...nel.org, vincent.guittot@...aro.org,
valentin.schneider@....com, mgorman@...e.de
Cc: linux-kernel@...r.kernel.org, tj@...nel.org, tglx@...utronix.de
Subject: Re: [PATCH 4/9] sched: Default core-sched policy
On 4/21/21 9:33 AM, Peter Zijlstra wrote:
> On Thu, Apr 01, 2021 at 03:10:16PM +0200, Peter Zijlstra wrote:
>> Implement default core scheduling policy.
>>
>> - fork() / clone(): inherit cookie from parent
>> - exec(): if cookie then new cookie
>>
>> Did that exec() thing want to change cookie on suid instead, just like
>> perf_event_exit_task() ?
>
> Talk to me about that exec() thing; I still think it's weird. Did we
> just want to drop cookie on suid instead?
>
The choices for fork and exec were for security. A forked process or thread gets a copy because the code is "trusted",
but execed code is not by default (that was the policy choice) and so it gets a new cookie. Dropping the cookie on suid
was not considered (an oversight on my part), but seems like a good idea, but I think, also orthogonal.
The biggest issue with a new cookie on exec is that makes it difficult to construct a large process tree of all the same
cookies like the cgroup interface does. If we remove the cgroup interface, we either need to remove the "new cookie on
exec" (inherit cookie from parent from fork) or provide a global/per-task policy for controlling that. Probably easiest
to just drop it.
-chrish
Powered by blists - more mailing lists