[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200925082326.GB438822@phenom.ffwll.local>
Date: Fri, 25 Sep 2020 10:23:26 +0200
From: Daniel Vetter <daniel@...ll.ch>
To: Qais Yousef <qais.yousef@....com>
Cc: Rob Clark <robdclark@...il.com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Rob Clark <robdclark@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
Tim Murray <timmurray@...gle.com>, Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 0/3] drm: commit_work scheduling
On Thu, Sep 24, 2020 at 05:15:00PM +0100, Qais Yousef wrote:
> On 09/24/20 10:49, Daniel Vetter wrote:
>
> [...]
>
> > > > I also thought kernel threads can be distinguished from others, so
> > > > userspace shouldn't be able to sneak in and get elevated by accident.
> > >
> > > I guess maybe you could look at the parent? I still would like to
> > > think that we could come up with something a bit less shaking than
> > > matching thread names by regexp..
> >
> > ps marks up kernel threads with [], so there is a way. But I haven't
> > looked at what it is exactly that tells kernel threads apart from others.
> >
> > But aside from that sounds like "match right kernel thread with regex and
> > set its scheduler class" is how this is currently done, if I'm
> > understanding what Tejun and Peter said correctly.
> >
> > Not pretty, but also *shrug* ...
>
> Isn't there a real danger that a sneaky application names its threads to match
> this regex and get a free promotion to RT without having the capability to do
> so?
A sneaky application can't fake being a kernel thread, at least that's
what I thought. You need to check for that _and_ that the name matches.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Powered by blists - more mailing lists