lkml.org 
[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 2/5] sched: CGroup tagging interface for core scheduling
On Fri, Jan 22, 2021 at 08:17:01PM -0500, Joel Fernandes (Google) wrote:
> +int sched_core_share_tasks(struct task_struct *t1, struct task_struct *t2)
> +{
> + static DEFINE_MUTEX(sched_core_tasks_mutex);
> + unsigned long cookie;
> + int ret = -ENOMEM;
> +
> + mutex_lock(&sched_core_tasks_mutex);
> +
> + if (!t2) {
> + if (t1->core_task_cookie) {
> + sched_core_put_task_cookie(t1->core_task_cookie);
> + sched_core_update_task_cookie(t1, 0);
> + sched_core_put();
> + }

So this seems to be the bit that implements _CLEAR. ISTR there were
security implications / considerations here.

When the machine is vulnerable to L1TF/MDS and the like, clearing the
cookie would gain privilege and should thus be subject to some checks,
but I can'd find anything.

At the very least that deserves a comment I'm thinking.

\
 
 \ /
  Last update: 2021-02-05 13:06    [W:0.231 / U:4.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site