lkml.org 
[lkml]   [2021]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v10 2/5] sched: CGroup tagging interface for core scheduling
On Thu, Feb 4, 2021 at 6:02 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Fri, Jan 22, 2021 at 08:17:01PM -0500, Joel Fernandes (Google) wrote:
>
> > +#ifdef CONFIG_SCHED_DEBUG
> > + /* Read the group cookie. */
> > + {
> > + .name = "core_group_cookie",
> > + .flags = CFTYPE_NOT_ON_ROOT,
> > + .read_u64 = cpu_core_group_cookie_read_u64,
> > + },
> > +#endif
>
> > +#ifdef CONFIG_SCHED_DEBUG
> > + /* Read the group cookie. */
> > + {
> > + .name = "core_group_cookie",
> > + .flags = CFTYPE_NOT_ON_ROOT,
> > + .read_u64 = cpu_core_group_cookie_read_u64,
> > + },
> > +#endif
>
> AFAICT this leaks kernel pointers. IIRC that was a bad thing.

For that matter, we're also exposing the cookie pointer in
/proc/$pid/sched. Currently these are used by the selftests to
validate that two tasks are/aren't sharing. If this poses a risk, we
can rework to avoid exposing the actual pointers.

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