Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp930924pxk; Fri, 25 Sep 2020 01:24:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgJaGyOXxNkkGUOQ1ymQVgK3lApA5qpkKW9s4SHXB7rhmlMB0RQB/DgTiIQyf+Y4YTxCWd X-Received: by 2002:a05:6402:6d3:: with SMTP id n19mr39150edy.381.1601022291603; Fri, 25 Sep 2020 01:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601022291; cv=none; d=google.com; s=arc-20160816; b=u8KVJm9m9Kru0co+PGQPEjGnMfyuydVwIvect47pBrma7nOt6Mir/mCYaCLp3uDOhG cAXgwnzoBqxp1ImGnJ267ZXrgRCQ2I4iMU/p7Db4CoSoaFMtG0QkAyK5tJFufY40/Okp TG5yxsBOAoNbhUikFgHXrQpD4zw5YBl/nKX21YWM8X/uZu5hEn0aChIxiCS9nJ68wkE9 EDXyevkM+pEiOLDelouyXIIyeCdknSofEYIvYWi0ppHMmBAvIosGhbScJMz+95m3vgjw 2OOtCoznzXvCjSbEkkDnrs+UeSF/6u3NawyK5ZYBqy9rf8Eu6OZKDuN0GE3dcNtwqNnL qj9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/xceJ+nL8CAqEkUgZuOodpMwpUATKDkMiShfUA4n0is=; b=cvh5t5WJmgwhbaSWZk3nw1ikxlItMwfx2I6CDfOZDIw2lG1tKBOSQi8huYgswRjwlS 9xvfHtmuzX3tLKol1z1tG82gMl6C7TvPcxxI1qqsCy+QxYuk8I8rgHb2cHL4TR4rfeQH JTHlmyEUa6+JOuoCPJ4NKg20psg0v6DCFT8EKDgK+T1PjufjOYD3XBJoGXOZkYGI3wY+ B45P7A+72Hpz506Vcx+D+/8B7+iIe1CIpyrKqYFEeDNDKI4lRBXRFFccNAZjiW/0wTXf BzUkD0jKzA2eFGysGwxVAKP+PSTk/YyqQEHxjGmKNo9Dfu7cNkx/owONtmsiYvU71tir Q6NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IMoy3KPK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gc15si1412910ejb.464.2020.09.25.01.24.28; Fri, 25 Sep 2020 01:24:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IMoy3KPK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727461AbgIYIXb (ORCPT + 99 others); Fri, 25 Sep 2020 04:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727290AbgIYIXa (ORCPT ); Fri, 25 Sep 2020 04:23:30 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90DD8C0613CE for ; Fri, 25 Sep 2020 01:23:30 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id x23so2122497wmi.3 for ; Fri, 25 Sep 2020 01:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=/xceJ+nL8CAqEkUgZuOodpMwpUATKDkMiShfUA4n0is=; b=IMoy3KPK/HSnt/jGJLKFcr63ejUioDK+hkFhAqQP7ySqv+9NovuKLi4xgoyx8pXGfa IPZ061o5pjj1kntDniZySCXHOoeOLddNZxPzj6LRRW15BDvl6eh8gLOTYTwBzf7ziCbN kWw1N1bh2re3A8BkK/fMcq5uEaZfyXj/LUp8c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=/xceJ+nL8CAqEkUgZuOodpMwpUATKDkMiShfUA4n0is=; b=gkjs1I0NlnStP9+Y7+F9ezOkpSdhWxIroQ9hnubhX0DjhGUAk/23yJpSgLgK2E6F2U NilP/RB8M/qVD2TqqBRv/n373cdD2DxdtTQxmeJNBIvfN9tIPRVodPBbZ/HwDs4P1DCp g3Qz6fvQMUr7Z0QngecoKiHyC7tZCF69Yip+MQdmkUQKRb6Ri2A5qx5eq7B2LRXt5KoM 4YclqkghvcsGVY/s5fp2T3HCFzBsqP20N9/8KojIpsA5E5nTCk1o3+VSwy+MNN+QUYzu 1TNsV/Yrh1HJXxrS6MuunIOPBVJEQemzELa/GMAPZylEq55Uqxm2bKJlBoThyn9St3sX JuXA== X-Gm-Message-State: AOAM533idgHSJyGJbUwvrwpashNPinF8uKy0DKSgHXkXoMukPuldDDTm 7JtVt3Bam7fPw46aReUaJ5Ap1A== X-Received: by 2002:a7b:c751:: with SMTP id w17mr1783626wmk.97.1601022209259; Fri, 25 Sep 2020 01:23:29 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id q12sm1949166wrs.48.2020.09.25.01.23.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 01:23:28 -0700 (PDT) Date: Fri, 25 Sep 2020 10:23:26 +0200 From: Daniel Vetter To: Qais Yousef Cc: Rob Clark , dri-devel , Rob Clark , Peter Zijlstra , linux-arm-msm , open list , Tim Murray , Tejun Heo Subject: Re: [PATCH 0/3] drm: commit_work scheduling Message-ID: <20200925082326.GB438822@phenom.ffwll.local> Mail-Followup-To: Qais Yousef , Rob Clark , dri-devel , Rob Clark , Peter Zijlstra , linux-arm-msm , open list , Tim Murray , Tejun Heo References: <20200919193727.2093945-1-robdclark@gmail.com> <20200921092154.GJ438822@phenom.ffwll.local> <20200923152545.GQ438822@phenom.ffwll.local> <20200924084950.GY438822@phenom.ffwll.local> <20200924161356.5kezxwiqwtbi3o2p@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200924161356.5kezxwiqwtbi3o2p@e107158-lin.cambridge.arm.com> X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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